Modifying App Bundle

I understand that your application cannot modify its app bundle.

I have an application (written in another development environment, that I'm porting to Swift).

It has a dummy file in its app bundle that I want to modify in some way. How would I go about it?

Can I copy an item out of the app bundle, modify it, then delete it?

Thanks for any suggestions.

Answered by OOPer in 691229022

How would I go about it?

Copy the item into the right folder where your app can touch it. Your app can modify or delete the copied file as you like.

Accepted Answer

How would I go about it?

Copy the item into the right folder where your app can touch it. Your app can modify or delete the copied file as you like.

There may be a better (or "more correct") solution but I solved it by copying the file I needed into the user's Documents directory then deleting it when it was no longer needed. (it only needed to be there for fraction of a second.)

Modifying App Bundle
 
 
Q