paypal / paypal-ios

One merchant integration point for all of PayPal's services
Apache License 2.0
59 stars 27 forks source link

Prepare PPCP Demo App for TestFlight #207

Closed sshropshire closed 1 year ago

sshropshire commented 1 year ago

Reason for changes

The SWIFT_PACKAGE compiler macro prevents our Xcode project from being archived. We did some investigation, and it seems like we can remove this compiler directive. SPM defines this compiler macro on it's own when building SPM framework binaries via Xcode.

We've also removed references to PayPalCheckout from the Demo app in an effort to gradually phase it out.

Summary of changes

Checklist

~- [ ] Added a changelog entry~

Authors

List GitHub usernames for everyone who contributed to this pull request.

scannillo commented 1 year ago

Can we also remove the uses if MXO in the Demo app (for example here)? Or is that work planned for a separate PR?

scannillo commented 1 year ago

I'm able to run this on a simulator, but running on a device results in a crash:

dyld[10171]: Library not loaded: @rpath/PayPalCheckout.framework/PayPalCheckout
  Referenced from: <A809CAFE-5DAD-3AE2-858D-28A50905DC35> /private/var/containers/Bundle/Application/F8555334-4348-44FB-852A-74E600F1952E/Demo.app/Demo
  Reason: tried: '/private/var/containers/Bundle/Application/F8555334-4348-44FB-852A-74E600F1952E/Demo.app/Frameworks/PayPalCheckout.framework/PayPalCheckout' (errno=2)

We should try removing references to PayPalCheckout in the demo to see if that resolves this.

jaxdesmarais commented 1 year ago

@scannillo I just saw a similar crash earlier today on BT when running on device. I think we are pulling it in as a package since we are using a direct integration (vs a package manager). We should decide if we want to:

  1. Continue to not use a package manager in our demo app
  2. If so - how do we want to pull in MXO since it needs a reference to it to build on device
scannillo commented 1 year ago

@scannillo I just saw a similar crash earlier today on BT when running on device. I think we are pulling it in as a package since we are using a direct integration (vs a package manager). We should decide if we want to:

Continue to not use a package manager in our demo app If so - how do we want to pull in MXO since it needs a reference to it to build on device

We were talking about this in a huddle & slack thread the other day (I'll CC you in it) about moving to a structure like iOS Drop-In to pull PPCP into the Demo. The pro of it is that it mirrors a true SPM integration and uses the Package.swift to define the SDK. The con of it is that it's confusing to track down where the reference to the local version of the SDK is set (here). I do want to try it out, though!

jaxdesmarais commented 1 year ago

We were talking about this in a huddle & slack thread the other day (I'll CC you in it) about moving to a structure like iOS Drop-In to pull PPCP into the Demo. The pro of it is that it mirrors a true SPM integration and uses the Package.swift to define the SDK. The con of it is that it's confusing to track down where the reference to the local version of the SDK is set (here). I do want to try it out, though!

To me this makes the most sense. Especially since we try to discourage direct integrations then use it ourselves. 🙈 I'd be down to try it out on BT and/or PPCP!