我在尝试将PaymentSampleFramework
嵌入到POSSampleFramework
中时遇到了一个dyld错误(dyld[8942]: Library not loaded
),并且只在主应用程序中链接POSSampleFramework
。错误如下:
dyld[8942]: Library not loaded: @rpath/PaymentSampleFramework.framework/PaymentSampleFramework
Referenced from: <99DE58BE-5611-3397-BED2-6D7DDCE5A878> /private/var/containers/Bundle/Application/B4CB8F71-F8A7-4A21-8C1B-170612C3C628/ParentApp.app/ParentApp
Reason: tried: '/usr/lib/swift/PaymentSampleFramework.framework/PaymentSampleFramework' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/PaymentSampleFramework.framework/PaymentSampleFramework' (no such file), '/private/var/containers/Bundle/Application/B4CB8F71-F8A7-4A21-8C1B-170612C3C628/ParentApp.app/Frameworks/PaymentSampleFramework.framework/PaymentSampleFramework' (no such file), '/usr/lib/swift/PaymentSampleFramework.framework/PaymentSampleFramework' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/PaymentSampleFramework.framework/PaymentSampleFramework' (no such file), '/private/var/containers/Bundle/Application/B4CB8F71-F8A7-4A21-8C1B-170612C3C628/ParentApp.app/Frameworks/PaymentSampleFramework.framework/PaymentSampleFramework'
字符串
只有当PaymentSampleFramework
没有直接添加到应用程序时才会发生错误。我希望应用程序端只有POSSampleFrameWork
,其中包含PaymentSampleFramework
。
我已经分享了GitHub链接到我的工作区作为参考:GitHub Repository(在应用程序内部添加了PaymentSampleFramework以避免崩溃)
我正在寻求建议,是否可以只嵌入POSSampleFrameWork
而不添加所有内部依赖项。任何建议或解决方案,以解决这个问题将不胜感激。
1条答案
按热度按时间63lcw9qa1#
一个潜在的解决方案是使内部库静态。这将消除在应用程序端包含所有内部依赖项的需要。
我们是否应该考虑任何替代解决方案,这种方法是否有潜在的副作用?