At Desktop build time, my read-only supporting files get swept into a resources folder by a Build step. At debug time I just access them directly, using “If Debugbuild.” and going straight to them.
How do I get at these kinds of files in iOS?
At Desktop build time, my read-only supporting files get swept into a resources folder by a Build step. At debug time I just access them directly, using “If Debugbuild.” and going straight to them.
How do I get at these kinds of files in iOS?
On iOS when the files are copied using a Build Step, you can access resource files with SpecialFolder.Resource
Coming from a purely Desktop culture, a lot of the iOS approach seems foreign to me. I guess what I do not understand is how to, for iOS, “copy the files using a build step.” Can you help me through that?
In the Navigator, select iOS
In the Insert Menu, select Build Step > Copy Files
Drag the build step above Sign
Then drag & drop files and folders
You can then reference them using
Var aFolder As FolderItem = SpecialFolder.Resource("folder_name")
Var afile As FolderItem = SpecialFolder.Resource("filename.extension")
And if you have picture files in multiple resolutions such as
The system is smart enough to create a Multi-resolution image with the following code:
Var f as folderItem = SpecialFolder.Resource("home_icon.png")
Var p as picture = Picture.Open(f)
// p will have all three resolutions
// and will use the best suitable image for display
Thank you Jeremie. This all looks good.