Pull
Pull

Reputation: 2246

keep corporate app alive in background

I am developing a corporate app that will be publish on an internal store. The app is just supposed to keep in memory some credentials but I can't store them on the device for security reasons.

I want the app to stay in background as long as possible but I don't know what is the best solution knowing that I won't have to publish the app in the AppStore.

I read about the option in plist Required background modes, but I don't know which option is the most efficient for my situation.

Upvotes: 0

Views: 51

Answers (1)

Hemang
Hemang

Reputation: 27050

Firstly, you don't need to keep running app in background, second you can store "those [secret] credentials" in keychain store with some encrypted format, SHA1 or MD5 or any other cryptographic hash functions can be use for this, third the benefit of this is you can access to them from your different apps as well (by using the same encryption key to decryption and accessing keychain store item), at last when you no longer need it, you can even delete it. The only thing you need to keep secret is keychain store key (which you used to store credentials) and also your encryption key (to used with cryptographic hash function).

There's are several libraries available to easily manipulate data in keychain store, here's the one, and here's the solution to apply MD5 or SHA1.

Upvotes: 2

Related Questions