ios - Change app's name cause crash on launch -


i change app's name abcxyz abc-xyz in

info.plist -> bundle display name 

this cause crash on device when launch. message:

diskcookiestorage changing policy 2 0, cookie file: file:///private/var/mobile/containers/data/application/7cb9b0ea-97a2-4d3e-a8aa-ceb419beb1f2/library/cookies/cookies.binarycookies 

the simulator works fine, real device crash. problem here? crash when update on appstore?

edit 1: worked super fine before changed app name. i'll try change name see if problems gone.

edit 2: no, didn't work after change name back. should now?

edit 3: change app's display name, not project name or else. project name still abcxyz-ipad. think problem maybe because have imported external framework, sdk... , cause conflict somewhere?

edit 4: these solutions i've tried far. no result yet.

0. rename old name, reinstall. 1. clean, build, reset xcode, clean, build. 2. delete app on device, reinstall. 3. re-download store, reinstall. 4. reset device, reinstall. 

edit 5: find out app got through line of code.

-(void)application:(uiapplication *)application performfetchwithcompletionhandler:(void (^)(uibackgroundfetchresult))completionhandler {     nslog(@"background fetch");     completionhandler(uibackgroundfetchresultnewdata); } 

and write out message above. not sure mean though.

edit 6: found cause crash! many nicholas langley, problems printed here:

- (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions {     // stripe payment     [stripe setdefaultpublishablekey:stripepublishablekey];     // izettle payment     [[izettlesdk shared] startwithapikey:@"the_api_key"]; 

i changed app name, cause change bundle. after debugging, prints out message after line of code (startwithapikey), , crash when try this:

nsmutabledictionary *dic = [[nsmutabledictionary alloc] init]; nsstring *x = [[nsuserdefaults standarduserdefaults] objectforkey:@"x"]; [dic setobject:x forkey@"x"]; <<< here error setting nil. strange because doesn't print message. also, app should store x already. 

it seems after changing app's name, change bundle, cause data loss. real question is: how migrate old data new data after changing app's name/bundle. simulator doesn't produce error, , can't debug device's directory check anything.

edit 7: solved!

after update app:

nsmutabledictionary *dic = [[nsmutabledictionary alloc] init]; nsstring *x = [[nsuserdefaults standarduserdefaults] objectforkey:@"x"]; if (x) {     [dic setobject:x forkey@"x"]; } 

and reinstall, crash few times, work again. change app's name few more times, no problem occurred again. worry if update app store cause crash if users download , upgrade app.

edit 8: test upgrading store. re-download store old version. upgrade new version (doesn't change app's name). change app's name. no problem occur. problem disappeared, dream....... don't know do. meme absolutely right in case! well, has spent time reading long article.

i have no clue

build project (cmd+b). go product > clean (shift+cmd+k). close xcode find project directory i.e. desktop/abc-xyz , open project double clicking xcode project file.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -