Use of Resources Folder in iOS Apps?

Hey all,

I copy over a read-only file into my app’s resources folder as part of a build step. This file is used by the app just like images, etc. The app runs fine installed ad-hoc from Xcode but my build got rejected by Apple for crashing. Loading into TestFlight, I had the same problem. I determined that it’s this file. Apparently I can access in the .app package which is used in the adhoc install but not in the .ipa file used by the App Store.

So is there a way to access files in the Resource folder? If not, why is it included as a destination?

Thanks,

Jon

Jon, what were you using to get the resources file? Does Xojo.IO.SpecialFolder.GetResource work?

Yes, but I think my problem is that I was putting it in the Resources folder and not the App Parent Folder. What’s weird is Xcode picks up the file just fine in the resources folder of the app, but not the .ipa file from the store…

Nope. Still doesn’t work.

So bottom line - no this does not work with the .ipa file. Shows up as NIL when running the app.

Sounds like you’ll need to file a ticket :confused:

With who? Apple or Xojo?

I’ve got a way around this but it would have been easier to include the file.

With Xojo.

1 Like

Ok. Well, I’ll have to implement getting my file the backup way. Oh well…No time to wait for Xojo to fix it.

Maybe I misunderstand this thread but isn’t the GetResources folder read-only by default? Is that really a bug? Or would you expect it to work because you’re doing it as part of the build step?

Is the build step correctly defined to happen before the signing step?

Correct. I’m trying to read from a file I copied there in the build step.

I don’ think so. It can’t be that easy can it?

1 Like

WOW! It was that easy. I wish Xojo would then insert the copy step BEFORE the signing step when this is added. How would you ever know otherwise it it weren’t for people like you, @Jeremie_L? So thank you!

I spent all night last night and into the wee hours of the morning working on a workaround for this! Oh well, I figured out some other improvements but this makes things so much simpler.

1 Like

As soon as I read that side-loading the app worked correctly but it didn’t work with the .ipa file I was pretty sure that’s the issue.
You’re welcome :slight_smile:

1 Like

For reference this is noted on the Build Automation Copy Files doc page:

https://documentation.xojo.com/topics/build_automation/introduction.html#Copy_Files