wonderpush / wonderpush-cordova-sdk

Cordova SDK for WonderPush − Advanced push notification service for mobile applications and Websites. High volume, fast delivery and full-featured starting €1/month.
https://www.wonderpush.com
7 stars 6 forks source link

Failing to upload to App store connect when using cordova-ios < 6 #7

Closed josh-yates closed 3 years ago

josh-yates commented 3 years ago

Hi there,

I've recently had success using your plugin (at 3.0.3) with the latest version of cordova-ios (6.1.1). However this setup appears to only support iOS 11+, and we need to support iOS 9+. Since cordova-ios is the limiting factor for this, we dropped it to 5.1.1 and used the cordova-plugin-wkwebview-engine plugin for UIWebView -> WKWebView compliance.

From what I gather, your plugin (at version 3.0.3) should support iOS 9+, but when using it with cordova-ios@5.1.1 I get the following error when trying to upload to App store connect (via xcrun altool --upload-app):

 ITMS-90715: "Minimum OS too low. The Payload/{app name here}.app/PlugIns/WonderPushNotificationServiceExtension.appex extension requires a version of iOS higher than the value specified for the MinimumOSVersion key in Info.plist."

I've checked the Info.plist inside the IPA we're trying to upload, and the Info.plist inside WonderPushNotificationServiceExtension.appex, and both give a MinimumOSVersion of iOS 9.0, so I'm not sure why this error is happening.

Any help would be greatly appreciated.

ofavre commented 3 years ago

Hi Josh,

Notification Service Extensions cannot target iOS versions below 10 because they simply did not exist until iOS 10.

Make sure to set the minimum iOS version to 10 for the WonderPushNotificationServiceExtension target in your Podfile, then close Xcode and run pod install, and reopen Xcode to check it has been applied properly.

Best,

josh-yates commented 3 years ago

Thanks for taking the time to explain this and the quick response!

josh-yates commented 3 years ago

Sorry to re-open, but I'd just like to follow up on this. Is there any way to safely remove this extension during cordova prepare / build time, ideally in an automated fashion / via the command line? In theory then we could still support iOS 9 and use your cordova SDK. The warning in https://docs.wonderpush.com/docs/cordova-push-notifications-quickstart#step-3-add-the-sdk implies the plugin should work without the extension, I'm just not really sure how we could remove it ourselves.

Thanks!

ofavre commented 3 years ago

You just need to integrate normally, and make sure the minimum iOS version is 9 in the target corresponding to your application. Leave minimum iOS version 10 in the Notification Service Extension target, it won't prevent compatibility of your application itself. It will simply be used for iOS 10+ devices.

josh-yates commented 3 years ago

Thanks for the reply. However what you're advising is what we were doing in the first part and it prevented us from being able to upload to App store connect, with the ITMS-90715 error from above. Our cordova project was targeting iOS 9 using:

<preference name="deployment-target"
                value="9.0" />

and we were integrating normally. How can we resolve this?

josh-yates commented 3 years ago

I believe I misunderstood your advice and didn't realise we had to explicitly change the target of the extension. We changed the target of the extension to 10.0 in XCode, then continued the build, archive and signing within XCode - this solved the uploading error. Do you know of a way this could be automated and done via the command line?

Thanks for your help with this issue.