Stripe iOS SDK via Swift Package Manager 正在安装,但由于 "Library not loaded" 而崩溃
Stripe iOS SDK via Swift Package Manager is installing, but crashing because "Library not loaded"
我正在使用 Xcode 12、iOS 14,一切都正确构建,但是当我安装到设备上并即将 运行 时,我收到一条消息说“dylib : 库未加载:"
dyld: Library not loaded: @rpath/Stripe.framework/Stripe
Referenced from: /private/var/containers/Bundle/Application/31B00354-2E1E-4385-8317-5518588873F7/MyApp.app/MyApp
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
我试过通过构建阶段复制框架,但无法通过这种方式复制 Stripe 框架。在我的目标 Frameworks, Libraries and Embedded content
中,Stripe 设置为 Embed & Sign
.
我已经删除派生数据、清理、杀死 Xcode、重新启动计算机、尝试不同的 iPhone、不同的 iOS 等等。没有运气。
感谢您的帮助。
我需要在构建设置中将 @executable_path/Frameworks
添加到我的 RunPath Search Paths
。
@executable_path - resolves to the absolute path of the executable, eg. /private/var/mobile/Containers/Bundle/Application/0F2C2461-A68B-4ABA-A604-B88E6E9D1BB1/App.app/
来自https://blog.krzyzanowskim.com/
比我更了解这些东西^
文章(如果它仍然链接):https://blog.krzyzanowskim.com/2018/12/05/rpath-what/
我正在使用 Xcode 12、iOS 14,一切都正确构建,但是当我安装到设备上并即将 运行 时,我收到一条消息说“dylib : 库未加载:"
dyld: Library not loaded: @rpath/Stripe.framework/Stripe
Referenced from: /private/var/containers/Bundle/Application/31B00354-2E1E-4385-8317-5518588873F7/MyApp.app/MyApp
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
我试过通过构建阶段复制框架,但无法通过这种方式复制 Stripe 框架。在我的目标 Frameworks, Libraries and Embedded content
中,Stripe 设置为 Embed & Sign
.
我已经删除派生数据、清理、杀死 Xcode、重新启动计算机、尝试不同的 iPhone、不同的 iOS 等等。没有运气。
感谢您的帮助。
我需要在构建设置中将 @executable_path/Frameworks
添加到我的 RunPath Search Paths
。
@executable_path - resolves to the absolute path of the executable, eg. /private/var/mobile/Containers/Bundle/Application/0F2C2461-A68B-4ABA-A604-B88E6E9D1BB1/App.app/
来自https://blog.krzyzanowskim.com/
比我更了解这些东西^
文章(如果它仍然链接):https://blog.krzyzanowskim.com/2018/12/05/rpath-what/