I've been trying to debug push notifications, but they fail silently so it's been difficult. As far as I can tell, I've correctly followed Apple's instructions, so I was wondering if anyone else sees any issues with my setup:
It used to be working, using a development certificate and a Debug build of my app. When I created the AdHoc build to start testing with others, that's when the problems started. I created a production certificate, which I'm using now on the server. I also changed the APNS destination from sandbox to production. I updated the provisioning profile (and <key>aps-environment</key><string>production</string> is present as required), and rebuilt and packaged the app as an IPA (using the new profile) which I distributed to my testers through TestFlight. I can tell that it was definitely packaged with the new provisioning profile, since I added a new tester at the same time, and TestFlight shows the new tester.
I got the testers' new device tokens and sent them all a simple alert notification: {"aps":{"alert":"hello"}}, but no success. Any tips?
One thing I found weird: I thought device tokens were supposed to change when you have a new provisioning profile? But for all my testers it seemed that the device tokens were the same ones as before. I thought that maybe the provisioning profile wasn't getting updated on their phones for some reason, so I asked one of them to delete the profile from his phone settings (by the way, there turned out to be two of them for the app, with the same name), and re-install the app using TestFlight. But, his device token actually still stayed the same. Any tips? Thanks in advance!
In case anyone else is having this problem, here's the solution: It seems to be caching the device token, so try just creating a new app in the dev center for your AdHoc build.
Related
I see that this question has been asked many times but I see no solution that works for me so I'm hoping that providing more info might shed some light.
We use appcenter.ms to test iOS apps. Until our iOS certificate expired this method worked fine. We generated a new enterprise certificate and ad hoc provisioning profile for new releases of the iOS app. Which led to the first curiosity.
I see how to upload a certificate on appcenter.ms but not a provisioning profile. I thought there was an option to do this in the past but perhaps I am mistaken. However, the app is signed with a provisioning profile before upload, so perhaps this is not needed now.
Once the app is uploaded, it can't be installed. It remains grey and when you tap it, you get the "this app cannot be installed because its integrity could not be verified" error. Again, that the .ipa is created with an ad hoc certificate and profile in Xamarin (VS for Mac).
Also, I can't install the provisioning profile on a device from appcenter.ms. You basically get stuck in a loop where you seem to successfully install the profile but have to keep doing it because it never actually installs.
I hope this is enough info for some insight and thanks in advance for any feedback.
We were able to solve this by redoing and downloading development certs and via
And also downloading and double clicking the apple development certificate here
After that our keychain showed both as trusted and we could build to the iPhone again.
The issue can be the your device is simply not registered on the developer portal and/or that ad-hoc provisioning profiles have not been regenerated.
You need to register your device, regenerate a provisioning profile with this device in it and rebuild your app using this profile.
This can also happen because of
Developer ID Notary Service - Outage
which can be checked on https://developer.apple.com/system-status/
Notarization is well explained here:
Notarization gives users more confidence that the Developer ID-signed
software you distribute has been checked by Apple for malicious
components. Notarization is not App Review. The Apple notary service
is an automated system that scans your software for malicious content,
checks for code-signing issues, and returns the results to you
quickly. If there are no issues, the notary service generates a ticket
for you to staple to your software.
Work around fix:
Select your app.
Navigate to TextFlight tab
Create External Testing group
Add one tester
Add build which you want to download using TestFlight
Open TestFlight and download an app.
In my case this was caused by trying to include an entitlement for aps-environment "development" when using an Ad-Hoc provisioning profile. The value for this environment in Entitlements.plist must match what is hard coded into the provisioning profile file - if you open an Ad-Hoc profile in a text editor you will see it expects the "production" environment.
The possible solutions depending on your requirements are to either use the Development profile/certificate, or change the aps-environment to "production" to continue using an Ad-Hoc provisioning profile.
It can also happen if you have other incorrect entitlements - worth checking what entitlements are enabled under the Identifier in Apple Developer portal and removing unnecessary ones.
I had this issue because when building the app on xCode for distribution (Product->Archive then Distribute App), I chose automatic signing. After manually signing the app and choosing my own generated certificate and profile, everything worked again fine.
I removed the Entitlements file from the Addition Resources in iOS Bundle Signing and it worked.
I think the MSAL configuration was set to debug in entitlements.plist
I have also face this issue before but for me the reason was little different
First the build was enterprise one and the build was made on the earlier Xcode version on which the iOS version you are using on the device was not supported by the Xcode.
All I did was to update my Xcode and make a new build and shared the build. After that we were able to install that build over device Hope it works for you as well
This is how I solved for myself.
In you iPhone Settings > General > VPN & Device Management you should see your company name (if an app from it is installed), and if you click on it, you will see a button like "Verify" above the list of apps installed provided by the company. Just click on "Verify".
My app is currently being tested by testers via TestFlight. The problem is that they don’t receive any push notifications sent. It’s working on my own device when connecting it to my mac and running the app directly from x-code.
I feel like I’ve tried almost everything, from changing certificate from dev to production to recreating a new production APNS certificate and build using a new profile referencing it, etc.
I know this question has been discussed on other topics but I never found the right answer in my case. I can't post images here because I don't have enough reputation but I have relevant screenshots.
Any help is welcome :)
Elements to help diagnostic :
It’s working on my device when I run the app directly from x-code.
The testers are asked properly if they want to authorize push notifications on their devices (at least the first install, after if they want to get asked again they have to do what’s described in Reset push notification settings for app)
The registering is working because I can see their devices tokens in the logs (but I have the feeling that the token is always the same, no matter if the app is built with the production or the dev certificate, not sure if it’s normal).
I have an APNS Production certificate.
I have a distribution profile, with “push notification” enabled. It’s linked with my “full” appID (and not the generic one with “*”).
I’m signin the build in release mode with the distribution certificate (not in debug mode), and I’m using the provisionning profile described above (the distribution one, linked with my app id)
And when I check in the "binary & entitlements" window just before submitting the build I see the the provisionning profile is correct and that "aps-environment" is set to "production".
Server-side : The APNS call is made by using javapns (https://code.google.com/p/javapns/) from a google app engine server. Like I said the notification are correctly received on my own device so I guess this call is working. We have a .p12 file generated from the APNS developpement certificate and a .p12 file from the APNS production certificate, and I've tried to make the call with both and it's not working. The server-side code hasn't change from the previous version and it was working in production with the app on the store. The problem is really focused on testing with testflight.
Thank you all !
If you followed Ray Wenderlich's tutorial and you made everything work in development mode, the issue most likely comes the fact that you now need to create a new .pem-file for production mode.
So, you need to perform exactly the same steps that you did with the development certificate (i.e. the .p12-file) you downloaded once more with the production certificate which you can obtain in the iOS dev center as well:
Something strange is happening currently in one of the apps i'm developing.
While developing the APNS Pushtoken could be obtained properly. As soon as I pushed the app for testflight internal testing it doesn't work anymore.
The well-known error is throwed: 'APNS Push token - No valid aps-environement-entitlement whatever could be found'
I usually solved this error through refreshing all the mobile provisioning profiles in XCode, but this doesn't work in that case.
The App ID is configured properly for push notifications production and development.
Any Ideas? Would really be glad.
The problem was that the provisioning profile was created before adding the Push Notifications to the App ID. Creating a new Provisioning Profile and download it through XCode solved it.
Big hand to Apple for screwing TestFlight. I can't seem to get anything to happen past this screen. I've
Created external testers
Upload a build with ad hoc profile (though application loader)
Turned on TestFlight Beta Testing (even tried turning it on and off to get invitation emails to send)
When adding external users they never receive and email either. Anyone have this problem?
I haven't seen this exact message, but one problem I see with your process is that you used an adhoc profile. According to Apple, you should be using an app store distribution profile:
Generate a new App Store Distribution profile containing the beta
entitlement to distribute builds via TestFlight.
As the message says, you also need to have the beta entitlement in your profile. If you created it in the last couple months - it should have it - but it's possible adhoc profiles don't. When you go to upload the binary, expand the entitlements and check to see that beta-reports-active is present and set to on.
Hopefully one of those two is your issue.
I am working on xamarin for ios.
Its was working on my older machine. But, then i had to switch to new machine and recreate all the certificates and everything for the new machine.
I have created the app ID. Then created the aps certificates and then created the provisioning profile.
In Debug I have provided the downloaded provisioning profile. But still I am getting this same error. And my app is unable to get the device token.
I am searching a lot since last night. And have done the following things with no success:
Regenerating provisioning profile and trying with the new one
I also deleted the app id itself. Recreated everything from start. All Certificates, app id, provisioning profile
Deleted all the provisioning profile from my system and device. Created new profiles and installed them.
Above are three most common solutions i found in my searches, but to my dismay nothing is working for me.
If you have any idea please throw at me. I am in a great need for that. Its holding me from submitting the app.
Please help.
The problem was xamarin studio itself. It seems that after updating form stable 5.2/5.1 version to 5.3 this issue surfaces. So i deleted the app and installed it again which game me v5.2. Now i am not udpating till i publish my app.
This link is full of people facing this problem:
http://forums.xamarin.com/discussion/22502/xamarin-studio-5-3-push-notification-error
did you add the App's Development SSL Certificate to your keychain? when enabling push notifications for the App ID you should generate a Development SSL Certificate for the App, download it and add it to your key chain.