1

I'm making iPhone App with remote push notification .

When I build my App by Release Build and run on real iOS device, one device can get DeviceToken, but another device can't.

I checked register log in bad device, so appear these log.↓

 <Warning>: Failed to register with error : Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x174270900 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}

searching this error, i found some article like this.

No valid 'aps-environment' entitlement string found for application on app store

I thought app is build by bad provision file, but some devices can get DeviceToken. if provision file is invalid, all device can't get device token.

how to solve this error or what is difference between valid device and invalid one?

Community
  • 1
  • 1
dmnlk
  • 2,995
  • 2
  • 25
  • 30

2 Answers2

1

In Xcode, select your target. Go to the Capabilities tab. Enable the Push Notifications capability.

jazzbpn
  • 6,441
  • 16
  • 63
  • 99
0
  1. Delete your entitlements file
  2. Close and reopen 'Push Notification Capability'
  3. Everything should going on well.

Otherwise, please make sure that your entitlement file contains following item: APS Environment - development

Paradise
  • 558
  • 6
  • 17