Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I test access to a keychain property after update via the AppStore?

In the Keychain Services Programming Guide it states the following:

"On iPhone, Keychain rights depend on the provisioning profile used to sign your application. Be sure to consistently use the same provisioning profile across different versions of your application."

Which I have no problem with but I would like to test that if I provide an update to my app in the AppStore that it will still be able to access the old values stored in the keychain. I have tried to test by updating the app with a version signed with an ad-hoc distribution profile that contained the same bundle id and product name as the original but it could not access the old value in the keychain.

Is the only option to submit the update to the AppStore and hope that it will work?

like image 542
Shane Fitzgibbon Avatar asked Apr 18 '11 23:04

Shane Fitzgibbon


1 Answers

This is a good question.

One of the main reason why you might want to store some data in the keychain is to prevent malicious users from accessing it. This is quite a dry sentence on its own so I recommend reading about how someone might access that data.

Another way to access keychain data would be to create a malicious app with the same app ID as the target app. Apple have secured this route by requiring the provisioning profile to be the same.


So, to answer your question, you can only test the keychain data in update from the same provisioning profile, i.e.

  1. Ad hoc to Ad hoc
  2. App store to app store.

App store to app store is not really an option since it will be too late by then (your update will be on the market). So instead you need to delete your app store app and install an ad hoc version. Then recreate your data on the keychain, then update to the latest ad hoc version and test that it worked.

Of course this requires you to have an archived ad hoc version of the app thats currently on the app store. If you don't have this, then its not possible to test an update.

like image 173
Robert Avatar answered Oct 11 '22 12:10

Robert