File not found on iOS device, but found in Simulator -
when run application on simulator found path of file using following code:
{ nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); nsstring *basepath = ([paths count] > 0) ? [paths objectatindex:0] : nil; nslog(@"%@",basepath); }
simulator output:
file:///users/username/library/application support/iphone simulator/7.0.3/applications/e7816ff6-7e6a-4606-917e-e74cdb574ec8/documents/images/20140306113538.png
and same code when run in device found output with:
device output:
file:///var/mobile/applications/2d86a03f-c239-4b57-849f-019bcdca8543/documents/images/20140306114536.png
and when checked, file store in documents. when load url in browser path of simulator(which simulator output) loaded in browser. path of device(which device output) showing error in browser file not found.
like: firefox can't find file @ /var/mobile/applications/2d86a03f-c239-4b57-849f-019bcdca8543/documents/image/20140306114536.png.
only because of reason not able send file device on server using web service.
xcode version: 5.0.2
device: iphone 4(ios 7.0.6)
any 1 please help.
because trying load file device not available on system. , simulator directory exist on system thats why loading file system.
so better can browse files device , copy system using following software
Comments
Post a Comment