johnno1962 / HotReloading

Hot reloading as a Swift Package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.
image

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.

YES,Xcode 12.4
image
image
image

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.

Thanks for the idea, the problem has been solved. I didn't try it on 14.5, I don't know if it works, because Xcode is too big and I didn't download the Xcode 12.5 RC version.
Actually, SwiftTrace Framework cannot be added directly. I added SwiftTrace as Swift Package Dependencies and it works.
image

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.