I have App A
and App B
. Here I just want to share text
data from A to B and for that I doing following code.
In A :
UIApplication.sharedApplication().openURL(NSURL(string: "B://sample_text")!)
In B :
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
print(url)
return true
}
Output in B : B://sample_text
Using above code, I can able to send sample_text
data from A to B. But App B is getting open that I don't want.
I want to share the same data and it should get in B when I launch B manually in future.
May be if there is any other method than openURL
, then please suggest.
App Group can achieve this but it has limitation like you can only share data between applications that share a common app ID prefix.