diff --git a/cim-client-sdk-libs/ios/CimKit.framework/Headers/CIMHeader.h b/cim-client-sdk-libs/ios/CimKit.framework/Headers/CIMHeader.h new file mode 100644 index 0000000..c80508d --- /dev/null +++ b/cim-client-sdk-libs/ios/CimKit.framework/Headers/CIMHeader.h @@ -0,0 +1,23 @@ +// +// CIMHeader.h +// CIMKit +// +// Created by mason on 2020/11/13. +// + +#ifndef CIMHeader_h +#define CIMHeader_h + + +#import "GCDAsyncSocket.h" +#import "SentBody.pbobjc.h" +#import "Message.pbobjc.h" +#import "NSData+IM.h" +#import "NSString+IM.h" + +#import "CIMSendMessageData.h" +#import "CIMService.h" + + + +#endif /* CIMHeader_h */ diff --git a/cim-client-sdk-libs/ios/CimKit.framework/Headers/CIMService.h b/cim-client-sdk-libs/ios/CimKit.framework/Headers/CIMService.h new file mode 100644 index 0000000..ea66767 --- /dev/null +++ b/cim-client-sdk-libs/ios/CimKit.framework/Headers/CIMService.h @@ -0,0 +1,103 @@ +// +// CIMMessageObserver.h +// CIMKit +// +// Created by mason on 2020/11/18. +// + +#import +#import "GCDAsyncSocket.h" +#import "CIMMessageModel.h" + +@class CIMService; +/// 消息回调 +@protocol CIMPeerMessageObserver + +/// 接受到消息 +/// @param msg msg description +-(void)cimHandleMessage:(CIMMessageModel * _Nonnull)msg; + +/// 消息解析失败 +/// @param data data description +-(void)cimHandleMessageError:(NSData * _Nonnull)data; + + +@end + +/// 服务器连接回调 +@protocol CIMConnectionObserver +@optional + +/// 用户绑定成功 +/// @param bindSuccess bindSuccess description +-(void)cimDidBindUserSuccess:(BOOL)bindSuccess; + +/// 连接成功 +-(void)cimDidConnectSuccess; + +/// 断开连接 +-(void)cimDidConnectClose; + +/// 连接失败 +/// @param error res description +-(void)cimDidConnectError:(NSError *_Nullable)error; + +@end + + +NS_ASSUME_NONNULL_BEGIN + +@interface CIMService : NSObject + ++(CIMService*)instance; + +/// 配置IM服务器 +/// @param host host description +/// @param port port description +-(void)configHost:(NSString *)host onPort:(NSInteger)port; + +/// 连接服务器并绑定用户 +/// @param userId userId description +-(void)connectionBindUserId:(NSString *)userId; + +/// 添加消息监听回调 +/// @param observer observer description (可添加多个)不同时记得Remove +-(void)addMessageObserver:(id)observer; + +/// 添加连接状态监听回调 +/// @param observer observer description (可添加多个)不同时记得Remove +-(void)addConnectionObserver:(id)observer; + +/// 移除监听 +/// @param observer observer description +-(void)removeMessageObserver:(id)observer; + +/// 移除监听回调 +/// @param observer observer description +-(void)removeConnectionObserver:(id)observer; + +/// 退出后台 断开连接 +-(void)enterBackground; + +/// 进入前台重新连接 +-(void)enterForeground; + +/// 重新连接 +-(void)reconnect; + +/// 断开连接 +-(void)disconnect; + + + + + + + + + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/cim-client-sdk-libs/ios/CimKit.framework/Info.plist b/cim-client-sdk-libs/ios/CimKit.framework/Info.plist new file mode 100644 index 0000000..d95f927 Binary files /dev/null and b/cim-client-sdk-libs/ios/CimKit.framework/Info.plist differ diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/project.pbxproj b/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/project.pbxproj new file mode 100644 index 0000000..132d95a --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/project.pbxproj @@ -0,0 +1,1316 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 52; + objects = { + +/* Begin PBXAggregateTarget section */ + 9349BD4D2569288E00D97C92 /* BundleSDK */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 9349BD4E2569288E00D97C92 /* Build configuration list for PBXAggregateTarget "BundleSDK" */; + buildPhases = ( + 9349BD562569289D00D97C92 /* ShellScript */, + ); + dependencies = ( + ); + name = BundleSDK; + productName = BundleSDK; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 4E8DF3BEF58B2739F08EC247 /* Pods_CIMKit_CIMKitUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C9958BEEE8DF70ACA336BF8 /* Pods_CIMKit_CIMKitUITests.framework */; }; + 7617CD1DB6611993ED63D6BD /* Pods_CIMKitTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDA31FF9E988383C3BFE1937 /* Pods_CIMKitTests.framework */; }; + 93062A9E255E39F8001E4349 /* SentBody.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 932F5F632556829C00F60663 /* SentBody.pbobjc.m */; }; + 93062AA5255E5C13001E4349 /* NSData+IM.m in Sources */ = {isa = PBXBuildFile; fileRef = 93062AA4255E5C13001E4349 /* NSData+IM.m */; }; + 93062AA9255E6156001E4349 /* Message.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 932F5F652556829C00F60663 /* Message.pbobjc.m */; }; + 93062AAF255E6508001E4349 /* NSString+IM.m in Sources */ = {isa = PBXBuildFile; fileRef = 93062AAE255E6508001E4349 /* NSString+IM.m */; }; + 93062AB6255E7C86001E4349 /* CIMMessageHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 93062AB5255E7C86001E4349 /* CIMMessageHandler.m */; }; + 932A05AD25653E8100875673 /* CIMService.m in Sources */ = {isa = PBXBuildFile; fileRef = 932A05AC25653E8100875673 /* CIMService.m */; }; + 932F5F16255675F900F60663 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 932F5F15255675F900F60663 /* AppDelegate.m */; }; + 932F5F19255675F900F60663 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 932F5F18255675F900F60663 /* SceneDelegate.m */; }; + 932F5F1C255675F900F60663 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 932F5F1B255675F900F60663 /* ViewController.m */; }; + 932F5F1F255675F900F60663 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 932F5F1D255675F900F60663 /* Main.storyboard */; }; + 932F5F21255675FC00F60663 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 932F5F20255675FC00F60663 /* Assets.xcassets */; }; + 932F5F24255675FC00F60663 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 932F5F22255675FC00F60663 /* LaunchScreen.storyboard */; }; + 932F5F27255675FC00F60663 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 932F5F26255675FC00F60663 /* main.m */; }; + 932F5F31255675FC00F60663 /* CIMKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 932F5F30255675FC00F60663 /* CIMKitTests.m */; }; + 932F5F3C255675FC00F60663 /* CIMKitUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 932F5F3B255675FC00F60663 /* CIMKitUITests.m */; }; + 93402F13256656CB008C75C2 /* CIMMessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 93402F12256656CB008C75C2 /* CIMMessageModel.m */; }; + 93402F2325666085008C75C2 /* AViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93402F2225666085008C75C2 /* AViewController.m */; }; + 9349BCA92569124700D97C92 /* ReplyBody.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 932F5F602556829C00F60663 /* ReplyBody.pbobjc.m */; }; + 9349BCBB256921F200D97C92 /* CimKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9349BCB2256921F100D97C92 /* CimKit.framework */; }; + 9349BCC2256921F200D97C92 /* CimKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9349BCC1256921F200D97C92 /* CimKitTests.m */; }; + 9349BCC7256921F200D97C92 /* CimKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9349BCB2256921F100D97C92 /* CimKit.framework */; }; + 9349BCC8256921F200D97C92 /* CimKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9349BCB2256921F100D97C92 /* CimKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 9349BCDC256922A900D97C92 /* CIMService.m in Sources */ = {isa = PBXBuildFile; fileRef = 932A05AC25653E8100875673 /* CIMService.m */; platformFilter = ios; }; + 9349BCDD256922A900D97C92 /* CIMMessageHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 93062AB5255E7C86001E4349 /* CIMMessageHandler.m */; platformFilter = ios; }; + 9349BCDE256922A900D97C92 /* CIMSendMessageData.m in Sources */ = {isa = PBXBuildFile; fileRef = 93F4A765255E875D00BD6335 /* CIMSendMessageData.m */; platformFilter = ios; }; + 9349BCDF256922A900D97C92 /* CIMMessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 93402F12256656CB008C75C2 /* CIMMessageModel.m */; platformFilter = ios; }; + 9349BCE0256922A900D97C92 /* Message.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 932F5F652556829C00F60663 /* Message.pbobjc.m */; platformFilter = ios; }; + 9349BCE1256922A900D97C92 /* ReplyBody.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 932F5F602556829C00F60663 /* ReplyBody.pbobjc.m */; platformFilter = ios; }; + 9349BCE2256922A900D97C92 /* SentBody.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = 932F5F632556829C00F60663 /* SentBody.pbobjc.m */; platformFilter = ios; }; + 9349BCE3256922A900D97C92 /* NSData+IM.m in Sources */ = {isa = PBXBuildFile; fileRef = 93062AA4255E5C13001E4349 /* NSData+IM.m */; platformFilter = ios; }; + 9349BCE4256922A900D97C92 /* NSString+IM.m in Sources */ = {isa = PBXBuildFile; fileRef = 93062AAE255E6508001E4349 /* NSString+IM.m */; platformFilter = ios; }; + 9349BCFD256922F000D97C92 /* CIMService.h in Headers */ = {isa = PBXBuildFile; fileRef = 932A05AB25653E8100875673 /* CIMService.h */; platformFilter = ios; settings = {ATTRIBUTES = (Public, ); }; }; + 9349BD06256922FE00D97C92 /* CIMHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 93062AC7255E7F93001E4349 /* CIMHeader.h */; platformFilter = ios; settings = {ATTRIBUTES = (Public, ); }; }; + 9349BD0F2569231400D97C92 /* CIMMessageHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 93062AB4255E7C86001E4349 /* CIMMessageHandler.h */; platformFilter = ios; }; + 9349BD102569231400D97C92 /* CIMSendMessageData.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F4A764255E875D00BD6335 /* CIMSendMessageData.h */; platformFilter = ios; }; + 9349BD112569231400D97C92 /* CIMMessageModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 93402F11256656CB008C75C2 /* CIMMessageModel.h */; platformFilter = ios; }; + 9349BD122569231400D97C92 /* Message.pbobjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 932F5F622556829C00F60663 /* Message.pbobjc.h */; platformFilter = ios; }; + 9349BD132569231400D97C92 /* ReplyBody.pbobjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 932F5F662556829C00F60663 /* ReplyBody.pbobjc.h */; platformFilter = ios; }; + 9349BD142569231400D97C92 /* SentBody.pbobjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 932F5F5D2556829B00F60663 /* SentBody.pbobjc.h */; platformFilter = ios; }; + 9349BD152569231400D97C92 /* NSData+IM.h in Headers */ = {isa = PBXBuildFile; fileRef = 93062AA3255E5C13001E4349 /* NSData+IM.h */; platformFilter = ios; }; + 9349BD162569231400D97C92 /* NSString+IM.h in Headers */ = {isa = PBXBuildFile; fileRef = 93062AAD255E6508001E4349 /* NSString+IM.h */; platformFilter = ios; }; + 93F4A766255E875D00BD6335 /* CIMSendMessageData.m in Sources */ = {isa = PBXBuildFile; fileRef = 93F4A765255E875D00BD6335 /* CIMSendMessageData.m */; }; + BC08C0624F726AA32AC1ECE9 /* Pods_CIMKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B6C9EDE90A311ADC3D6710D /* Pods_CIMKit.framework */; }; + ED466054031267879FD62BD1 /* Pods_CIMKit_CimKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 510B22FB656054D61A2FF6ED /* Pods_CIMKit_CimKit.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 932F5F2D255675FC00F60663 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 932F5F09255675F900F60663 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 932F5F10255675F900F60663; + remoteInfo = CIMKit; + }; + 932F5F38255675FC00F60663 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 932F5F09255675F900F60663 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 932F5F10255675F900F60663; + remoteInfo = CIMKit; + }; + 9349BCBC256921F200D97C92 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 932F5F09255675F900F60663 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 9349BCB1256921F100D97C92; + remoteInfo = CimKit; + }; + 9349BCBE256921F200D97C92 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 932F5F09255675F900F60663 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 932F5F10255675F900F60663; + remoteInfo = CIMKit; + }; + 9349BCC5256921F200D97C92 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 932F5F09255675F900F60663 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 9349BCB1256921F100D97C92; + remoteInfo = CimKit; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9349BCCC256921F200D97C92 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 9349BCC8256921F200D97C92 /* CimKit.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0B9619315442BC40CEDD0ED8 /* Pods-CIMKit-CimKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CIMKit-CimKit.debug.xcconfig"; path = "Target Support Files/Pods-CIMKit-CimKit/Pods-CIMKit-CimKit.debug.xcconfig"; sourceTree = ""; }; + 11CB4EEA7469BF32E87BFE9A /* Pods-CIMKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CIMKit.release.xcconfig"; path = "Target Support Files/Pods-CIMKit/Pods-CIMKit.release.xcconfig"; sourceTree = ""; }; + 171FA92CAAC990E7ABF55DA9 /* Pods-CIMKit-CimKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CIMKit-CimKit.release.xcconfig"; path = "Target Support Files/Pods-CIMKit-CimKit/Pods-CIMKit-CimKit.release.xcconfig"; sourceTree = ""; }; + 30F797C9D82EBF80170AA004 /* Pods-CIMKitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CIMKitTests.release.xcconfig"; path = "Target Support Files/Pods-CIMKitTests/Pods-CIMKitTests.release.xcconfig"; sourceTree = ""; }; + 3B6C9EDE90A311ADC3D6710D /* Pods_CIMKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CIMKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 418D5CD06CAA804D0DB77CF6 /* Pods-CIMKit-CIMKitUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CIMKit-CIMKitUITests.release.xcconfig"; path = "Target Support Files/Pods-CIMKit-CIMKitUITests/Pods-CIMKit-CIMKitUITests.release.xcconfig"; sourceTree = ""; }; + 44DF6ABD1C8B9E406A138A8C /* Pods-CIMKit-CIMKitUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CIMKit-CIMKitUITests.debug.xcconfig"; path = "Target Support Files/Pods-CIMKit-CIMKitUITests/Pods-CIMKit-CIMKitUITests.debug.xcconfig"; sourceTree = ""; }; + 510B22FB656054D61A2FF6ED /* Pods_CIMKit_CimKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CIMKit_CimKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 595724F83A3A72B0B5E9C2B7 /* Pods-CIMKitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CIMKitTests.debug.xcconfig"; path = "Target Support Files/Pods-CIMKitTests/Pods-CIMKitTests.debug.xcconfig"; sourceTree = ""; }; + 93062AA3255E5C13001E4349 /* NSData+IM.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSData+IM.h"; sourceTree = ""; }; + 93062AA4255E5C13001E4349 /* NSData+IM.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSData+IM.m"; sourceTree = ""; }; + 93062AAD255E6508001E4349 /* NSString+IM.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+IM.h"; sourceTree = ""; }; + 93062AAE255E6508001E4349 /* NSString+IM.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+IM.m"; sourceTree = ""; }; + 93062AB4255E7C86001E4349 /* CIMMessageHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CIMMessageHandler.h; sourceTree = ""; }; + 93062AB5255E7C86001E4349 /* CIMMessageHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CIMMessageHandler.m; sourceTree = ""; }; + 93062AC7255E7F93001E4349 /* CIMHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CIMHeader.h; sourceTree = ""; }; + 932A05AB25653E8100875673 /* CIMService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CIMService.h; sourceTree = ""; }; + 932A05AC25653E8100875673 /* CIMService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CIMService.m; sourceTree = ""; }; + 932F5F11255675F900F60663 /* CIMKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CIMKit.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 932F5F14255675F900F60663 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 932F5F15255675F900F60663 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 932F5F17255675F900F60663 /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; + 932F5F18255675F900F60663 /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; + 932F5F1A255675F900F60663 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 932F5F1B255675F900F60663 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 932F5F1E255675F900F60663 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 932F5F20255675FC00F60663 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 932F5F23255675FC00F60663 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 932F5F25255675FC00F60663 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 932F5F26255675FC00F60663 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 932F5F2C255675FC00F60663 /* CIMKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CIMKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 932F5F30255675FC00F60663 /* CIMKitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CIMKitTests.m; sourceTree = ""; }; + 932F5F32255675FC00F60663 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 932F5F37255675FC00F60663 /* CIMKitUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CIMKitUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 932F5F3B255675FC00F60663 /* CIMKitUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CIMKitUITests.m; sourceTree = ""; }; + 932F5F3D255675FC00F60663 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 932F5F5D2556829B00F60663 /* SentBody.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SentBody.pbobjc.h; sourceTree = ""; }; + 932F5F602556829C00F60663 /* ReplyBody.pbobjc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReplyBody.pbobjc.m; sourceTree = ""; }; + 932F5F622556829C00F60663 /* Message.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Message.pbobjc.h; sourceTree = ""; }; + 932F5F632556829C00F60663 /* SentBody.pbobjc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentBody.pbobjc.m; sourceTree = ""; }; + 932F5F652556829C00F60663 /* Message.pbobjc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Message.pbobjc.m; sourceTree = ""; }; + 932F5F662556829C00F60663 /* ReplyBody.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReplyBody.pbobjc.h; sourceTree = ""; }; + 93402F11256656CB008C75C2 /* CIMMessageModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CIMMessageModel.h; sourceTree = ""; }; + 93402F12256656CB008C75C2 /* CIMMessageModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CIMMessageModel.m; sourceTree = ""; }; + 93402F2125666085008C75C2 /* AViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AViewController.h; sourceTree = ""; }; + 93402F2225666085008C75C2 /* AViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AViewController.m; sourceTree = ""; }; + 9349BCB2256921F100D97C92 /* CimKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CimKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9349BCB5256921F100D97C92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9349BCBA256921F200D97C92 /* CimKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CimKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 9349BCC1256921F200D97C92 /* CimKitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CimKitTests.m; sourceTree = ""; }; + 9349BCC3256921F200D97C92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9349BD23256924E800D97C92 /* CocoaAsyncSocket.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = CocoaAsyncSocket.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9349BD25256924E800D97C92 /* Protobuf.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Protobuf.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9349BD27256924E800D97C92 /* SocketRocket.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SocketRocket.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 93F4A764255E875D00BD6335 /* CIMSendMessageData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CIMSendMessageData.h; sourceTree = ""; }; + 93F4A765255E875D00BD6335 /* CIMSendMessageData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CIMSendMessageData.m; sourceTree = ""; }; + 9C9958BEEE8DF70ACA336BF8 /* Pods_CIMKit_CIMKitUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CIMKit_CIMKitUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + CDA31FF9E988383C3BFE1937 /* Pods_CIMKitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CIMKitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DB51EFF36A2217EB5D22D782 /* Pods-CIMKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CIMKit.debug.xcconfig"; path = "Target Support Files/Pods-CIMKit/Pods-CIMKit.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 932F5F0E255675F900F60663 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + BC08C0624F726AA32AC1ECE9 /* Pods_CIMKit.framework in Frameworks */, + 9349BCC7256921F200D97C92 /* CimKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 932F5F29255675FC00F60663 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7617CD1DB6611993ED63D6BD /* Pods_CIMKitTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 932F5F34255675FC00F60663 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4E8DF3BEF58B2739F08EC247 /* Pods_CIMKit_CIMKitUITests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9349BCAF256921F100D97C92 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ED466054031267879FD62BD1 /* Pods_CIMKit_CimKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9349BCB7256921F200D97C92 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9349BCBB256921F200D97C92 /* CimKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 28EB2E7DEF8F617D3333D919 /* Pods */ = { + isa = PBXGroup; + children = ( + DB51EFF36A2217EB5D22D782 /* Pods-CIMKit.debug.xcconfig */, + 11CB4EEA7469BF32E87BFE9A /* Pods-CIMKit.release.xcconfig */, + 44DF6ABD1C8B9E406A138A8C /* Pods-CIMKit-CIMKitUITests.debug.xcconfig */, + 418D5CD06CAA804D0DB77CF6 /* Pods-CIMKit-CIMKitUITests.release.xcconfig */, + 595724F83A3A72B0B5E9C2B7 /* Pods-CIMKitTests.debug.xcconfig */, + 30F797C9D82EBF80170AA004 /* Pods-CIMKitTests.release.xcconfig */, + 0B9619315442BC40CEDD0ED8 /* Pods-CIMKit-CimKit.debug.xcconfig */, + 171FA92CAAC990E7ABF55DA9 /* Pods-CIMKit-CimKit.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 93062AA2255E5BDD001E4349 /* Tool */ = { + isa = PBXGroup; + children = ( + 93062AA3255E5C13001E4349 /* NSData+IM.h */, + 93062AA4255E5C13001E4349 /* NSData+IM.m */, + 93062AAD255E6508001E4349 /* NSString+IM.h */, + 93062AAE255E6508001E4349 /* NSString+IM.m */, + ); + path = Tool; + sourceTree = ""; + }; + 93062AB3255E7C25001E4349 /* Handler */ = { + isa = PBXGroup; + children = ( + 93062AB4255E7C86001E4349 /* CIMMessageHandler.h */, + 93062AB5255E7C86001E4349 /* CIMMessageHandler.m */, + 93F4A764255E875D00BD6335 /* CIMSendMessageData.h */, + 93F4A765255E875D00BD6335 /* CIMSendMessageData.m */, + ); + path = Handler; + sourceTree = ""; + }; + 93062AC6255E7F64001E4349 /* CIMKit */ = { + isa = PBXGroup; + children = ( + 932A05B125653E8900875673 /* Service */, + 93062AB3255E7C25001E4349 /* Handler */, + 93402F17256656CF008C75C2 /* Model */, + 932F5F5C2556828000F60663 /* Proto */, + 93062AA2255E5BDD001E4349 /* Tool */, + 93062AC7255E7F93001E4349 /* CIMHeader.h */, + ); + path = CIMKit; + sourceTree = ""; + }; + 932A05B125653E8900875673 /* Service */ = { + isa = PBXGroup; + children = ( + 932A05AB25653E8100875673 /* CIMService.h */, + 932A05AC25653E8100875673 /* CIMService.m */, + ); + path = Service; + sourceTree = ""; + }; + 932F5F08255675F900F60663 = { + isa = PBXGroup; + children = ( + 932F5F13255675F900F60663 /* CIMKit */, + 932F5F2F255675FC00F60663 /* CIMKitTests */, + 932F5F3A255675FC00F60663 /* CIMKitUITests */, + 9349BCB3256921F100D97C92 /* CimKit */, + 9349BCC0256921F200D97C92 /* CimKitTests */, + 932F5F12255675F900F60663 /* Products */, + 28EB2E7DEF8F617D3333D919 /* Pods */, + A59BDD008342417190167F14 /* Frameworks */, + ); + sourceTree = ""; + }; + 932F5F12255675F900F60663 /* Products */ = { + isa = PBXGroup; + children = ( + 932F5F11255675F900F60663 /* CIMKit.app */, + 932F5F2C255675FC00F60663 /* CIMKitTests.xctest */, + 932F5F37255675FC00F60663 /* CIMKitUITests.xctest */, + 9349BCB2256921F100D97C92 /* CimKit.framework */, + 9349BCBA256921F200D97C92 /* CimKitTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 932F5F13255675F900F60663 /* CIMKit */ = { + isa = PBXGroup; + children = ( + 93062AC6255E7F64001E4349 /* CIMKit */, + 932F5F14255675F900F60663 /* AppDelegate.h */, + 932F5F15255675F900F60663 /* AppDelegate.m */, + 932F5F17255675F900F60663 /* SceneDelegate.h */, + 932F5F18255675F900F60663 /* SceneDelegate.m */, + 932F5F1A255675F900F60663 /* ViewController.h */, + 932F5F1B255675F900F60663 /* ViewController.m */, + 932F5F1D255675F900F60663 /* Main.storyboard */, + 932F5F20255675FC00F60663 /* Assets.xcassets */, + 932F5F22255675FC00F60663 /* LaunchScreen.storyboard */, + 932F5F25255675FC00F60663 /* Info.plist */, + 932F5F26255675FC00F60663 /* main.m */, + 93402F2125666085008C75C2 /* AViewController.h */, + 93402F2225666085008C75C2 /* AViewController.m */, + ); + path = CIMKit; + sourceTree = ""; + }; + 932F5F2F255675FC00F60663 /* CIMKitTests */ = { + isa = PBXGroup; + children = ( + 932F5F30255675FC00F60663 /* CIMKitTests.m */, + 932F5F32255675FC00F60663 /* Info.plist */, + ); + path = CIMKitTests; + sourceTree = ""; + }; + 932F5F3A255675FC00F60663 /* CIMKitUITests */ = { + isa = PBXGroup; + children = ( + 932F5F3B255675FC00F60663 /* CIMKitUITests.m */, + 932F5F3D255675FC00F60663 /* Info.plist */, + ); + path = CIMKitUITests; + sourceTree = ""; + }; + 932F5F5C2556828000F60663 /* Proto */ = { + isa = PBXGroup; + children = ( + 932F5F622556829C00F60663 /* Message.pbobjc.h */, + 932F5F652556829C00F60663 /* Message.pbobjc.m */, + 932F5F662556829C00F60663 /* ReplyBody.pbobjc.h */, + 932F5F602556829C00F60663 /* ReplyBody.pbobjc.m */, + 932F5F5D2556829B00F60663 /* SentBody.pbobjc.h */, + 932F5F632556829C00F60663 /* SentBody.pbobjc.m */, + ); + path = Proto; + sourceTree = ""; + }; + 93402F17256656CF008C75C2 /* Model */ = { + isa = PBXGroup; + children = ( + 93402F11256656CB008C75C2 /* CIMMessageModel.h */, + 93402F12256656CB008C75C2 /* CIMMessageModel.m */, + ); + path = Model; + sourceTree = ""; + }; + 9349BCB3256921F100D97C92 /* CimKit */ = { + isa = PBXGroup; + children = ( + 9349BCB5256921F100D97C92 /* Info.plist */, + ); + path = CimKit; + sourceTree = ""; + }; + 9349BCC0256921F200D97C92 /* CimKitTests */ = { + isa = PBXGroup; + children = ( + 9349BCC1256921F200D97C92 /* CimKitTests.m */, + 9349BCC3256921F200D97C92 /* Info.plist */, + ); + path = CimKitTests; + sourceTree = ""; + }; + A59BDD008342417190167F14 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 9349BD23256924E800D97C92 /* CocoaAsyncSocket.framework */, + 9349BD25256924E800D97C92 /* Protobuf.framework */, + 9349BD27256924E800D97C92 /* SocketRocket.framework */, + 3B6C9EDE90A311ADC3D6710D /* Pods_CIMKit.framework */, + 9C9958BEEE8DF70ACA336BF8 /* Pods_CIMKit_CIMKitUITests.framework */, + CDA31FF9E988383C3BFE1937 /* Pods_CIMKitTests.framework */, + 510B22FB656054D61A2FF6ED /* Pods_CIMKit_CimKit.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 9349BCAD256921F100D97C92 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 9349BCFD256922F000D97C92 /* CIMService.h in Headers */, + 9349BD06256922FE00D97C92 /* CIMHeader.h in Headers */, + 9349BD0F2569231400D97C92 /* CIMMessageHandler.h in Headers */, + 9349BD102569231400D97C92 /* CIMSendMessageData.h in Headers */, + 9349BD112569231400D97C92 /* CIMMessageModel.h in Headers */, + 9349BD122569231400D97C92 /* Message.pbobjc.h in Headers */, + 9349BD132569231400D97C92 /* ReplyBody.pbobjc.h in Headers */, + 9349BD142569231400D97C92 /* SentBody.pbobjc.h in Headers */, + 9349BD152569231400D97C92 /* NSData+IM.h in Headers */, + 9349BD162569231400D97C92 /* NSString+IM.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 932F5F10255675F900F60663 /* CIMKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 932F5F40255675FC00F60663 /* Build configuration list for PBXNativeTarget "CIMKit" */; + buildPhases = ( + D44F6BE67A4CEE619C46D1D3 /* [CP] Check Pods Manifest.lock */, + 932F5F0D255675F900F60663 /* Sources */, + 932F5F0E255675F900F60663 /* Frameworks */, + 932F5F0F255675F900F60663 /* Resources */, + 9349BCCC256921F200D97C92 /* Embed Frameworks */, + 7385CA3997F2986E25D7A137 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 9349BCC6256921F200D97C92 /* PBXTargetDependency */, + ); + name = CIMKit; + productName = CIMKit; + productReference = 932F5F11255675F900F60663 /* CIMKit.app */; + productType = "com.apple.product-type.application"; + }; + 932F5F2B255675FC00F60663 /* CIMKitTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 932F5F43255675FC00F60663 /* Build configuration list for PBXNativeTarget "CIMKitTests" */; + buildPhases = ( + 5497A6EF282C7ED89AE7B4F1 /* [CP] Check Pods Manifest.lock */, + 932F5F28255675FC00F60663 /* Sources */, + 932F5F29255675FC00F60663 /* Frameworks */, + 932F5F2A255675FC00F60663 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 932F5F2E255675FC00F60663 /* PBXTargetDependency */, + ); + name = CIMKitTests; + productName = CIMKitTests; + productReference = 932F5F2C255675FC00F60663 /* CIMKitTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 932F5F36255675FC00F60663 /* CIMKitUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 932F5F46255675FC00F60663 /* Build configuration list for PBXNativeTarget "CIMKitUITests" */; + buildPhases = ( + 34F3C60E3E8C7A1FFDA4EB41 /* [CP] Check Pods Manifest.lock */, + 932F5F33255675FC00F60663 /* Sources */, + 932F5F34255675FC00F60663 /* Frameworks */, + 932F5F35255675FC00F60663 /* Resources */, + 04661419828D34052174EBEE /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 932F5F39255675FC00F60663 /* PBXTargetDependency */, + ); + name = CIMKitUITests; + productName = CIMKitUITests; + productReference = 932F5F37255675FC00F60663 /* CIMKitUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; + 9349BCB1256921F100D97C92 /* CimKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9349BCC9256921F200D97C92 /* Build configuration list for PBXNativeTarget "CimKit" */; + buildPhases = ( + D42BC121B2D3A34443C6F860 /* [CP] Check Pods Manifest.lock */, + 9349BCAD256921F100D97C92 /* Headers */, + 9349BCAE256921F100D97C92 /* Sources */, + 9349BCAF256921F100D97C92 /* Frameworks */, + 9349BCB0256921F100D97C92 /* Resources */, + 9349BD482569273A00D97C92 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CimKit; + productName = CimKit; + productReference = 9349BCB2256921F100D97C92 /* CimKit.framework */; + productType = "com.apple.product-type.framework"; + }; + 9349BCB9256921F200D97C92 /* CimKitTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9349BCCD256921F200D97C92 /* Build configuration list for PBXNativeTarget "CimKitTests" */; + buildPhases = ( + 9349BCB6256921F200D97C92 /* Sources */, + 9349BCB7256921F200D97C92 /* Frameworks */, + 9349BCB8256921F200D97C92 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 9349BCBD256921F200D97C92 /* PBXTargetDependency */, + 9349BCBF256921F200D97C92 /* PBXTargetDependency */, + ); + name = CimKitTests; + productName = CimKitTests; + productReference = 9349BCBA256921F200D97C92 /* CimKitTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 932F5F09255675F900F60663 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1200; + TargetAttributes = { + 932F5F10255675F900F60663 = { + CreatedOnToolsVersion = 12.0; + }; + 932F5F2B255675FC00F60663 = { + CreatedOnToolsVersion = 12.0; + TestTargetID = 932F5F10255675F900F60663; + }; + 932F5F36255675FC00F60663 = { + CreatedOnToolsVersion = 12.0; + TestTargetID = 932F5F10255675F900F60663; + }; + 9349BCB1256921F100D97C92 = { + CreatedOnToolsVersion = 12.0; + }; + 9349BCB9256921F200D97C92 = { + CreatedOnToolsVersion = 12.0; + TestTargetID = 932F5F10255675F900F60663; + }; + 9349BD4D2569288E00D97C92 = { + CreatedOnToolsVersion = 12.0; + }; + }; + }; + buildConfigurationList = 932F5F0C255675F900F60663 /* Build configuration list for PBXProject "CIMKit" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 932F5F08255675F900F60663; + productRefGroup = 932F5F12255675F900F60663 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 932F5F10255675F900F60663 /* CIMKit */, + 932F5F2B255675FC00F60663 /* CIMKitTests */, + 932F5F36255675FC00F60663 /* CIMKitUITests */, + 9349BCB1256921F100D97C92 /* CimKit */, + 9349BCB9256921F200D97C92 /* CimKitTests */, + 9349BD4D2569288E00D97C92 /* BundleSDK */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 932F5F0F255675F900F60663 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 932F5F24255675FC00F60663 /* LaunchScreen.storyboard in Resources */, + 932F5F21255675FC00F60663 /* Assets.xcassets in Resources */, + 932F5F1F255675F900F60663 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 932F5F2A255675FC00F60663 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 932F5F35255675FC00F60663 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9349BCB0256921F100D97C92 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9349BCB8256921F200D97C92 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 04661419828D34052174EBEE /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-CIMKit-CIMKitUITests/Pods-CIMKit-CIMKitUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-CIMKit-CIMKitUITests/Pods-CIMKit-CIMKitUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CIMKit-CIMKitUITests/Pods-CIMKit-CIMKitUITests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 34F3C60E3E8C7A1FFDA4EB41 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-CIMKit-CIMKitUITests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 5497A6EF282C7ED89AE7B4F1 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-CIMKitTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 7385CA3997F2986E25D7A137 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-CIMKit/Pods-CIMKit-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-CIMKit/Pods-CIMKit-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CIMKit/Pods-CIMKit-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 9349BD482569273A00D97C92 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = " +"; + }; + 9349BD562569289D00D97C92 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\nTARGET_NAME=\"CimKit\"\nif [[ $1 ]]\nthen\nTARGET_NAME=$1\nfi\nUNIVERSAL_OUTPUT_FOLDER=\"${SRCROOT}/Products\"\n\n#创建输出目录,并删除之前的framework文件\nmkdir -p \"${UNIVERSAL_OUTPUT_FOLDER}\"\nrm -rf \"${UNIVERSAL_OUTPUT_FOLDER}/${TARGET_NAME}.framework\"\n\n#分别编译模拟器和真机的Framework\nxcodebuild -target \"${TARGET_NAME}\" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\" clean build\nxcodebuild -target \"${TARGET_NAME}\" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphonesimulator BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\" clean build\n\n#拷贝framework到univer目录\ncp -R \"${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${TARGET_NAME}.framework\" \"${UNIVERSAL_OUTPUT_FOLDER}\"\n\n#合并framework,输出最终的framework到build目录\nlipo -create -output \"${UNIVERSAL_OUTPUT_FOLDER}/${TARGET_NAME}.framework/${TARGET_NAME}\" \"${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${TARGET_NAME}.framework/${TARGET_NAME}\" \"${BUILD_DIR}/${CONFIGURATION}-iphoneos/${TARGET_NAME}.framework/${TARGET_NAME}\"\n\n#删除编译之后生成的无关的配置文件\ndir_path=\"${UNIVERSAL_OUTPUT_FOLDER}/${TARGET_NAME}.framework/\"\nfor file in ls $dir_path\ndo\nif [[ ${file} =~ \".xcconfig\" ]]\nthen\nrm -f \"${dir_path}/${file}\"\nfi\ndone\n#判断build文件夹是否存在,存在则删除\nif [ -d \"${SRCROOT}/build\" ]\nthen\nrm -rf \"${SRCROOT}/build\"\nfi\nrm -rf \"${BUILD_DIR}/${CONFIGURATION}-iphonesimulator\" \"${BUILD_DIR}/${CONFIGURATION}-iphoneos\"\n#打开合并后的文件夹\nopen \"${UNIVERSAL_OUTPUT_FOLDER}\"\n\n\n"; + }; + D42BC121B2D3A34443C6F860 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-CIMKit-CimKit-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + D44F6BE67A4CEE619C46D1D3 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-CIMKit-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 932F5F0D255675F900F60663 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9349BCA92569124700D97C92 /* ReplyBody.pbobjc.m in Sources */, + 93062AB6255E7C86001E4349 /* CIMMessageHandler.m in Sources */, + 93062AA9255E6156001E4349 /* Message.pbobjc.m in Sources */, + 93062AAF255E6508001E4349 /* NSString+IM.m in Sources */, + 93F4A766255E875D00BD6335 /* CIMSendMessageData.m in Sources */, + 93062A9E255E39F8001E4349 /* SentBody.pbobjc.m in Sources */, + 932F5F1C255675F900F60663 /* ViewController.m in Sources */, + 932A05AD25653E8100875673 /* CIMService.m in Sources */, + 93402F2325666085008C75C2 /* AViewController.m in Sources */, + 93402F13256656CB008C75C2 /* CIMMessageModel.m in Sources */, + 932F5F16255675F900F60663 /* AppDelegate.m in Sources */, + 932F5F27255675FC00F60663 /* main.m in Sources */, + 93062AA5255E5C13001E4349 /* NSData+IM.m in Sources */, + 932F5F19255675F900F60663 /* SceneDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 932F5F28255675FC00F60663 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 932F5F31255675FC00F60663 /* CIMKitTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 932F5F33255675FC00F60663 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 932F5F3C255675FC00F60663 /* CIMKitUITests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9349BCAE256921F100D97C92 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9349BCDC256922A900D97C92 /* CIMService.m in Sources */, + 9349BCDD256922A900D97C92 /* CIMMessageHandler.m in Sources */, + 9349BCDE256922A900D97C92 /* CIMSendMessageData.m in Sources */, + 9349BCDF256922A900D97C92 /* CIMMessageModel.m in Sources */, + 9349BCE0256922A900D97C92 /* Message.pbobjc.m in Sources */, + 9349BCE1256922A900D97C92 /* ReplyBody.pbobjc.m in Sources */, + 9349BCE2256922A900D97C92 /* SentBody.pbobjc.m in Sources */, + 9349BCE3256922A900D97C92 /* NSData+IM.m in Sources */, + 9349BCE4256922A900D97C92 /* NSString+IM.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9349BCB6256921F200D97C92 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9349BCC2256921F200D97C92 /* CimKitTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 932F5F2E255675FC00F60663 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 932F5F10255675F900F60663 /* CIMKit */; + targetProxy = 932F5F2D255675FC00F60663 /* PBXContainerItemProxy */; + }; + 932F5F39255675FC00F60663 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 932F5F10255675F900F60663 /* CIMKit */; + targetProxy = 932F5F38255675FC00F60663 /* PBXContainerItemProxy */; + }; + 9349BCBD256921F200D97C92 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9349BCB1256921F100D97C92 /* CimKit */; + targetProxy = 9349BCBC256921F200D97C92 /* PBXContainerItemProxy */; + }; + 9349BCBF256921F200D97C92 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 932F5F10255675F900F60663 /* CIMKit */; + targetProxy = 9349BCBE256921F200D97C92 /* PBXContainerItemProxy */; + }; + 9349BCC6256921F200D97C92 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9349BCB1256921F100D97C92 /* CimKit */; + targetProxy = 9349BCC5256921F200D97C92 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 932F5F1D255675F900F60663 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 932F5F1E255675F900F60663 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 932F5F22255675FC00F60663 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 932F5F23255675FC00F60663 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 932F5F3E255675FC00F60663 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 932F5F3F255675FC00F60663 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 932F5F41255675FC00F60663 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DB51EFF36A2217EB5D22D782 /* Pods-CIMKit.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = WB85X7FMZ5; + INFOPLIST_FILE = CIMKit/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = app.demo.deemoo2; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = DemoAllProfile; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + 932F5F42255675FC00F60663 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 11CB4EEA7469BF32E87BFE9A /* Pods-CIMKit.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = WB85X7FMZ5; + INFOPLIST_FILE = CIMKit/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = app.demo.deemoo2; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = DemoAllProfile; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; + 932F5F44255675FC00F60663 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 595724F83A3A72B0B5E9C2B7 /* Pods-CIMKitTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = CIMKitTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.cim.sdk.CIMKitTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CIMKit.app/CIMKit"; + }; + name = Debug; + }; + 932F5F45255675FC00F60663 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 30F797C9D82EBF80170AA004 /* Pods-CIMKitTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = CIMKitTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.cim.sdk.CIMKitTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CIMKit.app/CIMKit"; + }; + name = Release; + }; + 932F5F47255675FC00F60663 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 44DF6ABD1C8B9E406A138A8C /* Pods-CIMKit-CIMKitUITests.debug.xcconfig */; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = CIMKitUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.cim.sdk.CIMKitUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = CIMKit; + }; + name = Debug; + }; + 932F5F48255675FC00F60663 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 418D5CD06CAA804D0DB77CF6 /* Pods-CIMKit-CIMKitUITests.release.xcconfig */; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = CIMKitUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.cim.sdk.CIMKitUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = CIMKit; + }; + name = Release; + }; + 9349BCCA256921F200D97C92 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0B9619315442BC40CEDD0ED8 /* Pods-CIMKit-CimKit.debug.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = WB85X7FMZ5; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CimKit/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.sm.app.CimKit; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 9349BCCB256921F200D97C92 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 171FA92CAAC990E7ABF55DA9 /* Pods-CIMKit-CimKit.release.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = WB85X7FMZ5; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CimKit/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.sm.app.CimKit; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 9349BCCE256921F200D97C92 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = CimKitTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + LINK_WITH_STANDARD_LIBRARIES = NO; + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = com.sm.app.CimKitTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CIMKit.app/CIMKit"; + }; + name = Debug; + }; + 9349BCCF256921F200D97C92 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = CimKitTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + LINK_WITH_STANDARD_LIBRARIES = NO; + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = com.sm.app.CimKitTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CIMKit.app/CIMKit"; + }; + name = Release; + }; + 9349BD4F2569288E00D97C92 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 9349BD502569288E00D97C92 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 932F5F0C255675F900F60663 /* Build configuration list for PBXProject "CIMKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 932F5F3E255675FC00F60663 /* Debug */, + 932F5F3F255675FC00F60663 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 932F5F40255675FC00F60663 /* Build configuration list for PBXNativeTarget "CIMKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 932F5F41255675FC00F60663 /* Debug */, + 932F5F42255675FC00F60663 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 932F5F43255675FC00F60663 /* Build configuration list for PBXNativeTarget "CIMKitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 932F5F44255675FC00F60663 /* Debug */, + 932F5F45255675FC00F60663 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 932F5F46255675FC00F60663 /* Build configuration list for PBXNativeTarget "CIMKitUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 932F5F47255675FC00F60663 /* Debug */, + 932F5F48255675FC00F60663 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9349BCC9256921F200D97C92 /* Build configuration list for PBXNativeTarget "CimKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9349BCCA256921F200D97C92 /* Debug */, + 9349BCCB256921F200D97C92 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9349BCCD256921F200D97C92 /* Build configuration list for PBXNativeTarget "CimKitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9349BCCE256921F200D97C92 /* Debug */, + 9349BCCF256921F200D97C92 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9349BD4E2569288E00D97C92 /* Build configuration list for PBXAggregateTarget "BundleSDK" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9349BD4F2569288E00D97C92 /* Debug */, + 9349BD502569288E00D97C92 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 932F5F09255675F900F60663 /* Project object */; +} diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/project.xcworkspace/xcuserdata/mason.xcuserdatad/UserInterfaceState.xcuserstate b/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/project.xcworkspace/xcuserdata/mason.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..6d53c17 Binary files /dev/null and b/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/project.xcworkspace/xcuserdata/mason.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/xcuserdata/mason.xcuserdatad/xcschemes/xcschememanagement.plist b/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/xcuserdata/mason.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..1be893d --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit.xcodeproj/xcuserdata/mason.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,24 @@ + + + + + SchemeUserState + + BundleSDK.xcscheme_^#shared#^_ + + orderHint + 9 + + CIMKit.xcscheme_^#shared#^_ + + orderHint + 7 + + CimKit.xcscheme_^#shared#^_ + + orderHint + 8 + + + + diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit.xcworkspace/contents.xcworkspacedata b/cim-client-sdk/cim-ios-sdk/CIMKit.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..223cbd2 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/cim-client-sdk/cim-ios-sdk/CIMKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit.xcworkspace/xcuserdata/mason.xcuserdatad/UserInterfaceState.xcuserstate b/cim-client-sdk/cim-ios-sdk/CIMKit.xcworkspace/xcuserdata/mason.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..2a94e64 Binary files /dev/null and b/cim-client-sdk/cim-ios-sdk/CIMKit.xcworkspace/xcuserdata/mason.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit.xcworkspace/xcuserdata/mason.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/cim-client-sdk/cim-ios-sdk/CIMKit.xcworkspace/xcuserdata/mason.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..8912b4a --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit.xcworkspace/xcuserdata/mason.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/AViewController.h b/cim-client-sdk/cim-ios-sdk/CIMKit/AViewController.h new file mode 100644 index 0000000..4151b56 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/AViewController.h @@ -0,0 +1,16 @@ +// +// AViewController.h +// CIMKit +// +// Created by mason on 2020/11/19. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface AViewController : UIViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/AViewController.m b/cim-client-sdk/cim-ios-sdk/CIMKit/AViewController.m new file mode 100644 index 0000000..088a010 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/AViewController.m @@ -0,0 +1,41 @@ +// +// AViewController.m +// CIMKit +// +// Created by mason on 2020/11/19. +// + +#import "AViewController.h" +#import "CIMService.h" + +@interface AViewController () + +@end + +@implementation AViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + + self.view.backgroundColor = UIColor.whiteColor; + + [[CIMService instance] addMessageObserver:self]; +} + + +- (void)cimhandleMessage:(CIMMessageModel *)msg{ + NSLog(@"AViewController:%@",msg.content); +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/AppDelegate.h b/cim-client-sdk/cim-ios-sdk/CIMKit/AppDelegate.h new file mode 100644 index 0000000..4fe96cd --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/AppDelegate.h @@ -0,0 +1,15 @@ +// +// AppDelegate.h +// CIMKit +// +// Created by mason on 2020/11/7. +// + +#import + +@interface AppDelegate : UIResponder + + + +@end + diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/AppDelegate.m b/cim-client-sdk/cim-ios-sdk/CIMKit/AppDelegate.m new file mode 100644 index 0000000..b473839 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/AppDelegate.m @@ -0,0 +1,47 @@ +// +// AppDelegate.m +// CIMKit +// +// Created by mason on 2020/11/7. +// + +#import "AppDelegate.h" +#import "CIMHeader.h" +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + +- (void)applicationDidEnterBackground:(UIApplication *)application{ + [[CIMService instance] enterBackground]; +} +- (void)applicationWillEnterForeground:(UIApplication *)application{ + [[CIMService instance] enterForeground]; + +} + +#pragma mark - UISceneSession lifecycle + + +- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; +} + + +- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. +} + + +@end diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/Assets.xcassets/AccentColor.colorset/Contents.json b/cim-client-sdk/cim-ios-sdk/CIMKit/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/Assets.xcassets/AppIcon.appiconset/Contents.json b/cim-client-sdk/cim-ios-sdk/CIMKit/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9221b9b --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/Assets.xcassets/Contents.json b/cim-client-sdk/cim-ios-sdk/CIMKit/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/Base.lproj/LaunchScreen.storyboard b/cim-client-sdk/cim-ios-sdk/CIMKit/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/Base.lproj/Main.storyboard b/cim-client-sdk/cim-ios-sdk/CIMKit/Base.lproj/Main.storyboard new file mode 100644 index 0000000..808a21c --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/CIMHeader.h b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/CIMHeader.h new file mode 100644 index 0000000..c80508d --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/CIMHeader.h @@ -0,0 +1,23 @@ +// +// CIMHeader.h +// CIMKit +// +// Created by mason on 2020/11/13. +// + +#ifndef CIMHeader_h +#define CIMHeader_h + + +#import "GCDAsyncSocket.h" +#import "SentBody.pbobjc.h" +#import "Message.pbobjc.h" +#import "NSData+IM.h" +#import "NSString+IM.h" + +#import "CIMSendMessageData.h" +#import "CIMService.h" + + + +#endif /* CIMHeader_h */ diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Handler/CIMMessageHandler.h b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Handler/CIMMessageHandler.h new file mode 100644 index 0000000..09c35e5 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Handler/CIMMessageHandler.h @@ -0,0 +1,50 @@ +// +// CIMMessageDeCode.h +// CIMKit +// +// Created by mason on 2020/11/13. +// + +#import +#import "CIMService.h" +#import "GCDAsyncSocket.h" +#import "SentBody.pbobjc.h" +#import "Message.pbobjc.h" +#import "NSData+IM.h" +#import "NSString+IM.h" +#import "CIMSendMessageData.h" +#import "ReplyBody.pbobjc.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef enum CIMMessageType: NSUInteger { + CIMMessageTypeC_H_RS = 0,//客户端心跳响应 + CIMMessageTypeS_H_RQ,//服务端心跳请求 + CIMMessageTypeMESSAGE,//服务端推送的消息 + CIMMessageTypeSENT_BODY,//客户端发送的sentBody请求 + CIMMessageTypeREPLY_BODY//sentBody请求的异步响应replyBody +} CIMMessageType; + + +@interface CIMMessageHandler : NSObject + +/// 处理服务数据 +/// @param data data description +-(void)doCode:(nullable NSData *)data socket:(GCDAsyncSocket *)sock; + +-(void)addPeerMessageObservers:(id)objects; +-(void)addConnectionObservers:(id)objects; +-(void)removePeerMessageObservers:(id)objects; +-(void)removeConnectionObservers:(id)objects; + +-(void)handlerMessage:(CIMMessageModel *)message; +-(void)handlerMessageError:(NSData *)data; +-(void)handlerBindUser:(BOOL)bindSuccess; + +-(void)handlerConnectSuccess; +-(void)handlerConnectClose; +-(void)handlerConnectError:(NSError *)error; + +@end + +NS_ASSUME_NONNULL_END diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Handler/CIMMessageHandler.m b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Handler/CIMMessageHandler.m new file mode 100644 index 0000000..731dad5 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Handler/CIMMessageHandler.m @@ -0,0 +1,228 @@ +// +// CIMMessageDeCode.m +// CIMKit +// +// Created by Siter By:750692607@qq.com on 2020/11/13. +// + +#import "CIMMessageHandler.h" + + +@interface CIMMessageHandler() + +@property(strong,nonatomic)NSData * data; + +@property(strong,nonatomic)NSMutableArray * connectionObservers; +@property(strong,nonatomic)NSMutableArray * messageObservers; + +@property(copy,nonatomic)NSString *mainQueueLabel; + + +@end + +@implementation CIMMessageHandler + + +- (instancetype)init +{ + self = [super init]; + if (self) { + const char *label = dispatch_queue_get_label(dispatch_get_main_queue()); + self.mainQueueLabel = label ? [[NSString alloc] initWithUTF8String:label] : @""; + self.connectionObservers = [NSMutableArray array]; + self.messageObservers = [NSMutableArray array]; + } + return self; +} + +/// 处理服务数据 +/// @param data data description +-(void)doCode:(nullable NSData *)data socket:(GCDAsyncSocket *)sock{ + self.data = data; + //TLV格式 + int allDateLenght = [self getMessageVauleLenght] + 3; + do { + [sock readDataWithTimeout:-1 tag:0]; + } while (self.data.length != allDateLenght); + + NSData *headTagData = [data subdataWithRange:NSMakeRange(0, 1)];//取得头部数据 + CIMMessageType messageType = (CIMMessageType)[headTagData convertDataToHexStr].integerValue; + + //心跳包请求 + if(messageType == CIMMessageTypeS_H_RQ){ + [sock writeData:[CIMSendMessageData initHeartbeatData] withTimeout:-1 tag:0]; + return; + } + //绑定异步回调 + if(messageType == CIMMessageTypeREPLY_BODY){ + + NSData * messageData = [data subdataWithRange:NSMakeRange(3, [self getMessageVauleLenght])]; + + NSError * error; + + ReplyBodyModel * replyBodyModel = [[ReplyBodyModel alloc] initWithData:messageData error:&error]; + if(!error){ + [self handlerBindUser:[replyBodyModel.code isEqualToString:@"200"]]; + }else{ + [self handlerBindUser:NO]; + } + + return; + } + //服务端消息 + if(messageType == CIMMessageTypeMESSAGE){ + + NSData * messageData = [data subdataWithRange:NSMakeRange(3, [self getMessageVauleLenght])]; + + NSError * error; + + MessageModel * messgae = [[MessageModel alloc] initWithData:messageData error:&error]; + + if(!error){ + //返回消息 + [self handlerMessage:[CIMMessageModel initWithProtoMdoel:messgae]]; + }else{ + [self handlerMessageError:data]; + } + return; + } + +} + + +#pragma mark Observe methods +-(void)handlerConnectSuccess{ + [self runOnMainThread:^{ + for (NSValue *value in self.messageObservers) { + id ob = [value nonretainedObjectValue]; + if ([ob respondsToSelector:@selector(cimDidConnectSuccess)]) { + [ob cimDidConnectSuccess]; + } + } + }]; +} + + + +-(void)handlerConnectError:(NSError *)error{ + [self runOnMainThread:^{ + for (NSValue *value in self.messageObservers) { + id ob = [value nonretainedObjectValue]; + if ([ob respondsToSelector:@selector(cimDidConnectError:)]) { + [ob cimDidConnectError:error]; + } + } + }]; +} + +-(void)handlerMessage:(CIMMessageModel *)message{ + [self runOnMainThread:^{ + for (NSValue *value in self.messageObservers) { + id ob = [value nonretainedObjectValue]; + if ([ob respondsToSelector:@selector(cimHandleMessage:)]) { + [ob cimHandleMessage:message]; + } + } + }]; +} + +-(void)handlerMessageError:(NSData *)data{ + [self runOnMainThread:^{ + for (NSValue *value in self.messageObservers) { + id ob = [value nonretainedObjectValue]; + if ([ob respondsToSelector:@selector(cimHandleMessageError:)]) { + [ob cimHandleMessageError:data]; + } + } + }]; +} +-(void)handlerConnectClose{ + [self runOnMainThread:^{ + for (NSValue *value in self.messageObservers) { + id ob = [value nonretainedObjectValue]; + if ([ob respondsToSelector:@selector(cimDidConnectClose)]) { + [ob cimDidConnectClose]; + } + } + }]; +} + +-(void)handlerBindUser:(BOOL)bindSuccess{ + [self runOnMainThread:^{ + for (NSValue *value in self.connectionObservers) { + id ob = [value nonretainedObjectValue]; + if ([ob respondsToSelector:@selector(cimDidBindUserSuccess:)]) { + [ob cimDidBindUserSuccess:bindSuccess]; + } + } + }]; +} + +-(void)addPeerMessageObservers:(id)objects{ + NSValue *value = [NSValue valueWithNonretainedObject:objects]; + if (![self.messageObservers containsObject:value]) { + [self.messageObservers addObject:value]; + } +} + +-(void)addConnectionObservers:(id)objects{ + NSValue *value = [NSValue valueWithNonretainedObject:objects]; + if (![self.connectionObservers containsObject:value]) { + [self.connectionObservers addObject:value]; + } +} + +-(void)removePeerMessageObservers:(id)objects{ + NSValue *value = [NSValue valueWithNonretainedObject:objects]; + if (![self.messageObservers containsObject:value]) { + [self.messageObservers removeObject:value]; + } +} + +-(void)removeConnectionObservers:(id)objects{ + NSValue *value = [NSValue valueWithNonretainedObject:objects]; + if ([self.connectionObservers containsObject:value]) { + [self.connectionObservers removeObject:value]; + } +} + +#pragma mark private methods +-(void)runOnQueue:(NSString*)queueLabel block:(dispatch_block_t)block { + const char *s = dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL); + NSString *label = s ? [[NSString alloc] initWithUTF8String:s] : @""; + + if ([queueLabel isEqualToString:label]) { + block(); + } else { + dispatch_async(dispatch_get_main_queue(), ^{ + block(); + }); + } +} +-(void)runOnMainThread:(dispatch_block_t)block { + [self runOnQueue:self.mainQueueLabel block:block]; +} + + +/// 获取data 消息长度 +-(int)getMessageVauleLenght{ + + NSData * lv = [self.data subdataWithRange:NSMakeRange(1, 1)]; + NSData * hv = [self.data subdataWithRange:NSMakeRange(2, 1)]; + + int lvString = [[lv convertDataToHexStr] hexToDecimal].intValue; + int hvString = [[hv convertDataToHexStr] hexToDecimal].intValue; + + return lvString | hvString << 8; +} + + +- (NSData *)data{ + if(!_data){ + _data = [[NSData alloc] init]; + } + return _data; +} + + +@end diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Handler/CIMSendMessageData.h b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Handler/CIMSendMessageData.h new file mode 100644 index 0000000..838abe1 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Handler/CIMSendMessageData.h @@ -0,0 +1,23 @@ +// +// CIMSendMessage.h +// CIMKit +// +// Created by mason on 2020/11/13. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface CIMSendMessageData : NSObject + +/// 心跳包数据 ++(NSData *)initHeartbeatData; + +/// 绑定用户数据 +/// @param userId userId description ++(NSData *)initBindUserData:(NSString *)userId; + +@end + +NS_ASSUME_NONNULL_END diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Handler/CIMSendMessageData.m b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Handler/CIMSendMessageData.m new file mode 100644 index 0000000..2844ddc --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Handler/CIMSendMessageData.m @@ -0,0 +1,81 @@ +// +// CIMSendMessage.m +// CIMKit +// +// Created by mason on 2020/11/13. +// + +#import "CIMSendMessageData.h" +#import "CIMHeader.h" +#import "SentBody.pbobjc.h" +#import + +@implementation CIMSendMessageData + + +/// 心跳包数据 ++(NSData *)initHeartbeatData{ + NSData * model = [@"CR" convertBytesStringToData]; + NSInteger lenght = model.length; + Byte type = 0; + Byte head[3] ; + head[0] = type; + head[1] = lenght & 0xff; + head[2] = (lenght >> 8) & 0xff; + NSMutableData * sendData = [[NSMutableData alloc] initWithBytes:head length:3]; + [sendData appendData:model]; + + return sendData; +} + + +/// 绑定用户数据 +/// @param userId userId description ++(NSData *)initBindUserData:(NSString *)userId{ + SentBodyModel * body = [SentBodyModel new]; + body.key = @"client_bind"; + body.timestamp = (int64_t)[NSDate timeIntervalSinceReferenceDate] *1000; + body.data_p[@"account"] = userId; + body.data_p[@"deviceId"] = [[self class] deviceId]; + body.data_p[@"channel"] = @"ios"; + NSData *modeData = body.data; + NSInteger lenght = modeData.length; + Byte type = 3; + Byte head[3] ; + head[0] = type; + head[1] = lenght & 0xff; + head[2] = (lenght >> 8) & 0xff; + NSMutableData * sendData = [[NSMutableData alloc] initWithBytes:head length:3]; + [sendData appendData:modeData]; + return sendData; + +} + ++(NSData *)initMessageData:(NSString *)userId{ + SentBodyModel * body = [SentBodyModel new]; + body.key = @"client_bind"; + body.timestamp = (int64_t)[NSDate timeIntervalSinceReferenceDate] *1000; + body.data_p[@"account"] = userId; + body.data_p[@"deviceId"] = [[self class] deviceId]; + body.data_p[@"channel"] = @"ios"; + NSData *modeData = body.data; + NSInteger lenght = modeData.length; + Byte type = 3; + Byte head[3] ; + head[0] = type; + head[1] = lenght & 0xff; + head[2] = (lenght >> 8) & 0xff; + NSMutableData * sendData = [[NSMutableData alloc] initWithBytes:head length:3]; + [sendData appendData:modeData]; + return sendData; + +} + + ++(NSString *)deviceId{ + return [[[UIDevice currentDevice] identifierForVendor] UUIDString]; +} + + + +@end diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Model/CIMMessageModel.h b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Model/CIMMessageModel.h new file mode 100644 index 0000000..4439bcf --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Model/CIMMessageModel.h @@ -0,0 +1,36 @@ +// +// CIMMessageModel.h +// CIMKit +// +// Created by mason on 2020/11/19. +// + +#import +#import "Message.pbobjc.h" +NS_ASSUME_NONNULL_BEGIN + +@interface CIMMessageModel : NSObject + +@property(nonatomic, readwrite) int64_t id_p; + +@property(nonatomic, readwrite, copy) NSString *action; + +@property(nonatomic, readwrite, copy) NSString *content; + +@property(nonatomic, readwrite, copy) NSString *sender; + +@property(nonatomic, readwrite, copy) NSString *receiver; + +@property(nonatomic, readwrite, copy) NSString *extra; + +@property(nonatomic, readwrite, copy) NSString *title; + +@property(nonatomic, readwrite, copy) NSString *format; + +@property(nonatomic, readwrite) int64_t timestamp; + ++(CIMMessageModel *)initWithProtoMdoel:(MessageModel *)model; + +@end + +NS_ASSUME_NONNULL_END diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Model/CIMMessageModel.m b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Model/CIMMessageModel.m new file mode 100644 index 0000000..994c8b0 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Model/CIMMessageModel.m @@ -0,0 +1,28 @@ +// +// CIMMessageModel.m +// CIMKit +// +// Created by mason on 2020/11/19. +// + +#import "CIMMessageModel.h" + +@implementation CIMMessageModel + + ++(CIMMessageModel *)initWithProtoMdoel:(MessageModel *)model{ + + CIMMessageModel * cimMessageModel = [CIMMessageModel new]; + cimMessageModel.id_p = model.id_p; + cimMessageModel.title = model.title; + cimMessageModel.action = model.action; + cimMessageModel.timestamp = model.timestamp; + cimMessageModel.extra = model.extra; + cimMessageModel.format = model.format; + cimMessageModel.sender = model.sender; + cimMessageModel.content = model.content; + cimMessageModel.receiver = model.receiver; + return cimMessageModel; +} + +@end diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/Message.pbobjc.h b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/Message.pbobjc.h new file mode 100644 index 0000000..8cf62dc --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/Message.pbobjc.h @@ -0,0 +1,89 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Message.proto + +// This CPP symbol can be defined to use imports that match up to the framework +// imports needed when using CocoaPods. +#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) + #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 +#endif + +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import +#else + #import "GPBProtocolBuffers.h" +#endif + +#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 +#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. +#endif +#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION +#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. +#endif + +// @@protoc_insertion_point(imports) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + +CF_EXTERN_C_BEGIN + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - MessageRoot + +/** + * Exposes the extension registry for this file. + * + * The base class provides: + * @code + * + (GPBExtensionRegistry *)extensionRegistry; + * @endcode + * which is a @c GPBExtensionRegistry that includes all the extensions defined by + * this file and all files that it depends on. + **/ +@interface MessageRoot : GPBRootObject +@end + +#pragma mark - Model + +typedef GPB_ENUM(MessageModel_FieldNumber) { + MessageModel_FieldNumber_Id_p = 1, + MessageModel_FieldNumber_Action = 2, + MessageModel_FieldNumber_Content = 3, + MessageModel_FieldNumber_Sender = 4, + MessageModel_FieldNumber_Receiver = 5, + MessageModel_FieldNumber_Extra = 6, + MessageModel_FieldNumber_Title = 7, + MessageModel_FieldNumber_Format = 8, + MessageModel_FieldNumber_Timestamp = 9, +}; + +@interface MessageModel : GPBMessage + +@property(nonatomic, readwrite) int64_t id_p; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *action; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *content; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *sender; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *receiver; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *extra; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *title; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *format; + +@property(nonatomic, readwrite) int64_t timestamp; + +@end + +NS_ASSUME_NONNULL_END + +CF_EXTERN_C_END + +#pragma clang diagnostic pop + +// @@protoc_insertion_point(global_scope) diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/Message.pbobjc.m b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/Message.pbobjc.m new file mode 100644 index 0000000..3524aa1 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/Message.pbobjc.m @@ -0,0 +1,181 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Message.proto + +// This CPP symbol can be defined to use imports that match up to the framework +// imports needed when using CocoaPods. +#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) + #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 +#endif + +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import +#else + #import "GPBProtocolBuffers_RuntimeSupport.h" +#endif + +#import "Message.pbobjc.h" +// @@protoc_insertion_point(imports) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + +#pragma mark - MessageRoot + +@implementation MessageRoot + +// No extensions in the file and no imports, so no need to generate +// +extensionRegistry. + +@end + +#pragma mark - MessageRoot_FileDescriptor + +static GPBFileDescriptor *MessageRoot_FileDescriptor(void) { + // This is called by +initialize so there is no need to worry + // about thread safety of the singleton. + static GPBFileDescriptor *descriptor = NULL; + if (!descriptor) { + GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); + descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"" + syntax:GPBFileSyntaxProto3]; + } + return descriptor; +} + +#pragma mark - Model + +@implementation MessageModel + +@dynamic id_p; +@dynamic action; +@dynamic content; +@dynamic sender; +@dynamic receiver; +@dynamic extra; +@dynamic title; +@dynamic format; +@dynamic timestamp; + +typedef struct Model__storage_ { + uint32_t _has_storage_[1]; + NSString *action; + NSString *content; + NSString *sender; + NSString *receiver; + NSString *extra; + NSString *title; + NSString *format; + int64_t id_p; + int64_t timestamp; +} Model__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "id_p", + .dataTypeSpecific.className = NULL, + .number = MessageModel_FieldNumber_Id_p, + .hasIndex = 0, + .offset = (uint32_t)offsetof(Model__storage_, id_p), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeInt64, + }, + { + .name = "action", + .dataTypeSpecific.className = NULL, + .number = MessageModel_FieldNumber_Action, + .hasIndex = 1, + .offset = (uint32_t)offsetof(Model__storage_, action), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "content", + .dataTypeSpecific.className = NULL, + .number = MessageModel_FieldNumber_Content, + .hasIndex = 2, + .offset = (uint32_t)offsetof(Model__storage_, content), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "sender", + .dataTypeSpecific.className = NULL, + .number = MessageModel_FieldNumber_Sender, + .hasIndex = 3, + .offset = (uint32_t)offsetof(Model__storage_, sender), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "receiver", + .dataTypeSpecific.className = NULL, + .number = MessageModel_FieldNumber_Receiver, + .hasIndex = 4, + .offset = (uint32_t)offsetof(Model__storage_, receiver), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "extra", + .dataTypeSpecific.className = NULL, + .number = MessageModel_FieldNumber_Extra, + .hasIndex = 5, + .offset = (uint32_t)offsetof(Model__storage_, extra), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "title", + .dataTypeSpecific.className = NULL, + .number = MessageModel_FieldNumber_Title, + .hasIndex = 6, + .offset = (uint32_t)offsetof(Model__storage_, title), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "format", + .dataTypeSpecific.className = NULL, + .number = MessageModel_FieldNumber_Format, + .hasIndex = 7, + .offset = (uint32_t)offsetof(Model__storage_, format), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "timestamp", + .dataTypeSpecific.className = NULL, + .number = MessageModel_FieldNumber_Timestamp, + .hasIndex = 8, + .offset = (uint32_t)offsetof(Model__storage_, timestamp), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeInt64, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[MessageModel class] + rootClass:[MessageRoot class] + file:MessageRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(Model__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + + +#pragma clang diagnostic pop + +// @@protoc_insertion_point(global_scope) diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/ReplyBody.pbobjc.h b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/ReplyBody.pbobjc.h new file mode 100644 index 0000000..8be2466 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/ReplyBody.pbobjc.h @@ -0,0 +1,79 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ReplyBody.proto + +// This CPP symbol can be defined to use imports that match up to the framework +// imports needed when using CocoaPods. +#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) + #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 +#endif + +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import +#else + #import "GPBProtocolBuffers.h" +#endif + +#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 +#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. +#endif +#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION +#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. +#endif + +// @@protoc_insertion_point(imports) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + +CF_EXTERN_C_BEGIN + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - ReplyBodyRoot + +/** + * Exposes the extension registry for this file. + * + * The base class provides: + * @code + * + (GPBExtensionRegistry *)extensionRegistry; + * @endcode + * which is a @c GPBExtensionRegistry that includes all the extensions defined by + * this file and all files that it depends on. + **/ +@interface ReplyBodyRoot : GPBRootObject +@end + +#pragma mark - Model + +typedef GPB_ENUM(ReplyBodyModel_FieldNumber) { + ReplyBodyModel_FieldNumber_Key = 1, + ReplyBodyModel_FieldNumber_Code = 2, + ReplyBodyModel_FieldNumber_Message = 3, + ReplyBodyModel_FieldNumber_Timestamp = 4, + ReplyBodyModel_FieldNumber_Data_p = 5, +}; + +@interface ReplyBodyModel : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *key; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *code; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *message; + +@property(nonatomic, readwrite) int64_t timestamp; + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary *data_p; +/** The number of items in @c data_p without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger data_p_Count; + +@end + +NS_ASSUME_NONNULL_END + +CF_EXTERN_C_END + +#pragma clang diagnostic pop + +// @@protoc_insertion_point(global_scope) diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/ReplyBody.pbobjc.m b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/ReplyBody.pbobjc.m new file mode 100644 index 0000000..6925be5 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/ReplyBody.pbobjc.m @@ -0,0 +1,137 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ReplyBody.proto + +// This CPP symbol can be defined to use imports that match up to the framework +// imports needed when using CocoaPods. +#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) + #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 +#endif + +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import +#else + #import "GPBProtocolBuffers_RuntimeSupport.h" +#endif + +#import "ReplyBody.pbobjc.h" +// @@protoc_insertion_point(imports) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + +#pragma mark - ReplyBodyRoot + +@implementation ReplyBodyRoot + +// No extensions in the file and no imports, so no need to generate +// +extensionRegistry. + +@end + +#pragma mark - ReplyBodyRoot_FileDescriptor + +static GPBFileDescriptor *ReplyBodyRoot_FileDescriptor(void) { + // This is called by +initialize so there is no need to worry + // about thread safety of the singleton. + static GPBFileDescriptor *descriptor = NULL; + if (!descriptor) { + GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); + descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"" + syntax:GPBFileSyntaxProto3]; + } + return descriptor; +} + +#pragma mark - Model + +@implementation ReplyBodyModel + +@dynamic key; +@dynamic code; +@dynamic message; +@dynamic timestamp; +@dynamic data_p, data_p_Count; + +typedef struct Model__storage_ { + uint32_t _has_storage_[1]; + NSString *key; + NSString *code; + NSString *message; + NSMutableDictionary *data_p; + int64_t timestamp; +} Model__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "key", + .dataTypeSpecific.className = NULL, + .number = ReplyBodyModel_FieldNumber_Key, + .hasIndex = 0, + .offset = (uint32_t)offsetof(Model__storage_, key), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "code", + .dataTypeSpecific.className = NULL, + .number = ReplyBodyModel_FieldNumber_Code, + .hasIndex = 1, + .offset = (uint32_t)offsetof(Model__storage_, code), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "message", + .dataTypeSpecific.className = NULL, + .number = ReplyBodyModel_FieldNumber_Message, + .hasIndex = 2, + .offset = (uint32_t)offsetof(Model__storage_, message), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "timestamp", + .dataTypeSpecific.className = NULL, + .number = ReplyBodyModel_FieldNumber_Timestamp, + .hasIndex = 3, + .offset = (uint32_t)offsetof(Model__storage_, timestamp), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeInt64, + }, + { + .name = "data_p", + .dataTypeSpecific.className = NULL, + .number = ReplyBodyModel_FieldNumber_Data_p, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(Model__storage_, data_p), + .flags = GPBFieldMapKeyString, + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[ReplyBodyModel class] + rootClass:[ReplyBodyRoot class] + file:ReplyBodyRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(Model__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + + +#pragma clang diagnostic pop + +// @@protoc_insertion_point(global_scope) diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/SentBody.pbobjc.h b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/SentBody.pbobjc.h new file mode 100644 index 0000000..45f9a15 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/SentBody.pbobjc.h @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SentBody.proto + +// This CPP symbol can be defined to use imports that match up to the framework +// imports needed when using CocoaPods. +#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) + #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 +#endif + +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import +#else + #import "GPBProtocolBuffers.h" +#endif + +#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 +#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. +#endif +#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION +#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. +#endif + +// @@protoc_insertion_point(imports) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + +CF_EXTERN_C_BEGIN + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - SentBodyRoot + +/** + * Exposes the extension registry for this file. + * + * The base class provides: + * @code + * + (GPBExtensionRegistry *)extensionRegistry; + * @endcode + * which is a @c GPBExtensionRegistry that includes all the extensions defined by + * this file and all files that it depends on. + **/ +@interface SentBodyRoot : GPBRootObject +@end + +#pragma mark - Model + +typedef GPB_ENUM(Model_FieldNumber) { + Model_FieldNumber_Key = 1, + Model_FieldNumber_Timestamp = 2, + Model_FieldNumber_Data_p = 3, +}; + +@interface SentBodyModel : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *key; + +@property(nonatomic, readwrite) int64_t timestamp; + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary *data_p; +/** The number of items in @c data_p without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger data_p_Count; + +@end + +NS_ASSUME_NONNULL_END + +CF_EXTERN_C_END + +#pragma clang diagnostic pop + +// @@protoc_insertion_point(global_scope) diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/SentBody.pbobjc.m b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/SentBody.pbobjc.m new file mode 100644 index 0000000..27aede2 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Proto/SentBody.pbobjc.m @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SentBody.proto + +// This CPP symbol can be defined to use imports that match up to the framework +// imports needed when using CocoaPods. +#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) + #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 +#endif + +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import +#else + #import "GPBProtocolBuffers_RuntimeSupport.h" +#endif + +#import "SentBody.pbobjc.h" +// @@protoc_insertion_point(imports) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + +#pragma mark - SentBodyRoot + +@implementation SentBodyRoot + +// No extensions in the file and no imports, so no need to generate +// +extensionRegistry. + +@end + +#pragma mark - SentBodyRoot_FileDescriptor + +static GPBFileDescriptor *SentBodyRoot_FileDescriptor(void) { + // This is called by +initialize so there is no need to worry + // about thread safety of the singleton. + static GPBFileDescriptor *descriptor = NULL; + if (!descriptor) { + GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); + descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"" + syntax:GPBFileSyntaxProto3]; + } + return descriptor; +} + +#pragma mark - Model + +@implementation SentBodyModel + +@dynamic key; +@dynamic timestamp; +@dynamic data_p, data_p_Count; + +typedef struct Model__storage_ { + uint32_t _has_storage_[1]; + NSString *key; + NSMutableDictionary *data_p; + int64_t timestamp; +} Model__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "key", + .dataTypeSpecific.className = NULL, + .number = Model_FieldNumber_Key, + .hasIndex = 0, + .offset = (uint32_t)offsetof(Model__storage_, key), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "timestamp", + .dataTypeSpecific.className = NULL, + .number = Model_FieldNumber_Timestamp, + .hasIndex = 1, + .offset = (uint32_t)offsetof(Model__storage_, timestamp), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeInt64, + }, + { + .name = "data_p", + .dataTypeSpecific.className = NULL, + .number = Model_FieldNumber_Data_p, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(Model__storage_, data_p), + .flags = GPBFieldMapKeyString, + .dataType = GPBDataTypeString, + }, + }; + + + + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[SentBodyModel class] + rootClass:[SentBodyRoot class] + file:SentBodyRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(Model__storage_) + flags:GPBDescriptorInitializationFlag_None]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + + +#pragma clang diagnostic pop + +// @@protoc_insertion_point(global_scope) diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Service/CIMService.h b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Service/CIMService.h new file mode 100644 index 0000000..ea66767 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Service/CIMService.h @@ -0,0 +1,103 @@ +// +// CIMMessageObserver.h +// CIMKit +// +// Created by mason on 2020/11/18. +// + +#import +#import "GCDAsyncSocket.h" +#import "CIMMessageModel.h" + +@class CIMService; +/// 消息回调 +@protocol CIMPeerMessageObserver + +/// 接受到消息 +/// @param msg msg description +-(void)cimHandleMessage:(CIMMessageModel * _Nonnull)msg; + +/// 消息解析失败 +/// @param data data description +-(void)cimHandleMessageError:(NSData * _Nonnull)data; + + +@end + +/// 服务器连接回调 +@protocol CIMConnectionObserver +@optional + +/// 用户绑定成功 +/// @param bindSuccess bindSuccess description +-(void)cimDidBindUserSuccess:(BOOL)bindSuccess; + +/// 连接成功 +-(void)cimDidConnectSuccess; + +/// 断开连接 +-(void)cimDidConnectClose; + +/// 连接失败 +/// @param error res description +-(void)cimDidConnectError:(NSError *_Nullable)error; + +@end + + +NS_ASSUME_NONNULL_BEGIN + +@interface CIMService : NSObject + ++(CIMService*)instance; + +/// 配置IM服务器 +/// @param host host description +/// @param port port description +-(void)configHost:(NSString *)host onPort:(NSInteger)port; + +/// 连接服务器并绑定用户 +/// @param userId userId description +-(void)connectionBindUserId:(NSString *)userId; + +/// 添加消息监听回调 +/// @param observer observer description (可添加多个)不同时记得Remove +-(void)addMessageObserver:(id)observer; + +/// 添加连接状态监听回调 +/// @param observer observer description (可添加多个)不同时记得Remove +-(void)addConnectionObserver:(id)observer; + +/// 移除监听 +/// @param observer observer description +-(void)removeMessageObserver:(id)observer; + +/// 移除监听回调 +/// @param observer observer description +-(void)removeConnectionObserver:(id)observer; + +/// 退出后台 断开连接 +-(void)enterBackground; + +/// 进入前台重新连接 +-(void)enterForeground; + +/// 重新连接 +-(void)reconnect; + +/// 断开连接 +-(void)disconnect; + + + + + + + + + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Service/CIMService.m b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Service/CIMService.m new file mode 100644 index 0000000..eedba63 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Service/CIMService.m @@ -0,0 +1,164 @@ +// +// CIMMessageObserver.m +// CIMKit +// +// Created by mason on 2020/11/18. +// + +#import "CIMService.h" +#import "CIMSendMessageData.h" +#import "CIMMessageHandler.h" + + +@interface CIMService() + +@property (assign, nonatomic)BOOL deBugLog; + +@property(nonatomic,copy,readonly)NSString * host; +@property(nonatomic,assign,readonly)NSInteger port; + +@property (strong, nonatomic) GCDAsyncSocket * clientSocket; +@property (strong, nonatomic)dispatch_queue_t queue; + +@property (strong, nonatomic)CIMMessageHandler *handler; + +@property (copy, nonatomic)NSString *userId; + + + +@end + +@implementation CIMService + ++(CIMService*)instance { + static CIMService *imService; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + if (!imService) { + imService = [[CIMService alloc] init]; + } + }); + return imService; +} + +-(id)init { + self = [super init]; + if (self) { + + } + return self; +} + +-(void)configHost:(NSString *)host onPort:(NSInteger)port{ + _host = host; + _port = port; +} + + +- (void)connectionBindUserId:(NSString *)userId{ + if(userId.length == 0){ + [self.handler handlerBindUser:NO]; + return; + } + self.userId = userId; + NSAssert(self.host.length > 1, @"定调用configHost 配置host和port"); + NSAssert(self.port > 1, @"定调用configHost 配置host和port"); + //接服务器 + NSError *error; + [self.clientSocket connectToHost:self.host onPort:self.port error:&error]; + if (error) { + [self.handler handlerConnectError:error]; + }else{ + NSLog(@"socket 成功"); + [self.clientSocket writeData:[CIMSendMessageData initBindUserData:userId] withTimeout:-1 tag:0]; + } +} + + + + + + +#pragma mark Observe +- (void)addMessageObserver:(id)observer{ + [self.handler addPeerMessageObservers:observer]; +} + +- (void)addConnectionObserver:(id)observer{ + [self.handler addConnectionObservers:observer]; +} + +- (void)removeMessageObserver:(id)observer{ + [self.handler removePeerMessageObservers:observer]; +} + +- (void)removeConnectionObserver:(id)observer{ + [self.handler removeConnectionObservers:observer]; +} +#pragma mark -Connection methods +-(void)enterBackground{ + if(self.clientSocket.isConnected){ + [self.clientSocket disconnect]; + } +} +-(void)enterForeground{ + if(!self.clientSocket.isConnected){ + [self connectionBindUserId:self.userId]; + } +} + +-(void)reconnect{ + if(!self.clientSocket.isConnected){ + [self connectionBindUserId:self.userId]; + } +} + +-(void)disconnect{ + if(self.clientSocket.isConnected){ + [self.clientSocket disconnect]; + self.clientSocket = nil; + } +} + +#pragma mark - GCDAsyncSocketDelegate +// 连接成功 +- (void)socket:(GCDAsyncSocket *)sock didConnectToHost:(NSString *)host port:(uint16_t)port { + NSLog(@"socket 连接成功"); + [self.clientSocket readDataWithTimeout:-1 tag:0]; + [self.handler handlerConnectSuccess]; +} + +// 已经断开链接 +- (void)socketDidDisconnect:(GCDAsyncSocket *)sock withError:(NSError *)err { + NSLog(@"socket 断开连接%@",err.localizedDescription); + [self.handler handlerConnectClose]; +} + +//读取到数据 +- (void)socket:(GCDAsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag { + [self.clientSocket readDataWithTimeout:-1 tag:0]; + //数据处理 + NSLog(@"didReadData"); + [self.handler doCode:data socket:sock]; +} + + +#pragma mark lazy +- (GCDAsyncSocket *)clientSocket{ + if(!_clientSocket){ + self.queue = dispatch_queue_create("com.cim.IMQueue", DISPATCH_QUEUE_CONCURRENT); + _clientSocket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:self.queue]; + } + return _clientSocket; +} + +- (CIMMessageHandler *)handler{ + if(!_handler){ + _handler = [[CIMMessageHandler alloc] init]; + } + return _handler; +} + + + +@end diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Tool/NSData+IM.h b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Tool/NSData+IM.h new file mode 100644 index 0000000..b03b981 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Tool/NSData+IM.h @@ -0,0 +1,20 @@ +// +// NSData+IM.h +// CIMKit +// +// Created by mason on 2020/11/13. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSData (IM) + +- (NSString *)convertDataToHexStr; + ++ (NSString *)convertDataToHexStr:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Tool/NSData+IM.m b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Tool/NSData+IM.m new file mode 100644 index 0000000..424a787 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Tool/NSData+IM.m @@ -0,0 +1,57 @@ +// +// NSData+IM.m +// CIMKit +// +// Created by mason on 2020/11/13. +// + +#import "NSData+IM.h" + +@implementation NSData (IM) + +- (NSString *)convertDataToHexStr{ + if (!self || [self length] == 0) { + return @""; + } + NSMutableString *string = [[NSMutableString alloc] initWithCapacity:[self length]]; + + [self enumerateByteRangesUsingBlock:^(const void *bytes, NSRange byteRange, BOOL *stop) { + unsigned char *dataBytes = (unsigned char*)bytes; + for (NSInteger i = 0; i < byteRange.length; i++) { + NSString *hexStr = [NSString stringWithFormat:@"%x", (dataBytes[i]) & 0xff]; + if ([hexStr length] == 2) { + [string appendString:hexStr]; + } else { + [string appendFormat:@"0%@", hexStr]; + } + } + }]; + + return string; +} + + ++ (NSString *)convertDataToHexStr:(NSData *)data +{ + if (!data || [data length] == 0) { + return @""; + } + NSMutableString *string = [[NSMutableString alloc] initWithCapacity:[data length]]; + + [data enumerateByteRangesUsingBlock:^(const void *bytes, NSRange byteRange, BOOL *stop) { + unsigned char *dataBytes = (unsigned char*)bytes; + for (NSInteger i = 0; i < byteRange.length; i++) { + NSString *hexStr = [NSString stringWithFormat:@"%x", (dataBytes[i]) & 0xff]; + if ([hexStr length] == 2) { + [string appendString:hexStr]; + } else { + [string appendFormat:@"0%@", hexStr]; + } + } + }]; + return string; +} + + + +@end diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Tool/NSString+IM.h b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Tool/NSString+IM.h new file mode 100644 index 0000000..1c2884c --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Tool/NSString+IM.h @@ -0,0 +1,24 @@ +// +// NSString+IM.h +// CIMKit +// +// Created by mason on 2020/11/13. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSString (IM) + + +-(NSData*) convertBytesStringToData ; + +- (NSString *)hexToDecimal ; + +//data -> 16进制 ++(NSString *)hexStringFormData:(NSData *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Tool/NSString+IM.m b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Tool/NSString+IM.m new file mode 100644 index 0000000..523a455 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/CIMKit/Tool/NSString+IM.m @@ -0,0 +1,155 @@ +// +// NSString+IM.m +// CIMKit +// +// Created by mason on 2020/11/13. +// + +#import "NSString+IM.h" +# +@implementation NSString (IM) + +/** + 带子节的string转为NSData + + @return NSData类型 + */ +-(NSData*) convertBytesStringToData { + NSMutableData* data = [NSMutableData data]; + int idx; + for (idx = 0; idx+2 <= self.length; idx+=2) { + NSRange range = NSMakeRange(idx, 2); + NSString* hexStr = [self substringWithRange:range]; + NSScanner* scanner = [NSScanner scannerWithString:hexStr]; + unsigned int intValue; + [scanner scanHexInt:&intValue]; + [data appendBytes:&intValue length:1]; + } + return data; +} + + + +/** + 十进制转十六进制 + + @return 十六进制字符串 + */ +- (NSString *)decimalToHex { + long long int tmpid = [self intValue]; + NSString *nLetterValue; + NSString *str = @""; + long long int ttmpig; + for (int i = 0; i < 9; i++) { + ttmpig = tmpid % 16; + tmpid = tmpid / 16; + switch (ttmpig) { + case 10: + nLetterValue = @"A"; + break; + case 11: + nLetterValue = @"B"; + break; + case 12: + nLetterValue = @"C"; + break; + case 13: + nLetterValue = @"D"; + break; + case 14: + nLetterValue = @"E"; + break; + case 15: + nLetterValue = @"F"; + break; + default: + nLetterValue = [[NSString alloc]initWithFormat:@"%lli", ttmpig]; + } + str = [nLetterValue stringByAppendingString:str]; + if (tmpid == 0) { + break; + } + } + return str; +} +/** + 十进制转十六进制 + length 总长度,不足补0 + @return 十六进制字符串 + */ +- (NSString *)decimalToHexWithLength:(NSUInteger)length{ + NSString* subString = [self decimalToHex]; + NSUInteger moreL = length - subString.length; + if (moreL>0) { + for (int i = 0; i= 0; i --) { + result = [result stringByAppendingFormat:@"%@", + [prepare substringWithRange:NSMakeRange(i , 1)]]; + } + return [NSString stringWithFormat:@"%08d",[result intValue]]; +} + + ++(NSString *)hexStringFormData:(NSData *)data +{ + return [[[[NSString stringWithFormat:@"%@",data] + stringByReplacingOccurrencesOfString:@"<" withString:@""] + stringByReplacingOccurrencesOfString:@">" withString:@""] + stringByReplacingOccurrencesOfString:@" " withString:@""]; + + + +} +@end diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/Info.plist b/cim-client-sdk/cim-ios-sdk/CIMKit/Info.plist new file mode 100644 index 0000000..34014f0 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleVersion + 1 + CFBundleShortVersionString + 1 + + diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/SceneDelegate.h b/cim-client-sdk/cim-ios-sdk/CIMKit/SceneDelegate.h new file mode 100644 index 0000000..7c2877c --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/SceneDelegate.h @@ -0,0 +1,15 @@ +// +// SceneDelegate.h +// CIMKit +// +// Created by mason on 2020/11/7. +// + +#import + +@interface SceneDelegate : UIResponder + +@property (strong, nonatomic) UIWindow * window; + +@end + diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/SceneDelegate.m b/cim-client-sdk/cim-ios-sdk/CIMKit/SceneDelegate.m new file mode 100644 index 0000000..bc6c8c1 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/SceneDelegate.m @@ -0,0 +1,61 @@ +// +// SceneDelegate.m +// CIMKit +// +// Created by mason on 2020/11/7. +// + +#import "SceneDelegate.h" +#import "CIMHeader.h" +@interface SceneDelegate () + +@end + +@implementation SceneDelegate + + +- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). +} + + +- (void)sceneDidDisconnect:(UIScene *)scene { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). +} + +- (void)sceneDidEnterBackground:(UIScene *)scene{ + [[CIMService instance] enterBackground]; + +} + +- (void)sceneWillEnterForeground:(UIScene *)scene{ + [[CIMService instance] enterForeground]; + +} + + + + + + +- (void)sceneDidBecomeActive:(UIScene *)scene { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. +} + + +- (void)sceneWillResignActive:(UIScene *)scene { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). +} + + + + + +@end diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/ViewController.h b/cim-client-sdk/cim-ios-sdk/CIMKit/ViewController.h new file mode 100644 index 0000000..e9519c1 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/ViewController.h @@ -0,0 +1,14 @@ +// +// ViewController.h +// CIMKit +// +// Created by mason on 2020/11/7. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/ViewController.m b/cim-client-sdk/cim-ios-sdk/CIMKit/ViewController.m new file mode 100644 index 0000000..f5c5b77 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/ViewController.m @@ -0,0 +1,88 @@ +// +// ViewController.m +// CIMKit +// +// Created by mason on 2020/11/7. +// + +#import "ViewController.h" +#import "SocketRocket.h" + +#import "GCDAsyncSocket.h" +#import "SentBody.pbobjc.h" +#import "Message.pbobjc.h" +#import "NSData+IM.h" +#import "NSString+IM.h" +#import "CIMHeader.h" +#import "AViewController.h" + +@interface ViewController () + +@property (strong, nonatomic) SRWebSocket *imWebSocket; +@property (strong, nonatomic) GCDAsyncSocket * clientSocket; + + +@end + +@implementation ViewController + + + + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ + [self presentViewController:[AViewController new] animated:YES completion:nil]; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.view.backgroundColor = UIColor.redColor; + + [[CIMService instance] configHost:@"192.168.51.197" onPort:23456]; + + [[CIMService instance] connectionBindUserId:@"111111"]; + + [[CIMService instance] addMessageObserver:self]; + [[CIMService instance] addConnectionObserver:self]; + + [[CIMService instance] removeMessageObserver:self]; + [[CIMService instance] removeConnectionObserver:self]; + + +} + + +- (void)cimDidConnectClose{ + NSLog(@"cimDidConnectClose"); + +} + +- (void)cimDidConnectError:(NSError *)error{ + NSLog(@"cimDidConnectError"); + +} + +- (void)cimDidConnectSuccess{ + NSLog(@"cimDidConnectSuccess"); + +} + +- (void)cimDidBindUserSuccess:(BOOL)bindSuccess{ + NSLog(@"cimDidBindUserSuccess"); +} + +- (void)cimHandleMessage:(CIMMessageModel *)msg{ + NSLog(@"ViewController:%@\nu用户:%@(%lld)\n---------",msg.content,msg.sender,msg.timestamp); +} +- (void)cimHandleMessageError:(NSData *)data{ + NSLog(@"cimHandleMessageError"); +} + + + + + + + + +@end diff --git a/cim-client-sdk/cim-ios-sdk/CIMKit/main.m b/cim-client-sdk/cim-ios-sdk/CIMKit/main.m new file mode 100644 index 0000000..6be68f2 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKit/main.m @@ -0,0 +1,18 @@ +// +// main.m +// CIMKit +// +// Created by mason on 2020/11/7. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + NSString * appDelegateClassName; + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + appDelegateClassName = NSStringFromClass([AppDelegate class]); + } + return UIApplicationMain(argc, argv, nil, appDelegateClassName); +} diff --git a/cim-client-sdk/cim-ios-sdk/CIMKitTests/CIMKitTests.m b/cim-client-sdk/cim-ios-sdk/CIMKitTests/CIMKitTests.m new file mode 100644 index 0000000..935ce66 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKitTests/CIMKitTests.m @@ -0,0 +1,36 @@ +// +// CimKitTests.m +// CimKitTests +// +// Created by mason on 2020/11/21. +// + +#import + +@interface CimKitTests : XCTestCase + +@end + +@implementation CimKitTests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testExample { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end diff --git a/cim-client-sdk/cim-ios-sdk/CIMKitTests/Info.plist b/cim-client-sdk/cim-ios-sdk/CIMKitTests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKitTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/cim-client-sdk/cim-ios-sdk/CIMKitUITests/CIMKitUITests.m b/cim-client-sdk/cim-ios-sdk/CIMKitUITests/CIMKitUITests.m new file mode 100644 index 0000000..7e93b7e --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKitUITests/CIMKitUITests.m @@ -0,0 +1,47 @@ +// +// CIMKitUITests.m +// CIMKitUITests +// +// Created by mason on 2020/11/7. +// + +#import + +@interface CIMKitUITests : XCTestCase + +@end + +@implementation CIMKitUITests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = NO; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testExample { + // UI tests must launch the application that they test. + XCUIApplication *app = [[XCUIApplication alloc] init]; + [app launch]; + + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. +} + +- (void)testLaunchPerformance { + if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) { + // This measures how long it takes to launch your application. + [self measureWithMetrics:@[[[XCTApplicationLaunchMetric alloc] init]] block:^{ + [[[XCUIApplication alloc] init] launch]; + }]; + } +} + +@end diff --git a/cim-client-sdk/cim-ios-sdk/CIMKitUITests/Info.plist b/cim-client-sdk/cim-ios-sdk/CIMKitUITests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/CIMKitUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/cim-client-sdk/cim-ios-sdk/Podfile b/cim-client-sdk/cim-ios-sdk/Podfile new file mode 100644 index 0000000..0969f3f --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/Podfile @@ -0,0 +1,31 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, '9.0' + +target 'CIMKit' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + + # Pods for CIMKit + pod "SocketRocket", '~> 0.5.1' + pod "Protobuf", '~> 3.13.0' + pod "CocoaAsyncSocket", '~> 7.6.4' + + target 'CimKit' do + pod "SocketRocket", '~> 0.5.1' + pod "Protobuf", '~> 3.13.0' + pod "CocoaAsyncSocket", '~> 7.6.4' + + end + + + target 'CIMKitTests' do + inherit! :search_paths + # Pods for testing + end + + target 'CIMKitUITests' do + # Pods for testing + end + +end diff --git a/cim-client-sdk/cim-ios-sdk/Podfile.lock b/cim-client-sdk/cim-ios-sdk/Podfile.lock new file mode 100644 index 0000000..7c85871 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/Podfile.lock @@ -0,0 +1,24 @@ +PODS: + - CocoaAsyncSocket (7.6.4) + - Protobuf (3.13.0) + - SocketRocket (0.5.1) + +DEPENDENCIES: + - CocoaAsyncSocket (~> 7.6.4) + - Protobuf (~> 3.13.0) + - SocketRocket (~> 0.5.1) + +SPEC REPOS: + trunk: + - CocoaAsyncSocket + - Protobuf + - SocketRocket + +SPEC CHECKSUMS: + CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845 + Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748 + SocketRocket: d57c7159b83c3c6655745cd15302aa24b6bae531 + +PODFILE CHECKSUM: fe21b8def5ac502f6af111678a5b83f7c4803c28 + +COCOAPODS: 1.9.3 diff --git a/cim-client-sdk/cim-ios-sdk/Products/CimKit.framework/Headers/CIMHeader.h b/cim-client-sdk/cim-ios-sdk/Products/CimKit.framework/Headers/CIMHeader.h new file mode 100644 index 0000000..c80508d --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/Products/CimKit.framework/Headers/CIMHeader.h @@ -0,0 +1,23 @@ +// +// CIMHeader.h +// CIMKit +// +// Created by mason on 2020/11/13. +// + +#ifndef CIMHeader_h +#define CIMHeader_h + + +#import "GCDAsyncSocket.h" +#import "SentBody.pbobjc.h" +#import "Message.pbobjc.h" +#import "NSData+IM.h" +#import "NSString+IM.h" + +#import "CIMSendMessageData.h" +#import "CIMService.h" + + + +#endif /* CIMHeader_h */ diff --git a/cim-client-sdk/cim-ios-sdk/Products/CimKit.framework/Headers/CIMService.h b/cim-client-sdk/cim-ios-sdk/Products/CimKit.framework/Headers/CIMService.h new file mode 100644 index 0000000..ea66767 --- /dev/null +++ b/cim-client-sdk/cim-ios-sdk/Products/CimKit.framework/Headers/CIMService.h @@ -0,0 +1,103 @@ +// +// CIMMessageObserver.h +// CIMKit +// +// Created by mason on 2020/11/18. +// + +#import +#import "GCDAsyncSocket.h" +#import "CIMMessageModel.h" + +@class CIMService; +/// 消息回调 +@protocol CIMPeerMessageObserver + +/// 接受到消息 +/// @param msg msg description +-(void)cimHandleMessage:(CIMMessageModel * _Nonnull)msg; + +/// 消息解析失败 +/// @param data data description +-(void)cimHandleMessageError:(NSData * _Nonnull)data; + + +@end + +/// 服务器连接回调 +@protocol CIMConnectionObserver +@optional + +/// 用户绑定成功 +/// @param bindSuccess bindSuccess description +-(void)cimDidBindUserSuccess:(BOOL)bindSuccess; + +/// 连接成功 +-(void)cimDidConnectSuccess; + +/// 断开连接 +-(void)cimDidConnectClose; + +/// 连接失败 +/// @param error res description +-(void)cimDidConnectError:(NSError *_Nullable)error; + +@end + + +NS_ASSUME_NONNULL_BEGIN + +@interface CIMService : NSObject + ++(CIMService*)instance; + +/// 配置IM服务器 +/// @param host host description +/// @param port port description +-(void)configHost:(NSString *)host onPort:(NSInteger)port; + +/// 连接服务器并绑定用户 +/// @param userId userId description +-(void)connectionBindUserId:(NSString *)userId; + +/// 添加消息监听回调 +/// @param observer observer description (可添加多个)不同时记得Remove +-(void)addMessageObserver:(id)observer; + +/// 添加连接状态监听回调 +/// @param observer observer description (可添加多个)不同时记得Remove +-(void)addConnectionObserver:(id)observer; + +/// 移除监听 +/// @param observer observer description +-(void)removeMessageObserver:(id)observer; + +/// 移除监听回调 +/// @param observer observer description +-(void)removeConnectionObserver:(id)observer; + +/// 退出后台 断开连接 +-(void)enterBackground; + +/// 进入前台重新连接 +-(void)enterForeground; + +/// 重新连接 +-(void)reconnect; + +/// 断开连接 +-(void)disconnect; + + + + + + + + + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/cim-client-sdk/cim-ios-sdk/Products/CimKit.framework/Info.plist b/cim-client-sdk/cim-ios-sdk/Products/CimKit.framework/Info.plist new file mode 100644 index 0000000..d95f927 Binary files /dev/null and b/cim-client-sdk/cim-ios-sdk/Products/CimKit.framework/Info.plist differ diff --git a/doc/CimKit iOS教程.pdf b/doc/CimKit iOS教程.pdf new file mode 100644 index 0000000..aa08cba Binary files /dev/null and b/doc/CimKit iOS教程.pdf differ