You actually don't need extensions to share data between your own apps. You can use app groups for this.
In both MyApp1 and MyApp2 goto the target, then capabilities, then click on the app groups capability. Let Xcode help you get app group entitlement setup in your apple developer account.
Now you can use that app group ID to share data between you apps. For instance:
In MyApp1 put this in your appDelegate:
NSUserDefaults *myDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.mycompany.myappgroup"];
[myDefaults setObject:@"foo" forKey:@"bar"];
And in MyApp2 appDelegate put this:
NSUserDefaults *myDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.mycompany.myappgroup"];
NSLog(@"Show me something: %@",[myDefaults objectForKey:@"bar"]);
Make sure that the string you used for the suite name is the exact same as what is under the app group capabilities section in Xcode and also the string in your entitlements plist that was automatically added to your project.
You can also share files using the same idea:
NSURL *groupURL = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:
@"group.mycompany.myappgroup"];
And for those of you who want to see it in Swift:
var userDefaults = NSUserDefaults(suiteName: "group.mycompany.myappgroup")
var fileManager = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier("group.mycompany.myappgroup")