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

BraintreeCore Fails to Build in Xcode 16 Beta 3 with Error: Type 'UIApplication' does not conform to protocol 'URLOpener' #1359

Closed
RGG-jayoung opened this issue Jul 9, 2024 · 4 comments · Fixed by #1360

Comments

@RGG-jayoung
Copy link

RGG-jayoung commented Jul 9, 2024

Braintree SDK Version

6.17.10 - 6.22.0

Environment

Both

Xcode Version

Xcode 16 Beta 3

OS Version & Device

iOS 18

Integration type

Swfit Package Manager

Development Processor

Apple Silicon (M-series chips)

Describe the bug

After updating to Apple's latest Beta 3, BraintreeCore fails to build due the following compiler error:

// Error Message
Type 'UIApplication' does not conform to protocol 'URLOpener'
// Fixit Suggestion
Candidate has non-matching type '(URL, [UIApplication.OpenExternalURLOptionsKey : Any], (@MainActor @Sendable (Bool) -> Void)?) -> Void' (UIKit.UIApplication)

It seems that the UIApplication+URLOpener.swift conformance to URLOpener requires stubs to fulfill it's contract.

To reproduce

  1. Open a project configured with the Braintree SDK with Xcode 16 Beta 3
  2. Attempt to build an App Target that imports BraintreeCore.
  3. Build will fail with the error.

Other steps taken:

  • Attempted build with Braintree 6.17.0, same result.
  • Attempted build with Braintree 6.22.0, same result but more protocol conformance stubs listed.

Expected behavior

App target should build without issue like Xcode 16 Beta 1 and Xcode 16 Beta 2

Screenshots

Braintree Core - Application URLOpener Conformance Braintree Core - Application URLOpener Confirmance - SDK 6_17_0 Braintree Core - Application File
@jaxdesmarais
Copy link
Contributor

Hey @RGG-jayoung -

Thanks for bringing this issue to our attention! The method signature for this changed in Xcode 16 beta 3 (apple dev docs diff here). Since changing to the new signature in our protocol would then produce the same error you are seeing in versions lower than Xcode 16 beta 3, we will need to under the hood call the both the old and new method.

I've done some testing in Xcode 16 beta 3 as well as Xcode 15.4 and the change in PR #1360 seems to resolve both issues. If you'd like to pull down that branch and let us know if you're seeing the issue resolved on your end, please feel free.

@jqsilver
Copy link

jqsilver commented Jul 9, 2024

I also ran into this today, so I'm happy to see this getting addressed so quickly!

@FlorianTousch
Copy link

FlorianTousch commented Jul 10, 2024

Same here, Bitrise don't build anymore
(XCode is building well)

CleanShot 2024-07-10 at 10 46 42@2x

@jaxdesmarais
Copy link
Contributor

Hey all -

The fix for this issue has been released in version 6.23.0 of the SDK. Thanks again for bringing this to our attention!

StronkMan added a commit to StronkMan/react-native-braintree-no-ui that referenced this issue Nov 20, 2024
Update react-native-braintree-no-ui.podspec

braintree/braintree_ios#1359
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

Successfully merging a pull request may close this issue.

4 participants