Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by bac9-flcl · Mar 09, 2014 at 03:31 PM · ioslocalnotificationnotificationservices

iOS local notifications never appear

Hi. I'm using Unity 4.3 and having a bit of a problem with getting local notifications on iOS to display. I'm using this code to schedule one:

     var notification = new LocalNotification();
     notification.fireDate = System.DateTime.Now.AddSeconds(10);
     notification.alertBody = "Hello.";
     NotificationServices.ScheduleLocalNotification(notification);

The notification never appears though. What exactly do I have to do besides using that code to get it to work? The documentation isn't mentioning anything, but maybe I need to change something in the app settings through XCode? Or maybe I need to add some more code elsewhere? Or maybe I need to add certain frameworks to the app?

At the moment, the notification is just completely absent no matter the lock state of the phone and no matter the state of the app (paused, closed). Unfortunately it's extremely hard to find any information about local notifications on the net besides official Unity and XCode docs as absolute majority of questions and threads are dedicated to push notifications which aren't exactly what I need.

P.S.: Besides, shouldn't I be seeing my game in the Notification Center section of iOS Settings app if notifications were working correctly? That's not happening either.

P.P.S.: I've heard there were some huge problems with how System.DateTime works on iOS in Unity 4.3 - could it be the reason for the issue (i.e. notifications are created correctly, but the scheduled time they get is completely wrong)? I'm building my XCode projects from PC, if that matters.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by bac9-flcl · Mar 10, 2014 at 05:50 PM

Solved the issue. Turns out I was right - Windows-based XCode project generation is to blame (System.DateTime was indeed working incorrectly) and should be avoided. After building the project on Mac, notifications appeared and lots of other time-dependent functionality stopped dropping errors.

I sure hope Unity developers will fix it as soon as possible.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

iOS Notifications Resume Game 0 Answers

iOS LocalNotifications Not Changable 0 Answers

Not able to receive notifications in all devices 0 Answers

iOS Local Notification doesn't make a sound 1 Answer

[iOS] NotificationServices.localNotifications is empty when game is minimized 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges