Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 11 support #814

Closed
massoud12345 opened this issue Oct 18, 2017 · 17 comments
Closed

iOS 11 support #814

massoud12345 opened this issue Oct 18, 2017 · 17 comments

Comments

@massoud12345
Copy link

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!

@bdorfman-stripe
Copy link
Contributor

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?

@massoud12345
Copy link
Author

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

@massoud12345
Copy link
Author

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

@bdorfman-stripe
Copy link
Contributor

Are you using cocoapods with or without frameworks enabled?

@bdorfman-stripe
Copy link
Contributor

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.

@massoud12345
Copy link
Author

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

@bdorfman-stripe
Copy link
Contributor

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!

@massoud12345
Copy link
Author

Will do.
Thank you for your help Brian.

@cyrilzakka
Copy link

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

@cyrilzakka
Copy link

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

@bdorfman-stripe
Copy link
Contributor

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

@cyrilzakka
Copy link

Just going to ignore them for now as they’re 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

@bdorfman-stripe
Copy link
Contributor

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

@cyrilzakka
Copy link

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

@bdorfman-stripe
Copy link
Contributor

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!

@bdorfman-stripe
Copy link
Contributor

Update on this issue: The warnings are silenced in #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

@flexaddicted
Copy link

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

mludowise-stripe added a commit that referenced this issue Mar 2, 2022
Creates an `IdentityAPIClientImpl` implementation
of the `IdentityAPIClient` protocol which wraps
an `STPAPIClient` and configures the beta headers
and appInfo. This also simplifies the Identity
code by making all of the networking logic
self-contained in `IdentityAPIClient`.

Because none of the Identity API requests use a
public key but instead use an ephemeral key
secret, we're able to instantiate an APIClient
using the ephemeral key secret in place of the
public key.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants