Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tutorials > Tutorial Requests

Reply
 
LinkBack Thread Tools Display Modes
Old 06-13-2011, 02:28 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 33
fast is on a distinguished road
Default Local notification - sample app

hi,
I would add to the local notification to my app that iOS 5
displays a simple text to be displayed by the hour
targets (6AM, 12AM, 6PM, 12PM)
I created this code but no good, because it at intervals and not
predetermined hours, can anyone help?

Code:
- (void)applicationDidEnterBackground:(UIApplication *)application{


        NSDate *alertTime = [[NSDate date] dateByAddingTimeInterval:10];

        UIApplication* app = [UIApplication sharedApplication];

        UILocalNotification* notifyAlarm = [[UILocalNotification alloc] init];

        if (notifyAlarm) {

            notifyAlarm.fireDate = alertTime;

            notifyAlarm.timeZone = [NSTimeZone defaultTimeZone];

            notifyAlarm.repeatInterval = (360*60);

            notifyAlarm.soundName = @"suono tasto8.caf";

            notifyAlarm.alertBody = @"Hello universe!";



            notifyAlarm.applicationIconBadgeNumber = NO;           


            [app scheduleLocalNotification:notifyAlarm];


        }
}
fast is offline   Reply With Quote
Reply

Bookmarks

Tags
iphone, local notifications, time

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Stats
Members: 175,696
Threads: 94,139
Posts: 402,962
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jasper_muc
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:12 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0