Funky Sloth
Funky Sloth

Reputation: 55

Application Resource Path for iOS

I have a question on how iOS create its folder, I have a function wherein it will generate a Pdf file and will be upload to list of attachment. In the screenshot the First Run section, this is the time the file is created F4CB04F6... is the folder where it is located.

However, when I close my application and run it again, and try to download the file, the detected path changed to FE438CE9...

Does it mean the application root is always creating a new folder?

enter image description here

Upvotes: 0

Views: 95

Answers (1)

Liyun Zhang - MSFT
Liyun Zhang - MSFT

Reputation: 14224

This problem will just appear in the simulator. The path will change when you build or run the project every time. Accoridng to this case, the cause is the XCode will change the application's UUID every time.

But if you run it on the physical device, the path will be the same all the time. And you can use the relative path such as Path.Combine() to store or get the files.

Upvotes: 2

Related Questions