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

Add support for dSYMs when using XCFrameworks in CocoaPods 1.9.0.beta.x #9530

Closed
2 tasks done
radazzouz opened this issue Feb 11, 2020 · 13 comments · Fixed by #9540
Closed
2 tasks done

Add support for dSYMs when using XCFrameworks in CocoaPods 1.9.0.beta.x #9530

radazzouz opened this issue Feb 11, 2020 · 13 comments · Fixed by #9540
Labels
r:xcframeworks Related to the support for XCFrameworks s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Milestone

Comments

@radazzouz
Copy link

radazzouz commented Feb 11, 2020



CocoaPods 1.9.3.beta.x added support for XCFrameworks (see #9148 and #9334). However, dSYMs are not currently supported.

At PSPDFKit, we currently bundle the CocoaPods artifact as the old fat .frameworks, and we plan on distributing XCFrameworks as soon as CocoaPods supports dSYMs in its latest stable version, as dSYM support is crucial for our customers.

How the Manual Integration with dSYM supports works:

You can manually integrate XCFrameworks into your project and add the dSYMs using an .xcfilelist, as described in the second step of this guide here: https://pspdfkit.com/guides/ios/current/getting-started/integrating-pspdfkit/#integrating-the-xcframework

How to Test:

Create the Local PSPDFKit CocoaPods Artifacts:

  1. If you’re an existing customer, download PSPDFKit for iOS from the customer portal. Otherwise, if you don’t already have PSPDFKit, sign up for our 60-day trial and you will receive an email with the download instructions.
  2. Copy PSPDFKit.xcframework, PSPDFKitUI.xcframework, PSPDFKit-dSYMs, and PSPDFKitUI-dSYMs in a writable location.
  3. Remove strip-bitcode.sh and strip-framework.sh from PSPDFKit.xcframework/*/PSPDFKit.framework:
rm PSPDFKit.xcframework/*/PSPDFKit.framework/strip-*.sh
  1. Rename the PSPDFKit-dSYMs and PSPDFKitUI-dSYMs foldersto PSPDFKit.dSYMs, and PSPDFKitUI.dSYMs respectively.
  2. Create an archive (.zip file) by compressing PSPDFKit.xcframework, PSPDFKitUI.xcframework, PSPDFKit.dSYMs, and PSPDFKitUI.dSYMs into PSPDFKit.zip.
  3. Rename the resulting Archive.zip to PSPDFKit.zip.

Integrate PSPDFKit using CocoaPods Beta in a Sample Project:

  • Install CocoaPods beta on your Mac: sudo gem install cocoapods --pre. In my tests, I used 1.9.3.beta.3 in my tests
  • Download the attached sample project (CocoaPods-dSYM-Support.zip) and unzip it.
  • cd into the project directory: cd CocoaPods-dSYM-Support/SwiftExample
  • Copy the CocoaPods artifacts (PSPDFKit.zip) in the root folder (CocoaPods-dSYM-Support).
  • run pod install.
  • Open the sample project in Xcode 11.3.1: open SwiftExample/SwiftExample.xcworkspace.
  • Create an archive: In Xcode UI go to Product > Archive.
  • Inspect the dSYMs in the archive an notice that the PSPDFKit dSYMs are not present.

Screen Shot 2020-02-11 at 9 29 35 AM

Proposed Outcome:

  • dSYMs should be automatically added when using XCFrameworks, just like when using fat .frameworks.
@dnkoutso
Copy link
Contributor

dnkoutso commented Feb 11, 2020

@amorde didnt we add dSYM support for xcframeworks in 1.9.x?

@amorde
Copy link
Member

amorde commented Feb 11, 2020

Hi @radazzouz 👋

dSYM support was added by including a folder in the format FrameworkName.dSYMs, so in this case if the folders PSPDFKit.dSYMs and PSPDFKitUI.dSYMs exist, CocoaPods should pick those up and include it during the build. Did you try that and, if so, did it not work correctly?

@dnkoutso dnkoutso added the s1:awaiting input Waiting for input from the original author label Feb 11, 2020
@stale stale bot removed the s1:awaiting input Waiting for input from the original author label Feb 11, 2020
@radazzouz
Copy link
Author

Thanks for the prompt response, @amorde! 👍

I just tested with the dSYM folders named PSPDFKit.dSYMs, and PSPDFKitUI.dSYMs instead of PSPDFKit-dSYMs and PSPDFKitUI-dSYMs and they dSYMS are still not present in the archive.

I also updated the instructions and the sample project's Podspec from the main comment so you can conveniently test it on your side.

@radazzouz
Copy link
Author

BTW, when using the manual integration (see the Manual-Integration-dSYM-Support.zip sample project), the dSYMs can be found in the archive on both iOS and Mac Catalyst:

iOS Mac Catalyst
Screen Shot 2020-02-11 at 1 35 20 PM Screen Shot 2020-02-11 at 1 39 24 PM

@amorde
Copy link
Member

amorde commented Feb 11, 2020

Hmm ok will need some time to look into this, thanks for the detailed report!

@amorde amorde added the r:xcframeworks Related to the support for XCFrameworks label Feb 11, 2020
@amorde
Copy link
Member

amorde commented Feb 12, 2020

The names of the dSYMs are messing with the logic of finding the binary inside the dSYM bundle.

This is something we can fix, hopefully I'll have a PR up soon in time for 1.9. Thanks for the report!

@amorde amorde added s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome! labels Feb 12, 2020
@amorde
Copy link
Member

amorde commented Feb 12, 2020

@radazzouz I've pushed up a WIP fix for this on the amorde/xcframework-dsyms branch - if you get the chance, check it out and let me know if it works for you. I tested it against PSPDFKit and it worked for me.

@radazzouz
Copy link
Author

Thanks @amorde! 👍

I just pulled your branch and it did not work for me. Did you use the same sample project and the updated integration steps from the main comment?

@amorde
Copy link
Member

amorde commented Feb 12, 2020

Yes I did, thanks so much for the sample + detailed instructions!

What happened when you tried my branch? did it you see "Selected dsym [path]" in the build output?

@radazzouz
Copy link
Author

What happened when you tried my branch?

Everything worked except for the dSYMs.Just like on 1.9.0.beta.3.

BTW, I used these instructions to build locally.

did it you see "Selected dsym [path]" in the build output?

No. Unfortunately, I did not.

@amorde
Copy link
Member

amorde commented Feb 13, 2020

Looks like I had some local changes that didn't get included in that commit - I pushed again, please give it another try when you can

@radazzouz
Copy link
Author

Thank you so much, @amorde!

I confirm that it now works on both iOS and Mac Catalyst! 🎉

iOS Mac Catalyst
Screen Shot 2020-02-13 at 7 44 56 AM Screen Shot 2020-02-13 at 7 45 19 AM

@dnkoutso
Copy link
Contributor

Will ship with final 1.9.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r:xcframeworks Related to the support for XCFrameworks s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants