That's too early.
I could maybe add that to my iOS Extension, so we could provide a function to start an activity.
And that activity could block sleeping for some time.
Sounds great ! Can't wait to try this out.
Got it to compile and run after I added the SystemConfiguration framework (it was not in the Readme file).
Unfortunately it does not seem to work on my Iphone 5 (9.2.1)
Set my Auto-lock to 30 sec and I tried
The screen dimmed and went black after 30 secs.
Am I missing something ?
it's just an advisory to the OS. Not sure why it would not work.
I will test it on my ipad to see if that makes a difference
Also the files.writetextfile works but I can not get the files.deletefile command to be recognized by mbs
iOS functions a lot based on notifications and listeners. I'm not sure how the MBS app is supposed to block a device from going to sleep, but AFAIK, I'm not sure it's even possible to override a user action like clicking the home button, force restarting and putting the device to sleep. Those are all physical actions outside of the normal sandbox environment.
Usually the order of operation is:
-Your app starts
-You register with iOS to receive event notifications
-iOS sends your app a notification that something is happening (EG home button clicked)
-Your app runs a function in response to the event
You can think about this as similar to script triggers in filemaker. However, I'm not sure there's any way to "exit false" like you would in filemaker to "block" the trigger from completing. For other iOS developers, this gives you a chance to do things like save your CoreData stack or clear your browser cache before it enters a hibernation state. Given the limited "hooks" into filemaker that the SDK provides though, I'm not really sure you can do anything with FM.
It's possible to disable the timer, for a particular activity, like a presentation
That's the approach Christian tried.
Now I wish I could get it to work
Well, what you are describing (dim first, then to black) is display sleep, so I would think you need to use the "idleDisplaySleepDisabled" flag instead of the SystemDisabled one.
If you need files.deletefile, please email me and I can send you a new copy.
Thanks for the suggestion.
Tried that...did not work.
Mike do you have the sdk ?
If so, could you try it out so I know if the problem is , for some reason, on my side ?
I have it but have not had a chance to test it out yet (my free time is a bit limited with devcon being a month away).
Christian would be the best to support it, but you may want to try a combination of parameters if it's supported. Since the function doesn't return anything to filemaker noting if the activity was successfully started, there's not really any obvious way to test it outside of the Xcode simulator and stepping through.
I would prefer to get an official iOS Plugin SDK...
So far we can only hack into the iOS SDK.
Try with & instead of ? before options in the URL.
My example had this typo.