iOS 10 Notification Service Extension - apple-push-notifications

I'm working on the iOS 10 APNs function, trying to add Notification Service Extension to an existing App, add the function of pushing an image to the App.
After the extension was added, it did receive the pushed message. But couldn't receive the image, the function(wrote in the extension) of downloading the pushed image didn't execute during debugging. I checked the content in the App package, confirmed that the extension was installed in the App, it just didn't work.
What made me confused was that: I built a new testing project with same bundle id. The testing app could receive the pushed message and show the image correctly.(please see below screen shot)
What's wrong with the existing project? I tried to find the difference between the existing project and the testing project, yet found nothing in the code, setting, environment.
Does anyone encountered this before? I have been struggling in this for a week...
reference:
WWDC 2016 APNS Guide: https://willowtreeapps.com/ideas/wwdc-2016-rich-notifications-in-ios-10
Apple notification guide:https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ModifyingNotifications.html#//apple_ref/doc/uid/TP40008194-CH16-SW1

Finally this bug was fixed, please see the attached image. XCode recommends setting the architecture as automatic and I did so, then the notification service extension worked and could receive the pushed image. I don't know why this setting caused the problem, but I'm sure it works.

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 :)

Xamarin iOS Library can't get location

I have a vendor provided .framework file that I created an iOS binding project for using Objective Sharpie. I can call into the library, get callbacks, pull data, mostly everything works except the library being able to access the current location. The public headers for that project are here StripeTerminal
In my C# code, I used the Xamarin.Essentials to pull the current location.
var location = await Geolocation.GetLastKnownLocationAsync();
This returns with my location both in the simulator and on a real iPhone. I can see the access is granted to my app in the Privacy-> Location Services menu.
I have the below in my info.plist file, which I have tried targeting 9.0 SDK and 12.0 SDK.
<key>NSLocationWhenInUseUsageDescription</key>
<string>Location required for accepting payments.</string>
In an example XCode project provided by the vendor, that is able to pull the location by inspecting their verbose logs. In the Xamarin app, their logs get stuck on a requestLocation and never continue past it. I even tried setting the Link option to Don't Link and the result is the same.
What is wrong with my binding project that would prevent a native framework library from being able to access the location?
The issue was a mix of how Xamarin works and iOS. I created a CLLocationManager object in my C# code and setup a listener for location changes, except it never worked. So I tried the Xamarin.Essentials package to get the current location using GetLastKnownLocationAsync and that worked every time, so it wasn't a permission issue or a simulator issue. Digging into the Xamarin.Essentials code I found the below.
NSRunLoop.Main.InvokeOnMainThread(() => manager = new CLLocationManager());
Reading more documentation, I found that the CLLocationManager can only be successfully created from an active run loop. Wrapping calls into the Stripe Terminal iOS SDK in the NSRunLoop.Main.InvokeOnMainThread allowed things to work as they were creating a CLLocationManager expecting the call to be in an active run loop without checking first, or documenting that behavior. Stripe's internal code waited on a callback, which never happened, thus hanging the SDK in a weird state.

Error When Attempting to Upload a Build to iTunes Connect

This post relates to a rapidly changing event.
I am getting an error while trying to upload a build to iTunes Connect. This is the first time that I have seen this error, and I can't resolve it. I have tried following advice from other posts, but that has not proved successful. I have tried removing and re-adding my account in Xcode, having the client change my role to Application Manager, manually managing signing, and attempting to use Application Loader, which returns the same error.
I have two teams associated with my account; my personal team and my client's team. I am trying to upload my client's application, which I have done many times without issue. However, I just started getting the following error today:
I don't understand why this error has started occurring today after successfully uploading builds within the past few weeks.
Did something change on Apple's end that is now causing me to receive this error after successful uploads over the recent weeks?
As #AmodGokhale pointed out, this is likely a glitch on Apple's side. I just tried to upload with the Application Loader and can confirm that it works.
If you are not familiar with the Application Loader, here is how you do it.
Archive your project
Export -> Save for iOS App Store Deployment (save it where you can easily find it).
Xcode -> Services -> Open developer tool -> Application Loader
Deliver your app
Same issue here - I had to use the application loader.
As said above you have to generate an application specific password.
This can be done here:
https://appleid.apple.com/account/manage
Look for "APP-SPECIFIC PASSWORDS" in the "Security" section, and click "Generate Password…" I typed "Loader" for the "Password Label" and then cut and paste the password generation into the login screen of the Application Loader.
All seemed to be straight forward from then on.
Hi there i do what apple recommend and i will be able to upload my app using Application Loader.
Apple respond:
Thank you for contacting App Store Developer Support. My name is Camai, and I'll be assisting you today with your upload error.
We are aware of this issue and are working to resolve it. It occurs intermittently and might be resolved by retrying your delivery from Xcode. As an alternative, you can export your IPA from Xcode and upload it using Application Loader or altool.
For more information on using Application Loader and altool, please see the Using Application Loader guide: https://itunesconnect.apple.com/docs/UsingApplicationLoader.pdf.
If you have any questions, please don't hesitate to reply to this email, or contact us by phone. We are happy to help.
Worldwide Telephone Support
https://developer.apple.com/contact/phone
I was able to overcome the issue by uploading with Application Loader.
But there is a catch here, the Application Loader v3.6 which came with XCode works and the 3.0 version which was suggested by iTunes Connect portal does not work.
Go to XCode menu XCode -> Open Developer Tool -> Application Loader

Your apple id is also attached to other itunes providers (1622) [duplicate]

This post relates to a rapidly changing event.
I am getting an error while trying to upload a build to iTunes Connect. This is the first time that I have seen this error, and I can't resolve it. I have tried following advice from other posts, but that has not proved successful. I have tried removing and re-adding my account in Xcode, having the client change my role to Application Manager, manually managing signing, and attempting to use Application Loader, which returns the same error.
I have two teams associated with my account; my personal team and my client's team. I am trying to upload my client's application, which I have done many times without issue. However, I just started getting the following error today:
I don't understand why this error has started occurring today after successfully uploading builds within the past few weeks.
Did something change on Apple's end that is now causing me to receive this error after successful uploads over the recent weeks?
As #AmodGokhale pointed out, this is likely a glitch on Apple's side. I just tried to upload with the Application Loader and can confirm that it works.
If you are not familiar with the Application Loader, here is how you do it.
Archive your project
Export -> Save for iOS App Store Deployment (save it where you can easily find it).
Xcode -> Services -> Open developer tool -> Application Loader
Deliver your app
Same issue here - I had to use the application loader.
As said above you have to generate an application specific password.
This can be done here:
https://appleid.apple.com/account/manage
Look for "APP-SPECIFIC PASSWORDS" in the "Security" section, and click "Generate Password…" I typed "Loader" for the "Password Label" and then cut and paste the password generation into the login screen of the Application Loader.
All seemed to be straight forward from then on.
Hi there i do what apple recommend and i will be able to upload my app using Application Loader.
Apple respond:
Thank you for contacting App Store Developer Support. My name is Camai, and I'll be assisting you today with your upload error.
We are aware of this issue and are working to resolve it. It occurs intermittently and might be resolved by retrying your delivery from Xcode. As an alternative, you can export your IPA from Xcode and upload it using Application Loader or altool.
For more information on using Application Loader and altool, please see the Using Application Loader guide: https://itunesconnect.apple.com/docs/UsingApplicationLoader.pdf.
If you have any questions, please don't hesitate to reply to this email, or contact us by phone. We are happy to help.
Worldwide Telephone Support
https://developer.apple.com/contact/phone
I was able to overcome the issue by uploading with Application Loader.
But there is a catch here, the Application Loader v3.6 which came with XCode works and the 3.0 version which was suggested by iTunes Connect portal does not work.
Go to XCode menu XCode -> Open Developer Tool -> Application Loader

Local Notification is cleared from notification center after clicking the notification in iOS 8

UILocalNotification is cleared from the notification center after clicking in iOS 8. But it is not cleared from notification center in iOS 7. Can I know what makes the notification clear from center?
i dont have this behavior but i did have it with location services as you said...in that case it seems that the plugin was not working properly so i had to create the project from scratch (after updating cordova to latest) then added each plugin, that fixed my problem with location services BUT now i have a problem with local notification, again i dont see the option at all in my settings, but since you are seeing it this might be related with your app being installed just where prior (iOS7 installation) was in that case it make sense that if you delete you app you will NO see your app in local notification settings at all... this is definitively related with local-notification-cordova-plugin being a pain in the neck to work properly now im really sad to see that iOS8 is conflictive with the plugin i barely found...now i'm not sure what to do, if you find a local-notification-plugin that works with iOS8 PLEASE let me know!

Resources