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 /
This question was closed Oct 24, 2013 at 06:12 AM by DeveshPandey for the following reason:

Solved by myself

avatar image
0
Question by DeveshPandey · Oct 11, 2013 at 07:53 AM · iospush notificationnotificationservices

Problem in Register for remote notifications

Hi Guys,

I am trying below code, but its not working, what I am doing wrong?

  var tokenSent = false;
 function Start() {
             NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert | 
                                         RemoteNotificationType.Badge | 
                                         RemoteNotificationType.Sound);
         }
         function Update () {
             if (!tokenSent) {
                 var token : byte[] = NotificationServices.deviceToken;
                 if (token != null) {
                     Debug.Log("Registered!")
                     tokenSent = true;
                 }
             }
         }

I simply take a new scene and put this script on main camera, change the bundle identifier and Build and Run(CMD+B).

XCode console never print the message "Registered!", please let me know where I am doing wrong, I guess that, there is any mistake in provision profile. May be two or more app installed with same provision, therefore its creating problem???

Waiting for your replies.

Comment
Add comment · Show 4
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
avatar image mattssonon · Oct 11, 2013 at 08:05 AM 0
Share

Did you properly configure your app for push notifications in the Provisioning Portal? There's a throrough guide here: http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1

avatar image DeveshPandey · Oct 11, 2013 at 09:24 AM 0
Share

@mattssonon : yes I have configured it properly, I marked as push notification enabled and also create "Development SSL Certificate".

when I was used this provision profile with PushWoosh then it was working fine,

Thanks!

avatar image supernat · Oct 11, 2013 at 03:08 PM 0
Share

The last time I tried using Debug Log in iOS, the XCode console would not show any statements from Unity. I.e. Unity Debug.Log no longer goes to the console. It may be you have to select Development Build or they may have fixed it since then. I created an Objective C method that calls NSLog for my logs and pipe all logs through that now. $$anonymous$$y point is are you sure that code isn't being reached?

avatar image Dinksg · May 25, 2016 at 03:54 AM 0
Share

By any chance did you fix the problem ?

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

18 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

Related Questions

In NotificationServices, how do I know when the token was received/denied? 0 Answers

Remote Notifications - Triggered by user or not 2 Answers

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

Detect if app was launched from a local notification 0 Answers

Push Notifications (to Specific devices) 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