Hi @GermanVelibekovHouzz!!
Thanks for reporting!!
I confirmed that the dSYMs weren’t included in the .xcframework
folder.
I made a fix for it, currently in review. Once the fix is merged, I’ll update the .xcframework
files in GitHub so you’ll be able to re-run carthage and get them.
In order to get the dSYMs, though, you should use carthage with --use-xcframeworks
and without --no-use-binaries
.
--use-xcframeworks
will ensure that xcframeworks are used, and not using --no-use-binaries
will ensure that you get the pre-compiled .xcframework
which includes the dSYMs. It’ll also mean that you won’t have to have `swiftlint` installed.
I’ll update the installation instructions when all of that’s wrapped up to reflect this.
I apologize for the inconvenience. I just tested exporting a new .xcframework
from the branch with the fix (fix/xcframework_not_including_dsyms
) and it worked correctly, getting the dSYMs.
Here’s the PR for reference. You can try it yourself by updating the entry in your Cartfile to
github "revenuecat/purchases-ios" "fix/xcframework_not_including_dsyms"
However, I’ll update the existing 3.13.1 release so you won’t have to do that, after the PR passes review.
I’ll post again in this ticket when that’s done.
Thanks again for reporting!
Hey @Andy !
Thank you for your reply and work!
I have another problem tho.
As for now, when we run carthage update --no-use-binaries --use-xcframeworks
as mentioned in documentation dSYMs are generated locally. However, when rest of the team debug and try to po an object they encounter the following problem:
error: virtual filesystem overlay file '/Users/germanv/Library/Caches/org.carthage.CarthageKit/DerivedData/13.2_13C90/purchases-ios/3.13.1/Build/Intermediates.noindex/Purchases.build/Release-iphonesimulator/Purchases.build/all-product-headers.yaml' not found error: virtual filesystem overlay file '/Users/germanv/Library/Caches/org.carthage.CarthageKit/DerivedData/13.2_13C90/purchases-ios/3.13.1/Build/Intermediates.noindex/Purchases.build/Release-iphonesimulator/Purchases.build/all-product-headers.yaml' not found error:
couldn't IRGen expression. Please check the above error messages for possible root causes.
There’re possible solutions to this. However, for now we just used the pre-built Purchases.xcframework not containing the dSYMs from the current release.
Now, when you added dSYMs to be part of the pre-built xcframework, how do you prevent that issue above? Does running a plugin mentioned in the PR differ from generating dSYMs locally with --no-use-binaries
to include dSYMs?
As for the current release, I hope there dSYMs aren’t outside of pre-built xcframework on purpose.
Note: To test if it created the problem above:
- Clean Derived Data for your Test project where Purchases.xcframework is integrated with dSYMs included
- Set breakpoint
- po some object in console during a runtime
Thank you.
@GermanVelibekovHouzz Thanks for the very detailed report.
I updated the release in GitHub to include the dSYMs, so if you try doing carthage update purchases-ios --use-xcframeworks
, you should now get the dSYMs.
As for the couldn't IRGen expression
issue, that’s a tough one. I tried it out and was able to reproduce on my machine (as long as I delete derived data every time and restart xcode).
I went into a bit of a rabbit hole, but I did find this easy workaround from steipete’s blog that points to this SO answer. I tried it out and it worked like a charm for me. Could you give it a shot?
If it works for you too, I’ll add it to the docs. I apologize for the inconvenience. XCFrameworks are great, but they’re very tricky to get right from an SDK developer’s perspective.
Hey @Andy .
I gave it a shot as you asked. Even though Purchases.xcframework
now contains dSYMs, which is great, I didn’t get the couldn't IRGen expression
error which is also great!
But can you explain why I didn’t get the error this time? What’s the difference between generating dSYMs locally and getting it as part of the pre-built xcframework?
Here’s the test I performed:
carthage update purchases-ios --use-xcframeworks
- Cleaned DerivedData
- Cleaned Build Folder
- Re-opened the project
- Run
po object
Thanks.
I’m actually unsure why it worked without further changes this time! Maybe there’s something still cached from when you were doing `--no-use-binaries`?
For my test project, I got the IRGen issue and could only get it to go away by adding a dummy Objective-C file and a bridging header to the project.
If you get the issue again, give that a shot!