-
Notifications
You must be signed in to change notification settings - Fork 459
使用ChatKit OC调试AVOSCloud.framework
#使用ChatKit-OC 调试AVOSCloud.framework
##步骤
需要几步:
将库(ChatKit) 的 Podfile 中依赖的第三方库(我整理了下放在 这里 了),以源文件的形式拖拽的 Demo 的Project中(ChatKit.project) 中,将.h文件设为 public,删除下面两个 section。
- target-->build Phases-->Check Pods Manifest.lock
- target-->build Phases-->Copy Pods Resources
确保Project能编译通过。 注意:不需要注释删除 Podfile 中的第三方库,因为下一步会不使用 CocoaPods 来建立库(ChatKit)与Demo(ChatKit-OC)的依赖。 ChatKit.project 的最低支持的 iOS 应该与 ChatKit-OC.project 保持一致。
第三方库不能再使用如下方法导入:
#import <ChatKit/LCChatKit.h>
必须要做检查:
#if __has_include(<ChatKit/LCChatKit.h>)
#import <ChatKit/LCChatKit.h>
#else
#import "LCChatKit.h"
#endif
AVOS.xcodeproj 拖拽后,还需要导入到下面几个地方:
- ChatKit target --> Build Phases --> Target Dependencies
- ChatKit target --> Build Phases --> Link Binary With Libraies、
为 ChatKit 创建了一个 framework,将 ChatKit 的 project 拖拽到Demo(ChatKit-OC)的Project中。 然后 pod install
-
demo target --> Build Phases --> Target Dependencies
-
demo target --> General --> Embedded binaries (参考:add the ChatKit framework to the "Embedded binaries" section in the "General" tab of your app target OS X Framework Library not loaded: 'Image not found' )
-
demo target --> Build Phases --> Link Binary With Libraies、 注意:操作第二Section时,Xcode会自动配置第三个Section,如果发现第三个Section无法进行,请确保第一步【删除库(ChatKit) 对 CocoaPod s 的依赖】是否正确完成。
过程中过程中出现问题,可以尝试,Quit Xcode,删 CocoaPods 库,profile.lock文件,在Xcode关闭状态下 pod install。