iOS Push Notification showing invalid token - apple-push-notifications

I have been facing this invalid token when I test the iOS push notification.
It works fine if I build the project in development mode.
This are the following I used to create certificate.
1. I generate certSigningRequest and saved.
2. Generate all development, adhoc, distribution certificate and provisioning profiles.
3. Test in development works fine.
4. Archive in Adhoc mode and installed the app. Now fail to push by showing invalid token. enter image description here
Please suggest some help, I have been trying many days but still no solution.
Best regards

Guys there is one update,
If I choose the server as gateway.push.apple.com, it works fine.
Success image

Related

App store connect operation error asset validation failed

Hi I got this error while uploading archive with xCode.
Does anybody had this error before ? Thanks
I exported IPA from Organizer and used Transporter app which finally helped me to see the issues.
Install the "Transporter" app from the MacOS app store.
From Xcode's organizer, select your archive and press "Distribute App"
Instead of "Upload", select "Export" and proceed as usual.
Drop the exported .ipa into the transporter and press "Deliver".
In case your current app version is already in approved but not released status, you cannot use the same version number. You must go higher version.
In my case, it was the version number. Once App is published on App Store, to push update use a higher version number e.g 1.0.1 (if in production we have App version 1.0.0).
Ways to fix this:
Check if the new version is greater than the previous version.
In the issue navigator, you just need to apply the changes recommended by Xcode. Start clicking the issue to see the recommendations, it will prompt automatically.
Download Transporter, to see the details of the error.
You need to export appName.ipa from Xcode
Upload the appName.ipa in the Transporter
I had the same problem. Even though validation continued to fail, I eventually just tried clicking on the "Distribute App" button in Organizer. That also failed, but gave me a much more helpful error message. Turned out that the issue had nothing to do with Assets. I added a redirect uri scheme that contained an invalid character. I fixed that, and the validation succeeded.
I was getting the same error but when i tried to upload the app, it gives me the detailed info, i was using the same version for the latest build which apple doesn't accept. I just changed the version number for that build and able to upload the app successfully.
There is something wrong in your assets. Either the app icons are not correct/missing OR you need to check your images.
I am also encountering this error with an Ionic project. Even though my build failed Xcode validation, I tried to distribute it to the App Store anyway, and received the following error, which provided more detail:
Missing Info.plist value. A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'xx.xxxxx.xxxxxxxx'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7. With error code STATE_ERROR.VALIDATION_ERROR.90713 for id 97fb5968-9248-4336-a622-e015181dd333
In Xcode I examined the app/app/assets and under AppIcon the 1024x1024px icon was missing. I added a file, generated a new build, and subsequently was able to Archive, validate and deploy.
This error message occurs by different situactions, to address your problem you can distribute your app directly to get more detail error message.
I got same message because I overrite my ios folder with a older one,
issue fixed by replacing a ios folder with a new one.( you can run "flutter create newProject" to get it)
The XGA-sized icon for the App Store cannot have an Alpha channel (and only that one - all other assets are OK with Alpha channels... go figure). It's one of the many, many unnecessary quirks Xcode / AppStore Connect have that drive me nuts.
In my case, the app was approved for release with the same version number. So I have to cancel the release to validate and distribute the app with the same build number. Or you can change the build number.
You can cancel the release in AppStore connect. It's a blue button on the top of the page.
Found that the problem was with the assets like it's said in the error. Don't know if it's a new requirement by apple or if it's an old one but you cannot have an alpha channel in your assets. So I just edited all my assets and deleted the alpha channels and then it worked ! Hope it help ;)
I just changed the iOS build version 3.6.3(92) to 3.6.4(92) from runner and it works fine. So, try changing your build version properly.
In my case two mistakes, I did
The first one is the store version and Xcode build versions are not matching
The second one is something wrong with our assets. (Either the app icons are not created/missing or other images)
If you have already deployed (to the app store) the same version of the app you are attempting to validate for TestFlight, you will see this error message. The new TestFlight release must have a succeeding version number in comparison to the latest version of the app, if it is already on the app store.
Remove alpha channel only for the icon "App Store iOS 1024pt" (Assets.xcassets) and you will fix the issue "App Store Connect Operation Error - Asset validation failed"
In my case there were some errors with the icons in Runner/Assets.
I just deleted those images was shown in the image bellow and everything works fine.
If your app has "Approved" state, but it is not released yet - you can not use same version number.
You have two options:
increase version number (not just version code);
cancel release (nothing will be deleted, just your approval will be cancelled), validate and distribute app, submit for approval.
i have found a solution to this problem,
you need to double check that, you have check the iphone or Ipad checkbox on xcode , but you have to upload the Iphone icons or ipad icons, one of them is missing.
I got the same error message when I tried to validate my app, so I tried to distribute the app and I got a full error message, in my case was:
Invalid Provisioning Profile Signature. The provisioning profile included in the bundle 'netoloboapps.com.mensagensProntas' (Payload/Runner.app) cannot be used to submit apps to the iOS App Store until it has a valid signature from Apple. (Expired profile signing certificate.) For more information, visit the iOS Developer Portal. With error code STATE_ERROR.VALIDATION_ERROR.90165 for id b493faef-bcf5-4732-995d-f7c6609a0354
My problem was a expired signing certificated. So here's the tip, check out the complete error message and see the source of the problem.
I got the same error too. I contacted Apple and received the following reply:
Thank you for contacting Apple Developer Program Support.
We are sorry to hear that an error message is displayed in Xcode and that you are unable to distribute the app.
We have checked our available resources and found that none of them correspond to the error you have inquired about.
We have identified a guide that may be related to the error you are experiencing and are sending it to you below.
Validate an archive of your app
If you need more information, please consider visiting the Apple Developer Forums, where you can discuss development issues with Apple engineers and other developers.
Developer Forums
https://developer.apple.com/forums/
For feedback on Xcode or to report a bug, please use the Feedback Assistant.
Developer Feedback Assistant
https://developer.apple.com/jp/bug-reporting/
We apologize for not being able to help you with your inquiry, but we hope the above resources will be of assistance.
I found same issue, but i dont see error reporting anywhere. I build my app with Flutter and i try edit version in pubsbec.yaml. and i edit too version app in xcode. then my app success validate and distribute
In my case I was messing some AppIcon resolution images for iPad. Also I made sure that the version and the build are set correctly.
1- Go to the icons folder
/myapp/ios/App/App/Assets.xcassets/
2- Open the photo
3- Click File, then choose Export
4- Deselect from Alpha and replace the image
This should be applied to all icons
I got the error when the WatchApp uses the healthkit api but not adds description into info.plist.
I use the Transporter App to upload, it shows the error summery.
For Flutter Developer, Change the version number. From Example in pub.yaml, 1.0.0+4 to 1.0.1+5.
If this is a new project and you are uploading to the App Store for the first time, you must have app icons set in the Assets folder.
This is why it could say "Asset validation failed".
The only one solution helps me is transfer app to other AppStore account.
Before uploading the app to the app store first we need to validate the app to check whether the app has any errors or not.
Another advantage of validating app is it’ll provide detailed error.
I found 3 scenarios on which this error will occur:
=> if we are not updating the version name
=> Alpha channel in all the images of Assets.xcassets/ should be removed (you can download alpha channel remover for that)
=> if we have selected Ipad in general settings Portrait, landscape right , landscape left should be enable if we have given just portrait mode we will face the same error.
Happy coding :)

How to enable phone auth firebase, flutter, xcode

I have Flutter Firebase auth configured and it is working perfectly with Android. But with ios, I cannot seem to get it to work.
Am using Xcode and Flutter on MacOS deploying to a physical iphone()14.4) and I have followed the instructions:
Added googleservice-info.plist into project via Xcode.
Under Signing and capabilities in Xcode, Provisioning profile, Team , Bundle identifier, Signing certificate(Apple Development certificate) configured with no errors. Push Notifications(Release) also enabled.
In developer.apple.com, under Identities->myapp, I have enabled Push Notifications. I have also created development and production SSL certs inside Push Notifications. Also created key for Apple Push Notifications service (APNs).
In my Firebase project, I have added iOS apps and all the fields are populated. Under Cloud Messaging, in iOS apps, I have uploaded the APN key and both development and Production certs I got from Apple Developer.
I run 'flutter run --release' (I am using a physical iphone(14.4)) because debug mode is not allowed on 14.4. App installs successfully. I am able to navigate pages and even register email/pw with Firebase. But when I do a Firebase phone auth (verifyPhoneNumber), I keep getting an error as indicated by a snackbar error I coded in. Problem is that I cannot get the specific error from the logs since I have deployed using release and flutter logs remain blank.
I don't know what else to do. Please help.
Figured it out. Problem was with URL Types under Info of target Runner. Had to add URL Scheme. For those who has this problem, refer to the below.
https://firebase.google.com/docs/auth/ios/phone-auth
iOS uses captcha with Firebase.

iTunes Connect and Xcode 8: your app has changed to invalid binary

Last week, with Xcode 7, I was able to upload without any issue. But today I am getting the message your app has changed to invalid binary.
I have seen that now with Xcode 8 a new icon 20x20 2x and 3x is added. I added one, but still getting the error.
Does anyone had similar problem?
Сheck your email!
In my case, I wasted a lot of time because I did not check my email. When you get such an error, Apple sends you an email with it's description.
For example, this is what Apple sent me:
"This app attempts to access privacy-sensitive data without a usage
description. The app's Info.plist must contain an
NSCameraUsageDescription key with a string value explaining to the
user how the app uses this data."
After days of wrestling with the same problem I finally got my app successfully submitted, but only after being on the phone with Apple Developer support.
A couple of things to keep in mind:
Make sure you set the Info.plist description keys for any entitlements. This is necessary for iOS apps. Mine was a macOS app, so this didn't apply.
Head over to iTunes Connect, and recreate all your provisioning profiles and code signing certificates if you're not 100% sure that they're valid. You can do it for both Developer and Distribution.
In Xcode, turn off automatic code signing for your app, and any build targets (you can try automatic code signing in Xcode after completing steps #2 and #4 but that wasn't what worked for me).
Go to Xcode preferences, and click your development team, and in the sheet that comes up, you should see some "Download" buttons beside the newly created (in iTunes Connect) code signing certificates and provisioning profiles. Click them all. And so you don't get confused in step #5, delete all the other stale provisioning profiles and code signing identities for this app.
In Build Settings for each of your targets, make sure that the Release build setting for code signing, and provision profile are set to the above newly created code signing certificate and provisioning profile.
Bump your build number.
Deep clean your project (Option-Shift-Command-K).
Archive build your app.
In the Organizer that opens up, select the newly archived app, and validate (it always validated, but I still would get Invalid Binary later).
Export the build and select the option "Save for Mac App Store Deployment" or similar.
When prompted, use the same Provisioning Profiles you used previously and save.
Open the .pkg in Application Loader which you can launch from Xcode > Open Developer Tool > Application Loader menu.
I was't getting any emails on the Invalid Binary issue. Instead, I was lucky enough to have set up my iPad with iTunes Connect, and so, like clock-work, I was getting notifications within a couple minutes of uploading the app: "Your app ... has changed to Invalid Binary."
If you don't get one of these Invalid Binary notifications, that's a good sign. Another 10-15 minutes later, I checked the iTunes Connect portal, and I could finally add the uploaded build and submit for review.
After a while of searching, as a last-ditch effort I added every possible 'NS...UsageDescription into each of my target's Info.plist and this seems to have worked. After process of elimination, I deduced that it was either the NSAppleMusicUsageDescription or the NSFaceIDUsageDescription key-string pair that was preventing the upload from being successful so I just added them even though I don't use either in my project. I have also read on some other threads that something with a new version of Xcode required them to have the NSAppleMusicUsageDescription even though they didn't use anything related to Apple Music.

iTunesConnect Update app strange error

I am just trying to update the old version with the new one. I am using the latest version of Xcode (version 6.4) and I validate my app bundle before submitting the app.I submit it from Xcode to iTunes Connect.
After all the setup, when I clicked on the Submit for Review button I got error like below.
The app's Info.plist can't contain values for the UIRequiredDeviceCapabilities key that would prevent this app from opening on any iOS device.
I check in my project .plist file there is appear like following screenshot.
But I don't know why this error occurred during the submission of the app.
As some of the comments above state, you have two options here.
Option 1:
You delete the key from the plist entirely. Wouldn't recommend that as you want it to run only on devices with armv7
Option 2:
You can add the normal architecture of 64 to the plist. This will allow it to run on more devices, thus also getting it successfully submitted.
Lastly, you could try to use Application Loader. There's a small chance this will actually make a change, but it doesnt cot anything and is worth a try. If nothing works out, you can contact iTunes Connect at: ituesconnect#apple.com
Hope that helps, Julian
I did fixed this issue by I removed the UIRequiredDeviceCapabilities from Project Plist and then create IPA and upload it to iTunesConnect.
Then that will be submit without this error.
Maybe you must check your Build Settings. I have your same .plist and I don't have any trouble to upload to App Store.
Check this values:

APNS Assistant not launching on Apple Dev Provisioning Site

I just want to see if I am going crazy or not. I have the following App Ids in the provisioning portal.
com.foo.*
com.foo
com.foo.FooApp
The first was for before we needed push.
The second was a mistake, but I can't delete it.
The third is for my current push notifications
The problem that I have is that the APNS assistant will not launch when I click the configure button for my com.foo.FooApp App Id. I created the push certificates and then revoked them, but am unable to recreate...?
Thanks!
mark
I have the same problem. The APNS assistant doesn't launch when I click the configure button. Tried everything I can think of, like creating additional AppID's and then trying to configure the SSL certs for those, but same result - clicking the configure button does nothing.
Also reported it to Apple (2010/10/12) -no response yet.
Just tried again (2010/10/15) - Apple fixed the issue. All working

Resources