ios - Handle keychain loss after changing to team id prefix

895 views Asked by At

As I am developing extensions for my app, to share keychain I got bundle identifier changed to Team Id Prefix.

Now I want to log out user first time as old keychain will not be accessible. Problem is I cant upgrade my app.

I installed older version from appstore and tried to run from source. It says "App installation failed. The application could not be verified."

Then I tried to install old developer build and update it with new developer build. This also do not upgrade. It starts installation and then app icon is dull. If clicked it again shows installing.

If I uninstall app and run new Team id app, it works fine.

I want to have run from source to test upgrade and logout user smoothly.

2

There are 2 answers

0
Durgaprasad On BEST ANSWER

Finally found the way. You can upload app to testflight and test it.

Also could not show a proper message. I use to save app version in app. I wanted to compare old version number and show message. But, after upgrade because of new app id, you cannot access older nsuserdefault. So you cannot decide whether it was an upgrade or a fresh install.

So choose to silently log-out user.

0
Blazej SLEBODA On

Context:

I have an explicit AppId with AppPrefix different from my TeamId.

  • TeamId: ASJAZSZR
  • AppPrefix+AppId: HDJIAZDJ.com.myapp.ios

To Do:

I am considering to request the Apple assistance to migrate to my AppPrefix to be the same as my TeamId.

Question:

In the technical note they say "A one-time loss in keychain data will occur if you switch your App ID prefix" : https://developer.apple.com/library/content/technotes/tn2311/_index.html

I would like to know if the same will happen with User defaults ([NSUserDefaults default]) ? Any experience ?