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

Code signing mac builds fails after updating to 1.10.0 #236

Closed
colintremblay-okta opened this issue Oct 31, 2024 · 2 comments
Closed

Code signing mac builds fails after updating to 1.10.0 #236

colintremblay-okta opened this issue Oct 31, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@colintremblay-okta
Copy link

Expected Behavior

Code signing shouldn't have changed from 1.9.4 to 1.10.0

Current Behavior

We're seeing the following error when we code sign our mac application:

/PATH_TO_ARCHIVE/PRODUCT_NAME.xcarchive/Products contains invalid products.

Multiple binaries share the same codesign path:
/Applications/PRODUCT_NAME.app/Contents/Frameworks/AnalyticsConnector.framework/Versions/Current

Binaries:
/Applications/PRODUCT_NAME.app/Contents/Frameworks/AnalyticsConnector.framework/Versions/Current/AnalyticsConnector
/Applications/PRODUCT_NAME.app/Contents/Frameworks/AnalyticsConnector.framework/AnalyticsConnector

This can happen if your build process copies frameworks by following symlinks.

Downgrading our Amplitude SDK to 1.9.4 resolves our issue.

Possible Solution

It seems that #235 modified the way AnalyticsConnector is pulled in, perhaps this is the culprit? It's also possible that one of the recent changes within the analytics-connector-ios library itself could be the cause.

Steps to Reproduce

  1. Create a new macOS project in Xcode (code signing with Personal Team is fine)
  2. Add Amplitude-Swift as a Swift Package dependency (use Up to next major version so it grabs 1.10.0). Make sure to add the dependency to the target.
  3. Archive the project (Product -> Archive)
  4. When the Organizer window opens, highlight the archive and click the Validate App button in the right panel.

The error mentioned above in Current Behavior will pop up.

Next, change the dependency to use Exact version and set 1.9.4 as the version. Repeat steps 3 and 4. The error will not appear (if you used Personal Team and actually try to complete the validation it will fail, but that's normal).

Environment

  • SDK Version: 1.10.0
  • OS Info: Code signing is happening on a mac running macOS 14.1, Xcode: 15.2
@colintremblay-okta colintremblay-okta added the bug Something isn't working label Oct 31, 2024
@crleona
Copy link
Collaborator

crleona commented Nov 1, 2024

Hi @colintremblay-okta - it look like we were not preserving symlinks when zipping the frameworks for distribution, this should be fixed as of analytics-connector-ios 1.2.4.

Binaries from this repo will be fixed in #237, but they should only be for Carthage users.

@colintremblay-okta
Copy link
Author

It looks like Swift Package Manager pulls in analytics-connector-ios 1.2.4 automatically now, so everything is good on our end!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants