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.
                        
Finally found the way. You can upload app to
testflightand 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.