iOS 集成腾讯IM记录

1. 导入方式

因要对聊天UI进行修改,手动导入了带UI的腾讯IM库
TXIMSDK_iOSTXIMSDK_TUIKit_iOS
使用了CocoaPods导入了下面的依赖库

pod 'Toast', '~> 4.0.0'
pod 'SDWebImage',  '~> 5.9.0'
pod 'ISVImageScrollView' ,'~> 0.2.0'
pod 'MMLayout', '~> 0.2.0'
pod 'ReactiveObjC', '~> 3.1.1'
pod 'TXLiteAVSDK_TRTC', '~> 8.1.9721' 

运行一下,发现报错

dyld: Library not loaded: @rpath/ImSDK.framework/ImSDK
Referenced from: /var/containers/Bundle/Application/90AC3EF3-3047-499B-9B79-07025191C534/XX.app/XX
Reason: image not found

解决方法:
ImSDK.framework改为Embed&Sign


embed.png

2. 运行问题

/Users/.../XX.xcodeproj Building for iOS, but the linked and embedded framework 'ImSDK.framework' was built for iOS + iOS Simulator.

解决方法:
Target-Build Settings下Validate Workspace设置为Yes

3. 打包导出

问题:IPA processing failed
方法1:此页面出现之前,也就是在选择导出类型包之后,连续快速点击Next.. ,就可以跳过错误页面..
方法2: 去除SDK中的i386、x86_86
我使用的ImSDK包含x86_86,去掉之后就没有报打包错误了
命令相关:

//进入到sdk所在位置
cd /Users/.../TXIMSDK_iOS/ImSDK.framework
//查看当前sdk支持的架构
lipo -info ImSDK 
//Architectures in the fat file: ImSDK are: armv7 x86_64 arm64 
//删掉x86_64
lipo -remove x86_64 ImSDK -o ImSDK

参考地址:https://cloud.tencent.com/developer/ask/233303
https://stackoverflow.com/questions/63267897/building-for-ios-simulator-but-the-linked-framework-framework-was-built
https://cloud.tencent.com/developer/article/1533963
https://stackoverflow.com/questions/57382217/how-to-fix-ipa-processing-failed-error-in-xcode-11/60559539#60559539

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容