I have implemented UILocalNotification for iOS 6 but every time the notification is launched, it is displayed as a banner. Is there way I can default it to be an alert (like previous iOS 4)?
Thanks in advance everyone!
This is a setting which you cannot set programmatically. All apps that use notifications have a setting in the Settings app which you can choose from alert, banner, or none.
So bottom line, it is up to the user to select the type of notification.
Related
I have an issue on iOS 11. All delivered notification automatically removing from notification tray after I select any action for one of them. This happens before my code start handling action. In iOS 10 everything is ok, all delivered notifications stay in delivered and disappear only notification where I proceed some action.
My app schedule reminders with custom action, 2 buttons Activate and Stop. User can receive many of them in one day, but its very important to keep already delivered notifications, because most of them is uniq and make different actions.
If it is iOS 11 new notification center behavior or known issue, where I can read about this? Thanks a lot for help.
Minimum deployment target in my app is iOS10 and I use new UNNotificationRequest for scheduling local notifications.
I am a bit (a lot) confused about the Notification Center and the app badge counter. I have designed an iOS to-do app which uses local notifications to alert users of a scheduled reminder (which they set in the app) . The app also uses the icon batch counter to display the # of tasks due "today".
At the time of a set reminder notifications correctly show up in Notification Center. However, once the app has been opened the notifications are cleared from Notification Center. The idea is that the notifications remain available in Notification Center until the user clears them.
I have discussed this with my developer and he states that notifications can only be saved in NC when we do not use the icon batch counter. This seems very illogical to me since the icon batch counter shows the # of tasks due "today" and the notifications shown in Notification Center are alerts set by the user.
Hope you guys can help here.... Thanks!
application can set its own badge (counter) independent of the notification scheduled. so u can surely set whatever counter you want to show the today's task by:
NSUInteger tasksCount = 10;
[UIApplication sharedApplication].applicationIconBadgeNumber = tasksCount;
talking about the notifications to show in NF bar, it is configurable by user in Device's Native: Settings-> Notifications-> so you cannot force the user to show all notifications in NF bar (lets say 50 for the day) if user has configured for only 5.
Coming back to your concern, when the app is launched, Notifications from NF bar are not automatically wiped off. you have to write the CODE to remove them from inside the app.
[[UIApplication sharedApplication] cancelAllLocalNotifications];
OR
[[UIApplication sharedApplication] cancelLocalNotification:<notification object>];
I was wondering how push notifications were displayed on screen for iOS 4? Since there is no notification center (iOS 5) will the push notification instead automatically be displayed as an alert or must I implement this myself?
Thanks
The code/logic to implement to send "message" push notifications is no different in iOS 4 vs iOS 5. the only difference is the appearance to the user which is a UIAlertView style notification with a "Go to App" button and an ok button. Also be aware there is no notification center that will keep track of old notifications.
I am using a UIAlertView in my code in iOS5, but rather than the classic popup window with an "OK" button to exit, I'd prefer to have my alert show as a banner at the top of the screen that eventually fades away.
Is it possible to change the style of UIAlertView to resemble the iOS 5 push notification banner or does it have to be a popup window that must be dismissed manually? If not, is there any way to use the iOS5 banner notification rather than an alert notification? I don't need to send a push notification but just need to alert the user of something that happens on the server side using the app.
Not using the SDK. You'll have to design and implement that by yourself.
Have a look at:
http://cocoacontrols.com/platforms/ios/controls/mkinfopanel
http://cocoacontrols.com/platforms/ios/controls/jhnotificationmanager
I developed an app for IPhone and it's posted to itunes for approval. Now when I test the app I found out a strange behavior which I think should be rectified. When I launch app first time, the app launched and when I press home button it closes but when I tap the app icon to open it again it opens where it was last closed.
How can I change the view to first view of the app when it's launched after closing by Home screen button?
If you don't want your app to run in the background you need to set the "Application does not run in background" key in the info.plist file. This means that your app will completely restart every time your user returns to it. Take time to decide if this really is the best move for your app. Allowing users to return to where they left off or remembering information about the last session can be a big plus.
If you do not set the info.plist value like I mention above you can manage the way your app behaves by using the: applicationWillEnterForeground: in UIApplicationDelegate or you could observe UIApplicationWillEnterForegroundNotifications. Read up on all the available notifications and methods available for this in the UIApplication Delegate documentation.