My app has gotten rejected for the fourth time and I’m no closer to solving this than after the first rejection. The issue seems to be happening in the Open event and the only thing it does is copy an Sqlite DB from the resources folder to the Documents folder. I talked to an app supervisor the other day on the phone and he installed the app on his device and it crashed before it even displayed the first screen. Consequently, that has to be the open event of the app because that is the only thing that runs before the first screen.
I have run this app on numerous devices as well as the simulator without any issues. What I’m looking for is code to copy the database from the resources folder to the documents folder (from someone who is doing this on their app) so that I can compare it to what I’m doing.
I’d be happy to provide someone with a copy of the app if they’d like to help resolve this issue. Very frustrating!
If you can reproduce the issue on your own phone, you can connect your phone to Xcode, view the device log and Xcode has an option to symbolicate the crashlog. I’ve used this myself and it’s convenient. But as you’ve said you can’t reproduce the issue then that likely won’t help. Have you got access to another device, one that has never had your app on it?
I re-wrote my “open event” code that simply copies the Sqlite database that I am distributing with my application from the resources folder to the documents folder. Tested it and it runs perfectly in the simulator.
Since the app has been rejected 4 times because it crashes before it even gets to my splash screen, the only code that runs prior to that is the open event code… hence, I figured I might as well re-write it and see what happens. The crash logs provide no clue as to what’s causing the crash.
I also tried the following, with no luck. Since the IPA file is just a zip file, I decided to extract the app file from it and tried to copy it to my iPhone 6 and I got an error saying that it is not provisioned for my iPhone. Why would the app allow me to copy it, but the app in the IPA can’t be copied to it? Not sure this is related to the crashes, but just thought I’d ask. Here is the new open event code:
'-----------------------------------------------------------------------------------------------------
'--- COPY DB FROM RESOURCES TO DOCS FOLDER
'-----------------------------------------------------------------------------------------------------
'--- CREATE FOLDERITEM POINTING TO DB IN RECOURCES FOLDER
dim f_ResourcesFile As FolderItem
f_ResourcesFile = SpecialFolder.GetResource("ACAIR.dat")
'--- CREATE FOLDERITEM WHERE THE DB WILL BE COPIED
dim f_TargetLocation As FolderItem
f_TargetLocation = SpecialFolder.Documents.Child("ACAIR.dat")
if not f_TargetLocation.Exists then
f_ResourcesFile.CopyTo(f_TargetLocation)
end
if f_TargetLocation.Exists then
dim db As New SQLiteDatabase
db.DatabaseFile = f_TargetLocation
if db.Connect then
rs = db.SQLSelect("Select * from ACA")
end
end
Seems to work fine. I also noticed that IOS seems to be case sensitive, because when I entered the name of the file located in the resources of the app as ACAIR.DAT it didn’t find it and generated an error. The file actually has a lowercase extension. When I changed it in the code above to lowercase, it found the file properly. Is this normal behavior?
Anyone see anything wrong with this code. By the way, there is other code elsewhere to make sure the recordset is populated.