omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    iOS Clock access - with objcutil

    Pythonista
    clock objcutil ios objc
    5
    11
    12391
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Phuket2
      Phuket2 last edited by

      This is not important, but wondered if anyone has been able to access the iOS clock app API with objc Magic. I would love to be able to start the timer from a script. I use it all the time. I know I could use the notifications module for a simlar effect. But I really like the timer app. I never miss it. I only use it when I can not miss something. But I use 4 or 5 times a day. I really hate the tumbler interface for picking dates and times on iOS. I feel it's so flawed, just trying to be pretty. But klunky. Ok, it works. But I don't like it 😱😱

      1 Reply Last reply Reply Quote 0
      • lukaskollmer
        lukaskollmer last edited by

        I don't think this is possible. To my knowledge, there is no API for accessing system alarms or timers.

        Phuket2 1 Reply Last reply Reply Quote 1
        • Phuket2
          Phuket2 @lukaskollmer last edited by

          @lukaskollmer , ok thanks. Was worth asking.

          1 Reply Last reply Reply Quote 0
          • ccc
            ccc last edited by ccc

            From http://stackoverflow.com/questions/8722683/how-i-can-open-native-alarm-clock-in-iphone-by-using-code

            • clock-worldclock://
            • clock-alarm://
            • clock-stopwatch://
            • clock-timer://
            • clock-timer-running://

            These try to open the Clock app but then fail. :-(

            This one might help: http://stackoverflow.com/questions/6696346/iphone-uilocalnotification-as-alarm

            1 Reply Last reply Reply Quote 1
            • omz
              omz last edited by

              Unfortunately, the built-in Clock app has some "privileges" that aren't available to third-party apps (which typically use local notifications for alarms). For example, the Clock app can override the mute switch, show a countdown timer on the lock screen, an icon in the status bar, etc. I'm pretty sure that it's not possible to set alarms in the Clock app programmatically in any way.

              1 Reply Last reply Reply Quote 2
              • Phuket2
                Phuket2 last edited by

                @omz , @ccc. Thanks guys. As I say was not important. But I use clocks a lot. I have about 6 Alarms every day. And they are very important to my routine. As I am sure you are aware , this is not like a calander alert. The apps in ios clock are great for daily routine things.
                Eg. One of my alarms is to order food from FoodPanda. A big food delivery service in Asia. If I order then I set a timer for 5 mins. It takes that long to see if you order has been accepted or not. If it's accepted then I set another alarm for 40 mins. Is normally a max 60 min delivery time.

                If some say they will buy me a drink next time, for fun I start the stopwatch. I tell them I do it. Just for fun. The stopwatch work faithfully over days 😱

                Also with a lot of friends around the world, convenient to use the world clock also.

                But hopefully one day apple will provide access the API without exposing other parts of the API that are not considered safe. I suspect iOS clock code is old but very stable code. I am sure to just change one byte in that class/app would give a lot of apple programmers some sleepless nights

                1 Reply Last reply Reply Quote 0
                • Phuket2
                  Phuket2 last edited by

                  "Foodpanda' app. Actually it's a very well written app. German company.
                  Well, I am getting food soon 😱

                  1 Reply Last reply Reply Quote 0
                  • Phuket2
                    Phuket2 last edited by Phuket2

                    Sad night, Prince died
                    Lost my appetite

                    1 Reply Last reply Reply Quote 1
                    • cvp
                      cvp last edited by

                      Surprise, the Launcher app is able to start the clock native app in today widget...

                      1 Reply Last reply Reply Quote 0
                      • cvp
                        cvp last edited by cvp

                        I've defined an app clock-alarm:// in Launcher and I can start the native clock in alarm mode, but only from the today widget.
                        But if I try a script with webbrowser.open or

                        app = UIApplication.sharedApplication()
                        app.openURL_(nsurl('clock-alarm://'))

                        That doesn't function...

                        Phuket2 1 Reply Last reply Reply Quote 0
                        • Phuket2
                          Phuket2 @cvp last edited by

                          @cvp , thanks for replying. I also had a wick go with launcher. Also no luck. It's ok. Not a big deal. Just a nice to have 🙄😬

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Powered by NodeBB Forums | Contributors