ios


Xcode 8 APS Environment Entitlement won't set to production


I have push notifications working on my app. I went to go submit a new app update and I ran into an error with APS environment not being set.I hit fix issue and it created the entitlement file with APS environment set to development. To submit the app I obviously want this set to production. I change the value to production and proceed to archive the app for submission.It throws an error in the capabilities section for push notifications with the last past "Add the Push Notifications entitlement to your entitlements file" being red.So when I hit fix issue, it then changes the value of APS environment to development.I came across a suggestion to inspect the provisioning profile and look for the APS environment property.I went through the process of archiving and selected "Upload to App Store".When I finally reached the summary, I clicked on the provisioning profile attached to the binary and entitlements.I open the provisioning profile in a text editor and looked for the APS environment property. I did find the property and it is set to production in the provision profile. I decided to try another suggestion, which was to recreate the distribution provisioning profile. I did make a new one and that solution doesn't work either.From what I understand, the APS environment property is based on the value in your provisioning profile.
Any help would be appreciated. Thanks.
Turn off the "push notifications" in Capabilities then re-build.
Update
After hours of debugging, no matter how you configure Xcode8 or build with whatever scheme(debug or production), you will always get a deviceToken for development environment from APNS. I tried to remove my app on my test device which build directly from Xcode8.1 with production scheme. Then I installed my app from AppStore, which was archived from Xcode8.1 with same configuration two weeks ago, the AppStore version's notification service works fine, which proves that Xcode did set the right entitlement value for production environment. So, the solution is: leave the entitlements file alone, and keep "Push Notifications" switch on in Capabilities, do any fixes Xcode asked for. Hope this would help you.
Try to re-enable "Push Notifications" capabilities in , it worked for me, if this don't help, try to delete file with entitlements in your project, and again re-enable "Push Notifications" capabilities in your project settings
For me XCode 8 'Automatically manage signing' feature do it automatically & correctly when archiving according to provisioning profile we select for deployment method.

Related Links

Facebook FBSDKLoginManager/logInWithReadPermissions Swift Example not using Parse
Mix colour in Sprite Kit
Time and date for camera photos
Why Xcode 7 shows around 12% code coverage when there are no unit tests at all?
XCode iOS - How to animate position of a UICollectionView? (Slide in from bottom of screen)
iOS Swift appending value to array
How can I add different line spacing for different parts of NSAttributedString?
Xcode- Implicit conversion from long long to long changes value from 10,000,000,000,000 to 1,575,856,128
HealthKit: save samples of type HKCategoryTypeIdentifierAppleStandHour
Autoresizing UICollectionView: first UICollectionViewCell overlaps
UIAlertView' was deprecated in iOS 9.0
UIWebView enable zoom and disable scroll
Your binary is designed for iPad Pro. Upload iPad Pro screenshots for a better App Store experience warning
swift nil when setting the value of text field
How to know if the append function is filling the properties of a NSObject
IOS Memory buildup when changing IFRAME src with angular/Embedding youtube in cordova?

Categories

HOME
amazon-s3
demandware
youtube
applet
azure-web-sites
anylogic
backand
quickblox
xcode8
tsql
gluon
mobilefirst-adapters
eloqua
sparkpost
sonata-admin
lag
plc
snort
stm32f4discovery
pcap
atg
azure-ad-graph-api
line-breaks
broker
profiling
core-location
mediator
iteration
google-oauth2
rrd
ucwa
codewarrior
rdf4j
stl
apache-commons-httpclient
cloudinary
ose
webcenter
chamilo-lms
draggable
powerbuilder-conversion
bezier
runc
csr
essbase
consistency
monogame
xargs
requirements-management
federation
simple.odata.client
kony
assembly-references
qtcpserver
gwt-material-design
amazon-dynamodb-streams
jasny-bootstrap
selenium2library
rabbitvcs
pakyow
cucumber-java
actioncable
quasar
user-registration
wss4j
keypad
genexus-gam
byte-order-mark
javaw
simpleadapter
tortoisecvs
jasmin
private-methods
clearcase-remote-client
notifydatasetchanged
dojo.gridx
nine-patch
modalpopupextender
pydatalog
preon
freemind
pligg
progressdialog
pixelsense
onmouseout
jtemplates
staging
treetop
android-3.1
machine.config
noaa
myisam
unitils
maemo
polyglot
drwatson
plumtree

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App