Instabug/Instabug-SP

"dyld: Library not loaded" error on XCode 13/SPM

shalinipk opened this issue · 3 comments

Hello,

I am trying to port my codebase to XCode13. Running into this strange issue for Instabug framework when I try to run my app on a real device (works well on simulator):

dyld: Library not loaded: @rpath/Instabug.framework/Instabug
Referenced from: /private/var/containers/Bundle/Application//XXX.app/Frameworks/XXXModel.framework/XXXModel
Reason: image not found
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib

I am using SPM for dependency management - https://github.com/Instabug/Instabug-SP version 10.10.1

I also tried adding Instabug.xcframework manually to my project, however ran into the same issue
Update: manually adding xcframework works.

Appreciate any help.

Steps to Reproduce the Problem

Add Instabug framework using SPM

Expected Behavior

similar behavior on simulator & real device

Actual Behavior

app fails to run on real device

Instabug integration code

N/a - app has been successfully integrated with Instabug for many years now.

SDK Version

10.10.1

iOS Version

14/15

Device Model

SE

[Optional] Project That Reproduces the Issue

Hi @shalinipk
Sorry for the late reply, can you please send us a demo app reproducing the issue as I'm unable to reproduce it from my side.

We started seeings crashes with this in our app this week. We cannot reproduce it reliably, but it seems like this happens when the iOS app is backgrounded for a while, so maybe it occurs when iOS suspends the application? The user gets an alert saying that the app crashed, but they weren't actively using it.

We're using Instabug-SP version 11.5.0. It crashes on iOS 16.1.1 (20B101) and 16.2 (20C5058d) via builds created with Xcode Version 14.1 (14B47b) on builds distributed through TestFlight. We hadn't seen these crashes before but now it's our number one crash for our new test build.

You can see it crashed three times for this user in about an hour, and has crashed a couple times in as much time with another user:

Screenshot 2022-12-08 at 1 41 08 PM

sorry i wasn't able to get back to this till now

we moved most 3rd party frameworks including instabug to SPM, on xcode 14.0.1 now, instabug version 10.11.7.
All good for now!

hope that helps