App Review - Crash

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
MiloD
Posts: 5
Joined: Fri Oct 09, 2015 4:43 pm

App Review - Crash

Post by MiloD » Thu Feb 04, 2016 8:16 pm

I have submitted my app for review for the App Store.

I got a response from the App Review team saying that my app consistently crashed when they pressed a certain button.

I cannot duplicate the crash, but since my app was built with a 3rd party application (LiveCode) then the Apple Support Team will not help me and look at my code.

Any suggestions/help?

Thanks so much.

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: App Review - Crash

Post by quailcreek » Fri Feb 05, 2016 12:36 am

We need to see the code.
Tom
MacBook Pro OS Mojave 10.14

MiloD
Posts: 5
Joined: Fri Oct 09, 2015 4:43 pm

Re: App Review - Crash

Post by MiloD » Fri Feb 05, 2016 4:07 pm

on touchEnd pId
mobGUIUntouch the long id of me
#visual effect push right very fast
#go card "yourCard"
#go prev card
end touchEnd


on touchRelease pId
mobGUIUntouch the long id of me
end touchRelease


on touchStart pId
mobGUITouch the long id of me
end touchStart

#Performs a check to see if the user has completed the Safety Check. If not then the user is sent to the Safety Check card. Else they are sent to the Dry Practice Drill card (Handgun).
on mouseUp
set the defaultFolder to specialFolderPath("Documents")
put URL "file:tDate.txt" into fld "Safety Check"
put the date into $$Today
if field "Safety Check" = $$Today then
play (specialFolderPath("engine") & "/iOS_Click.mp3")
visual effect push right
go to card "Practice Menu"
else
put (specialFolderPath("engine") & "/DPT_Files/SafetyCheck.mp3") into tPath
put "play and record" into pCategory
   put "false" into pMixWithOthers
   put "false" into pDuckOthers
   put "true" into pAllowBluetooth
   put "true" into pDefaultToSpeaker
   mergAVAudioSessionSetCategory pCategory,pMixWithOthers,pDuckOthers,pAllowBluetooth,pDefaultToSpeaker
put "noise1" into tChannelName
put "now" into tType
mobilePlaySoundOnChannel tPath, tChannelName, tType
visual effect push left
go to card "Safety 2"
end if
end mouseUp


on mouseRelease
if the environment = "development" then touchRelease 1
end mouseRelease


on mouseDown
if the environment = "development" then touchStart 1
end mouseDown

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: App Review - Crash

Post by Klaus » Fri Feb 05, 2016 4:25 pm

Hi Milo,

two things jump right into my eyes:
1. The old syntax for visual effect has been deprecated and using it may result in a crash on iOS!
Needs to be:

Code: Select all

...
lock screen for visual effect
go cd "Practice Menu"
unlock screen with visual effect push right
...
2. iOS is case sensitive, so specialfolderpath codes need to be lower case, see below...
3. You do not do any error checking!?
If you try e.g. to access a file that is not there, then the script silently fails at this point, although it shold not crash.

Code: Select all

on mouseUp
   put specialFolderPath("documents") & "/tDate.txt" into tDateFile
   if there is a file tDateFile then
      put url("file:" & tDateFile) into fld "Safety Check"
   end if
...
Best

Klaus

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: App Review - Crash

Post by quailcreek » Fri Feb 05, 2016 7:09 pm

Put this in your stack script. It will should point you to where the errors are coming from. Also, what version of LC are you running?

Code: Select all

on errorDialog pError
   if environment() is "mobile" then answer pError
   --   put pError
   pass errorDialog
end errorDialog
Is tDate a variable?

Code: Select all

put URL "file:tDate.txt" into fld "Safety Check"
Tom
MacBook Pro OS Mojave 10.14

Post Reply