Getting an error from push notification

前端 未结 15 2123
失恋的感觉
失恋的感觉 2020-12-01 02:39

In my app, I need push notifications. I am implementing all the instructions from the push notifications docs. But I got an error from Push Notification:

Fai         


        
15条回答
  •  渐次进展
    2020-12-01 03:22

    First thing you have to run applcaiton in device.

    This is will happen in xcode 3.2.6. Because when you are getting everything perfect. But your application is not registering in your iphone, ipad or ipod. You need to generate a Entitlement.plst file.

    • Step: First select your project in xcode create a file. Select codesign file named it entitlement.plist(default name).
    • Put it on resource folder.
    • Right click open as xml editor.
    • Then open your provisionfile like your_apllicationName.mobileprovision (which you have created for Apns server ) in textedit mode.

    Now copy some lines like the following from your provisioning profile into your entitlements file:

    application-identifier
    xyz.com.company_name.app_name
      aps-environment        
                development
        get-task-allow   
    
        keychain-access-groups   
    
            xyx.*      
        
    
    • Save the entitlement.plist file.
    • Run your applcation you will notify by Apns server.

提交回复
热议问题