UsAaR33
UsAaR33

Reputation: 3686

How can one app provide data to another without swiching apps?

Scenario:

Constraints:

This is seeming rather difficult to pull off in iOS7. Help is appreciated.

Upvotes: 2

Views: 201

Answers (2)

Albert Renshaw
Albert Renshaw

Reputation: 17882

Tricky work around. Not recommended, but it will get the job done if you can't afford servers.

On the first app create a contact in the user's contacts book. Give it a generic name like "000 - NameOfAppB Data - Don't Delete" (I start with "000" so it goes to the bottom of the users contact book so they never see it, I also add "don't delete" so if the user does somehow find it they don't delete it hahaha) (who looks at contact books anyways). In the contact info under notes add your NSData in string format.

Then when app A is opened search for that contact, read the data, then delete the contact.

Apple does allow you to create and delete users contacts without their permission. (At least in 2011 they did, this may have changed).

Upvotes: 2

Preson
Preson

Reputation: 244

This might serve your purpose

https://developer.apple.com/library/ios/documentation/Security/Reference/keychainservices/Reference/reference.html

I am not sure of its limitations though, i have seen implementations where credentials have been shared between apps.

Upvotes: 0

Related Questions