iOS Home Button Shutdown not working!

Chris Sheffield cmsheffield at icloud.com
Thu May 8 13:35:30 EDT 2014


Unfortunately, no it doesn’t work for me either. However, I seem to remember a bug in one version of LC where using put statements itself did not work correctly. The output wasn’t displayed in the console. Unfortunately I don’t remember which version. Does anyone else? So there’s a possibility we’re running into that bug with LC 6.5.2.

Another way to test this would be to write out a simple text file to the Documents folder in the shutdown handler. If you test it in the simulator, you can fairly easily locate that text file. The path would be something like this /Users/[user_name]/Library/Application Support/iPhone Simulator/[iOS_version]/Applications/F16EE956-F742-4FB9-80A6-51C521B2FA75/Documents. Maybe you already know this. Anyway, that big long nasty folder name will have to be replaced with whatever folder contains your app. No easy way that I know of. You’ll just have to browse all the folders until you find the one containing your app.

Anyway, this is kind of a dumb workaround that shouldn’t even be necessary, but hopefully it’ll get you started in determining whether or not shutdown is actually firing. My guess is that it is, and 6.5.2 has the “put” bug, and there’s some error occurring that makes it seem like shutdown is not running. If you have access to a newer version of LC, I’d recommend switching over when you can. I realize that’s not always easy to do.

Hope this helps a bit. Good luck!

Chris

On May 8, 2014, at 9:20 AM, Rick Harrison <harrison at all-auctions.com> wrote:

> Hi Chris,
> 
> I’m using LC version 6.5.2 and tested in both the simulator and on the device.
> I used the “put” statement at the beginning of the handler but do not see my
> message displayed when I press the “Home button”.  I also tried using an
> answer statement to do the same thing.  No message appears for me.
> 
> Does this work for you in LC 6.5.2?
> 
> Thanks,
> 
> Rick
> 
> 
> On May 8, 2014, at 10:44 AM, Chris Sheffield <cmsheffield at icloud.com> wrote:
> 
>> Rick,
>> 
>> This seems to be working fine for me. Which version of LC are you using? I just did a simple test using a put command and checking console output using LC 6.6.2 RC3. Tested in both the simulator and on a device. My shutdown handler triggers in both cases.
>> 
>> You might try a simple test like that with a put statement right at the beginning of your handler, if you haven’t done so already. If you don’t see any output in the console, then there’s definitely an issue and it should be reported to RunRev. But if you do, then you should be able to do a little debugging and try to figure out exactly where the problem lies.
>> 
>> Chris
>> 
>> 
>> --
>> Chris Sheffield
>> Read Naturally, Inc.
>> www.readnaturally.com
>> 
>> 
>> 
>> On May 7, 2014, at 8:00 PM, Rick Harrison <harrison at all-auctions.com> wrote:
>> 
>>> Hi there,
>>> 
>>> I have an iOS app that when the user hits the iPhone “Home” button,
>>> it doesn’t seem to be sending the “shutdown” message to the
>>> current card.
>>> 
>>> Yes, I also tried “shutdownRequest” and that doesn’t work either.
>>> 
>>> I therefore have no way to save the state of the app
>>> so the user can pick up where he/she left off in the app
>>> when they decide to come back to it.
>>> 
>>> Suggestions?
>>> 
>>> Thanks in advance!
>>> 
>>> Rick
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the Use-livecode mailing list