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

Unable to archive project which use BraintreeDataCollector or PayPalDataCollector #576

Closed
JonathanDowning opened this issue Jan 6, 2021 · 11 comments

Comments

@JonathanDowning
Copy link

JonathanDowning commented Jan 6, 2021

Integration Details (please complete the following information):

  • SDK/Library Version: master branch/commit hash acf23311388bc6be10f9a1b7740c77fa3a42c1f5
  • Environment: N/A
  • iOS Version: N/A
  • Device: N/A
  • Integration type & version: Swift Package Manager

Describe the bug
Xcode cannot archive BraintreeDataCollector or PayPalDataCollector (or targets which depend on these).

These targets depend on xcframeworks, I suspect this is not a coincidence.

Xcode emits the following error for each target:

BraintreeDataCollector:

'kDataCollector.h' file not found

PayPalDataCollector:

No such module 'PPRiskMagnes'

To Reproduce
Steps to reproduce the behavior:

  1. In Terminal, from the project directory: git checkout acf23311388bc6be10f9a1b7740c77fa3a42c1f5 (or pull the current master branch)
  2. open Package.swift
  3. Select either PayPalDataCollector or BraintreeDataCollector from the schemes dropdown
  4. Click Product > Archive
  5. See error

Expected behavior
The project should archive successfully

Screenshots
Screen Shot 2021-01-06 at 16 15 59
Screen Shot 2021-01-06 at 16 16 14

@JonathanDowning JonathanDowning changed the title Unable to archive project using BraintreeDataCollector or PayPalDataCollector Unable to archive project which uses BraintreeDataCollector or PayPalDataCollector Jan 6, 2021
@JonathanDowning JonathanDowning changed the title Unable to archive project which uses BraintreeDataCollector or PayPalDataCollector Unable to archive project which use BraintreeDataCollector or PayPalDataCollector Jan 6, 2021
@scannillo
Copy link
Contributor

Hi @JonathanDowning - thank you for opening this issue and providing detail. I am able to replicate the issue. We will keep you posted as we work on a fix.

@scannillo
Copy link
Contributor

Hey @JonathanDowning - after some investigating, multiple sources can confirm this is an Xcode bug. A report has been filed for it here.

Related issues:

We'll keep you posted when we release a workaround.

@JonathanDowning
Copy link
Author

JonathanDowning commented Jan 12, 2021

Hey @scannillo ! Thank you very much for your assiduousness in looking into this bug. I too suspected this was a bug related to binary dependencies in SPM. (Sigh!)

A super thanks goes to you and the team for being receptive to my feedback :)

Are you planning on waiting for this issue to be resolved with Xcode before shipping 5.0, or will this be a "known issue".

(I understand if you're unable to comment on release plans here)

@scannillo
Copy link
Contributor

We very much welcome and appreciate your feedback! Please keep it coming if you have more.

As of right now our workaround is - if we expose the binary targets as product libraries and the app also includes them, we're able to archive successfully.

@JonathanDowning
Copy link
Author

Given my desire to rid our project of Carthage, this is agreeable. I'm hesitant to suggest waiting for an Xcode fix since who knows when this could be. (Murphy's law is Xcode 12.4 beta is released next week with a fix)

@scannillo scannillo mentioned this issue Jan 13, 2021
3 tasks
@sestevens
Copy link
Contributor

sestevens commented Jan 20, 2021

This fix is released in 5.0.0-beta2. Just to summarize, you'll need to check the box for these two frameworks when using Braintree via SPM:

  • KountDataCollector (only required if using BraintreeDataCollector)
  • PPRiskMagnes (only required if using PayPalDataCollector, BraintreePaymentFlow, BraintreeThreeDSecure, BraintreePayPal or BraintreeVenmo)

@sestevens
Copy link
Contributor

This has been fixed in version 5.0.0. See our Swift Package Manager guide for instructions and required workarounds. See our migration guide for steps to upgrade your integration.

@JetForMe
Copy link

JetForMe commented May 29, 2021

I do not believe this is fixed in 5.0.0. We're trying to use the iOS drop-in 9.0.2, which has braintree-ios 5.0.3 as a dependency, and we're running into No such module 'PPRiskMagnes' when archiving (builds just fine). So far the workaround has not worked for us. This is on the released version of Xcode 12.5

@YKV
Copy link

YKV commented May 31, 2021

I'am getting the same error on Xcode 12.5. I used a provided workaround and this, but no luck. Braintree 5.3.2 and BraintreeDropIn 9.0.2

@JackoPlane
Copy link

@sestevens Can we have an update on how folks and work around this issue?

@sestevens
Copy link
Contributor

Let's move this conversation over to #679. From what we can tell, the archive issues occurring now are specific to PPRiskMagnes, whereas this issue involved any binary dependency.

We're able to reproduce the archive issues intermittently, but cleaning and re-building seems to resolve them. We'll continue investigating and post any additional findings in #679.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants