How can I open my own alarm clock in iphone using code?

I need to fill out an example application in which, when I clicked on a button that should open my own alarm so that the user can use it to set an alarm?

+5
source share
3 answers

If the Clock application supports a URL scheme, such as Phone apps tel://or Mail apps mail://, you can open it with a standard approach [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"..."]]. Unfortunately, as far as I know, this is not so, so all you really can do is invite the user to open this application to configure the alarm.

, , , UILocalNotification, .

+1

MobileClock.app URL. MobileClock.app u, URL- info.plist:

  • clock-worldclock,
  • -,
  • -,
  • -,
  • -- .

, Today. .

+1

.

URL- info.plist CFBundleURLSchemes

<array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>clock-alarm</string>
                <string>clock-stopwatch</string>
            </array>
        </dict>
</array>

sharedApplication openURL

[[UIApplication sharedApplication] 
  openURL:[NSURL URLWithString:@"clock-alarm:"]];
];
0
source

All Articles