1

I have an app that is build upon XCode 7.3 and swift 2.3 version and is live on app store. On iOS 9 device token is successfully generated but when I test it on iOS 10, device token is not generated. I can't debug it on iOS device because XCode doesn't support iOS 10 devices. So for that I am archiving with production mode and then I am testing on iOS 10 devices but unable to get device token. I know that for iOS 10 there is a new framework for notification but that doesn't support in XCode 7 . Is it any bug on iOS 10 OS or am I doing it some wrong way because I don't find any solution. Also due to some reasons I cannot convert code to swift 3.0.

I am getting a strange issue. On development profile device token for iOS 10 is generated but on production mode it is not generated. Any possible resons.

ankit
  • 3,537
  • 1
  • 16
  • 32

2 Answers2

1
  1. Download latest XCode(8.1 is available now)
  2. Then follow the steps mentioned in the following link to handle push notification for iOS 10 and above Handle Push notification for iOS 10

  3. Then test the app. You will get the device token.

Community
  • 1
  • 1
Bharath
  • 2,064
  • 1
  • 14
  • 39
  • I cannot convert that code in swift 3.0 now right now due to some reasons. – ankit Nov 12 '16 at 07:28
  • @NA000022 : You don't need to convert your code to swift 3.0. 1. If in case your project is made of Objective-C code then you no need to convert it. 2. Even if your project is made of Swift code while you open our project in latest version of XCode it will ask you wether you need to swift the code to Swift 3.0 or maintain the existing swift version. As of now you can choose "Later" and proceed with your development process. – Bharath Nov 12 '16 at 07:36
0

i too had same issue but resolved by doing the below steps

Enable "Push Notifications" in Xcode, under Targets -> Capabilities -> Push Notifications Attached image for reference

Note: Provisioning Profiles Should be in Active State

Sreenath S
  • 669
  • 6
  • 9