是否可以跨2个不同的iOS应用访问数据?

loc*_*boy 6 iphone ios

假设我在App1中存储了一些ID数据,并希望在同一设备上的App2中访问它.这可能在平台上吗?有没有解决方法,如果没有?

Ami*_*mit 2

在我的应用程序Instagram之间分享图像:

NSURL *instagramURL = [NSURL URLWithString:@"instagram://location?id=1"];
if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
    NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
    NSString *savedImagePath = [documentsDirectory stringByAppendingPathComponent:@"Image.ig"];

    NSData *imageData = UIImagePNGRepresentation(originalImageView.image);
    [imageData writeToFile:savedImagePath atomically:YES];        
    NSURL *imageUrl = [NSURL fileURLWithPath:savedImagePath];

    UIDocumentInteractionController * docController = [[UIDocumentInteractionController alloc] init];
    docController.delegate = self;
    [docController retain];
    docController.UTI = @"com.instagram.photo";
    [docController setURL:imageUrl];
    [docController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES];
} 
Run Code Online (Sandbox Code Playgroud)