ios - iPhone App Update. "createSymbolicLinkAtPath" released? -


i using symbolic link iphoneapp.

nsstring* js_path = [[nsbundle mainbundle] pathforresource:@"js" oftype:nil]; nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); if (js_path != nil) {     nsfilemanager *fm = [nsfilemanager defaultmanager];     nsstring* move_js_path = [nsstring stringwithformat:@"%@/js",  [paths objectatindex:0]];     nserror *error;      if ([fm createsymboliclinkatpath:move_js_path withdestinationpath:js_path error:&error]) {     } else {} } 

i updated application program. becomes impossible read file afterwards.

however, file able read reinstalling after application program had been deleted once.

is there problem in code?

if anyones wondering this, reason application moves directory every time it's updated, solution might use relative paths bundles located @ /var/mobile/applications/[unique id changes every update]/app.app whereas documents directory located @ /var/mobile/applications/[unique id changes every update]/documents symlink documents bundle work if uses ../[bundlepath lastpathcomponent]/documents

ofc it's idea build relativeness directories @ runtime rather hard coding it, incase these relative paths change in future.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -