paypal / paypalcheckout-ios

Need to add Native Checkout to your iOS Application? We can help!
http://www.paypal.com
Other
70 stars 55 forks source link

[🐞] Xcode 14 SwiftUI Preview crashes when PayPalCheckout is present #115

Closed quintonpryce closed 2 years ago

quintonpryce commented 2 years ago

🐞 Describe the Bug

I have tried the most recent release (0.109) & having PayPalCheckout sdk added to my project crashes all SwiftUI Previews.

HumanReadableSwiftError

SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x00006000c07855c0):'PayPalCheckout'>)

🔬 Minimal Reproduction

Using Xcode 14, add PayPalCheckout SDK to a project that has SwiftUI views with Swift Package Manager.

Try & preview a SwiftUI View.

I have a UIKit project with swiftui subviews.

🌍 Environment

quintonpryce commented 2 years ago

https://developer.apple.com/forums/thread/707569?page=5

Seems another project was having a similar issue & I believe they have since fixed it.

quintonpryce commented 2 years ago

https://github.com/microsoft/appcenter-sdk-apple/pull/2433

It was AppCenter. They have a branch with a fix on it.

jonathajones commented 2 years ago

@quintonpryce Thanks for opening this - we will triage and update here when we've identified a resolution.

quintonpryce commented 2 years ago

Thanks @jonathajones, I'm having to remove the SDK from my app in order to do any UI building.

jonathajones commented 2 years ago

Investigation is in progress - sorry for the headache @quintonpryce !

jonathajones commented 2 years ago

Hi @quintonpryce - We did some investigation on this, and these are our findings:

We created a new swiftUI project, added the SDK as a package dependency and tested preview for content views on various xcode versions:

xcode 14.0 -> works as you described xcode 14.1 beta 3 -> works as expected xcode 14.1 rc (released today) -> works as expected

Could you try with the RC and verify our findings?

quintonpryce commented 2 years ago

Yes the release candidate seems to have fixed the issue. I'm sorry to have wasted your teams time on this! Cheers.

jonathajones commented 2 years ago

No problem at all, happy to help 👍