you could check the Info.plist file of your iOS SDK project.
This key should be there:
Yes, this entry is in my info.plist.
May be your key previously was differ from 3 ?
Then you need to delete your app from the Simulator and build it again.
This could be a reason. Thanks, I will check it later.
I have delete all (the app in Debug folder, the app from the device and chosen a new device).
But still the same problem: Each time I restart the app, all database files are copied again into the apps documents folder and the update process, that I have created for my databases, is started again and again.
I should mention, that the app contains database files which are only used for updating the existing files from previous app version. The updater script deletes all this files after the update process is completed.
May be the app checks if there are all files present - and if not it copies the files even if it is not the first start?
I previously also had a problem with updates. Usually it happens, when you playing with this copy option.
Try to create a new project from the scratch and just set 3 to copy option before the first build.
I have created a new project from the scratch and set 3 to copy option before the first build – nothing has changed. Every time the app is started again, all files are copied and my update scripts for the old database files are executed.
May be the app checks if there are all files present when starting - and if not it copies the files even if it is not the first start?If this is true I will need to create a script catching this situation.The script needs to determine if it is the first start of this version and the update of the old files needs to be done or if it is not the first start of this version and all files copied from app need to be deleted without performing an update to the existing databases.If there is nobody presenting a better idea, I need to solve this.A never ending story to get an update for an existing app which is working perfectly.
silly question: It's iOS10 and the latest version of XCode? It was working perfect with iOS9?
(I'm asking because of '...A never ending story to get an update for an existing app which is working perfectly')
Any chance you could post a copy of your startup script? Possibly the problem is there......
and: How big is the solution?
What happens if You change the option from 3 to 2 (only once)?
Now it is iOS and Xcode 8 - of course.
I didn't test with iOS 9, because now it is the first time I need to provide an update. In my first version of the app the scripts for updating the data files already had been prepared but not used.
I never looked in detail what the app is doing because all worked fine and the database remained untouched when restarting the app.
It can't be my starting script because the files are copied before any script is executed.
The script is too large to post it here.
I have tried with option 2 - all the same.
The solutions has about 440 MB. It consists of 10 databases.
One of the databases is the starting database form which the user has access to the other databases.
6 of the databases are for data entry by the user (from 5 to 50 MB), 2 do something in background and one (the big one with 266 MB) provides the user with information, which not can be edited.
This is why it is a problem that the update is done at each restarting of the app. It takes a too long time.
I have done more checks and found the following:
No matter of using option 2 or 3 – when restarting the app all database files, which are not there, are copied into the apps documents folder. So, if you delete one (what I'm doing with my update script) it will be back after restarting.
And this seams to be my problem:
My starting script checks the documents for the files provided in the new version.
If this files are there, the existing solution databases are updated (or if no existing databases, because this is the first version installed on the iPad, the solution databases are created).
After this the files provided in the new version are deleted from documents folder.
I looks like I need to add a way to check if the solution databases already have been updated to the new version. And if so not to do the update again, only delete the files provided in the new version (they shouldn't be available for the user).
The summary is: The information FM provided of the behavior of app concerning the files in documents folder is not complete. They didn't consider the case that the files are deleted intentionally.
"(I'm testing in Xcode Simulator)"
Doesn't the Xcode simulator tread every new launch as the first initial launch? If you test on an actual physical device you might achieve the desired result. I have played around with the 4 launch options quite a bit and found that they work as expected as long as you use the latest version of the SDK (15.0.2).