Skip to content

SPM: MixpanelSessionReplay hard-linked on Mac Catalyst causing dyld crash (ITMS-90863) #15

@gsharm

Description

@gsharm

Hi Mixpanel Support,

We're experiencing an issue with MixpanelSessionReplay when running our iOS app on Mac (Mac Catalyst / "Designed for iPad" mode). The framework works perfectly on iOS/iPadOS
but fails to load on Mac, causing a dyld crash.

We've already:

  • Set the framework to "Optional/Weak" linking in Xcode
  • Added conditional compilation guards (#if !targetEnvironment(macCatalyst)) in our code
  • Received App Store Connect warning ITMS-90863 about macOS incompatibility

The framework appears to be hard-linked despite the weak linking setting, likely due to how SPM handles dependencies.

How can we properly exclude MixpanelSessionReplay from Mac Catalyst builds while maintaining it for iOS/iPadOS?

Error details below:

warning: (arm64) /Users/developer/Library/Developer/Xcode/DerivedData/MyApp-[hash]/Build/Products/Debug-iphoneos/.XCInstall/MyApp.app/Wrapper/MyApp.app/MyApp empty dSYM file
detected, dSYM was created with an executable with no debug info.

dyld[28720]: Library not loaded: @rpath/MixpanelSessionReplay.framework/MixpanelSessionReplay
Referenced from: /private/var/folders/[temp]/d/Wrapper/MyApp.app/MyApp.debug.dylib
Reason: tried: '/Users/developer/Library/Developer/Xcode/DerivedData/MyApp-[hash]/Build/Products/Debug-iphoneos/MixpanelSessionReplay.framework/MixpanelSessionReplay' (code
signature in not valid for use in process: Trying to load an unsigned library),
'/Users/developer/Library/Developer/Xcode/DerivedData/MyApp-[hash]/Build/Products/Debug-iphoneos/PackageFrameworks/MixpanelSessionReplay.framework/MixpanelSessionReplay'
(no such file),
'/System/iOSSupport/usr/lib/swift/MixpanelSessionReplay.framework/MixpanelSessionReplay' (no such file, not in dyld cache)
[additional search paths omitted]

Context:

  • iOS app with MixpanelSessionReplay added via Swift Package Manager
  • Framework is set to "Optional/Weak" linking in Build Phases
  • Building for iOS (Debug-iphoneos) and running on Mac
  • Framework link shows: settings = {ATTRIBUTES = (Weak, ); };

Thanks for your help!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions