ios - 如何在 swift 框架中使用 cocoapods
问题描述
我正在开发一个框架,我在框架中添加了带有 cocoapods 的 alamofire,但是当我将框架添加到目标应用程序时,它会因以下错误而崩溃:
dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
Referenced from: /Users/apple/Library/Developer/CoreSimulator/Devices/A9426EAA-64AA-4A24-A50E-24CA9781ED02/data/Containers/Bundle/Application/D068D428-93BA-4224-A673-4456C8A67B41/hovitaSignSdkTest.app/Frameworks/cryptography.framework/cryptography
Reason: image not found
dyld: launch, loading dependent libraries
DYLD_SHARED_CACHE_DIR=/Users/apple/Library/Developer/CoreSimulator/Caches/dyld/20C69/com.apple.CoreSimulator.SimRuntime.iOS-14-4.18D46
DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot
DYLD_LIBRARY_PATH=/Users/apple/Library/Developer/Xcode/DerivedData/hovitaSignSdkTest-fktcpojeagezfbacyzycszboqcfd/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/Cor
我确实将Embed&Sign添加到我的框架的目标应用程序中。
解决方案
推荐阅读
- java - 此 URL 不支持 HTTP POST 方法:IntellJ IDEA JSP Servlet、DAO AND VO
- java - 在 Java 代码中使用的不易察觉的字符列表,以防止其被复制、粘贴和编译
- redis - Redis 过期复制到从站
- javascript - 引入 V8 后,Google Apps 脚本无法为其他用户完全执行
- build - 如何在 azure devops 管道中将项目文件复制到构建文件夹中?
- java - Hibernate 集合持久性
- ionic-framework - 如何使用带电容器的 Ionic Native 的 facebook auth
- python - 在 Python 中使用请求为同一键发布多个值时遇到问题
- python - 将 InfluxDB 测量结果导出到带有标签的 Pandas Dataframe 作为它自己的列
- osclass - 从 osclass 中的 ajax 加载搜索中隐藏 index.php