From 2a2613b5cc27c5816d14bd0485fea76ae5843f41 Mon Sep 17 00:00:00 2001 From: Chentao Date: Fri, 16 Sep 2022 13:35:24 +0800 Subject: [PATCH] =?UTF-8?q?[cim-ios-oc-sdk]=E5=A2=9E=E5=8A=A0=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CIMKit.xcodeproj/project.pbxproj | 480 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../UserInterfaceState.xcuserstate | Bin 0 -> 5649 bytes .../xcschemes/xcschememanagement.plist | 14 + .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../UserInterfaceState.xcuserstate | Bin 0 -> 44244 bytes .../xcdebugger/Breakpoints_v2.xcbkptlist | 168 ++++++ .../cim-ios-oc-sdk/CIMKit/AppDelegate.h | 14 + .../cim-ios-oc-sdk/CIMKit/AppDelegate.m | 43 ++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 93 ++++ .../CIMKit/Assets.xcassets/Contents.json | 6 + .../CIMKit/Base.lproj/LaunchScreen.storyboard | 25 + .../CIMKit/Base.lproj/Main.storyboard | 24 + .../CIMKit/CIMKit/CIMMessageModel.h | 34 ++ .../CIMKit/CIMKit/CIMMessageModel.m | 12 + .../cim-ios-oc-sdk/CIMKit/CIMKit/CIMService.h | 148 ++++++ .../cim-ios-oc-sdk/CIMKit/CIMKit/CIMService.m | 417 +++++++++++++++ .../CIMKit/CIMKit/CIMSignalPacket.h | 30 ++ .../CIMKit/CIMKit/CIMSignalPacket.m | 14 + .../CIMKit/CIMKit/CIMSignalService.h | 65 +++ .../CIMKit/CIMKit/CIMSignalService.m | 129 +++++ .../CIMKit/CIMKit/CIMSignalServiceBuffer.h | 29 ++ .../CIMKit/CIMKit/CIMSignalServiceBuffer.m | 86 ++++ .../CIMKit/CIMKit/Proto/Message.pbobjc.h | 89 ++++ .../CIMKit/CIMKit/Proto/Message.pbobjc.m | 181 +++++++ .../CIMKit/CIMKit/Proto/ReplyBody.pbobjc.h | 79 +++ .../CIMKit/CIMKit/Proto/ReplyBody.pbobjc.m | 137 +++++ .../CIMKit/CIMKit/Proto/SentBody.pbobjc.h | 73 +++ .../CIMKit/CIMKit/Proto/SentBody.pbobjc.m | 118 +++++ .../CIMKit/Tool/CIMWeakProxy/CIMWeakProxy.h | 21 + .../CIMKit/Tool/CIMWeakProxy/CIMWeakProxy.m | 79 +++ .../Tool/KCLDataReaderWriter/KCLDataReader.h | 33 ++ .../Tool/KCLDataReaderWriter/KCLDataReader.m | 123 +++++ .../Tool/KCLDataReaderWriter/KCLDataWriter.h | 34 ++ .../Tool/KCLDataReaderWriter/KCLDataWriter.m | 90 ++++ .../cim-ios-oc-sdk/CIMKit/Info.plist | 25 + .../cim-ios-oc-sdk/CIMKit/SceneDelegate.h | 15 + .../cim-ios-oc-sdk/CIMKit/SceneDelegate.m | 57 +++ .../cim-ios-oc-sdk/CIMKit/ViewController.h | 14 + .../cim-ios-oc-sdk/CIMKit/ViewController.m | 106 ++++ cim-client-sdk/cim-ios-oc-sdk/CIMKit/main.m | 18 + cim-client-sdk/cim-ios-oc-sdk/Podfile | 13 + 45 files changed, 3180 insertions(+) create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.pbxproj create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.xcworkspace/xcuserdata/chentao.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/xcuserdata/chentao.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcworkspace/contents.xcworkspacedata create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcworkspace/xcuserdata/chentao.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcworkspace/xcuserdata/chentao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/AppDelegate.h create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/AppDelegate.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/Assets.xcassets/Contents.json create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/Base.lproj/LaunchScreen.storyboard create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/Base.lproj/Main.storyboard create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMMessageModel.h create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMMessageModel.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMService.h create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMService.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalPacket.h create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalPacket.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalService.h create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalService.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalServiceBuffer.h create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalServiceBuffer.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Proto/Message.pbobjc.h create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Proto/Message.pbobjc.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Proto/ReplyBody.pbobjc.h create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Proto/ReplyBody.pbobjc.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Proto/SentBody.pbobjc.h create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Proto/SentBody.pbobjc.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/CIMWeakProxy/CIMWeakProxy.h create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/CIMWeakProxy/CIMWeakProxy.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataReader.h create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataReader.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataWriter.h create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataWriter.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/Info.plist create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/SceneDelegate.h create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/SceneDelegate.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/ViewController.h create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/ViewController.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/CIMKit/main.m create mode 100644 cim-client-sdk/cim-ios-oc-sdk/Podfile diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.pbxproj b/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.pbxproj new file mode 100644 index 0000000..dd2e6aa --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.pbxproj @@ -0,0 +1,480 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + C625DCFE28BF1106008F267F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C625DCFD28BF1106008F267F /* AppDelegate.m */; }; + C625DD0128BF1106008F267F /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C625DD0028BF1106008F267F /* SceneDelegate.m */; }; + C625DD0428BF1106008F267F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C625DD0328BF1106008F267F /* ViewController.m */; }; + C625DD0728BF1106008F267F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C625DD0528BF1106008F267F /* Main.storyboard */; }; + C625DD0928BF1108008F267F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C625DD0828BF1108008F267F /* Assets.xcassets */; }; + C625DD0C28BF1108008F267F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C625DD0A28BF1108008F267F /* LaunchScreen.storyboard */; }; + C625DD0F28BF1108008F267F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C625DD0E28BF1108008F267F /* main.m */; }; + C625DD1828BF2BDF008F267F /* CIMService.m in Sources */ = {isa = PBXBuildFile; fileRef = C625DD1728BF2BDF008F267F /* CIMService.m */; }; + C66CFB5528BF9000002506AD /* CIMMessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = C66CFB5428BF9000002506AD /* CIMMessageModel.m */; }; + C66CFB6928C07ED5002506AD /* ReplyBody.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = C66CFB6428C07ED5002506AD /* ReplyBody.pbobjc.m */; }; + C66CFB6A28C07ED5002506AD /* Message.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = C66CFB6528C07ED5002506AD /* Message.pbobjc.m */; }; + C66CFB6B28C07ED5002506AD /* SentBody.pbobjc.m in Sources */ = {isa = PBXBuildFile; fileRef = C66CFB6728C07ED5002506AD /* SentBody.pbobjc.m */; }; + C66CFB6E28C1B19C002506AD /* CIMSignalService.m in Sources */ = {isa = PBXBuildFile; fileRef = C66CFB6D28C1B19C002506AD /* CIMSignalService.m */; }; + C66CFB7828C3548F002506AD /* CIMSignalServiceBuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = C66CFB7728C3548F002506AD /* CIMSignalServiceBuffer.m */; }; + C66CFB7B28C38D8E002506AD /* CIMSignalPacket.m in Sources */ = {isa = PBXBuildFile; fileRef = C66CFB7A28C38D8E002506AD /* CIMSignalPacket.m */; }; + C68DFB5528D210790088E639 /* KCLDataWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = C68DFB4E28D210790088E639 /* KCLDataWriter.m */; }; + C68DFB5628D210790088E639 /* KCLDataReader.m in Sources */ = {isa = PBXBuildFile; fileRef = C68DFB5128D210790088E639 /* KCLDataReader.m */; }; + C68DFB5728D210790088E639 /* CIMWeakProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = C68DFB5328D210790088E639 /* CIMWeakProxy.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + C625DCF928BF1106008F267F /* CIMKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CIMKit.app; sourceTree = BUILT_PRODUCTS_DIR; }; + C625DCFC28BF1106008F267F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + C625DCFD28BF1106008F267F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + C625DCFF28BF1106008F267F /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; + C625DD0028BF1106008F267F /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; + C625DD0228BF1106008F267F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + C625DD0328BF1106008F267F /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + C625DD0628BF1106008F267F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + C625DD0828BF1108008F267F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + C625DD0B28BF1108008F267F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + C625DD0D28BF1108008F267F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C625DD0E28BF1108008F267F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + C625DD1628BF2BDE008F267F /* CIMService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CIMService.h; sourceTree = ""; }; + C625DD1728BF2BDF008F267F /* CIMService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CIMService.m; sourceTree = ""; }; + C66CFB5328BF9000002506AD /* CIMMessageModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CIMMessageModel.h; sourceTree = ""; }; + C66CFB5428BF9000002506AD /* CIMMessageModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CIMMessageModel.m; sourceTree = ""; }; + C66CFB6328C07ED5002506AD /* SentBody.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SentBody.pbobjc.h; sourceTree = ""; }; + C66CFB6428C07ED5002506AD /* ReplyBody.pbobjc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReplyBody.pbobjc.m; sourceTree = ""; }; + C66CFB6528C07ED5002506AD /* Message.pbobjc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Message.pbobjc.m; sourceTree = ""; }; + C66CFB6628C07ED5002506AD /* ReplyBody.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReplyBody.pbobjc.h; sourceTree = ""; }; + C66CFB6728C07ED5002506AD /* SentBody.pbobjc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentBody.pbobjc.m; sourceTree = ""; }; + C66CFB6828C07ED5002506AD /* Message.pbobjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Message.pbobjc.h; sourceTree = ""; }; + C66CFB6C28C1B19C002506AD /* CIMSignalService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CIMSignalService.h; sourceTree = ""; }; + C66CFB6D28C1B19C002506AD /* CIMSignalService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CIMSignalService.m; sourceTree = ""; }; + C66CFB7628C3548F002506AD /* CIMSignalServiceBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CIMSignalServiceBuffer.h; sourceTree = ""; }; + C66CFB7728C3548F002506AD /* CIMSignalServiceBuffer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CIMSignalServiceBuffer.m; sourceTree = ""; }; + C66CFB7928C38D8E002506AD /* CIMSignalPacket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CIMSignalPacket.h; sourceTree = ""; }; + C66CFB7A28C38D8E002506AD /* CIMSignalPacket.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CIMSignalPacket.m; sourceTree = ""; }; + C68DFB4E28D210790088E639 /* KCLDataWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KCLDataWriter.m; sourceTree = ""; }; + C68DFB4F28D210790088E639 /* KCLDataReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KCLDataReader.h; sourceTree = ""; }; + C68DFB5028D210790088E639 /* KCLDataWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KCLDataWriter.h; sourceTree = ""; }; + C68DFB5128D210790088E639 /* KCLDataReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KCLDataReader.m; sourceTree = ""; }; + C68DFB5328D210790088E639 /* CIMWeakProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CIMWeakProxy.m; sourceTree = ""; }; + C68DFB5428D210790088E639 /* CIMWeakProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CIMWeakProxy.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + C625DCF628BF1106008F267F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + B17C5FA540C326B8C638FB9C /* Pods */ = { + isa = PBXGroup; + children = ( + ); + path = Pods; + sourceTree = ""; + }; + C625DCF028BF1105008F267F = { + isa = PBXGroup; + children = ( + C625DCFB28BF1106008F267F /* CIMKit */, + C625DCFA28BF1106008F267F /* Products */, + B17C5FA540C326B8C638FB9C /* Pods */, + ); + sourceTree = ""; + }; + C625DCFA28BF1106008F267F /* Products */ = { + isa = PBXGroup; + children = ( + C625DCF928BF1106008F267F /* CIMKit.app */, + ); + name = Products; + sourceTree = ""; + }; + C625DCFB28BF1106008F267F /* CIMKit */ = { + isa = PBXGroup; + children = ( + C625DD1528BF2BA0008F267F /* CIMKit */, + C625DCFC28BF1106008F267F /* AppDelegate.h */, + C625DCFD28BF1106008F267F /* AppDelegate.m */, + C625DCFF28BF1106008F267F /* SceneDelegate.h */, + C625DD0028BF1106008F267F /* SceneDelegate.m */, + C625DD0228BF1106008F267F /* ViewController.h */, + C625DD0328BF1106008F267F /* ViewController.m */, + C625DD0528BF1106008F267F /* Main.storyboard */, + C625DD0828BF1108008F267F /* Assets.xcassets */, + C625DD0A28BF1108008F267F /* LaunchScreen.storyboard */, + C625DD0D28BF1108008F267F /* Info.plist */, + C625DD0E28BF1108008F267F /* main.m */, + ); + path = CIMKit; + sourceTree = ""; + }; + C625DD1528BF2BA0008F267F /* CIMKit */ = { + isa = PBXGroup; + children = ( + C68DFB4C28D210790088E639 /* Tool */, + C66CFB6228C07ED5002506AD /* Proto */, + C625DD1628BF2BDE008F267F /* CIMService.h */, + C625DD1728BF2BDF008F267F /* CIMService.m */, + C66CFB6C28C1B19C002506AD /* CIMSignalService.h */, + C66CFB6D28C1B19C002506AD /* CIMSignalService.m */, + C66CFB7628C3548F002506AD /* CIMSignalServiceBuffer.h */, + C66CFB7728C3548F002506AD /* CIMSignalServiceBuffer.m */, + C66CFB7928C38D8E002506AD /* CIMSignalPacket.h */, + C66CFB7A28C38D8E002506AD /* CIMSignalPacket.m */, + C66CFB5328BF9000002506AD /* CIMMessageModel.h */, + C66CFB5428BF9000002506AD /* CIMMessageModel.m */, + ); + path = CIMKit; + sourceTree = ""; + }; + C66CFB6228C07ED5002506AD /* Proto */ = { + isa = PBXGroup; + children = ( + C66CFB6328C07ED5002506AD /* SentBody.pbobjc.h */, + C66CFB6728C07ED5002506AD /* SentBody.pbobjc.m */, + C66CFB6628C07ED5002506AD /* ReplyBody.pbobjc.h */, + C66CFB6428C07ED5002506AD /* ReplyBody.pbobjc.m */, + C66CFB6828C07ED5002506AD /* Message.pbobjc.h */, + C66CFB6528C07ED5002506AD /* Message.pbobjc.m */, + ); + path = Proto; + sourceTree = ""; + }; + C68DFB4C28D210790088E639 /* Tool */ = { + isa = PBXGroup; + children = ( + C68DFB4D28D210790088E639 /* KCLDataReaderWriter */, + C68DFB5228D210790088E639 /* CIMWeakProxy */, + ); + path = Tool; + sourceTree = ""; + }; + C68DFB4D28D210790088E639 /* KCLDataReaderWriter */ = { + isa = PBXGroup; + children = ( + C68DFB4E28D210790088E639 /* KCLDataWriter.m */, + C68DFB4F28D210790088E639 /* KCLDataReader.h */, + C68DFB5028D210790088E639 /* KCLDataWriter.h */, + C68DFB5128D210790088E639 /* KCLDataReader.m */, + ); + path = KCLDataReaderWriter; + sourceTree = ""; + }; + C68DFB5228D210790088E639 /* CIMWeakProxy */ = { + isa = PBXGroup; + children = ( + C68DFB5328D210790088E639 /* CIMWeakProxy.m */, + C68DFB5428D210790088E639 /* CIMWeakProxy.h */, + ); + path = CIMWeakProxy; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C625DCF828BF1106008F267F /* CIMKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = C625DD1228BF1108008F267F /* Build configuration list for PBXNativeTarget "CIMKit" */; + buildPhases = ( + C625DCF528BF1106008F267F /* Sources */, + C625DCF628BF1106008F267F /* Frameworks */, + C625DCF728BF1106008F267F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CIMKit; + productName = CIMKit; + productReference = C625DCF928BF1106008F267F /* CIMKit.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + C625DCF128BF1105008F267F /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 1340; + TargetAttributes = { + C625DCF828BF1106008F267F = { + CreatedOnToolsVersion = 13.4; + }; + }; + }; + buildConfigurationList = C625DCF428BF1105008F267F /* Build configuration list for PBXProject "CIMKit" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = C625DCF028BF1105008F267F; + productRefGroup = C625DCFA28BF1106008F267F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C625DCF828BF1106008F267F /* CIMKit */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + C625DCF728BF1106008F267F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C625DD0C28BF1108008F267F /* LaunchScreen.storyboard in Resources */, + C625DD0928BF1108008F267F /* Assets.xcassets in Resources */, + C625DD0728BF1106008F267F /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + C625DCF528BF1106008F267F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C66CFB7828C3548F002506AD /* CIMSignalServiceBuffer.m in Sources */, + C68DFB5728D210790088E639 /* CIMWeakProxy.m in Sources */, + C625DD0428BF1106008F267F /* ViewController.m in Sources */, + C66CFB5528BF9000002506AD /* CIMMessageModel.m in Sources */, + C66CFB6B28C07ED5002506AD /* SentBody.pbobjc.m in Sources */, + C66CFB7B28C38D8E002506AD /* CIMSignalPacket.m in Sources */, + C68DFB5528D210790088E639 /* KCLDataWriter.m in Sources */, + C625DCFE28BF1106008F267F /* AppDelegate.m in Sources */, + C625DD0F28BF1108008F267F /* main.m in Sources */, + C625DD1828BF2BDF008F267F /* CIMService.m in Sources */, + C68DFB5628D210790088E639 /* KCLDataReader.m in Sources */, + C66CFB6928C07ED5002506AD /* ReplyBody.pbobjc.m in Sources */, + C66CFB6E28C1B19C002506AD /* CIMSignalService.m in Sources */, + C66CFB6A28C07ED5002506AD /* Message.pbobjc.m in Sources */, + C625DD0128BF1106008F267F /* SceneDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + C625DD0528BF1106008F267F /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + C625DD0628BF1106008F267F /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + C625DD0A28BF1108008F267F /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + C625DD0B28BF1108008F267F /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C625DD1028BF1108008F267F /* 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++17"; + 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 = 9.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + C625DD1128BF1108008F267F /* 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++17"; + 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 = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + C625DD1328BF1108008F267F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = H6UN23L6E6; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = CIMKit/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.chen.CIMKit; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + C625DD1428BF1108008F267F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = H6UN23L6E6; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = CIMKit/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.chen.CIMKit; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C625DCF428BF1105008F267F /* Build configuration list for PBXProject "CIMKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C625DD1028BF1108008F267F /* Debug */, + C625DD1128BF1108008F267F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C625DD1228BF1108008F267F /* Build configuration list for PBXNativeTarget "CIMKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C625DD1328BF1108008F267F /* Debug */, + C625DD1428BF1108008F267F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = C625DCF128BF1105008F267F /* Project object */; +} diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.xcworkspace/xcuserdata/chentao.xcuserdatad/UserInterfaceState.xcuserstate b/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/project.xcworkspace/xcuserdata/chentao.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..f09c66404330905884433d7551bd7a6f574e69d3 GIT binary patch literal 5649 zcmbVQdw3Jql|Of8q>(g3tdTKbo(3E07z-r71pzEu78tN>EI)V{3)vdmgJns~$k+y) z-a;EflQe0PrIa=sYzPF>ZPJt`o3z>NZrbM2GzpMylcs69`}O;F+ilr4ZJOq>-90m7 z$#%&8v-tba%)RH_^SI~y&N$<9QtjFu(!_7O(;jj-5pZWmQv>iCslewRb?l zx3;2mGPScP*|T5nO=~V7x1EVNb3);5@|Ya+PZ3=K8`#^!>1bM}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r1m|+F(3$R2O?ipMMHVHrz}v{by&B$6wR*jj9>NF z)dxPUlSb#yRA92cA=@#(zIjVo2 z6^;3NJoqU=f`vGx-i%)hs_`p991dZNeG(?%B0L69VI%SemeBV}E`n(V*+90F5NW|l zJxtn22k9ic$R3>8_mLhFBYilx--`44CGr^g7WpCh9b;icW-hagS;Z7HB}^%^hVd}f zOe@pRD9j);#N5wJFz1As?lM3kd9=^=|c1F^x-DaFYE220hEo2zNFssO|?@d zkzQY?x_Yxsz}6xyYr&+7%?@tnWV*&I`GQutH`~r-4l{}8)*%oNrjiOatj17|N5wJ* zogjDUVPxdv7miZ= zj>cRuF6bsZ@Xlih{v+s_WB6s}IJpzQ%iM!sW}YIik+;cj$#wF3@-F!k`7`+o z`H-<**-No)<_p@;} z!KPT1O|u8tQT7mf7kh@i%s$V)#a?GWX8)UWaC5jE&c)5;=5fVbC0E5&b3U$)YvMY% zIHz%xJHg${J;+UR=eP^pMeY&qRqhS$P3|r3SKJ@D4=s#Euq?2+Eo&`aOSz@eQf={B z)>}4MHd*|Z4$Drw28Jn+XCA{ z+hW^tTcNGgR&J}Y`E5a4v#r(EX6vv;Y=>+|Y`5ATw0+n1j_nWj9DAXCt-Z<@xP&}mzOYbO zEG!kugiS)75D+#Cjlwn|A`A#aLQ*&&XaW_E3nzp-gu8_Mg_FW5;k58|;gayA@RD#% z__^?}!gb+2;eFu);Ukd|IngTGM2DCw7KqEm6=IR-6)VIl(I>7KH;6%To7f~ai#x<_ zQ5O3}MI01WF)bbxN5wJuY3Ao{*lCejq(By(s-i`myw?bVa)E0@o7PTGv)r)Rk}@ zaA~fCu2I(^*D=>^uG?K-blvAV={n^)?YiK4*mcqMi0iWJJ5xBtn7`zKSuh2zC;u08 CK#XYs literal 0 HcmV?d00001 diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/xcuserdata/chentao.xcuserdatad/xcschemes/xcschememanagement.plist b/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/xcuserdata/chentao.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6a36bac --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcodeproj/xcuserdata/chentao.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + CIMKit.xcscheme_^#shared#^_ + + orderHint + 3 + + + + diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcworkspace/contents.xcworkspacedata b/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..223cbd2 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcworkspace/xcuserdata/chentao.xcuserdatad/UserInterfaceState.xcuserstate b/cim-client-sdk/cim-ios-oc-sdk/CIMKit.xcworkspace/xcuserdata/chentao.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..edd84d8bc8d61668599c850de4ece9c214127478 GIT binary patch literal 44244 zcmeF4cR&EF3KJ1CFF*XMiV`SCG#2^MUEW=Eg0lrlPw>etI1v{qBu-CRZ`!Hzv zh8lxciM7Z+&t8|~PIQ3b8KKhJW^1#{Xs0*3kC7NXGk_V$3}T|07$%m9W8#?vCXq>E zl9?1HmC0dpnLNhAlrm*Z6;sblW2Q3=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DODOEWk{LQM9C$6BrTUpq)O?ibWXY;U6QUy*QA@$@6to*vGi2> zPpDa_MW|+(=} zxI9uGBaf3O%kRq5cF0aSUtS^qLoS!M$vfm-@*eq+Tq#$}wemM|z5Hvqb2uyP z4u`{=!k>rh!u8>X@QH9^_-wc-{C)U`@YV2*@U8Hj7iiTc^70EAc_ota!gRVvdPe$0 z`bE+r8IjD$xX7Hyf`}4X7paJxiu|rLSGp*#D{m>ol~KwBB}bW|%v5G8K4qbzD4G&g z;z~j(RCX%|l|xFU@{MvvIj>w)E-P1*t7>z#gPNjtRePv?)l@Z2O;@v2T=l7{s;e>8 zQkSaB)lbx7^;31dTB4S!`_)70VfBbwqt>bQYJ+-0ZB);yP3lGUUO}INAq8U#u!2Pe zYYTQ2G!{J4T4^a-SFMNETkEIw*G6b>Ym>Ao+I!mj8lnM>(&lSkjnneAMcQI5sKvA* ztz7#;JD}BR$F!5$Y3-bLS^H7Drrp$TY0vbR^kn@NeV{%>AEuAcN9#HIZ2dzW)=?eT z3EiXf`a=C2q#9|)C}W!8 zGUgey;WGk;U@S6ZLpS2aN@JC=##m>3W>gy0My+u(+A^9M9TRm#ebJAjMbYBun&{f- z`e;dXQ*?85OZ4+-ZL~i6WAx`(%UGLOYHV0+dJK;RVtQ%mjy1=d)66-hV18__GE2=ZX1Te|++}`gR+>l58uO&t zXr3|8n>Wl`<{k4F^HIEgyi@$u_|SM(JUc!yF2(iu^7yLwrueq_nfL{(m6c-kw)$CV zR)+PeHPjkzjk3mC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/AppDelegate.h b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/AppDelegate.h new file mode 100644 index 0000000..99fe37e --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/AppDelegate.h @@ -0,0 +1,14 @@ +// +// AppDelegate.h +// CIMKit +// +// Created by Chentao on 2022/8/31. +// + +#import + +@interface AppDelegate : UIResponder + + +@end + diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/AppDelegate.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/AppDelegate.m new file mode 100644 index 0000000..08c6226 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/AppDelegate.m @@ -0,0 +1,43 @@ +// +// AppDelegate.m +// CIMKit +// +// Created by Chentao on 2022/8/31. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + + + + return YES; +} + + +#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-oc-sdk/CIMKit/Assets.xcassets/AccentColor.colorset/Contents.json b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-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-oc-sdk/CIMKit/Assets.xcassets/AppIcon.appiconset/Contents.json b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..5a3257a --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "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" : "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-oc-sdk/CIMKit/Assets.xcassets/Contents.json b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/Base.lproj/LaunchScreen.storyboard b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/Base.lproj/Main.storyboard b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/Base.lproj/Main.storyboard new file mode 100644 index 0000000..808a21c --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMMessageModel.h b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMMessageModel.h new file mode 100644 index 0000000..3d09083 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMMessageModel.h @@ -0,0 +1,34 @@ +// +// CIMMessageModel.h +// CIMKit +// +// Created by Chentao on 2022/8/31. +// + +#import + +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; + +@end + +NS_ASSUME_NONNULL_END diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMMessageModel.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMMessageModel.m new file mode 100644 index 0000000..0ec068f --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMMessageModel.m @@ -0,0 +1,12 @@ +// +// CIMMessageModel.m +// CIMKit +// +// Created by Chentao on 2022/8/31. +// + +#import "CIMMessageModel.h" + +@implementation CIMMessageModel + +@end diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMService.h b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMService.h new file mode 100644 index 0000000..9fa5f17 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMService.h @@ -0,0 +1,148 @@ +// +// CIMService.h +// CIMKit +// +// Created by Chentao on 2022/9/4. +// +// + +#import +#import "CIMMessageModel.h" + +NS_ASSUME_NONNULL_BEGIN + +@class CIMService; + +/** + 消息回调 + */ +@protocol CIMPeerMessageObserver + +/** + 接受到消息 + */ +- (void)cimHandleMessage:(CIMMessageModel *_Nonnull)msg; + +/** + 消息解析失败 + */ +- (void)cimHandleMessageError:(NSData *_Nonnull)data; + +@end + +/** + 服务器连接回调 + */ +@protocol CIMConnectionObserver +@optional + +/** + 用户绑定成功 + */ +- (void)cimDidBindUserSuccess:(BOOL)bindSuccess; + +/** + 连接成功 + */ +- (void)cimDidConnectSuccess; + +/** + 重连回调 + */ +- (void)cimDidReconnection:(NSInteger)reconnectionCount; + +/** + 断开连接 + */ +- (void)cimDidConnectClose; + +/** + 连接失败 + */ +- (void)cimDidConnectError:(NSError *_Nullable)error; + +@end + +@interface CIMService : NSObject + ++ (CIMService *)instance; + +@property (nonatomic, readonly) BOOL isConnected; + +/** + 指示由于网络原因导致连接断开是否自动重连,reconnection = YES 自动重连,reconnection = NO 不自动重连; + 默认reconnection = YES; + 重连逻辑受reconnectionTimeInterval和reconnectionMaxCount影响; + */ +@property (nonatomic, assign) BOOL reconnection; + +/** + 当reconnection = YES时自动重连的时间间隔,默认reconnectionTimeInterval=1.0 单位:秒; + */ +@property (nonatomic, assign) NSTimeInterval reconnectionTimeInterval; + +/** + 当reconnection = YES时自动重连的最大次数,默认reconnectionMaxCount=3; + */ +@property (nonatomic, assign) NSInteger reconnectionMaxCount; + +/** + 配置IM服务器 + */ +- (void)configHost:(NSString *)host onPort:(NSInteger)port; + +/** + 连接到host:port对应的服务器 + */ +- (void)connection; + +/** + 绑定userId,需要更具isConnected判断当前连接的状态; + 如果isConnected=NO需要先调用[[CIMService instance] connection],等到连接成功后再调用[[CIMService instance] bindUserId:]; + 如果isConnected=YES,可直接调用[[CIMService instance] bindUserId:]; + */ +- (void)bindUserId:(NSString *)userId; + +/** + 添加消息监听回调,(可添加多个)不同时记得Remove + */ +- (void)addMessageObserver:(id)observer; + +/** + 移除监听 + */ +- (void)removeMessageObserver:(id)observer; + +/** + 添加连接状态监听回调,(可添加多个)不同时记得Remove + */ +- (void)addConnectionObserver:(id)observer; + +/** + 移除监听 + */ +- (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-oc-sdk/CIMKit/CIMKit/CIMService.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMService.m new file mode 100644 index 0000000..c9592b6 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMService.m @@ -0,0 +1,417 @@ +// +// CIMService.m +// CIMKit +// +// Created by Chentao on 2022/9/4. +// +// + +#import "CIMService.h" +#import "CIMSignalService.h" +#import "SentBody.pbobjc.h" +#import "ReplyBody.pbobjc.h" +#import "Message.pbobjc.h" +#import +#import "CIMWeakProxy.h" + +@interface CIMService () + +@property (nonatomic, strong) CIMSignalService *signalService; + +@property (nonatomic, strong) NSMutableArray *connectionObservers; +@property (nonatomic, strong) NSMutableArray *messageObservers; + +@property (nonatomic, assign) BOOL manualDisconnect; + +@property (nonatomic, assign) NSInteger reconnectionCount; + +@property (nonatomic, strong) NSTimer *reconnectionTimer; + +@end + +@implementation CIMService + +static CIMService *SINGLETON = nil; + +static bool isFirstAccess = YES; + +#pragma mark - Public Method + ++ (id)instance { + static dispatch_once_t onceToken; + + dispatch_once(&onceToken, ^{ + isFirstAccess = NO; + SINGLETON = [[super allocWithZone:NULL] init]; + }); + return SINGLETON; +} + +#pragma mark - Life Cycle + ++ (id)allocWithZone:(NSZone *)zone { + return [self instance]; +} + +- (id)copy { + return [[CIMService alloc] init]; +} + +- (id)mutableCopy { + return [[CIMService alloc] init]; +} + +- (id)init { + if (SINGLETON) { + return SINGLETON; + } + + if (isFirstAccess) { + [self doesNotRecognizeSelector:_cmd]; + } + + self = [super init]; + + self.reconnection = YES; + self.reconnectionTimeInterval = 1.0; + self.reconnectionMaxCount = 3; + self.reconnectionCount = 0; + return self; +} + +#pragma mark - connectionObservers +- (NSMutableArray *)connectionObservers { + if (!_connectionObservers) { + _connectionObservers = [[NSMutableArray alloc] init]; + } + + return _connectionObservers; +} + +- (void)addConnectionObserver:(id)observer { + NSValue *value = [NSValue valueWithNonretainedObject:observer]; + + if (![self.connectionObservers containsObject:value]) { + [self.connectionObservers addObject:value]; + } +} + +- (void)removeConnectionObserver:(id)observer { + NSValue *value = [NSValue valueWithNonretainedObject:observer]; + + if ([self.connectionObservers containsObject:value]) { + [self.connectionObservers removeObject:value]; + } +} + +#pragma mark - messageObservers +- (NSMutableArray *)messageObservers { + if (!_messageObservers) { + _messageObservers = [[NSMutableArray alloc] init]; + } + + return _messageObservers; +} + +- (void)addMessageObserver:(id)observer { + NSValue *value = [NSValue valueWithNonretainedObject:observer]; + + if (![self.messageObservers containsObject:value]) { + [self.messageObservers addObject:value]; + } +} + +- (void)removeMessageObserver:(id)observer { + NSValue *value = [NSValue valueWithNonretainedObject:observer]; + + if ([self.messageObservers containsObject:value]) { + [self.messageObservers removeObject:value]; + } +} + +#pragma mark - signalService + +- (CIMSignalService *)signalService { + if (!_signalService) { + _signalService = [[CIMSignalService alloc] init]; + _signalService.delegate = self; + } + + return _signalService; +} + +#pragma mark - CIMSignalServiceDelegate + +/** + * 将要开始连接 + **/ +- (void)signalServiceWillConnect:(CIMSignalService *)signalService { +} + +/** + * 开始连接时出错 + **/ +- (void)signalServiceWillConnect:(CIMSignalService *)signalService error:(NSError *)error { + [self handlerConnectError:error]; +} + +/** + * 连接成功 + **/ +- (void)signalServiceConnectSuccess:(CIMSignalService *)signalService { + self.manualDisconnect = NO; + self.reconnectionCount = 0; + [self handlerConnectSuccess]; +} + +/** + * 连接断开 + **/ +- (void)signalServiceDidDisconnect:(CIMSignalService *)signalService error:(NSError *)error { + if (!self.manualDisconnect && self.reconnection && self.reconnectionCount < self.reconnectionMaxCount) { + //如果非手动断开连接 并且 需要自动重连 并且 reconnectionCount < reconnectionMaxCount + [self startReconnectionTimer]; + } else { + [self handlerConnectClose]; + } +} + +/** + * 收到新包 + **/ +- (void)signalService:(CIMSignalService *)signalService receivePacket:(CIMSignalPacket *)packet { + switch (packet.tag) { + case CIMSignalPacketTypePing:{ + NSLog(@"receive Ping"); + CIMSignalPacket *pongSignalPacket = [self createPongPacket]; + [self.signalService sendSignalPacket:pongSignalPacket]; + break; + } + + case CIMSignalPacketTypeMessage:{ + NSLog(@"receive Message"); + NSError *error; + + MessageModel *messgae = [[MessageModel alloc] initWithData:packet.packetBody error:&error]; + + if (!error) { + //返回消息 + CIMMessageModel *messageModel = [[CIMMessageModel alloc] init]; + messageModel.id_p = messgae.id_p; + messageModel.title = messgae.title; + messageModel.action = messgae.action; + messageModel.timestamp = messgae.timestamp; + messageModel.extra = messgae.extra; + messageModel.format = messgae.format; + messageModel.sender = messgae.sender; + messageModel.content = messgae.content; + messageModel.receiver = messgae.receiver; + [self handlerMessage:messageModel]; + } else { + [self handlerMessageError:packet.packetBody]; + } + + break; + } + + case CIMSignalPacketTypeReplyBody:{ + NSLog(@"receive ReplyBody"); + NSError *error; + ReplyBodyModel *replyBodyModel = [[ReplyBodyModel alloc] initWithData:packet.packetBody error:&error]; + + if (!error) { + [self handlerBindUser:[@"200" isEqualToString:replyBodyModel.code]]; + } else { + [self handlerBindUser:NO]; + } + + break; + } + + default:{ + break; + } + } +} + +#pragma mark - + +- (void)startReconnectionTimer { + [self stopReconnectionTimer]; + self.reconnectionTimer = [NSTimer timerWithTimeInterval:self.reconnectionTimeInterval target:[CIMWeakProxy proxyWithTarget:self] selector:@selector(reconnectionTimerHandler) userInfo:nil repeats:NO]; + [NSRunLoop.mainRunLoop addTimer:self.reconnectionTimer forMode:NSRunLoopCommonModes]; +} + +- (void)stopReconnectionTimer { + if (self.reconnectionTimer) { + [self.reconnectionTimer invalidate]; + self.reconnectionTimer = nil; + } +} + +- (void)reconnectionTimerHandler { + self.reconnectionCount += 1; + [self handlerDidReconnection:self.reconnectionCount]; + [self connection]; +} + +#pragma mark - public + +- (void)configHost:(NSString *)host onPort:(NSInteger)port { + CIMSignalServiceConfig *config = [[CIMSignalServiceConfig alloc] init]; + + config.host = host; + config.port = port; + self.signalService.serviceConfig = config; +} + +- (void)connection { + if (self.signalService.isConnected) { + return; + } + + [self.signalService connect]; +} + +- (void)bindUserId:(NSString *)userId { + if (self.signalService.isConnected) { + CIMSignalPacket *clientBindPacket = [self createClientBindPacketWithUserId:userId]; + [self.signalService sendSignalPacket:clientBindPacket]; + } +} + +- (void)enterBackground { + [self disconnect]; +} + +- (void)enterForeground { + [self reconnect]; +} + +- (void)reconnect { + [self connection]; +} + +- (void)disconnect { + if (self.signalService.isConnected) { + self.manualDisconnect = YES; + [self stopReconnectionTimer]; + [self.signalService close]; + } +} + +#pragma mark - +- (void)handlerConnectSuccess { + for (NSValue *value in self.messageObservers) { + id ob = [value nonretainedObjectValue]; + + if ([ob respondsToSelector:@selector(cimDidConnectSuccess)]) { + [ob cimDidConnectSuccess]; + } + } +} + +- (void)handlerDidReconnection:(NSInteger)count { + for (NSValue *value in self.connectionObservers) { + id ob = [value nonretainedObjectValue]; + + if ([ob respondsToSelector:@selector(cimDidReconnection:)]) { + [ob cimDidReconnection:count]; + } + } +} + +- (void)handlerConnectClose { + for (NSValue *value in self.connectionObservers) { + id ob = [value nonretainedObjectValue]; + + if ([ob respondsToSelector:@selector(cimDidConnectClose)]) { + [ob cimDidConnectClose]; + } + } +} + +- (void)handlerConnectError:(NSError *)error { + for (NSValue *value in self.messageObservers) { + id ob = [value nonretainedObjectValue]; + + if ([ob respondsToSelector:@selector(cimDidConnectError:)]) { + [ob cimDidConnectError:error]; + } + } +} + +- (void)handlerMessageError:(NSData *)data { + for (NSValue *value in self.messageObservers) { + id ob = [value nonretainedObjectValue]; + + if ([ob respondsToSelector:@selector(cimHandleMessageError:)]) { + [ob cimHandleMessageError:data]; + } + } +} + +- (void)handlerMessage:(CIMMessageModel *)message { + for (NSValue *value in self.messageObservers) { + id ob = [value nonretainedObjectValue]; + + if ([ob respondsToSelector:@selector(cimHandleMessage:)]) { + [ob cimHandleMessage:message]; + } + } +} + +- (void)handlerBindUser:(BOOL)bindSuccess { + for (NSValue *value in self.connectionObservers) { + id ob = [value nonretainedObjectValue]; + + if ([ob respondsToSelector:@selector(cimDidBindUserSuccess:)]) { + [ob cimDidBindUserSuccess:bindSuccess]; + } + } +} + +- (CIMSignalPacket *)createClientBindPacketWithUserId:(NSString *)userId { + SentBodyModel *clientBindBody = [SentBodyModel new]; + + clientBindBody.key = @"client_bind"; + clientBindBody.timestamp = (int64_t)[NSDate timeIntervalSinceReferenceDate] * 1000; + clientBindBody.data_p[@"uid"] = userId; + clientBindBody.data_p[@"deviceId"] = [[[UIDevice currentDevice] identifierForVendor] UUIDString]; + clientBindBody.data_p[@"channel"] = @"ios"; + + clientBindBody.data_p[@"deviceName"] = [[UIDevice currentDevice] name]; + + NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; + clientBindBody.data_p[@"appVersion"] = [infoDictionary objectForKey:@"CFBundleShortVersionString"]; + + clientBindBody.data_p[@"osVersion"] = [[UIDevice currentDevice] systemVersion]; + + NSArray *languages = [NSLocale preferredLanguages]; + clientBindBody.data_p[@"language"] = [languages firstObject]; + NSData *bodyData = clientBindBody.data; + + CIMSignalPacket *clientBindPacket = [[CIMSignalPacket alloc] init]; + clientBindPacket.tag = CIMSignalPacketTypeSentBody; + clientBindPacket.bodyLength = bodyData.length; + clientBindPacket.packetBody = bodyData; + + return clientBindPacket; +} + +- (CIMSignalPacket *)createPongPacket { + CIMSignalPacket *pongPacket = [[CIMSignalPacket alloc] init]; + + pongPacket.tag = CIMSignalPacketTypePong; + + NSString *pong = @"PONG"; + const char *pongChar = [pong cStringUsingEncoding:NSASCIIStringEncoding]; + UInt16 lenght = pong.length; + NSData *bodyData = [NSData dataWithBytes:pongChar length:lenght]; + + pongPacket.bodyLength = bodyData.length; + pongPacket.packetBody = bodyData; + return pongPacket; +} + +@end diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalPacket.h b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalPacket.h new file mode 100644 index 0000000..3e90458 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalPacket.h @@ -0,0 +1,30 @@ +// +// CIMSignalPacket.h +// CIMKit +// +// Created by Chentao on 2022/9/3. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +extern UInt8 const CIMSIGNAL_PACKET_HEAD_SIZE; + +typedef NS_ENUM(UInt8, CIMSignalPacketType) { + CIMSignalPacketTypePong = 0, //PONG + CIMSignalPacketTypePing = 1, //PING + CIMSignalPacketTypeMessage = 2, //Message + CIMSignalPacketTypeSentBody = 3, //SentBody + CIMSignalPacketTypeReplyBody = 4, //ReplyBody +}; + +@interface CIMSignalPacket : NSObject + +@property (nonatomic, assign) CIMSignalPacketType tag; +@property (nonatomic, assign) UInt16 bodyLength; +@property (nonatomic, strong) NSData *packetBody; + +@end + +NS_ASSUME_NONNULL_END diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalPacket.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalPacket.m new file mode 100644 index 0000000..01d8f40 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalPacket.m @@ -0,0 +1,14 @@ +// +// CIMSignalPacket.m +// CIMKit +// +// Created by Chentao on 2022/9/3. +// + +#import "CIMSignalPacket.h" + +UInt8 const CIMSIGNAL_PACKET_HEAD_SIZE = 3; + +@implementation CIMSignalPacket + +@end diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalService.h b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalService.h new file mode 100644 index 0000000..1a02e68 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalService.h @@ -0,0 +1,65 @@ +// +// CIMSignalService.h +// CIMKit +// +// Created by Chentao on 2022/9/2. +// + +#import +#import "CIMSignalPacket.h" +NS_ASSUME_NONNULL_BEGIN + +@interface CIMSignalServiceConfig : NSObject + +@property (nonatomic, copy) NSString *host; +@property (nonatomic, assign) NSInteger port; + +@end + +@class CIMSignalService; +@protocol CIMSignalServiceDelegate + +/** + * 将要开始连接 + **/ +- (void)signalServiceWillConnect:(CIMSignalService *)signalService; + +/** + * 开始连接时出错 + **/ +- (void)signalServiceWillConnect:(CIMSignalService *)signalService error:(NSError *)error; + +/** + * 连接成功 + **/ +- (void)signalServiceConnectSuccess:(CIMSignalService *)signalService; + +/** + * 连接断开 + **/ +- (void)signalServiceDidDisconnect:(CIMSignalService *)signalService error:(NSError *)error; + +/** + * 收到新包 + **/ +- (void)signalService:(CIMSignalService *)signalService receivePacket:(CIMSignalPacket *)packet; + +@end + +@interface CIMSignalService : NSObject + +@property (nonatomic, weak) id delegate; + +@property (nonatomic, strong) CIMSignalServiceConfig *serviceConfig; + +@property (nonatomic, readonly) BOOL isConnected; + +- (void)connect; + +- (void)close; + +- (void)sendSignalPacket:(CIMSignalPacket *)signalPacket; + +@end + +NS_ASSUME_NONNULL_END diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalService.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalService.m new file mode 100644 index 0000000..10af984 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalService.m @@ -0,0 +1,129 @@ +// +// CIMSignalService.m +// CIMKit +// +// Created by Chentao on 2022/9/2. +// + +#import "CIMSignalService.h" +#import "GCDAsyncSocket.h" +#import "CIMSignalServiceBuffer.h" +#import "KCLDataWriter.h" + +@implementation CIMSignalServiceConfig + +@end + +@interface CIMSignalService () + +@property (nonatomic, strong) NSLock *signalBufferLock; + +@property (nonatomic, strong) CIMSignalServiceBuffer *signalBuffer; + +@property (nonatomic, strong) GCDAsyncSocket *socket; + +@end + +@implementation CIMSignalService + +- (instancetype)init { + self = [super init]; + + if (self) { + self.socket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:dispatch_queue_create("SignalServiceQueue", NULL)]; + + self.signalBufferLock = [[NSLock alloc]init]; + + self.signalBuffer = [[CIMSignalServiceBuffer alloc] init]; + self.signalBuffer.delegate = self; + } + + return self; +} + +- (BOOL)isConnected { + return self.socket.isConnected; +} + +- (void)connect { + if (self.delegate && [self.delegate respondsToSelector:@selector(signalServiceWillConnect:)]) { + [self.delegate signalServiceWillConnect:self]; + } + + NSError *error; + [self.socket connectToHost:self.serviceConfig.host onPort:self.serviceConfig.port withTimeout:15 error:&error]; + + if (error) { + //NSLog(@"connect error:%@", error); + + if (self.delegate && [self.delegate respondsToSelector:@selector(signalServiceWillConnect:error:)]) { + [self.delegate signalServiceWillConnect:self error:error]; + } + } +} + +- (void)close { + [self.socket disconnect]; +} + +- (void)sendSignalPacket:(CIMSignalPacket *)signalPacket { + KCLDataWriter *dataWriter = [KCLDataWriter writerWithData:[[NSMutableData alloc] init]]; + + [dataWriter writeByte:signalPacket.tag]; + [dataWriter writeUInt16:signalPacket.bodyLength]; + + if (signalPacket) { + [dataWriter writeBytes:signalPacket.packetBody]; + } + + [self.socket writeData:dataWriter.data withTimeout:30 tag:0]; +} + +#pragma mark - GCDAsyncSocketDelegate +- (void)socket:(GCDAsyncSocket *)sock didConnectToHost:(NSString *)host port:(uint16_t)port { + //NSLog(@"%s", __FUNCTION__); + [self.signalBufferLock lock]; + [self.signalBuffer clear]; + [self.signalBufferLock unlock]; + [sock readDataWithTimeout:-1 tag:0]; + dispatch_async(dispatch_get_main_queue(), ^{ + if (self.delegate && [self.delegate respondsToSelector:@selector(signalServiceConnectSuccess:)]) { + [self.delegate signalServiceConnectSuccess:self]; + } + }); +} + +- (void)socketDidDisconnect:(GCDAsyncSocket *)sock withError:(NSError *)error { + //NSLog(@"%s", __FUNCTION__); + dispatch_async(dispatch_get_main_queue(), ^{ + if (self.delegate && [self.delegate respondsToSelector:@selector(signalServiceDidDisconnect:error:)]) { + [self.delegate signalServiceDidDisconnect:self error:error]; + } + }); +} + +- (void)socket:(GCDAsyncSocket *)sock didWriteDataWithTag:(long)tag { + //NSLog(@"%s", __FUNCTION__); + [sock readDataWithTimeout:-1 tag:0]; +} + +- (void)socket:(GCDAsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag { + //NSLog(@"%s", __FUNCTION__); + [self.signalBufferLock lock]; + [self.signalBuffer appendData:data]; + [self.signalBufferLock unlock]; + + [sock readDataWithTimeout:-1 tag:0]; +} + +#pragma mark - CIMSignalServiceBufferDelegate + +- (void)signalServiceBuffer:(CIMSignalServiceBuffer *)signalServiceBuffer receiveSignalPacket:(CIMSignalPacket *)signalPacket { + dispatch_async(dispatch_get_main_queue(), ^{ + if (self.delegate && [self.delegate respondsToSelector:@selector(signalService:receivePacket:)]) { + [self.delegate signalService:self receivePacket:signalPacket]; + } + }); +} + +@end diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalServiceBuffer.h b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalServiceBuffer.h new file mode 100644 index 0000000..0897470 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalServiceBuffer.h @@ -0,0 +1,29 @@ +// +// CIMSignalServiceBuffer.h +// CIMKit +// +// Created by Chentao on 2022/9/3. +// + +#import +#import "CIMSignalPacket.h" +NS_ASSUME_NONNULL_BEGIN + +@class CIMSignalServiceBuffer; +@protocol CIMSignalServiceBufferDelegate + +- (void)signalServiceBuffer:(CIMSignalServiceBuffer *)signalServiceBuffer receiveSignalPacket:(CIMSignalPacket *)signalPacket; + +@end + +@interface CIMSignalServiceBuffer : NSObject + +@property (nonatomic, weak) id delegate; + +- (void)appendData:(NSData *)data; + +- (void)clear; + +@end + +NS_ASSUME_NONNULL_END diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalServiceBuffer.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalServiceBuffer.m new file mode 100644 index 0000000..68f729e --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/CIMSignalServiceBuffer.m @@ -0,0 +1,86 @@ +// +// CIMSignalServiceBuffer.m +// CIMKit +// +// Created by Chentao on 2022/9/3. +// + +#import "CIMSignalServiceBuffer.h" + +@interface CIMSignalServiceBuffer () + +@property (nonatomic, strong) NSMutableData *byteDatas; + +@end + +@implementation CIMSignalServiceBuffer + +- (instancetype)init { + self = [super init]; + + if (self) { + self.byteDatas = [[NSMutableData alloc] init]; + } + + return self; +} + +- (void)appendData:(NSData *)data { + [self.byteDatas appendData:data]; + + BOOL hasPacket = YES; + + while (hasPacket) { + @autoreleasepool { + if (CIMSIGNAL_PACKET_HEAD_SIZE <= self.byteDatas.length) { + NSData *headData = [self.byteDatas subdataWithRange:NSMakeRange(0, CIMSIGNAL_PACKET_HEAD_SIZE)]; + uint8_t *ptr = (uint8_t *)headData.bytes; + uint64_t _poz = 0; + + uint8_t tag = *(uint8_t *)ptr; + _poz += sizeof(uint8_t); + + uint16_t bodyLength = *(uint16_t *)(ptr + _poz); + _poz += sizeof(uint16_t); + + UInt32 packetSize = CIMSIGNAL_PACKET_HEAD_SIZE + bodyLength; + + if (packetSize <= self.byteDatas.length) { + NSData *packetBody = [self.byteDatas subdataWithRange:NSMakeRange(CIMSIGNAL_PACKET_HEAD_SIZE, bodyLength)]; + + CIMSignalPacket *signalPacket = [[CIMSignalPacket alloc] init]; + signalPacket.tag = tag; + signalPacket.bodyLength = bodyLength; + signalPacket.packetBody = packetBody; + + if (self.delegate && [self.delegate respondsToSelector:@selector(signalServiceBuffer:receiveSignalPacket:)]) { + [self.delegate signalServiceBuffer:self receiveSignalPacket:signalPacket]; + } + + NSMutableData *newByteDatas = [self subdata:self.byteDatas loc:packetSize length:self.byteDatas.length - packetSize]; + self.byteDatas = newByteDatas; + hasPacket = YES; + } else { + hasPacket = NO; + } + } else { + hasPacket = NO; + } + } + } +} + +- (void)clear { + @autoreleasepool { + self.byteDatas = [[NSMutableData alloc] init]; + } +} + +- (NSMutableData *)subdata:(NSMutableData *)data loc:(NSUInteger)loc length:(NSUInteger)len { + NSRange subRange = NSMakeRange(loc, len); + NSMutableData *newByteDatas = [[NSMutableData alloc] initWithData:[data subdataWithRange:subRange]]; + + return newByteDatas; +} + +@end diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Proto/Message.pbobjc.h b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Proto/Message.pbobjc.h new file mode 100644 index 0000000..8cf62dc --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-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-oc-sdk/CIMKit/CIMKit/Proto/Message.pbobjc.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Proto/Message.pbobjc.m new file mode 100644 index 0000000..3524aa1 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-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-oc-sdk/CIMKit/CIMKit/Proto/ReplyBody.pbobjc.h b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Proto/ReplyBody.pbobjc.h new file mode 100644 index 0000000..8be2466 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-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-oc-sdk/CIMKit/CIMKit/Proto/ReplyBody.pbobjc.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Proto/ReplyBody.pbobjc.m new file mode 100644 index 0000000..6925be5 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-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-oc-sdk/CIMKit/CIMKit/Proto/SentBody.pbobjc.h b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Proto/SentBody.pbobjc.h new file mode 100644 index 0000000..45f9a15 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-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-oc-sdk/CIMKit/CIMKit/Proto/SentBody.pbobjc.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Proto/SentBody.pbobjc.m new file mode 100644 index 0000000..27aede2 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-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-oc-sdk/CIMKit/CIMKit/Tool/CIMWeakProxy/CIMWeakProxy.h b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/CIMWeakProxy/CIMWeakProxy.h new file mode 100644 index 0000000..1ba933b --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/CIMWeakProxy/CIMWeakProxy.h @@ -0,0 +1,21 @@ +// +// CIMWeakProxy.h +// CIMKit +// +// Created by Chentao on 2022/9/14. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface CIMWeakProxy : NSProxy + +@property (weak, readonly, nullable, nonatomic) id target; + +- (nonnull instancetype)initWithTarget:(nonnull id)target; ++ (nonnull instancetype)proxyWithTarget:(nonnull id)target; + +@end + +NS_ASSUME_NONNULL_END diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/CIMWeakProxy/CIMWeakProxy.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/CIMWeakProxy/CIMWeakProxy.m new file mode 100644 index 0000000..908cb6b --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/CIMWeakProxy/CIMWeakProxy.m @@ -0,0 +1,79 @@ +// +// CIMWeakProxy.m +// CIMKit +// +// Created by Chentao on 2022/9/14. +// + +#import "CIMWeakProxy.h" + +@implementation CIMWeakProxy + +- (instancetype)initWithTarget:(id)target { + _target = target; + return self; +} + ++ (instancetype)proxyWithTarget:(id)target { + return [[CIMWeakProxy alloc] initWithTarget:target]; +} + +- (id)forwardingTargetForSelector:(SEL)selector { + return _target; +} + +- (void)forwardInvocation:(NSInvocation *)invocation { + void *null = NULL; + + [invocation setReturnValue:&null]; +} + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { + return [NSObject instanceMethodSignatureForSelector:@selector(init)]; +} + +- (BOOL)respondsToSelector:(SEL)aSelector { + return [_target respondsToSelector:aSelector]; +} + +- (BOOL)isEqual:(id)object { + return [_target isEqual:object]; +} + +- (NSUInteger)hash { + return [_target hash]; +} + +- (Class)superclass { + return [_target superclass]; +} + +- (Class)class { + return [_target class]; +} + +- (BOOL)isKindOfClass:(Class)aClass { + return [_target isKindOfClass:aClass]; +} + +- (BOOL)isMemberOfClass:(Class)aClass { + return [_target isMemberOfClass:aClass]; +} + +- (BOOL)conformsToProtocol:(Protocol *)aProtocol { + return [_target conformsToProtocol:aProtocol]; +} + +- (BOOL)isProxy { + return YES; +} + +- (NSString *)description { + return [_target description]; +} + +- (NSString *)debugDescription { + return [_target debugDescription]; +} + +@end diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataReader.h b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataReader.h new file mode 100644 index 0000000..bbf4659 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataReader.h @@ -0,0 +1,33 @@ +// +// KCLDataReader.h +// TeachingClient +// +// Created by Chentao on 2017/4/27. +// Copyright © 2017年 Chentao. All rights reserved. +// + +#import + +@interface KCLDataReader : NSObject + +@property (nonatomic, assign) uint64_t poz; +@property (nonatomic, strong, readonly) NSData *data; + ++ (instancetype)readerWithData:(NSData *)data; +- (instancetype)initWithData:(NSData *)data; + +- (NSData *)readBytes:(uint64_t)len; +- (int32_t)readInt32; +- (int64_t)readInt64; +- (int16_t)readInt16; +- (uint32_t)readUInt32; +- (uint64_t)readUInt64; +- (uint16_t)readUInt16; +- (char)readByte; +- (BOOL)readBool; +- (NSString *)readString; +- (NSData *)readPrefixedBytes; +- (float)readFloat; +- (double)readDouble; + +@end diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataReader.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataReader.m new file mode 100644 index 0000000..882e1ec --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataReader.m @@ -0,0 +1,123 @@ +// +// KCLDataReader.m +// TeachingClient +// +// Created by Chentao on 2017/4/27. +// Copyright © 2017年 Chentao. All rights reserved. +// + +#import "KCLDataReader.h" + +@implementation KCLDataReader { + char *_pointer; +} + ++ (instancetype)readerWithData:(NSData *)data { + return [[KCLDataReader alloc] initWithData:data]; +} + +- (instancetype)initWithData:(NSData *)data { + self = [super init]; + + if (!self || !data) { + return nil; + } + + _data = data; + _pointer = (char *)data.bytes; + return self; +} + +- (NSData *)readBytes:(uint64_t)len { + if (!len) { + return nil; + } + + NSData *data = [_data subdataWithRange:NSMakeRange(_poz, len)]; + _poz += len; + return data; +} + +- (NSData *)readPrefixedBytes { + uint32_t len = [self readUInt32]; + + return [self readBytes:len]; +} + +- (int32_t)readInt32 { + char *ptr = _pointer + _poz; + + _poz += sizeof(int32_t); + return *(int32_t *)ptr; +} + +- (int64_t)readInt64 { + char *ptr = _pointer + _poz; + + _poz += sizeof(int64_t); + return *(int64_t *)ptr; +} + +- (int16_t)readInt16 { + char *ptr = _pointer + _poz; + + _poz += sizeof(int16_t); + return *(int16_t *)ptr; +} + +- (uint32_t)readUInt32 { + char *ptr = _pointer + _poz; + + _poz += sizeof(uint32_t); + return *(uint32_t *)ptr; +} + +- (uint64_t)readUInt64 { + char *ptr = _pointer + _poz; + + _poz += sizeof(uint64_t); + return *(uint64_t *)ptr; +} + +- (uint16_t)readUInt16 { + char *ptr = _pointer + _poz; + + _poz += sizeof(uint16_t); + return *(uint16_t *)ptr; +} + +- (char)readByte { + char *ptr = _pointer + _poz; + + _poz += sizeof(char); + return *(char *)ptr; +} + +- (BOOL)readBool { + char *ptr = _pointer + _poz; + + _poz += sizeof(BOOL); + return *(BOOL *)ptr; +} + +- (float)readFloat { + char *ptr = _pointer + _poz; + + _poz += sizeof(float); + return *(float *)ptr; +} + +- (double)readDouble { + char *ptr = _pointer + _poz; + + _poz += sizeof(double); + return *(double *)ptr; +} + +- (NSString *)readString { + NSData *data = [self readPrefixedBytes]; + + return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; +} + +@end diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataWriter.h b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataWriter.h new file mode 100644 index 0000000..9e6d2db --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataWriter.h @@ -0,0 +1,34 @@ +// +// KCLDataWriter.h +// TeachingClient +// +// Created by Chentao on 2017/4/27. +// Copyright © 2017年 Chentao. All rights reserved. +// + +#import + +@interface KCLDataWriter : NSObject + +@property (nonatomic, strong, readonly) NSMutableData *data; + ++ (instancetype)writerWithData:(NSMutableData *)data; +- (instancetype)initWithData:(NSMutableData *)data; + +- (void)writeBytes:(NSData *)bytes; +- (void)writeBytes:(const char *)rawBytes length:(uint32_t)length; +- (void)writePrefixedBytes:(NSData *)data; +- (void)writeInt32:(int32_t)value; +- (void)writeInt64:(int64_t)value; +- (void)writeInt16:(int16_t)value; +- (void)writeUInt32:(uint32_t)value; +- (void)writeUInt64:(uint64_t)value; +- (void)writeUInt16:(uint16_t)value; +- (void)writeByte:(char)byte; +- (void)writeBool:(BOOL)value; +- (void)writeString:(NSString *)str; +- (void)writeFloat:(float)value; +- (void)writeDouble:(double)value; + + +@end diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataWriter.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataWriter.m new file mode 100644 index 0000000..3a2f146 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/CIMKit/Tool/KCLDataReaderWriter/KCLDataWriter.m @@ -0,0 +1,90 @@ +// +// KCLDataWriter.m +// TeachingClient +// +// Created by Chentao on 2017/4/27. +// Copyright © 2017年 Chentao. All rights reserved. +// + +#import "KCLDataWriter.h" + +@implementation KCLDataWriter + + ++ (instancetype)writerWithData:(NSMutableData *)data { + return [[KCLDataWriter alloc] initWithData:data]; +} + +- (instancetype)initWithData:(NSMutableData *)data { + self = [super init]; + + if (!self || !data) { + return nil; + } + + _data = data; + return self; +} + +- (void)writeBytes:(NSData *)bytes { + if (bytes.length) { + [_data appendData:bytes]; + } +} + +- (void)writeBytes:(const char *)rawBytes length:(uint32_t)length { + if (length) { + [_data appendBytes:rawBytes length:length]; + } +} + +- (void)writePrefixedBytes:(NSData *)data { + [self writeUInt32:(uint32_t)data.length]; + [self writeBytes:data]; +} + +- (void)writeInt32:(int32_t)value { + [self writeBytes:(const char *)&value length:sizeof(int32_t)]; +} + +- (void)writeInt64:(int64_t)value { + [self writeBytes:(const char *)&value length:sizeof(int64_t)]; +} + +- (void)writeInt16:(int16_t)value { + [self writeBytes:(const char *)&value length:sizeof(int16_t)]; +} + +- (void)writeUInt32:(uint32_t)value { + [self writeBytes:(const char *)&value length:sizeof(uint32_t)]; +} + +- (void)writeUInt64:(uint64_t)value { + [self writeBytes:(const char *)&value length:sizeof(uint64_t)]; +} + +- (void)writeUInt16:(uint16_t)value { + [self writeBytes:(const char *)&value length:sizeof(uint16_t)]; +} + +- (void)writeByte:(char)byte { + [self writeBytes:(const char *)&byte length:sizeof(char)]; +} + +- (void)writeBool:(BOOL)value { + [self writeByte:value ? 1 : 0]; +} + +- (void)writeString:(NSString *)str { + [self writePrefixedBytes:[str dataUsingEncoding:NSUTF8StringEncoding]]; +} + +- (void)writeFloat:(float)value { + [self writeBytes:(const char *)&value length:sizeof(float)]; +} + +- (void)writeDouble:(double)value { + [self writeBytes:(const char *)&value length:sizeof(double)]; +} + +@end diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/Info.plist b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/Info.plist new file mode 100644 index 0000000..81ed29b --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/Info.plist @@ -0,0 +1,25 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/SceneDelegate.h b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/SceneDelegate.h new file mode 100644 index 0000000..2305c54 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/SceneDelegate.h @@ -0,0 +1,15 @@ +// +// SceneDelegate.h +// CIMKit +// +// Created by Chentao on 2022/8/31. +// + +#import + +@interface SceneDelegate : UIResponder + +@property (strong, nonatomic) UIWindow * window; + +@end + diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/SceneDelegate.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/SceneDelegate.m new file mode 100644 index 0000000..16200af --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/SceneDelegate.m @@ -0,0 +1,57 @@ +// +// SceneDelegate.m +// CIMKit +// +// Created by Chentao on 2022/8/31. +// + +#import "SceneDelegate.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)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). +} + + +- (void)sceneWillEnterForeground:(UIScene *)scene { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. +} + + +- (void)sceneDidEnterBackground:(UIScene *)scene { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. +} + + +@end diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/ViewController.h b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/ViewController.h new file mode 100644 index 0000000..5e4618b --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/ViewController.h @@ -0,0 +1,14 @@ +// +// ViewController.h +// CIMKit +// +// Created by Chentao on 2022/8/31. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/ViewController.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/ViewController.m new file mode 100644 index 0000000..f0799bd --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/ViewController.m @@ -0,0 +1,106 @@ +// +// ViewController.m +// CIMKit +// +// Created by Chentao on 2022/8/31. +// + +#import "ViewController.h" +#import "CIMService.h" + +@interface ViewController () + +@property (nonatomic, strong) UIButton *addObserverButton; + +@property (nonatomic, strong) UIButton *removeObserverButton; + +@property (nonatomic, strong) UIButton *connectButton; + +@property (nonatomic, strong) UIButton *closeButton; + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + [[CIMService instance] configHost:@"120.53.221.43" onPort:23456]; + + self.addObserverButton = [[UIButton alloc] initWithFrame:CGRectMake(50, 100, 150, 50)]; + self.addObserverButton.backgroundColor = [UIColor grayColor]; + [self.addObserverButton addTarget:self action:@selector(addObserverButtonHandler) forControlEvents:UIControlEventTouchUpInside]; + [self.addObserverButton setTitle:@"addObserver" forState:UIControlStateNormal]; + [self.view addSubview:self.addObserverButton]; + + self.removeObserverButton = [[UIButton alloc] initWithFrame:CGRectMake(220, 100, 150, 50)]; + self.removeObserverButton.backgroundColor = [UIColor grayColor]; + [self.removeObserverButton addTarget:self action:@selector(removeObserverButtonHandler) forControlEvents:UIControlEventTouchUpInside]; + [self.removeObserverButton setTitle:@"removeObserver" forState:UIControlStateNormal]; + [self.view addSubview:self.removeObserverButton]; + + self.connectButton = [[UIButton alloc] initWithFrame:CGRectMake(50, 170, 150, 50)]; + self.connectButton.backgroundColor = [UIColor grayColor]; + [self.connectButton addTarget:self action:@selector(connectButtonHandler) forControlEvents:UIControlEventTouchUpInside]; + [self.connectButton setTitle:@"connec" forState:UIControlStateNormal]; + [self.view addSubview:self.connectButton]; + + self.closeButton = [[UIButton alloc] initWithFrame:CGRectMake(220, 170, 150, 50)]; + self.closeButton.backgroundColor = [UIColor grayColor]; + [self.closeButton addTarget:self action:@selector(closeButtonHandler) forControlEvents:UIControlEventTouchUpInside]; + [self.closeButton setTitle:@"close" forState:UIControlStateNormal]; + [self.view addSubview:self.closeButton]; +} + +- (void)addObserverButtonHandler { + [[CIMService instance] addConnectionObserver:self]; + [[CIMService instance] addMessageObserver:self]; +} + +- (void)removeObserverButtonHandler { + [[CIMService instance] removeConnectionObserver:self]; + [[CIMService instance] removeMessageObserver:self]; +} + +- (void)connectButtonHandler { + [[CIMService instance] connection]; +} + +- (void)closeButtonHandler { + [[CIMService instance] disconnect]; +} + +#pragma mark - CIMConnectionObserver + +- (void)cimDidBindUserSuccess:(BOOL)bindSuccess { + NSLog(@"%s",__FUNCTION__); +} + +- (void)cimDidConnectSuccess { + [[CIMService instance] bindUserId:@"2222"]; + NSLog(@"%s",__FUNCTION__); +} + +- (void)cimDidReconnection:(NSInteger)reconnectionCount { + NSLog(@"reconnection count:%@", @(reconnectionCount)); +} + +- (void)cimDidConnectClose { + NSLog(@"%s",__FUNCTION__); +} + +- (void)cimDidConnectError:(NSError *_Nullable)error { + NSLog(@"%s",__FUNCTION__); +} + +#pragma mark - CIMPeerMessageObserver + +- (void)cimHandleMessage:(CIMMessageModel *_Nonnull)msg { + NSLog(@"%s",__FUNCTION__); +} + +- (void)cimHandleMessageError:(NSData *_Nonnull)data { + NSLog(@"%s",__FUNCTION__); +} + +@end diff --git a/cim-client-sdk/cim-ios-oc-sdk/CIMKit/main.m b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/main.m new file mode 100644 index 0000000..ef2437d --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/CIMKit/main.m @@ -0,0 +1,18 @@ +// +// main.m +// CIMKit +// +// Created by Chentao on 2022/8/31. +// + +#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-oc-sdk/Podfile b/cim-client-sdk/cim-ios-oc-sdk/Podfile new file mode 100644 index 0000000..88851d2 --- /dev/null +++ b/cim-client-sdk/cim-ios-oc-sdk/Podfile @@ -0,0 +1,13 @@ +# 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 'Protobuf', '~> 3.21.5' + pod "CocoaAsyncSocket", '~> 7.6.5' + + +end