RevenueCat / purchases-ios

In-app purchases and subscriptions made easy. Support for iOS, watchOS, tvOS, macOS, and visionOS.
https://www.revenuecat.com/
MIT License
2.36k stars 319 forks source link

We cannot debug using the last xcframework versions. #3021

Closed jesus-mg-ios closed 5 months ago

jesus-mg-ios commented 1 year ago

Describe the bug Debug was possible using the 4.17.9 version. This is a continuation of #2997 to make it visible, because it was closed without fix.

RCGitBot commented 1 year ago

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

om-qustodio commented 1 year ago

Same issue

NachoSoto commented 1 year ago

Are you also able to reproduce with 4.25.6?

jesus-mg-ios commented 1 year ago

In my case, yes. More data, if I remove the DSMYs with their reference path inside the xcframework plist, I can debug the app without any problem, even elements from Revenuecat. The stat cache is inside the DSYM -> Dwarf -> Revenuecat.

Also if we compare 4.17.9 dwarf with for example the last one we can see that the last one contains SDKStatCaches.noindex whereas the 4.17.9 does not contain it.

Has something changed on the CI?

NachoSoto commented 1 year ago

That's weird, I'll take a look at the difference in Dwarfs. But no, nothing has changed in how we build the xcframeworks.

NachoSoto commented 1 year ago

Actually this is likely the only difference: https://github.com/RevenueCat/purchases-ios/pull/2398 And CircleCI eventually turned 14.3 into 14.3.1. So this is probably a bug in one of those two.

jesus-mg-ios commented 1 year ago

Maybe, the Xcode environment values changed, and a solution could be change this values to a relative paths:

SDK_STAT_CACHE_DIR=~/Library/Developer/Xcode/DerivedData SDK_STAT_CACHE_PATH=~/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator16.4-20E238-.sdkstatcache

or the other option could be changed to false this variable SDK_STAT_CACHE_ENABLE=YES

om-qustodio commented 1 year ago

4.25.6?

I just tried with that version, and I was not able to debug it.

NachoSoto commented 1 year ago

SDK_STAT_CACHE_ENABLE

Is that documented anywhere?

jesus-mg-ios commented 1 year ago

No, as far as I know, but you can see the Xcode environment variables here https://github.com/keith/Xcode.app-strings/blob/main/Xcode.app/Contents/SharedFrameworks/XCBuild.framework/Versions/A/PlugIns/XCBBuildService.bundle/Contents/Frameworks/XCBCore.framework/Versions/A/XCBCore

jesus-mg-ios commented 1 year ago

You can run xcodebuild -workspace YourWorkspace.xcworkspace/ -scheme "YourScheme" -showBuildSettings or xcodebuild -workspace project.xcproject -scheme "YourScheme" -showBuildSettings

jesus-mg-ios commented 1 year ago

Are there any updates about it? Maybe as a workaround, you can upload the xcframework without dwarf symbols in plist, but only for simulators? @NachoSoto

NachoSoto commented 1 year ago

AFAIK that would remove the ability to debug symbols.

You mentioned that this other "lottie" framework did work for you. Which version of Xcode was that built with?

jesus-mg-ios commented 1 year ago

https://github.com/airbnb/lottie-ios/releases/tag/4.2.0

jesus-mg-ios commented 1 year ago

Even if this problem is related to Carthage, Is it possible to create the xcframeworks without using it? https://developer.apple.com/documentation/xcode/creating-a-multi-platform-binary-framework-bundle

jesus-mg-ios commented 1 year ago

Interesting fix: https://github.com/twilio/conversations-ios/issues/42#issuecomment-1665470642 Could we test it? @NachoSoto

NachoSoto commented 1 year ago

That didn't seem to fix it

NachoSoto commented 9 months ago

@jesus-mg-ios is this still an issue with Xcode 15?

vegaro commented 5 months ago

Closing this since we haven't received a reply in a while

github-actions[bot] commented 5 months ago

This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.