Can I access data through 2 different iOS apps?

Let's say that I store some ID data in App1 and want to access it in App2 on the same device. Is this possible on the platform? Are there any workarounds for this, if not?

+6
source share
3 answers

Share images between My app to 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]; } 
+2
source

You can use iOS keychain . Here's a good tutorial on key group for keys .

+3
source

A workaround is to register applications as processing some type of file. When such a file is opened, the user receives a selection of applications that can process it, and the selected application receives a copy of the file copied to the ~Documents/Inbox directory. But I think you are better off with some kind of external service.

+2
source

Source: https://habr.com/ru/post/906362/


All Articles