My app crash on iOS

I received a message from app store team telling me that my app crash on iOS. I tested on my device with the provisioning profile for testing and everything works fine, but it does not seems to work with  the distribution provisioning profile. This was the message i received:

Guideline 2.1 - Performance - App Completeness

We were unable to review your app as it crashed on launch. We have attached detailed crash logs to help troubleshoot this issue.

I am using Corona 2018.3417. I attach the logs to see if someone can help me. Thank you.

I have never been able to read the logs, but from my experience the only time this has happened to me it was because I did not include the text for a permission that I am using. Are you using location, camera, contacts or anything other that requires a permission text in the build settings? Otherwise, at the time of use, it will crash.  

Consider adding the app to testflight, making your account a tester and download the version with the distribution profile instead of using a developer profile. That way you can see what their testers are seeing.

If I were guessing, you have a problem on startup with a freshly installed app. Perhaps you are looking for some settings file and when you test it on your device, the sandbox has an old file or an older formatted file that your app is dependent on and on a fresh install that file is missing.

Rob

Thanks i tested using testflight and i got this log:

You would attach your device to your computer via the USB/Lighting cable. Then run Xcode, go to “Devices and Simulators” and there is a pane at the bottom of the screen that shows the device’s console log.

Rob

I made the tests and i think that i found the error. It happens when i use this:

estado\_favoritos = fileSqlite.consultarInstruccionesFavoritos()

that is a reference from another file called fileSqlite.lua that contains this method:

function consultarInstruccionesFavoritos() local query = "SELECT \* FROM INSTRUCCIONESFAVORITOS WHERE ID = 1" local instrucciones = 0 for row in db:nrows(query) do instrucciones = row.INGRESO end return instrucciones end

But i don’t understand why does it broke the app and why does it work on android but not in iOS?

Are there any messages in the device’s console log that would help?

Rob

Those are the logs of the app:

predeterminado 14:16:12.827587 -0500 Futbol Colombiano [com.mobyleinc.futbolcolombiano] Requested authorization [didGrant: 1 hasError: 0 hasCompletionHandler: 1] predeterminado 14:16:12.827653 -0500 Futbol Colombiano [com.mobyleinc.futbolcolombiano] Getting notification settings (async) predeterminado 14:16:12.827778 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Requesting authorization with options 7 predeterminado 14:16:12.827848 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Requesting authorization with options 7 topics 0 predeterminado 14:16:12.827969 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting notification settings predeterminado 14:16:12.828013 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting section info predeterminado 14:16:12.828073 -0500 SpringBoard Getting requested section info (sync) predeterminado 14:16:12.828120 -0500 SpringBoard Got section infos [result: 0] predeterminado 14:16:12.828154 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Got section info [hasResult: 1] predeterminado 14:16:12.828266 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Got notification settings [hasResult: 1] predeterminado 14:16:12.828315 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Already registered. Update authorization with options 7 topics 0 predeterminado 14:16:12.828384 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Updating authorization options: 7 predeterminado 14:16:12.828433 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Update settings [authorizationStatus: 0 authorizationOptions: 7] predeterminado 14:16:12.828576 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting section info predeterminado 14:16:12.828623 -0500 SpringBoard Getting requested section info (sync) error 14:16:12.828694 -0500 SpringBoard No data found at /var/mobile/Library/UserNotifications/com.mobyleinc.futbolcolombiano/Topics.plist predeterminado 14:16:12.828739 -0500 SpringBoard Got section infos [result: 0] predeterminado 14:16:12.828775 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Got section info [hasResult: 1] predeterminado 14:16:12.828813 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Authorization granted: 1 predeterminado 14:16:12.828848 -0500 Futbol Colombiano [com.mobyleinc.futbolcolombiano] Requested authorization [didGrant: 1 hasError: 0 hasCompletionHandler: 1] predeterminado 14:16:12.828908 -0500 Futbol Colombiano [com.mobyleinc.futbolcolombiano] Getting notification settings (async) predeterminado 14:16:12.829036 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Requesting authorization with options 7 predeterminado 14:16:12.829106 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Requesting authorization with options 7 topics 0 predeterminado 14:16:12.829224 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting notification settings predeterminado 14:16:12.829285 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting section info predeterminado 14:16:12.829349 -0500 SpringBoard Getting requested section info (sync) predeterminado 14:16:12.829452 -0500 SpringBoard Got section infos [result: 0] predeterminado 14:16:12.829541 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Got section info [hasResult: 1] predeterminado 14:16:12.829622 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Got notification settings [hasResult: 1] predeterminado 14:16:12.829745 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Already registered. Update authorization with options 7 topics 0 predeterminado 14:16:12.829894 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Updating authorization options: 7 predeterminado 14:16:12.831725 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Update settings [authorizationStatus: 0 authorizationOptions: 7] predeterminado 14:16:12.871294 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting section info error 14:16:12.885773 -0500 SpringBoard No data found at /var/mobile/Library/UserNotifications/com.mobyleinc.futbolcolombiano/Topics.plist predeterminado 14:16:12.885957 -0500 SpringBoard Getting requested section info (sync) predeterminado 14:16:12.886058 -0500 SpringBoard Got section infos [result: 0] predeterminado 14:16:12.886482 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Got section info [hasResult: 1] predeterminado 14:16:12.955383 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Authorization granted: 1 predeterminado 14:16:12.955579 -0500 Futbol Colombiano [com.mobyleinc.futbolcolombiano] Requested authorization [didGrant: 1 hasError: 0 hasCompletionHandler: 1] predeterminado 14:16:12.955872 -0500 Futbol Colombiano [com.mobyleinc.futbolcolombiano] Getting notification settings (async) predeterminado 14:16:12.956125 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Requesting authorization with options 7 predeterminado 14:16:12.956479 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Requesting authorization with options 7 topics 0 predeterminado 14:16:12.956965 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting notification settings predeterminado 14:16:12.957051 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting section info predeterminado 14:16:12.957127 -0500 SpringBoard Getting requested section info (sync)

I have never been able to read the logs, but from my experience the only time this has happened to me it was because I did not include the text for a permission that I am using. Are you using location, camera, contacts or anything other that requires a permission text in the build settings? Otherwise, at the time of use, it will crash.  

Consider adding the app to testflight, making your account a tester and download the version with the distribution profile instead of using a developer profile. That way you can see what their testers are seeing.

If I were guessing, you have a problem on startup with a freshly installed app. Perhaps you are looking for some settings file and when you test it on your device, the sandbox has an old file or an older formatted file that your app is dependent on and on a fresh install that file is missing.

Rob

Thanks i tested using testflight and i got this log:

You would attach your device to your computer via the USB/Lighting cable. Then run Xcode, go to “Devices and Simulators” and there is a pane at the bottom of the screen that shows the device’s console log.

Rob

I made the tests and i think that i found the error. It happens when i use this:

estado\_favoritos = fileSqlite.consultarInstruccionesFavoritos()

that is a reference from another file called fileSqlite.lua that contains this method:

function consultarInstruccionesFavoritos() local query = "SELECT \* FROM INSTRUCCIONESFAVORITOS WHERE ID = 1" local instrucciones = 0 for row in db:nrows(query) do instrucciones = row.INGRESO end return instrucciones end

But i don’t understand why does it broke the app and why does it work on android but not in iOS?

Are there any messages in the device’s console log that would help?

Rob

Those are the logs of the app:

predeterminado 14:16:12.827587 -0500 Futbol Colombiano [com.mobyleinc.futbolcolombiano] Requested authorization [didGrant: 1 hasError: 0 hasCompletionHandler: 1] predeterminado 14:16:12.827653 -0500 Futbol Colombiano [com.mobyleinc.futbolcolombiano] Getting notification settings (async) predeterminado 14:16:12.827778 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Requesting authorization with options 7 predeterminado 14:16:12.827848 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Requesting authorization with options 7 topics 0 predeterminado 14:16:12.827969 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting notification settings predeterminado 14:16:12.828013 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting section info predeterminado 14:16:12.828073 -0500 SpringBoard Getting requested section info (sync) predeterminado 14:16:12.828120 -0500 SpringBoard Got section infos [result: 0] predeterminado 14:16:12.828154 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Got section info [hasResult: 1] predeterminado 14:16:12.828266 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Got notification settings [hasResult: 1] predeterminado 14:16:12.828315 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Already registered. Update authorization with options 7 topics 0 predeterminado 14:16:12.828384 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Updating authorization options: 7 predeterminado 14:16:12.828433 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Update settings [authorizationStatus: 0 authorizationOptions: 7] predeterminado 14:16:12.828576 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting section info predeterminado 14:16:12.828623 -0500 SpringBoard Getting requested section info (sync) error 14:16:12.828694 -0500 SpringBoard No data found at /var/mobile/Library/UserNotifications/com.mobyleinc.futbolcolombiano/Topics.plist predeterminado 14:16:12.828739 -0500 SpringBoard Got section infos [result: 0] predeterminado 14:16:12.828775 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Got section info [hasResult: 1] predeterminado 14:16:12.828813 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Authorization granted: 1 predeterminado 14:16:12.828848 -0500 Futbol Colombiano [com.mobyleinc.futbolcolombiano] Requested authorization [didGrant: 1 hasError: 0 hasCompletionHandler: 1] predeterminado 14:16:12.828908 -0500 Futbol Colombiano [com.mobyleinc.futbolcolombiano] Getting notification settings (async) predeterminado 14:16:12.829036 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Requesting authorization with options 7 predeterminado 14:16:12.829106 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Requesting authorization with options 7 topics 0 predeterminado 14:16:12.829224 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting notification settings predeterminado 14:16:12.829285 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting section info predeterminado 14:16:12.829349 -0500 SpringBoard Getting requested section info (sync) predeterminado 14:16:12.829452 -0500 SpringBoard Got section infos [result: 0] predeterminado 14:16:12.829541 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Got section info [hasResult: 1] predeterminado 14:16:12.829622 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Got notification settings [hasResult: 1] predeterminado 14:16:12.829745 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Already registered. Update authorization with options 7 topics 0 predeterminado 14:16:12.829894 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Updating authorization options: 7 predeterminado 14:16:12.831725 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Update settings [authorizationStatus: 0 authorizationOptions: 7] predeterminado 14:16:12.871294 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting section info error 14:16:12.885773 -0500 SpringBoard No data found at /var/mobile/Library/UserNotifications/com.mobyleinc.futbolcolombiano/Topics.plist predeterminado 14:16:12.885957 -0500 SpringBoard Getting requested section info (sync) predeterminado 14:16:12.886058 -0500 SpringBoard Got section infos [result: 0] predeterminado 14:16:12.886482 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Got section info [hasResult: 1] predeterminado 14:16:12.955383 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Authorization granted: 1 predeterminado 14:16:12.955579 -0500 Futbol Colombiano [com.mobyleinc.futbolcolombiano] Requested authorization [didGrant: 1 hasError: 0 hasCompletionHandler: 1] predeterminado 14:16:12.955872 -0500 Futbol Colombiano [com.mobyleinc.futbolcolombiano] Getting notification settings (async) predeterminado 14:16:12.956125 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Requesting authorization with options 7 predeterminado 14:16:12.956479 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Requesting authorization with options 7 topics 0 predeterminado 14:16:12.956965 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting notification settings predeterminado 14:16:12.957051 -0500 SpringBoard [com.mobyleinc.futbolcolombiano] Getting section info predeterminado 14:16:12.957127 -0500 SpringBoard Getting requested section info (sync)