Stripe-ios: iOS 11 support

Created on 18 Oct 2017  路  17Comments  路  Source: stripe/stripe-ios

To make it easier to diagnose your issue, please fill out the following:

Summary

The examples don't work with iOS 11

Code to reproduce

pod update in terminal.
Also using PKAddressField anywhere in Swift code

iOS version

What version of iOS are you observing the problem on?
11

Installation method

How did you install our SDK?
pod install

SDK version

What version of our SDK are you using? You can find this by either looking at your Podfile.lock (if you're using Cocoapods), your Cartfile.resolved (if you're using Carthage), or by looking at the value of STPSDKVersion in STPAPIClient.h.
11.3

Other information

Anything else you can include that'll make it easier for us to help you!

Most helpful comment

It's cool, I didn't take it as mean :) I know how annoying it is to have warnings pulled into your project by a third party that you can't do anything about. I'll try to get this all sorted out ASAP!

All 17 comments

Sorry you're having trouble. Can you give us the specific error message you are seeing so we can try to help you fix the problem?

screen shot 2017-10-19 at 13 55 30
screen shot 2017-10-19 at 13 55 24
screen shot 2017-10-19 at 13 55 17
screen shot 2017-10-19 at 13 55 06

Hi, thank you for your help. Please see the screenshots above.

Are you using cocoapods with or without frameworks enabled?

I have not been able to replicate your exact errors locally when running cocoapods. Can you provide me your podfile and your minimum iOS version you are targetting with your app? A sample xcode project that replicates the issue would be even better. Thank you for your help and patience as we try to work out what is happening.

Thank you for your quick reply.
I am using the following set up.
The deployment target is iOS 11.
platform :ios, '11.0'
use_frameworks!
target 'AppName' do
pod 'Alamofire', '~> 4.4'
pod 'Stripe'
end

I have just created a brand new Xcode project targeting iOS 11.0 and used your Podfile as you pasted here, and I do not see the warnings or errors you have shown in your screenshot. Can you create an example project which replicates the issue and send it to me so I can investigate further? You can send it to [email protected]

Thank you!

Will do.
Thank you for your help Brian.

I'm having the exact same issues described by @massoud12345

These errors/warnings are due to Apple having updated PassKit for iOS 11. http://codeworkshop.net/objc-diff/sdkdiffs/ios/11.0/PassKit.html

The Stripe SDK supports iOS versions back to iOS8 so we cannot simply move over to the new iOS 11 only methods. Locally the projects appear to build without deprecation warnings since the StripeSDK.framework has a minimum version of 8? I also do not see any ARC implicit conversion error at all like is shown in the screenshot. Same as I said before, if you have a project which replicates the error please email to me so that we can investigate.

Thanks,
Brian

Just going to ignore them for now as they鈥檙e not really stopping development - I just hate having warnings.
I think just inserting

if #available(iOS 11.0, *) {
// use the feature only available in iOS 11
} else {
// or use some work around
}

should take care of the warnings

We'll investigate adding some availability guards or superfluous warning suppression for our next release, sorry about that!

I鈥檓 sorry if that came off as mean, I was just trying to help. Really grateful for this library and everything you guys have done!

It's cool, I didn't take it as mean :) I know how annoying it is to have warnings pulled into your project by a third party that you can't do anything about. I'll try to get this all sorted out ASAP!

Update on this issue: The warnings are silenced in https://github.com/stripe/stripe-ios/pull/823 which will be included in our next release (all cases are actually properly guarded against, just not with the new @available language feature that Xcode 9 looks for).

Additionally, the compilation errors in the original post appear to be from user alterations made to the example project and not a bug in this repo or the sdk code itself.

If anyone else runs into issues on Xcode 9 or iOS 11 please open a new Github issue and we'll try to get it sorted out as soon as possible.

Thanks,
Brian

@bdorfman-stripe The warning still persists when using Carthage. I have the latest version of Stripe SDK: 11.5.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

billinghamj picture billinghamj  路  6Comments

provTheodoreNewell picture provTheodoreNewell  路  5Comments

mansoorshahsaid picture mansoorshahsaid  路  4Comments

paynd picture paynd  路  3Comments

aurelhubert picture aurelhubert  路  6Comments