Can't run directly when running on a real machine
MyColourfulLife opened this issue · comments
It works well on the iOS simulator,
but it can't run on the real machine.
It reported the following error:
dyld: Library not loaded: @rpath/SwiftTrace.framework/SwiftTrace Referenced from: /private/var/containers/Bundle/Application/99A71CEB-0F14-480C-9672-A7308B02F412/HotReloadTest.app/Frameworks/HotReloading.framework/HotReloading 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
The framework is Already embed , I don't know how can run it successfully.
Is this Xcode 12.4? Check that SwiftTrace is included in the libraries to embed for the project. You can't use HotReloading on a device but you should still be able to run the app.
In the project General properties in the image you showed above, click the + under "Frameworks, Libraries and Embedded content" and add the SwiftTrace framework. This is fixed in Xcode 12.5.
OK,thank you very much and I will try it tomorrow.
In the project General properties in the image you showed above, click the + under "Frameworks, Libraries and Embedded content" and add the SwiftTrace framework. This is fixed in Xcode 12.5.
YES, It's ok in Xcode 12.5.
👍