#MouseSdk/AiMouseSdk/AiMouseSdk/ffmpeg
MouseSdk_Demo
+MouseSdk/AiSdk/ffmpeg
+
+Demo/MouseSdk/libAiMouseManager
\ No newline at end of file
--- /dev/null
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 56;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 180E7D162BD8FFFA008558E8 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 18F3249D2B9337D500CABA2E /* libz.tbd */; };
+ 180E7D172BD9000B008558E8 /* libbz2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 18F324A12B93381C00CABA2E /* libbz2.tbd */; };
+ 180E7D182BD9001B008558E8 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 18F324A32B93382900CABA2E /* libiconv.tbd */; };
+ 180E7D192BD90029008558E8 /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18F324A52B93385100CABA2E /* VideoToolbox.framework */; };
+ 180E7D1A2BD90032008558E8 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18F325772B95737F00CABA2E /* CoreAudio.framework */; };
+ 180E7D1B2BD9005D008558E8 /* liblzma.5.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 18CB080B2BA401D0005F5854 /* liblzma.5.tbd */; };
+ 18862BE32C806D2500D3564D /* libAiMouseManager.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 18862BE22C806D2500D3564D /* libAiMouseManager.a */; };
+ 18BF1DCF2B81AB7C00B8D90F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 18BF1DCE2B81AB7C00B8D90F /* AppDelegate.m */; };
+ 18BF1DD22B81AB7C00B8D90F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18BF1DD12B81AB7C00B8D90F /* ViewController.m */; };
+ 18BF1DD42B81AB7F00B8D90F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 18BF1DD32B81AB7F00B8D90F /* Assets.xcassets */; };
+ 18BF1DD72B81AB7F00B8D90F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 18BF1DD52B81AB7F00B8D90F /* Main.storyboard */; };
+ 18BF1DD92B81AB7F00B8D90F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 18BF1DD82B81AB7F00B8D90F /* main.m */; };
+ 18BF1DE42B81AB8000B8D90F /* MouseSdkTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 18BF1DE32B81AB8000B8D90F /* MouseSdkTests.m */; };
+ 18BF1DEE2B81AB8000B8D90F /* MouseSdkUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 18BF1DED2B81AB8000B8D90F /* MouseSdkUITests.m */; };
+ 18BF1DF02B81AB8000B8D90F /* MouseSdkUITestsLaunchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 18BF1DEF2B81AB8000B8D90F /* MouseSdkUITestsLaunchTests.m */; };
+ 18BF1E762B832D2E00B8D90F /* ScanVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 18BF1E752B832D2E00B8D90F /* ScanVC.m */; };
+ 18EF7B1D2C760FF700AC5223 /* TlwScanVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 18EF7B1B2C760FF700AC5223 /* TlwScanVC.m */; };
+ 18EF7B1E2C760FF700AC5223 /* TlwScanVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 18EF7B1C2C760FF700AC5223 /* TlwScanVC.xib */; };
+ 18F3235D2B8ED78300CABA2E /* ScanCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 18F3235C2B8ED78300CABA2E /* ScanCell.m */; };
+ 18F328D52B98569D00CABA2E /* Config.m in Sources */ = {isa = PBXBuildFile; fileRef = 18F328D42B98569D00CABA2E /* Config.m */; };
+ 3F66C0512D1D0222001B4291 /* libAiMouseManager.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F66C04F2D1D0222001B4291 /* libAiMouseManager.a */; };
+ 8A6657BD1406314D4CBB7CEF /* libPods-MouseSdk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0311DF3AD67ED792549B96BD /* libPods-MouseSdk.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 18BF1DE02B81AB8000B8D90F /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 18BF1DC22B81AB7C00B8D90F /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 18BF1DC92B81AB7C00B8D90F;
+ remoteInfo = MouseSdk;
+ };
+ 18BF1DEA2B81AB8000B8D90F /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 18BF1DC22B81AB7C00B8D90F /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 18BF1DC92B81AB7C00B8D90F;
+ remoteInfo = MouseSdk;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 18BF1E8F2B8362D300B8D90F /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 0311DF3AD67ED792549B96BD /* libPods-MouseSdk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MouseSdk.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 180E7AB22BD7BBD9008558E8 /* libAiMouseSdk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libAiMouseSdk.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 18862BE22C806D2500D3564D /* libAiMouseManager.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libAiMouseManager.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 18BF1DCA2B81AB7C00B8D90F /* AiMouseSdk.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AiMouseSdk.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 18BF1DCD2B81AB7C00B8D90F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ 18BF1DCE2B81AB7C00B8D90F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ 18BF1DD02B81AB7C00B8D90F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
+ 18BF1DD12B81AB7C00B8D90F /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
+ 18BF1DD32B81AB7F00B8D90F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+ 18BF1DD62B81AB7F00B8D90F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+ 18BF1DD82B81AB7F00B8D90F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 18BF1DDA2B81AB7F00B8D90F /* MouseSdk.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MouseSdk.entitlements; sourceTree = "<group>"; };
+ 18BF1DDF2B81AB8000B8D90F /* MouseSdkTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MouseSdkTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 18BF1DE32B81AB8000B8D90F /* MouseSdkTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MouseSdkTests.m; sourceTree = "<group>"; };
+ 18BF1DE92B81AB8000B8D90F /* MouseSdkUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MouseSdkUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 18BF1DED2B81AB8000B8D90F /* MouseSdkUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MouseSdkUITests.m; sourceTree = "<group>"; };
+ 18BF1DEF2B81AB8000B8D90F /* MouseSdkUITestsLaunchTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MouseSdkUITestsLaunchTests.m; sourceTree = "<group>"; };
+ 18BF1E032B81E18700B8D90F /* MouseSdk-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MouseSdk-Bridging-Header.h"; sourceTree = "<group>"; };
+ 18BF1E742B832D2E00B8D90F /* ScanVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScanVC.h; sourceTree = "<group>"; };
+ 18BF1E752B832D2E00B8D90F /* ScanVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ScanVC.m; sourceTree = "<group>"; };
+ 18C31D6F2BBAA6CC0089D656 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
+ 18CB080B2BA401D0005F5854 /* liblzma.5.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = liblzma.5.tbd; path = usr/lib/liblzma.5.tbd; sourceTree = SDKROOT; };
+ 18EF7B1A2C760FF700AC5223 /* TlwScanVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TlwScanVC.h; sourceTree = "<group>"; };
+ 18EF7B1B2C760FF700AC5223 /* TlwScanVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TlwScanVC.m; sourceTree = "<group>"; };
+ 18EF7B1C2C760FF700AC5223 /* TlwScanVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TlwScanVC.xib; sourceTree = "<group>"; };
+ 18F3235B2B8ED78300CABA2E /* ScanCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScanCell.h; sourceTree = "<group>"; };
+ 18F3235C2B8ED78300CABA2E /* ScanCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ScanCell.m; sourceTree = "<group>"; };
+ 18F3249D2B9337D500CABA2E /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
+ 18F3249F2B9337E400CABA2E /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+ 18F324A12B93381C00CABA2E /* libbz2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libbz2.tbd; path = usr/lib/libbz2.tbd; sourceTree = SDKROOT; };
+ 18F324A32B93382900CABA2E /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
+ 18F324A52B93385100CABA2E /* VideoToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VideoToolbox.framework; path = System/Library/Frameworks/VideoToolbox.framework; sourceTree = SDKROOT; };
+ 18F324A82B956F1C00CABA2E /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+ 18F325772B95737F00CABA2E /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
+ 18F328D32B98569D00CABA2E /* Config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Config.h; sourceTree = "<group>"; };
+ 18F328D42B98569D00CABA2E /* Config.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Config.m; sourceTree = "<group>"; };
+ 3F66C04A2D1D0222001B4291 /* AiMouseSdk.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AiMouseSdk.h; sourceTree = "<group>"; };
+ 3F66C04B2D1D0222001B4291 /* ByteDanceSdk.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ByteDanceSdk.h; sourceTree = "<group>"; };
+ 3F66C04C2D1D0222001B4291 /* DeviceManger.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DeviceManger.h; sourceTree = "<group>"; };
+ 3F66C04D2D1D0222001B4291 /* TlwMouseSdk.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TlwMouseSdk.h; sourceTree = "<group>"; };
+ 3F66C04F2D1D0222001B4291 /* libAiMouseManager.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libAiMouseManager.a; sourceTree = "<group>"; };
+ 51DE1118FCBA78EBEE6FE2CD /* Pods-MouseSdk.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MouseSdk.release.xcconfig"; path = "Target Support Files/Pods-MouseSdk/Pods-MouseSdk.release.xcconfig"; sourceTree = "<group>"; };
+ 811936622867478806C1A8BB /* Pods-MouseSdk.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MouseSdk.debug.xcconfig"; path = "Target Support Files/Pods-MouseSdk/Pods-MouseSdk.debug.xcconfig"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 18BF1DC72B81AB7C00B8D90F /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 18862BE32C806D2500D3564D /* libAiMouseManager.a in Frameworks */,
+ 180E7D1B2BD9005D008558E8 /* liblzma.5.tbd in Frameworks */,
+ 180E7D1A2BD90032008558E8 /* CoreAudio.framework in Frameworks */,
+ 180E7D192BD90029008558E8 /* VideoToolbox.framework in Frameworks */,
+ 180E7D182BD9001B008558E8 /* libiconv.tbd in Frameworks */,
+ 180E7D172BD9000B008558E8 /* libbz2.tbd in Frameworks */,
+ 180E7D162BD8FFFA008558E8 /* libz.tbd in Frameworks */,
+ 3F66C0512D1D0222001B4291 /* libAiMouseManager.a in Frameworks */,
+ 8A6657BD1406314D4CBB7CEF /* libPods-MouseSdk.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 18BF1DDC2B81AB8000B8D90F /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 18BF1DE62B81AB8000B8D90F /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 18BF1DC12B81AB7C00B8D90F = {
+ isa = PBXGroup;
+ children = (
+ 3F66C0502D1D0222001B4291 /* libAiMouseManager */,
+ 18BF1DCC2B81AB7C00B8D90F /* MouseSdk */,
+ 18BF1DE22B81AB8000B8D90F /* MouseSdkTests */,
+ 18BF1DEC2B81AB8000B8D90F /* MouseSdkUITests */,
+ 18BF1DCB2B81AB7C00B8D90F /* Products */,
+ 723588BAA058E1012143D29F /* Pods */,
+ 543EC4E5F9FC310D6B850947 /* Frameworks */,
+ );
+ sourceTree = "<group>";
+ };
+ 18BF1DCB2B81AB7C00B8D90F /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 18BF1DCA2B81AB7C00B8D90F /* AiMouseSdk.app */,
+ 18BF1DDF2B81AB8000B8D90F /* MouseSdkTests.xctest */,
+ 18BF1DE92B81AB8000B8D90F /* MouseSdkUITests.xctest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 18BF1DCC2B81AB7C00B8D90F /* MouseSdk */ = {
+ isa = PBXGroup;
+ children = (
+ 18C31D6F2BBAA6CC0089D656 /* Info.plist */,
+ 18BF1DCD2B81AB7C00B8D90F /* AppDelegate.h */,
+ 18BF1DCE2B81AB7C00B8D90F /* AppDelegate.m */,
+ 18BF1DD02B81AB7C00B8D90F /* ViewController.h */,
+ 18BF1DD12B81AB7C00B8D90F /* ViewController.m */,
+ 18EF7B1A2C760FF700AC5223 /* TlwScanVC.h */,
+ 18EF7B1B2C760FF700AC5223 /* TlwScanVC.m */,
+ 18EF7B1C2C760FF700AC5223 /* TlwScanVC.xib */,
+ 18BF1E742B832D2E00B8D90F /* ScanVC.h */,
+ 18BF1E752B832D2E00B8D90F /* ScanVC.m */,
+ 18F3235B2B8ED78300CABA2E /* ScanCell.h */,
+ 18F3235C2B8ED78300CABA2E /* ScanCell.m */,
+ 18F328D32B98569D00CABA2E /* Config.h */,
+ 18F328D42B98569D00CABA2E /* Config.m */,
+ 18BF1DD32B81AB7F00B8D90F /* Assets.xcassets */,
+ 18BF1DD52B81AB7F00B8D90F /* Main.storyboard */,
+ 18BF1DD82B81AB7F00B8D90F /* main.m */,
+ 18BF1DDA2B81AB7F00B8D90F /* MouseSdk.entitlements */,
+ 18BF1E032B81E18700B8D90F /* MouseSdk-Bridging-Header.h */,
+ );
+ path = MouseSdk;
+ sourceTree = "<group>";
+ };
+ 18BF1DE22B81AB8000B8D90F /* MouseSdkTests */ = {
+ isa = PBXGroup;
+ children = (
+ 18BF1DE32B81AB8000B8D90F /* MouseSdkTests.m */,
+ );
+ path = MouseSdkTests;
+ sourceTree = "<group>";
+ };
+ 18BF1DEC2B81AB8000B8D90F /* MouseSdkUITests */ = {
+ isa = PBXGroup;
+ children = (
+ 18BF1DED2B81AB8000B8D90F /* MouseSdkUITests.m */,
+ 18BF1DEF2B81AB8000B8D90F /* MouseSdkUITestsLaunchTests.m */,
+ );
+ path = MouseSdkUITests;
+ sourceTree = "<group>";
+ };
+ 3F66C04E2D1D0222001B4291 /* include */ = {
+ isa = PBXGroup;
+ children = (
+ 3F66C04A2D1D0222001B4291 /* AiMouseSdk.h */,
+ 3F66C04B2D1D0222001B4291 /* ByteDanceSdk.h */,
+ 3F66C04C2D1D0222001B4291 /* DeviceManger.h */,
+ 3F66C04D2D1D0222001B4291 /* TlwMouseSdk.h */,
+ );
+ path = include;
+ sourceTree = "<group>";
+ };
+ 3F66C0502D1D0222001B4291 /* libAiMouseManager */ = {
+ isa = PBXGroup;
+ children = (
+ 3F66C04E2D1D0222001B4291 /* include */,
+ 3F66C04F2D1D0222001B4291 /* libAiMouseManager.a */,
+ );
+ path = libAiMouseManager;
+ sourceTree = "<group>";
+ };
+ 543EC4E5F9FC310D6B850947 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 18862BE22C806D2500D3564D /* libAiMouseManager.a */,
+ 180E7AB22BD7BBD9008558E8 /* libAiMouseSdk.a */,
+ 18CB080B2BA401D0005F5854 /* liblzma.5.tbd */,
+ 18F325772B95737F00CABA2E /* CoreAudio.framework */,
+ 18F324A82B956F1C00CABA2E /* AVFoundation.framework */,
+ 18F324A52B93385100CABA2E /* VideoToolbox.framework */,
+ 18F324A32B93382900CABA2E /* libiconv.tbd */,
+ 18F324A12B93381C00CABA2E /* libbz2.tbd */,
+ 18F3249F2B9337E400CABA2E /* CoreMedia.framework */,
+ 18F3249D2B9337D500CABA2E /* libz.tbd */,
+ 0311DF3AD67ED792549B96BD /* libPods-MouseSdk.a */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 723588BAA058E1012143D29F /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ 811936622867478806C1A8BB /* Pods-MouseSdk.debug.xcconfig */,
+ 51DE1118FCBA78EBEE6FE2CD /* Pods-MouseSdk.release.xcconfig */,
+ );
+ path = Pods;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 18BF1DC92B81AB7C00B8D90F /* MouseSdk */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 18BF1DF32B81AB8000B8D90F /* Build configuration list for PBXNativeTarget "MouseSdk" */;
+ buildPhases = (
+ 9A36963E54431D0A5AE88E2F /* [CP] Check Pods Manifest.lock */,
+ 18BF1DC62B81AB7C00B8D90F /* Sources */,
+ 18BF1DC72B81AB7C00B8D90F /* Frameworks */,
+ 18BF1DC82B81AB7C00B8D90F /* Resources */,
+ 18BF1E8F2B8362D300B8D90F /* Embed Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = MouseSdk;
+ productName = MouseSdk;
+ productReference = 18BF1DCA2B81AB7C00B8D90F /* AiMouseSdk.app */;
+ productType = "com.apple.product-type.application";
+ };
+ 18BF1DDE2B81AB8000B8D90F /* MouseSdkTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 18BF1DF62B81AB8000B8D90F /* Build configuration list for PBXNativeTarget "MouseSdkTests" */;
+ buildPhases = (
+ 18BF1DDB2B81AB8000B8D90F /* Sources */,
+ 18BF1DDC2B81AB8000B8D90F /* Frameworks */,
+ 18BF1DDD2B81AB8000B8D90F /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 18BF1DE12B81AB8000B8D90F /* PBXTargetDependency */,
+ );
+ name = MouseSdkTests;
+ productName = MouseSdkTests;
+ productReference = 18BF1DDF2B81AB8000B8D90F /* MouseSdkTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ 18BF1DE82B81AB8000B8D90F /* MouseSdkUITests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 18BF1DF92B81AB8000B8D90F /* Build configuration list for PBXNativeTarget "MouseSdkUITests" */;
+ buildPhases = (
+ 18BF1DE52B81AB8000B8D90F /* Sources */,
+ 18BF1DE62B81AB8000B8D90F /* Frameworks */,
+ 18BF1DE72B81AB8000B8D90F /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 18BF1DEB2B81AB8000B8D90F /* PBXTargetDependency */,
+ );
+ name = MouseSdkUITests;
+ productName = MouseSdkUITests;
+ productReference = 18BF1DE92B81AB8000B8D90F /* MouseSdkUITests.xctest */;
+ productType = "com.apple.product-type.bundle.ui-testing";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 18BF1DC22B81AB7C00B8D90F /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ BuildIndependentTargetsInParallel = 1;
+ LastUpgradeCheck = 1500;
+ TargetAttributes = {
+ 18BF1DC92B81AB7C00B8D90F = {
+ CreatedOnToolsVersion = 15.0.1;
+ LastSwiftMigration = 1500;
+ };
+ 18BF1DDE2B81AB8000B8D90F = {
+ CreatedOnToolsVersion = 15.0.1;
+ TestTargetID = 18BF1DC92B81AB7C00B8D90F;
+ };
+ 18BF1DE82B81AB8000B8D90F = {
+ CreatedOnToolsVersion = 15.0.1;
+ TestTargetID = 18BF1DC92B81AB7C00B8D90F;
+ };
+ };
+ };
+ buildConfigurationList = 18BF1DC52B81AB7C00B8D90F /* Build configuration list for PBXProject "MouseSdk" */;
+ compatibilityVersion = "Xcode 14.0";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 18BF1DC12B81AB7C00B8D90F;
+ productRefGroup = 18BF1DCB2B81AB7C00B8D90F /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 18BF1DC92B81AB7C00B8D90F /* MouseSdk */,
+ 18BF1DDE2B81AB8000B8D90F /* MouseSdkTests */,
+ 18BF1DE82B81AB8000B8D90F /* MouseSdkUITests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 18BF1DC82B81AB7C00B8D90F /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 18BF1DD42B81AB7F00B8D90F /* Assets.xcassets in Resources */,
+ 18BF1DD72B81AB7F00B8D90F /* Main.storyboard in Resources */,
+ 18EF7B1E2C760FF700AC5223 /* TlwScanVC.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 18BF1DDD2B81AB8000B8D90F /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 18BF1DE72B81AB8000B8D90F /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 9A36963E54431D0A5AE88E2F /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-MouseSdk-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 18BF1DC62B81AB7C00B8D90F /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 18F3235D2B8ED78300CABA2E /* ScanCell.m in Sources */,
+ 18BF1DD22B81AB7C00B8D90F /* ViewController.m in Sources */,
+ 18BF1DD92B81AB7F00B8D90F /* main.m in Sources */,
+ 18F328D52B98569D00CABA2E /* Config.m in Sources */,
+ 18BF1E762B832D2E00B8D90F /* ScanVC.m in Sources */,
+ 18EF7B1D2C760FF700AC5223 /* TlwScanVC.m in Sources */,
+ 18BF1DCF2B81AB7C00B8D90F /* AppDelegate.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 18BF1DDB2B81AB8000B8D90F /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 18BF1DE42B81AB8000B8D90F /* MouseSdkTests.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 18BF1DE52B81AB8000B8D90F /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 18BF1DEE2B81AB8000B8D90F /* MouseSdkUITests.m in Sources */,
+ 18BF1DF02B81AB8000B8D90F /* MouseSdkUITestsLaunchTests.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 18BF1DE12B81AB8000B8D90F /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 18BF1DC92B81AB7C00B8D90F /* MouseSdk */;
+ targetProxy = 18BF1DE02B81AB8000B8D90F /* PBXContainerItemProxy */;
+ };
+ 18BF1DEB2B81AB8000B8D90F /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 18BF1DC92B81AB7C00B8D90F /* MouseSdk */;
+ targetProxy = 18BF1DEA2B81AB8000B8D90F /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 18BF1DD52B81AB7F00B8D90F /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 18BF1DD62B81AB7F00B8D90F /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 18BF1DF12B81AB8000B8D90F /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+ 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;
+ ENABLE_USER_SCRIPT_SANDBOXING = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu17;
+ 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;
+ LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+ MACOSX_DEPLOYMENT_TARGET = 13.5;
+ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+ MTL_FAST_MATH = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ 18BF1DF22B81AB8000B8D90F /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+ 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;
+ ENABLE_USER_SCRIPT_SANDBOXING = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu17;
+ 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;
+ LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+ MACOSX_DEPLOYMENT_TARGET = 13.5;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ MTL_FAST_MATH = YES;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ 18BF1DF42B81AB8000B8D90F /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 811936622867478806C1A8BB /* Pods-MouseSdk.debug.xcconfig */;
+ buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_ENTITLEMENTS = MouseSdk/MouseSdk.entitlements;
+ CODE_SIGN_STYLE = Automatic;
+ COMBINE_HIDPI_IMAGES = YES;
+ CURRENT_PROJECT_VERSION = 1;
+ DEVELOPMENT_TEAM = M33X987285;
+ FRAMEWORK_SEARCH_PATHS = "$(inherited)";
+ GENERATE_INFOPLIST_FILE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"${PODS_ROOT}/Headers/Public\"",
+ "\"${PODS_ROOT}/Headers/Public/Masonry\"",
+ );
+ INFOPLIST_FILE = MouseSdk/Info.plist;
+ INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "要打开蓝牙才能使用AI功能哦";
+ INFOPLIST_KEY_NSHumanReadableCopyright = "";
+ INFOPLIST_KEY_NSMainStoryboardFile = Main;
+ INFOPLIST_KEY_NSMicrophoneUsageDescription = "要打开麦克风才能使用AI功能哦";
+ INFOPLIST_KEY_NSPrincipalClass = NSApplication;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/Masonry\"",
+ "$(PROJECT_DIR)/libAiMouseManager",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 11.0;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = zhihuishixun.MouseSdk;
+ PRODUCT_NAME = AiMouseSdk;
+ SWIFT_EMIT_LOC_STRINGS = YES;
+ SWIFT_OBJC_BRIDGING_HEADER = "MouseSdk/MouseSdk-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ USER_HEADER_SEARCH_PATHS = (
+ "\"$(SRCROOT)/AiMouseSdk/AiMouseSdk\"",
+ "\"$(SRCROOT)/AiMouseSdk/TlwMouseSdk\"",
+ "\"$(SRCROOT)/AiMouseSdk/Manager\"",
+ );
+ };
+ name = Debug;
+ };
+ 18BF1DF52B81AB8000B8D90F /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 51DE1118FCBA78EBEE6FE2CD /* Pods-MouseSdk.release.xcconfig */;
+ buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_ENTITLEMENTS = MouseSdk/MouseSdk.entitlements;
+ CODE_SIGN_STYLE = Automatic;
+ COMBINE_HIDPI_IMAGES = YES;
+ CURRENT_PROJECT_VERSION = 1;
+ DEVELOPMENT_TEAM = M33X987285;
+ FRAMEWORK_SEARCH_PATHS = "$(inherited)";
+ GENERATE_INFOPLIST_FILE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"${PODS_ROOT}/Headers/Public\"",
+ "\"${PODS_ROOT}/Headers/Public/Masonry\"",
+ );
+ INFOPLIST_FILE = MouseSdk/Info.plist;
+ INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "要打开蓝牙才能使用AI功能哦";
+ INFOPLIST_KEY_NSHumanReadableCopyright = "";
+ INFOPLIST_KEY_NSMainStoryboardFile = Main;
+ INFOPLIST_KEY_NSMicrophoneUsageDescription = "要打开麦克风才能使用AI功能哦";
+ INFOPLIST_KEY_NSPrincipalClass = NSApplication;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/Masonry\"",
+ "\"$(SRCROOT)/../../../../Library/Developer/Xcode/DerivedData/MouseSdk-eatzbjweckqdjggwliatmgfntjch/Build/Products/Debug\"",
+ "$(PROJECT_DIR)/libAiMouseManager",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 11.0;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = zhihuishixun.MouseSdk;
+ PRODUCT_NAME = AiMouseSdk;
+ SWIFT_EMIT_LOC_STRINGS = YES;
+ SWIFT_OBJC_BRIDGING_HEADER = "MouseSdk/MouseSdk-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ USER_HEADER_SEARCH_PATHS = (
+ "\"$(SRCROOT)/AiMouseSdk/AiMouseSdk\"",
+ "\"$(SRCROOT)/AiMouseSdk/TlwMouseSdk\"",
+ "\"$(SRCROOT)/AiMouseSdk/Manager\"",
+ );
+ };
+ name = Release;
+ };
+ 18BF1DF72B81AB8000B8D90F /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 13.5;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = zhihuishixun.MouseSdkTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_EMIT_LOC_STRINGS = NO;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MouseSdk.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/MouseSdk";
+ };
+ name = Debug;
+ };
+ 18BF1DF82B81AB8000B8D90F /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 13.5;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = zhihuishixun.MouseSdkTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_EMIT_LOC_STRINGS = NO;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MouseSdk.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/MouseSdk";
+ };
+ name = Release;
+ };
+ 18BF1DFA2B81AB8000B8D90F /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = zhihuishixun.MouseSdkUITests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_EMIT_LOC_STRINGS = NO;
+ TEST_TARGET_NAME = MouseSdk;
+ };
+ name = Debug;
+ };
+ 18BF1DFB2B81AB8000B8D90F /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = zhihuishixun.MouseSdkUITests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_EMIT_LOC_STRINGS = NO;
+ TEST_TARGET_NAME = MouseSdk;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 18BF1DC52B81AB7C00B8D90F /* Build configuration list for PBXProject "MouseSdk" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 18BF1DF12B81AB8000B8D90F /* Debug */,
+ 18BF1DF22B81AB8000B8D90F /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 18BF1DF32B81AB8000B8D90F /* Build configuration list for PBXNativeTarget "MouseSdk" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 18BF1DF42B81AB8000B8D90F /* Debug */,
+ 18BF1DF52B81AB8000B8D90F /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 18BF1DF62B81AB8000B8D90F /* Build configuration list for PBXNativeTarget "MouseSdkTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 18BF1DF72B81AB8000B8D90F /* Debug */,
+ 18BF1DF82B81AB8000B8D90F /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 18BF1DF92B81AB8000B8D90F /* Build configuration list for PBXNativeTarget "MouseSdkUITests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 18BF1DFA2B81AB8000B8D90F /* Debug */,
+ 18BF1DFB2B81AB8000B8D90F /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 18BF1DC22B81AB7C00B8D90F /* Project object */;
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:">
+ </FileRef>
+</Workspace>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IDEDidComputeMac32BitWarning</key>
+ <true/>
+</dict>
+</plist>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1500"
+ version = "1.7">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "18BF1DC92B81AB7C00B8D90F"
+ BuildableName = "AiMouseSdk.app"
+ BlueprintName = "MouseSdk"
+ ReferencedContainer = "container:MouseSdk.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ shouldAutocreateTestPlan = "YES">
+ <Testables>
+ <TestableReference
+ skipped = "NO"
+ parallelizable = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "18BF1DDE2B81AB8000B8D90F"
+ BuildableName = "MouseSdkTests.xctest"
+ BlueprintName = "MouseSdkTests"
+ ReferencedContainer = "container:MouseSdk.xcodeproj">
+ </BuildableReference>
+ </TestableReference>
+ <TestableReference
+ skipped = "NO"
+ parallelizable = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "18BF1DE82B81AB8000B8D90F"
+ BuildableName = "MouseSdkUITests.xctest"
+ BlueprintName = "MouseSdkUITests"
+ ReferencedContainer = "container:MouseSdk.xcodeproj">
+ </BuildableReference>
+ </TestableReference>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "18BF1DC92B81AB7C00B8D90F"
+ BuildableName = "AiMouseSdk.app"
+ BlueprintName = "MouseSdk"
+ ReferencedContainer = "container:MouseSdk.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "18BF1DC92B81AB7C00B8D90F"
+ BuildableName = "AiMouseSdk.app"
+ BlueprintName = "MouseSdk"
+ ReferencedContainer = "container:MouseSdk.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>MouseSdk.xcscheme_^#shared#^_</key>
+ <dict>
+ <key>isShown</key>
+ <true/>
+ <key>orderHint</key>
+ <integer>2</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>18BF1DC92B81AB7C00B8D90F</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ <key>18BF1DDE2B81AB8000B8D90F</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ <key>18BF1DE82B81AB8000B8D90F</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ <key>18BF1E862B8362D300B8D90F</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>MouseSdk.xcscheme_^#shared#^_</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+</dict>
+</plist>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "group:MouseSdk.xcodeproj">
+ </FileRef>
+ <FileRef
+ location = "group:Pods/Pods.xcodeproj">
+ </FileRef>
+</Workspace>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IDEDidComputeMac32BitWarning</key>
+ <true/>
+</dict>
+</plist>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<array/>
+</plist>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+ uuid = "96107861-D4C9-42B2-9605-61F7DD48CC72"
+ type = "0"
+ version = "2.0">
+ <Breakpoints>
+ <BreakpointProxy
+ BreakpointExtensionID = "Xcode.Breakpoint.RuntimeIssueBreakpoint">
+ <BreakpointContent
+ uuid = "24BABF42-95D7-48D8-8974-95C4DD64248D"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ breakpointStackSelectionBehavior = "1"
+ type = "65535">
+ </BreakpointContent>
+ </BreakpointProxy>
+ <BreakpointProxy
+ BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
+ <BreakpointContent
+ uuid = "D2ABCC85-A36A-4F6F-916F-5A94A9ABAEBD"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ breakpointStackSelectionBehavior = "1"
+ scope = "1"
+ stopOnStyle = "0">
+ </BreakpointContent>
+ </BreakpointProxy>
+ <BreakpointProxy
+ BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
+ <BreakpointContent
+ uuid = "FD7765B2-C0F6-4516-8B22-405653751077"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = ""
+ moduleName = "">
+ <Locations>
+ </Locations>
+ </BreakpointContent>
+ </BreakpointProxy>
+ <BreakpointProxy
+ BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+ <BreakpointContent
+ uuid = "CA89549A-270E-4CEC-9288-E1E21DC98E28"
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "AiMouseSdk/ByteDance/ByteDanceSdk.m"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "32"
+ endingLineNumber = "32"
+ landmarkName = "eventCallBack(type, report, data_len)"
+ landmarkType = "9">
+ </BreakpointContent>
+ </BreakpointProxy>
+ </Breakpoints>
+</Bucket>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+ uuid = "D56CBD13-B1CD-4964-946C-9C0A140796C8"
+ type = "0"
+ version = "2.0">
+ <Breakpoints>
+ <BreakpointProxy
+ BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+ <BreakpointContent
+ uuid = "29992B05-B7B9-4589-B0E7-DBA20489906A"
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "AiMouseSdk/Manager/BleManager.m"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "207"
+ endingLineNumber = "207"
+ landmarkName = "-writeToDevice:"
+ landmarkType = "7">
+ </BreakpointContent>
+ </BreakpointProxy>
+ </Breakpoints>
+</Bucket>
--- /dev/null
+//
+// AppDelegate.h
+// MouseSdk
+//
+// Created by incar on 2024/2/18.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface AppDelegate : NSObject <NSApplicationDelegate>
+
+
+@end
+
--- /dev/null
+//
+// AppDelegate.m
+// MouseSdk
+//
+// Created by incar on 2024/2/18.
+//
+
+#import "AppDelegate.h"
+
+@interface AppDelegate ()
+
+
+@end
+
+@implementation AppDelegate
+
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
+ // Insert code here to initialize your application
+}
+
+
+- (void)applicationWillTerminate:(NSNotification *)aNotification {
+ // Insert code here to tear down your application
+}
+
+
+- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app {
+ return YES;
+}
+
+
+@end
--- /dev/null
+{
+ "colors" : [
+ {
+ "idiom" : "universal"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "16x16"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "16x16"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "32x32"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "32x32"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "128x128"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "128x128"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "256x256"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "256x256"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "512x512"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "512x512"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
+ <dependencies>
+ <deployment identifier="macosx"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+ </dependencies>
+ <scenes>
+ <!--Application-->
+ <scene sceneID="JPo-4y-FX3">
+ <objects>
+ <application id="hnw-xV-0zn" sceneMemberID="viewController">
+ <menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
+ <items>
+ <menuItem title="MouseSdk" id="1Xt-HY-uBw">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="MouseSdk" systemMenu="apple" id="uQy-DD-JDr">
+ <items>
+ <menuItem title="About MouseSdk" id="5kV-Vb-QxS">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
+ <menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
+ <menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
+ <menuItem title="Services" id="NMo-om-nkz">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
+ <menuItem title="Hide MouseSdk" keyEquivalent="h" id="Olw-nP-bQN">
+ <connections>
+ <action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+ <connections>
+ <action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Show All" id="Kd2-mp-pUS">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
+ <menuItem title="Quit MouseSdk" keyEquivalent="q" id="4sb-4s-VLi">
+ <connections>
+ <action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="File" id="dMs-cI-mzQ">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="File" id="bib-Uj-vzu">
+ <items>
+ <menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
+ <connections>
+ <action selector="newDocument:" target="Ady-hI-5gd" id="4Si-XN-c54"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
+ <connections>
+ <action selector="openDocument:" target="Ady-hI-5gd" id="bVn-NM-KNZ"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Open Recent" id="tXI-mr-wws">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
+ <items>
+ <menuItem title="Clear Menu" id="vNY-rz-j42">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="clearRecentDocuments:" target="Ady-hI-5gd" id="Daa-9d-B3U"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
+ <menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
+ <connections>
+ <action selector="performClose:" target="Ady-hI-5gd" id="HmO-Ls-i7Q"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
+ <connections>
+ <action selector="saveDocument:" target="Ady-hI-5gd" id="teZ-XB-qJY"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
+ <connections>
+ <action selector="saveDocumentAs:" target="Ady-hI-5gd" id="mDf-zr-I0C"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Revert to Saved" keyEquivalent="r" id="KaW-ft-85H">
+ <connections>
+ <action selector="revertDocumentToSaved:" target="Ady-hI-5gd" id="iJ3-Pv-kwq"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
+ <menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
+ <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
+ <connections>
+ <action selector="runPageLayout:" target="Ady-hI-5gd" id="Din-rz-gC5"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
+ <connections>
+ <action selector="print:" target="Ady-hI-5gd" id="qaZ-4w-aoO"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Edit" id="5QF-Oa-p0T">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Edit" id="W48-6f-4Dl">
+ <items>
+ <menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
+ <connections>
+ <action selector="undo:" target="Ady-hI-5gd" id="M6e-cu-g7V"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
+ <connections>
+ <action selector="redo:" target="Ady-hI-5gd" id="oIA-Rs-6OD"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
+ <menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
+ <connections>
+ <action selector="cut:" target="Ady-hI-5gd" id="YJe-68-I9s"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
+ <connections>
+ <action selector="copy:" target="Ady-hI-5gd" id="G1f-GL-Joy"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
+ <connections>
+ <action selector="paste:" target="Ady-hI-5gd" id="UvS-8e-Qdg"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+ <connections>
+ <action selector="pasteAsPlainText:" target="Ady-hI-5gd" id="cEh-KX-wJQ"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Delete" id="pa3-QI-u2k">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="delete:" target="Ady-hI-5gd" id="0Mk-Ml-PaM"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
+ <connections>
+ <action selector="selectAll:" target="Ady-hI-5gd" id="VNm-Mi-diN"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
+ <menuItem title="Find" id="4EN-yA-p0u">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Find" id="1b7-l0-nxx">
+ <items>
+ <menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
+ <connections>
+ <action selector="performFindPanelAction:" target="Ady-hI-5gd" id="cD7-Qs-BN4"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+ <connections>
+ <action selector="performFindPanelAction:" target="Ady-hI-5gd" id="WD3-Gg-5AJ"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
+ <connections>
+ <action selector="performFindPanelAction:" target="Ady-hI-5gd" id="NDo-RZ-v9R"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
+ <connections>
+ <action selector="performFindPanelAction:" target="Ady-hI-5gd" id="HOh-sY-3ay"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
+ <connections>
+ <action selector="performFindPanelAction:" target="Ady-hI-5gd" id="U76-nv-p5D"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
+ <connections>
+ <action selector="centerSelectionInVisibleArea:" target="Ady-hI-5gd" id="IOG-6D-g5B"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
+ <items>
+ <menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
+ <connections>
+ <action selector="showGuessPanel:" target="Ady-hI-5gd" id="vFj-Ks-hy3"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
+ <connections>
+ <action selector="checkSpelling:" target="Ady-hI-5gd" id="fz7-VC-reM"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
+ <menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleContinuousSpellChecking:" target="Ady-hI-5gd" id="7w6-Qz-0kB"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleGrammarChecking:" target="Ady-hI-5gd" id="muD-Qn-j4w"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleAutomaticSpellingCorrection:" target="Ady-hI-5gd" id="2lM-Qi-WAP"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Substitutions" id="9ic-FL-obx">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
+ <items>
+ <menuItem title="Show Substitutions" id="z6F-FW-3nz">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="orderFrontSubstitutionsPanel:" target="Ady-hI-5gd" id="oku-mr-iSq"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
+ <menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleSmartInsertDelete:" target="Ady-hI-5gd" id="3IJ-Se-DZD"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Smart Quotes" id="hQb-2v-fYv">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleAutomaticQuoteSubstitution:" target="Ady-hI-5gd" id="ptq-xd-QOA"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Smart Dashes" id="rgM-f4-ycn">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleAutomaticDashSubstitution:" target="Ady-hI-5gd" id="oCt-pO-9gS"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Smart Links" id="cwL-P1-jid">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleAutomaticLinkDetection:" target="Ady-hI-5gd" id="Gip-E3-Fov"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Data Detectors" id="tRr-pd-1PS">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleAutomaticDataDetection:" target="Ady-hI-5gd" id="R1I-Nq-Kbl"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Text Replacement" id="HFQ-gK-NFA">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleAutomaticTextReplacement:" target="Ady-hI-5gd" id="DvP-Fe-Py6"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Transformations" id="2oI-Rn-ZJC">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Transformations" id="c8a-y6-VQd">
+ <items>
+ <menuItem title="Make Upper Case" id="vmV-6d-7jI">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="uppercaseWord:" target="Ady-hI-5gd" id="sPh-Tk-edu"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Make Lower Case" id="d9M-CD-aMd">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="lowercaseWord:" target="Ady-hI-5gd" id="iUZ-b5-hil"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Capitalize" id="UEZ-Bs-lqG">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="capitalizeWord:" target="Ady-hI-5gd" id="26H-TL-nsh"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Speech" id="xrE-MZ-jX0">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Speech" id="3rS-ZA-NoH">
+ <items>
+ <menuItem title="Start Speaking" id="Ynk-f8-cLZ">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="startSpeaking:" target="Ady-hI-5gd" id="654-Ng-kyl"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Stop Speaking" id="Oyz-dy-DGm">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="stopSpeaking:" target="Ady-hI-5gd" id="dX8-6p-jy9"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Format" id="jxT-CU-nIS">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Format" id="GEO-Iw-cKr">
+ <items>
+ <menuItem title="Font" id="Gi5-1S-RQB">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
+ <items>
+ <menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
+ <connections>
+ <action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
+ <connections>
+ <action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
+ <connections>
+ <action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
+ <connections>
+ <action selector="underline:" target="Ady-hI-5gd" id="FYS-2b-JAY"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
+ <menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
+ <connections>
+ <action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
+ <connections>
+ <action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
+ <menuItem title="Kern" id="jBQ-r6-VK2">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Kern" id="tlD-Oa-oAM">
+ <items>
+ <menuItem title="Use Default" id="GUa-eO-cwY">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="useStandardKerning:" target="Ady-hI-5gd" id="6dk-9l-Ckg"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Use None" id="cDB-IK-hbR">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="turnOffKerning:" target="Ady-hI-5gd" id="U8a-gz-Maa"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Tighten" id="46P-cB-AYj">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="tightenKerning:" target="Ady-hI-5gd" id="hr7-Nz-8ro"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Loosen" id="ogc-rX-tC1">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="loosenKerning:" target="Ady-hI-5gd" id="8i4-f9-FKE"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Ligatures" id="o6e-r0-MWq">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
+ <items>
+ <menuItem title="Use Default" id="agt-UL-0e3">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="useStandardLigatures:" target="Ady-hI-5gd" id="7uR-wd-Dx6"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Use None" id="J7y-lM-qPV">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="turnOffLigatures:" target="Ady-hI-5gd" id="iX2-gA-Ilz"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Use All" id="xQD-1f-W4t">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="useAllLigatures:" target="Ady-hI-5gd" id="KcB-kA-TuK"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Baseline" id="OaQ-X3-Vso">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Baseline" id="ijk-EB-dga">
+ <items>
+ <menuItem title="Use Default" id="3Om-Ey-2VK">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="unscript:" target="Ady-hI-5gd" id="0vZ-95-Ywn"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Superscript" id="Rqc-34-cIF">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="superscript:" target="Ady-hI-5gd" id="3qV-fo-wpU"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Subscript" id="I0S-gh-46l">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="subscript:" target="Ady-hI-5gd" id="Q6W-4W-IGz"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Raise" id="2h7-ER-AoG">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="raiseBaseline:" target="Ady-hI-5gd" id="4sk-31-7Q9"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Lower" id="1tx-W0-xDw">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="lowerBaseline:" target="Ady-hI-5gd" id="OF1-bc-KW4"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
+ <menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
+ <connections>
+ <action selector="orderFrontColorPanel:" target="Ady-hI-5gd" id="mSX-Xz-DV3"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
+ <menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+ <connections>
+ <action selector="copyFont:" target="Ady-hI-5gd" id="GJO-xA-L4q"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+ <connections>
+ <action selector="pasteFont:" target="Ady-hI-5gd" id="JfD-CL-leO"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Text" id="Fal-I4-PZk">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Text" id="d9c-me-L2H">
+ <items>
+ <menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
+ <connections>
+ <action selector="alignLeft:" target="Ady-hI-5gd" id="zUv-R1-uAa"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
+ <connections>
+ <action selector="alignCenter:" target="Ady-hI-5gd" id="spX-mk-kcS"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Justify" id="J5U-5w-g23">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="alignJustified:" target="Ady-hI-5gd" id="ljL-7U-jND"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
+ <connections>
+ <action selector="alignRight:" target="Ady-hI-5gd" id="r48-bG-YeY"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
+ <menuItem title="Writing Direction" id="H1b-Si-o9J">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
+ <items>
+ <menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ </menuItem>
+ <menuItem id="YGs-j5-SAR">
+ <string key="title"> Default</string>
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="makeBaseWritingDirectionNatural:" target="Ady-hI-5gd" id="qtV-5e-UBP"/>
+ </connections>
+ </menuItem>
+ <menuItem id="Lbh-J2-qVU">
+ <string key="title"> Left to Right</string>
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="makeBaseWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="S0X-9S-QSf"/>
+ </connections>
+ </menuItem>
+ <menuItem id="jFq-tB-4Kx">
+ <string key="title"> Right to Left</string>
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="makeBaseWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="5fk-qB-AqJ"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
+ <menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ </menuItem>
+ <menuItem id="Nop-cj-93Q">
+ <string key="title"> Default</string>
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="makeTextWritingDirectionNatural:" target="Ady-hI-5gd" id="lPI-Se-ZHp"/>
+ </connections>
+ </menuItem>
+ <menuItem id="BgM-ve-c93">
+ <string key="title"> Left to Right</string>
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="makeTextWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="caW-Bv-w94"/>
+ </connections>
+ </menuItem>
+ <menuItem id="RB4-Sm-HuC">
+ <string key="title"> Right to Left</string>
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="makeTextWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="EXD-6r-ZUu"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
+ <menuItem title="Show Ruler" id="vLm-3I-IUL">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="toggleRuler:" target="Ady-hI-5gd" id="FOx-HJ-KwY"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
+ <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
+ <connections>
+ <action selector="copyRuler:" target="Ady-hI-5gd" id="71i-fW-3W2"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
+ <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
+ <connections>
+ <action selector="pasteRuler:" target="Ady-hI-5gd" id="cSh-wd-qM2"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="View" id="H8h-7b-M4v">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="View" id="HyV-fh-RgO">
+ <items>
+ <menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+ <connections>
+ <action selector="toggleToolbarShown:" target="Ady-hI-5gd" id="BXY-wc-z0C"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="runToolbarCustomizationPalette:" target="Ady-hI-5gd" id="pQI-g3-MTW"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="hB3-LF-h0Y"/>
+ <menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
+ <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
+ <connections>
+ <action selector="toggleSidebar:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
+ <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
+ <connections>
+ <action selector="toggleFullScreen:" target="Ady-hI-5gd" id="dU3-MA-1Rq"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Window" id="aUF-d1-5bR">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
+ <items>
+ <menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
+ <connections>
+ <action selector="performMiniaturize:" target="Ady-hI-5gd" id="VwT-WD-YPe"/>
+ </connections>
+ </menuItem>
+ <menuItem title="Zoom" id="R4o-n2-Eq4">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="performZoom:" target="Ady-hI-5gd" id="DIl-cC-cCs"/>
+ </connections>
+ </menuItem>
+ <menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
+ <menuItem title="Bring All to Front" id="LE2-aR-0XJ">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <connections>
+ <action selector="arrangeInFront:" target="Ady-hI-5gd" id="DRN-fu-gQh"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ <menuItem title="Help" id="wpr-3q-Mcd">
+ <modifierMask key="keyEquivalentModifierMask"/>
+ <menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
+ <items>
+ <menuItem title="MouseSdk Help" keyEquivalent="?" id="FKE-Sm-Kum">
+ <connections>
+ <action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
+ </connections>
+ </menuItem>
+ </items>
+ </menu>
+ </menuItem>
+ </items>
+ </menu>
+ <connections>
+ <outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
+ </connections>
+ </application>
+ <customObject id="Voe-Tx-rLC" customClass="AppDelegate"/>
+ <customObject id="YLy-65-1bz" customClass="NSFontManager"/>
+ <customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="75" y="0.0"/>
+ </scene>
+ <!--Window Controller-->
+ <scene sceneID="R2V-B0-nI4">
+ <objects>
+ <windowController id="B8D-0N-5wS" sceneMemberID="viewController">
+ <window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
+ <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
+ <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
+ <rect key="contentRect" x="196" y="240" width="480" height="270"/>
+ <rect key="screenRect" x="0.0" y="0.0" width="1440" height="875"/>
+ <connections>
+ <outlet property="delegate" destination="B8D-0N-5wS" id="98r-iN-zZc"/>
+ </connections>
+ </window>
+ <connections>
+ <segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="cq2-FE-JQM"/>
+ </connections>
+ </windowController>
+ <customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="75" y="250"/>
+ </scene>
+ <!--View Controller-->
+ <scene sceneID="hIz-AP-VOD">
+ <objects>
+ <viewController id="XfG-lQ-9wD" customClass="ViewController" sceneMemberID="viewController">
+ <view key="view" id="m2S-Jp-Qdl">
+ <rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
+ <autoresizingMask key="autoresizingMask"/>
+ </view>
+ </viewController>
+ <customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="75" y="655"/>
+ </scene>
+ </scenes>
+</document>
--- /dev/null
+//
+// Config.h
+// MouseSdk
+//
+// Created by incar on 2024/3/6.
+//
+
+#ifdef DEBUG //调试
+
+// 不带方法名
+#define NSLog(FORMAT, ...) {\
+NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];\
+[dateFormatter setDateStyle:NSDateFormatterMediumStyle];\
+[dateFormatter setTimeStyle:NSDateFormatterShortStyle];\
+[dateFormatter setDateFormat:@"HH:mm:ss:SSS"]; \
+NSString *str = [dateFormatter stringFromDate:[NSDate date]];\
+fprintf(stderr," %s ~ %s\n",[str UTF8String], [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);\
+}
+
+//// 带方法名
+//#define NSLog(FORMAT, ...) {\
+//NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];\
+//[dateFormatter setDateStyle:NSDateFormatterMediumStyle];\
+//[dateFormatter setTimeStyle:NSDateFormatterShortStyle];\
+//[dateFormatter setDateFormat:@"HH:mm:ss:SSSSSS"]; \
+//NSString *str = [dateFormatter stringFromDate:[NSDate date]];\
+//fprintf(stderr," %s %s %d %s~ 打印 = %s\n",[str UTF8String],[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__,__func__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);\
+//}
+
+
+#else
+
+#define NSLog(FORMAT, ...) nil
+
+#endif
+
+
+#import <Foundation/Foundation.h>
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface Config : NSObject
+
+@end
+
+NS_ASSUME_NONNULL_END
--- /dev/null
+//
+// Config.m
+// MouseSdk
+//
+// Created by incar on 2024/3/6.
+//
+
+#import "Config.h"
+
+@implementation Config
+
+@end
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>NSAppTransportSecurity</key>
+ <dict>
+ <key>NSAllowsArbitraryLoads</key>
+ <true/>
+ </dict>
+</dict>
+</plist>
--- /dev/null
+//
+// Use this file to import your target's public headers that you would like to expose to Swift.
+//
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>com.apple.security.app-sandbox</key>
+ <true/>
+ <key>com.apple.security.device.audio-input</key>
+ <true/>
+ <key>com.apple.security.device.bluetooth</key>
+ <true/>
+ <key>com.apple.security.device.usb</key>
+ <true/>
+ <key>com.apple.security.files.user-selected.read-only</key>
+ <true/>
+ <key>com.apple.security.network.client</key>
+ <true/>
+</dict>
+</plist>
--- /dev/null
+//
+// ScanCell.h
+// MouseSdk
+//
+// Created by incar on 2024/2/28.
+//
+
+#import <Cocoa/Cocoa.h>
+#import <CoreBluetooth/CoreBluetooth.h>
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ScanCell : NSTableCellView
+@property(nonatomic,strong)CBPeripheral *peripheral;
+@property(nonatomic,strong)void (^connecBtnActionCallBack)(CBPeripheral *peripheral);
+@end
+
+NS_ASSUME_NONNULL_END
--- /dev/null
+//
+// ScanCell.m
+// MouseSdk
+//
+// Created by incar on 2024/2/28.
+//
+
+#import "ScanCell.h"
+
+@interface ScanCell()
+@property(nonatomic,strong)NSTextField *label;
+@property(nonatomic,strong)NSButton *connectBtn;
+@end
+
+@implementation ScanCell
+- (instancetype)initWithFrame:(CGRect)frame
+{
+ self = [super initWithFrame:frame];
+ if (self) {
+ [self setupView];
+ }
+ return self;
+}
+
+- (void)drawRect:(NSRect)dirtyRect{
+ [super drawRect:dirtyRect];
+}
+
+- (void)setupView{
+ NSTextField *label = [[NSTextField alloc] initWithFrame:CGRectMake(0, 10, 200, 35)];
+ label.editable = NO;
+ label.bordered = NO;
+ label.stringValue = @"000000";
+ self.label = label;
+ [self addSubview:label];
+
+ NSButton *btn = [[NSButton alloc]initWithFrame:NSMakeRect(250, 5, 100, 35)];
+ btn.bordered = true;
+ btn.title = @"连接";
+ [btn setTarget:self];
+ [btn setAction:@selector(connetAction)];
+ btn.state = 1;
+ [self addSubview:btn];
+ self.connectBtn = btn;
+}
+
+-(void)setPeripheral:(CBPeripheral *)peripheral{
+ _peripheral = peripheral;
+ self.label.stringValue = peripheral.name;
+ [self.label sizeToFit];
+ CGRect f = self.label.frame;
+ f.origin.y = (self.bounds.size.height - f.size.height)/2;
+ self.label.frame = f;
+}
+
+- (void)connetAction{
+ if (self.connecBtnActionCallBack) {
+ self.connecBtnActionCallBack(self.peripheral);
+ }
+}
+@end
--- /dev/null
+//
+// ScanVC.h
+// MouseSdk
+//
+// Created by incar on 2024/2/19.
+//
+
+#import <Cocoa/Cocoa.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ScanVC : NSViewController
+
+
+@end
+
+NS_ASSUME_NONNULL_END
--- /dev/null
+//
+// ScanVC.m
+// MouseSdk
+//
+// Created by incar on 2024/2/19.
+//
+
+#import "ScanVC.h"
+#import "ScanCell.h"
+#import "DeviceManger.h"
+@interface ScanVC ()<NSTableViewDelegate,NSTableViewDataSource>
+@property (nonatomic,strong) NSTableView *tableView;
+@property (nonatomic,strong) NSMutableArray<CBPeripheral *> *scanArray;
+@end
+
+@implementation ScanVC
+-(NSMutableArray<CBPeripheral *> *)scanArray{
+ if (_scanArray == nil) {
+ _scanArray = [[NSMutableArray alloc] init];
+ }
+ return _scanArray;
+}
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+ // Do view setup here.
+ [self setupUI];
+ [self setupBleManger];
+}
+- (void)loadView{
+ self.view = [[NSView alloc] initWithFrame:CGRectMake(0, 0, 500, 500)];
+}
+
+- (void)setupUI{
+ CALayer *viewLayer = [CALayer layer];
+ NSView *backgroundView= [[NSView alloc]init];
+ [backgroundView setWantsLayer:YES];
+ [backgroundView setLayer:viewLayer];
+ backgroundView.layer.backgroundColor = [NSColor greenColor].CGColor;
+ [backgroundView setNeedsDisplay:YES];
+ [self.view addSubview:backgroundView];
+
+ //实现tableview的滚动效果
+ NSScrollView *scrollView = [[NSScrollView alloc] initWithFrame:self.view.bounds];
+ scrollView.backgroundColor = [NSColor redColor];
+ [scrollView setDrawsBackground:NO];//不画背景(背景默认画成白色)
+ [scrollView setHasVerticalScroller:YES];//有垂直滚动条
+ //[_tableContainer setHasHorizontalScroller:YES]; //有水平滚动条
+ scrollView.autohidesScrollers = YES;//自动隐藏滚动条(滚动的时候出现)
+ [self.view addSubview:scrollView];
+
+ self.tableView = [[NSTableView alloc] initWithFrame:scrollView.bounds];
+ [scrollView setDocumentView:self.tableView];
+
+ NSTableColumn *column1 = [[NSTableColumn alloc] initWithIdentifier:@"columnFrist"];
+ column1.title = @"设备名称";
+ [column1 setWidth:self.tableView.bounds.size.width];
+ [self.tableView addTableColumn:column1];
+
+// self.tableView.focusRingType = NSFocusRingTypeNone;//tableview获得焦点时的风格
+// self.tableView.selectionHighlightStyle = NSTableViewSelectionHighlightStyleRegular;//行高亮的风格
+// self.tableView.backgroundColor = [NSColor greenColor];
+// self.tableView.usesAlternatingRowBackgroundColors = YES; //背景颜色的交替,一行白色,一行灰色。设置后,原来设置的 backgroundColor 就无效了。
+ self.tableView.delegate = self;
+ self.tableView.dataSource = self;
+ self.tableView.gridStyleMask = NSTableViewSolidHorizontalGridLineMask;
+}
+
+- (void)setupBleManger{
+// BleManager *manager = [BleManager shared];
+// __weak typeof(self) weakSelf= self;
+// __weak typeof(BleManager) *weakManager = manager;
+// manager.discoverDevice = ^(CBPeripheral *peripheral){
+// if ([weakSelf.scanArray containsObject:peripheral]){
+// return;
+// }
+// if(peripheral.name.length == 0){
+// return;
+// }
+// [weakSelf.scanArray addObject:peripheral];
+// [weakSelf.tableView reloadData];
+// };
+// manager.didConnectDevice = ^(CBPeripheral * _Nonnull peripheral) {
+// [weakSelf connectSuccess];
+// };
+// [manager startScanDevice];
+}
+
+- (void)tapDevice:(CBPeripheral *)peripheral{
+// [[BleManager shared] connectPeripheral:peripheral];
+}
+
+- (void)connectSuccess{
+// [[BleManager shared] stopScanDevice];
+ dispatch_async(dispatch_get_main_queue(), ^{
+ NSAlert *alert = [NSAlert new];
+ [alert addButtonWithTitle:@"确定"];
+ [alert setMessageText:@"连接成功"];
+ [alert setAlertStyle:NSAlertStyleInformational];
+ [alert beginSheetModalForWindow:[self.view window] completionHandler:^(NSModalResponse returnCode) {
+ [self dismissViewController:self];
+ }];
+ });
+}
+#pragma mark - NSTableViewDelegate,NSTableViewDataSource
+-(NSInteger)numberOfRowsInTableView:(NSTableView *)tableView{
+ return self.scanArray.count;
+}
+
+-(NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row{
+ ScanCell *cell = [[ScanCell alloc] initWithFrame:CGRectMake(0, 0, self.tableView.bounds.size.width, 44)];
+ cell.peripheral = self.scanArray[row];
+ __weak typeof(self) weakSelf = self;
+ cell.connecBtnActionCallBack = ^(CBPeripheral * _Nonnull peripheral) {
+ [weakSelf tapDevice:peripheral];
+ };
+ return cell;
+}
+-(CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row{
+ return 44;
+}
+
+@end
--- /dev/null
+//
+// TlwBleManager.h
+// AliIotSdkDemo
+//
+// Created by incar on 2024/1/30.
+//
+
+#import <Foundation/Foundation.h>
+#import <CoreBluetooth/CoreBluetooth.h>
+#import "TlwMouseSdk.h"
+
+#define kDidConnectBleNotification @"kDidConnectBleNotification"
+#define kDidDisconnectBleNotification @"kDidDisconnectBleNotification"
+
+
+
+@interface TlwBleManager : NSObject
+@property (nonatomic,strong)void (^discoverDevice)(CBPeripheral *peripheral) ;/// 扫描到设备
+@property (nonatomic,strong)void (^didConnectDevice)(CBPeripheral *peripheral);/// 连接成功
+@property (nonatomic,strong)void (^didDisConnectDevice)(CBPeripheral *peripheral);/// 断开连接
+/// 单利
++(TlwBleManager *)shared;
+
+/// 扫描
+- (void)startScanDevice;
+
+/// 停止扫描
+- (void)stopScanDevice;
+
+/// 连接设备
+/// - Parameter peripheral: 蓝牙设备
+- (void)connectPeripheral:(CBPeripheral *)peripheral;
+
+/// 获取设备信息
+- (void)getDeviceInfo:(void (^)(TlwDeviceInfo *deviceInfo,NSError *error))finished;
+
+/// setDPI
+- (void)setDPI:(int)value completation:(void (^)(BOOL isSuccess,NSError *error))finished;
+
+/// 打开录音
+- (void)openRecord:(void (^)(BOOL isSuccess,NSError *error))finished;
+
+/// 停止录音
+- (void)closeRecord:(void (^)(BOOL isSuccess,NSError *error))finished;
+@end
+
--- /dev/null
+//
+// TlwBleManager.m
+// AliIotSdkDemo
+//
+// Created by incar on 2024/1/30.
+//
+
+#import "TlwBleManager.h"
+#import "TlwMouseSdk.h"
+#import "Config.h"
+
+// 服务id
+#define kServiceUUID @"FFF0"
+//ai特征
+#define kAiUUID @"00010203-0405-0607-0809-0A0B0C0D2B18"
+//写设备信息特征
+#define kSetDeviceInfoUUID @"FFF1"
+//通知设备信息特征
+#define kNotifyDeviceInfoUUID @"FFF2"
+
+@interface TlwBleManager ()<CBCentralManagerDelegate,CBPeripheralDelegate,TlwMouseDelegate>
+@property(nonatomic, strong) CBCentralManager *centralManager;///蓝牙管理
+@property(nonatomic, strong) CBPeripheral *connectPeripheral;//连接的设备
+@property(nonatomic, strong) CBCharacteristic *deviceInfoCha;//设备信息特征
+@property (nonatomic,strong) NSMutableData *recordData;//录音的数据
+@end
+
+@implementation TlwBleManager
++(TlwBleManager *)shared{
+ static TlwBleManager *manager = nil;
+ static dispatch_once_t oncePredicate;
+ dispatch_once(&oncePredicate, ^{
+ manager = [[TlwBleManager alloc]init];
+ });
+ return manager;
+}
+
+- (instancetype)init{
+ self = [super init];
+ if (self) {
+ self.centralManager = [[CBCentralManager alloc]initWithDelegate:self queue:nil];
+ }
+ return self;
+}
+
+#pragma mark - CBCentralManagerDelegate
+- (void)centralManagerDidUpdateState:(nonnull CBCentralManager *)central {
+ [self showLog:[NSString stringWithFormat:@"蓝牙状态 = %@",@(central.state)]];
+ switch (central.state) {
+ case CBManagerStateUnknown:
+
+ break;
+ case CBManagerStateResetting:
+
+ break;
+ case CBManagerStateUnsupported:
+
+ break;
+ case CBManagerStateUnauthorized:
+
+ break;
+ case CBManagerStatePoweredOff:
+
+ break;
+ case CBManagerStatePoweredOn:
+ [self autoConnectDevice];
+ break;
+ }
+}
+
+- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI{
+// [self showLog:[NSString stringWithFormat:@"扫描到设备 = %@, data = %@",peripheral,advertisementData]];
+ if(self.discoverDevice){
+ self.discoverDevice(peripheral);
+ }
+}
+
+- (void)centralManager:(CBCentralManager *)central didConnectPeripheral:(CBPeripheral *)peripheral{
+ [self showLog:[NSString stringWithFormat:@"连接成功 name = %@",peripheral.name]];
+ if(self.didConnectDevice){
+ self.didConnectDevice(peripheral);
+ }
+ peripheral.delegate = self;
+ [peripheral discoverServices:nil];
+
+ [[NSNotificationCenter defaultCenter] postNotificationName:kDidConnectBleNotification object:nil];
+}
+-(void)centralManager:(CBCentralManager *)central didDisconnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error{
+ [self showLog:[NSString stringWithFormat:@"断开连接。。。%@",error.description]];
+ [[NSNotificationCenter defaultCenter] postNotificationName:kDidDisconnectBleNotification object:nil];
+ if(self.didDisConnectDevice){
+ self.didDisConnectDevice(peripheral);
+ }
+// [self aiMouseConnectStateDidChange:false];
+ [[TlwMouse shared] didDisconnect];
+}
+- (void)centralManager:(CBCentralManager *)central didFailToConnectPeripheral:(CBPeripheral *)peripheral error:(nullable NSError *)error{
+ [self showLog:[NSString stringWithFormat:@"连接失败。。。%@",error.description]];
+}
+#pragma mark - CBPeripheralDelegate
+//发现服务
+- (void)peripheral:(CBPeripheral *)peripheral didDiscoverServices:(NSError *)error {
+ for (CBService *service in peripheral.services){
+ [peripheral discoverCharacteristics:nil forService:service];
+ }
+}
+// 发现特征
+- (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error {
+ for (CBCharacteristic *characteristic in service.characteristics){
+ if ([characteristic.UUID.UUIDString isEqualToString:kAiUUID]) {
+ //语音特征
+ [peripheral setNotifyValue:YES forCharacteristic:characteristic];
+ }
+ else if ([characteristic.UUID.UUIDString isEqualToString:kNotifyDeviceInfoUUID]) {
+ //通知设备信息特征
+ [peripheral setNotifyValue:YES forCharacteristic:characteristic];
+ }
+ else if ([characteristic.UUID.UUIDString isEqualToString:kSetDeviceInfoUUID]) {
+ //设备信息特征
+ self.deviceInfoCha = characteristic;
+ //切换代理
+ [TlwMouse shared].delegate = self;
+ //切换当前连接类型
+// [[TlwMouse shared] switchConnect:AiMouseConnectType_bluetooth];
+ }
+ }
+}
+//收到蓝牙数据
+- (void)peripheral:(CBPeripheral *)peripheral didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error {
+ NSData *data = characteristic.value;
+ if([characteristic.UUID.UUIDString isEqualToString:kAiUUID]){
+ //AI数据
+ [[TlwMouse shared] sendAiDataToSdk:data];
+ }
+ else if([characteristic.UUID.UUIDString isEqualToString:kNotifyDeviceInfoUUID]){
+ //设备信息数据
+ [[TlwMouse shared] sendDeviceDataToSdk:data];
+ }
+}
+
+#pragma mark - AiDelegate
+
+/// 设备信息数据回调,需要将此数据通过设备信息特征转发给蓝牙设备
+/// - Parameter data: 数据
+-(void)tlwMouseSendDeviceInfoData:(NSData *)data{
+ [self.connectPeripheral writeValue:data forCharacteristic:self.deviceInfoCha type:CBCharacteristicWriteWithResponse];
+}
+
+/// 鼠标按键指令回调
+/// - Parameter data: 数据。
+/// 前 单击0x06, 按下0x13(开始录音)抬起0x14(结束录音)
+/// 中 单击0x03, 按下0x11(开始录音)抬起0x12(结束录音)
+/// 后 第一次单击0x01, 第二次单击0x02(结束录音) , 按下0x09(开始录音)抬起0x10(结束录音)
+/// 其他未定义
+- (void)tlwMouseSendCmdData:(NSData *)data{
+ uint8 cmd;
+ [data getBytes:&cmd length:1];
+
+ if(cmd == 0x13 || cmd == 0x11 || cmd == 0x01 ||cmd == 0x09){
+ [self showLog:@"开始录音"];
+ self.recordData = [[NSMutableData alloc] init];
+ }
+ else if(cmd == 0x14 || cmd == 0x12 || cmd == 0x02 ||cmd == 0x10){
+ [self showLog:@"结束录音"];
+ [self finishRecored:self.recordData];
+ }
+}
+
+/// 录音回调
+/// - Parameter data: pcm格式语音数据
+- (void)tlwMouseSendRecordData:(NSData *)data{
+ [self.recordData appendData:data];
+}
+/// 输出日志
+- (void)aiMouseAddLog:(NSString *)log {
+// [self showLog:log];
+}
+
+// 连接状态改变
+- (void)aiMouseConnectStateDidChange:(BOOL)connected{
+ if (connected) {
+ [[NSNotificationCenter defaultCenter] postNotificationName:kDidConnectBleNotification object:nil];
+ }
+ else{
+ [[NSNotificationCenter defaultCenter] postNotificationName:kDidDisconnectBleNotification object:nil];
+ }
+}
+#pragma mark - public
+/// 连接设备
+- (void)startScanDevice{
+ [self.centralManager scanForPeripheralsWithServices:nil options:@{CBCentralManagerScanOptionAllowDuplicatesKey : [NSNumber numberWithBool:NO]}];
+}
+
+/// 扫描设备
+- (void)stopScanDevice{
+ [self.centralManager stopScan];
+}
+
+/// 连接设备
+- (void)connectPeripheral:(CBPeripheral *)peripheral{
+ self.connectPeripheral = peripheral;
+ [self.centralManager connectPeripheral:peripheral options:@{CBConnectPeripheralOptionNotifyOnConnectionKey : [NSNumber numberWithBool:YES]}];
+}
+
+/// 获取设备信息
+- (void)getDeviceInfo:(void (^)(TlwDeviceInfo * _Nonnull, NSError * _Nonnull))finished{
+ [[TlwMouse shared] getDeviceInfo:finished];
+}
+
+/// setDPI
+- (void)setDPI:(int)value completation:(void (^)(BOOL isSuccess,NSError *error))finished{
+ [[TlwMouse shared] setDPI:value completation:finished];
+}
+
+/// 打开录音
+- (void)openRecord:(void (^)(BOOL isSuccess,NSError *error))finished{
+ [[TlwMouse shared] openRecord:finished];
+}
+
+/// 停止录音
+- (void)closeRecord:(void (^)(BOOL isSuccess,NSError *error))finished{
+ [[TlwMouse shared] closeRecord:finished];
+}
+#pragma mark - other
+//自动连接,获取已配对的蓝牙,取第一个连接
+- (void)autoConnectDevice{
+ //如果是已连接或者正在连接,则不再重连
+ if (self.connectPeripheral && (self.connectPeripheral.state == CBPeripheralStateConnected || self.connectPeripheral.state == CBPeripheralStateConnecting)) {
+ return;
+ }
+ NSArray<CBPeripheral *> *devices = [self.centralManager retrieveConnectedPeripheralsWithServices:@[[CBUUID UUIDWithString:kServiceUUID]]];
+ if (devices.count > 0) {
+ CBPeripheral *peripheral = devices[0];
+ [self showLog:[NSString stringWithFormat:@"匹配过的设备%@",peripheral.name]];
+ [self connectPeripheral:peripheral];
+ }
+ // 10s自动重连
+ [self performSelector:@selector(autoConnectDevice) withObject:nil afterDelay:10];
+}
+- (void)showLog:(NSString *)log{
+ NSLog(@"%@",log);
+}
+
+//将录音数据保存
+- (void)finishRecored:(NSData *)data{
+ NSString *doc = NSTemporaryDirectory();
+ NSString *fullPath = [NSString stringWithFormat:@"%@1.pcm",doc];
+ NSError *err;
+ [data writeToFile:fullPath options:NSDataWritingAtomic error:&err];
+ if (err) {
+ [self showLog:[NSString stringWithFormat:@"录音保存失败 %@",err.description]];
+ }
+ else{
+ [self showLog:[NSString stringWithFormat:@"录音保存成功 path = %@",fullPath]];
+ }
+}
+
+- (NSString *)dataToHexString:(NSData *)data {
+ NSUInteger length = data.length;
+ NSMutableString *result = [NSMutableString stringWithCapacity:length * 2];
+ const unsigned char *byte = data.bytes;
+ for (int i = 0; i < length; i++, byte++) {
+ [result appendFormat:@"%02X", *byte];
+ }
+ return result;
+}
+@end
--- /dev/null
+//
+// TlwDeviceManger.h
+// MouseSdk
+//
+// Created by incar on 2024/3/30.
+//
+
+#import <Foundation/Foundation.h>
+#import "TlwMouseSdk.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface TlwDeviceManger : NSObject
+@property (nonatomic, readonly) AiMouseConnectType connectType;//连接类型
+@property (nonatomic,strong)void (^connectStateCallBack)(AiMouseConnectType connectType,BOOL isConnect);///是否连接成功
+
++(TlwDeviceManger *)shared;
+
+/// 切换连接类型
+/// - Parameter type: 连接类型
+- (void)switchConnect:(AiMouseConnectType)type;
+
+/// 获取设备信息
+- (void)getDeviceInfo:(void (^)(TlwDeviceInfo *deviceInfo,NSError *error))finished;
+
+/// setDPI
+- (void)setDPI:(int)value completation:(void (^)(BOOL isSuccess,NSError *error))finished;
+
+/// 打开录音
+- (void)openRecord:(void (^)(BOOL isSuccess,NSError *error))finished;
+
+/// 停止录音
+- (void)closeRecord:(void (^)(BOOL isSuccess,NSError *error))finished;
+@end
+
+NS_ASSUME_NONNULL_END
--- /dev/null
+//
+// TlwDeviceManger.m
+// MouseSdk
+//
+// Created by incar on 2024/3/30.
+//
+
+#import "TlwDeviceManger.h"
+#import "TlwHidManager.h"
+#import "TlwBleManager.h"
+
+@interface TlwDeviceManger()
+
+@property (nonatomic,strong) TlwBleManager *ble;
+@property (nonatomic,strong) TlwHidManager *hid;
+@end
+
+@implementation TlwDeviceManger
++(TlwDeviceManger *)shared{
+ static TlwDeviceManger *manager = nil;
+ static dispatch_once_t oncePredicate;
+ dispatch_once(&oncePredicate, ^{
+ manager = [[TlwDeviceManger alloc]init];
+ });
+ return manager;
+}
+
+- (instancetype)init{
+ self = [super init];
+ if (self) {
+ [[TlwMouse shared] setLogLevel:TlwMouseLogLevel_info];
+ [self setupBle];
+ [self setupHid];
+ }
+ return self;
+}
+
+-(AiMouseConnectType)connectType{
+ return [TlwMouse shared].connectType;
+}
+
+- (void)switchConnect:(AiMouseConnectType)type{
+ [[TlwMouse shared] switchConnect:type isConnected:true];
+
+ if ([TlwMouse shared].connectType == AiMouseConnectType_bluetooth) {
+ [self setupBle];
+ }
+ else{
+ [self setupHid];
+ }
+}
+
+- (void)setupHid{
+ self.hid = [TlwHidManager shared];
+ __weak typeof(self) ws = self;
+ self.hid.connectStateCallBack = ^(BOOL isConnnect) {
+ if(ws.connectStateCallBack)ws.connectStateCallBack(AiMouseConnectType_hid,isConnnect);
+ };
+}
+
+- (void)setupBle{
+ self.ble = [TlwBleManager shared];
+ __weak typeof(self) ws = self;
+ self.ble.didConnectDevice = ^(CBPeripheral *peripheral) {
+ if(ws.connectStateCallBack)ws.connectStateCallBack(AiMouseConnectType_bluetooth,true);
+ };
+ self.ble.didDisConnectDevice = ^(CBPeripheral *peripheral) {
+ if(ws.connectStateCallBack)ws.connectStateCallBack(AiMouseConnectType_bluetooth,false);
+ };
+ [self setupBleNotification];
+}
+
+- (void)getDeviceInfo:(void (^)(TlwDeviceInfo *deviceInfo,NSError *error))finished{
+ if ([TlwMouse shared].connectType == AiMouseConnectType_bluetooth) {
+ [self.ble getDeviceInfo:finished];
+ }
+ else{
+ [self.hid getDeviceInfo:finished];
+ }
+}
+
+/// setDPI
+- (void)setDPI:(int)value completation:(void (^)(BOOL isSuccess,NSError *error))finished{
+ if ([TlwMouse shared].connectType == AiMouseConnectType_bluetooth) {
+ [self.ble setDPI:value completation:finished];
+ }
+ else{
+ [self.hid setDPI:value completation:finished];
+ }
+}
+
+/// 打开录音
+- (void)openRecord:(void (^)(BOOL isSuccess,NSError *error))finished{
+ if ([TlwMouse shared].connectType == AiMouseConnectType_bluetooth) {
+ [self.ble openRecord:finished];
+ }
+ else{
+ [self.hid openRecord:finished];
+ }
+}
+/// 停止录音
+- (void)closeRecord:(void (^)(BOOL isSuccess,NSError *error))finished{
+ if ([TlwMouse shared].connectType == AiMouseConnectType_bluetooth) {
+ [self.ble closeRecord:finished];
+ }
+ else{
+ [self.hid closeRecord:finished];
+ }
+}
+#pragma mark - notication
+- (void)setupBleNotification{
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(bleDidConnect:) name:kDidConnectBleNotification object:nil];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(bleDidDisconnect:) name:kDidDisconnectBleNotification object:nil];
+}
+
+- (void)bleDidConnect:(NSNotification *)notification{
+ if(self.connectStateCallBack)self.connectStateCallBack(AiMouseConnectType_bluetooth,true);
+ [[TlwMouse shared] switchConnect:AiMouseConnectType_bluetooth isConnected:true];
+}
+
+- (void)bleDidDisconnect:(NSNotification *)notification{
+ if(self.connectStateCallBack)self.connectStateCallBack(AiMouseConnectType_bluetooth,false);
+ [[TlwMouse shared] switchConnect:AiMouseConnectType_bluetooth isConnected:false];
+}
+
+@end
--- /dev/null
+//
+// TlwHidManager.h
+// MouseSdk
+//
+// Created by incar on 2024/3/26.
+//
+
+#import <Foundation/Foundation.h>
+#import "TlwMouseSdk.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface TlwHidManager : NSObject
+@property (nonatomic,strong)void (^connectStateCallBack)(BOOL isConnnect);/// 设备是否连上
+
++(TlwHidManager *)shared;
+
+- (void)showLog:(NSString *)log;
+
+/// 获取设备信息
+- (void)getDeviceInfo:(void (^)(TlwDeviceInfo *deviceInfo,NSError *error))finished;
+
+/// setDPI
+- (void)setDPI:(int)value completation:(void (^)(BOOL isSuccess,NSError *error))finished;
+
+/// 打开录音
+- (void)openRecord:(void (^)(BOOL isSuccess,NSError *error))finished;
+
+/// 停止录音
+- (void)closeRecord:(void (^)(BOOL isSuccess,NSError *error))finished;
+@end
+
+NS_ASSUME_NONNULL_END
--- /dev/null
+//
+// HidManager.m
+// MouseSdk
+//
+// Created by incar on 2024/3/26.
+//
+
+#import "TlwHidManager.h"
+#include <IOKit/hid/IOHIDLib.h>
+#include <IOKit/hid/IOHIDKeys.h>
+#import "Config.h"
+
+
+
+//供应商id
+//const long vendorID = 0x6675;
+//const long productID = 0x8601;
+
+@interface TlwHidManager ()<TlwMouseDelegate>
+
+@property(nonatomic, assign) IOHIDManagerRef hidManager;///hid管理
+@property(nonatomic, assign) IOHIDDeviceRef deviceInfoCha;//设备信息通道
+@property (nonatomic,strong) NSMutableData *recordData;//录音的数据
+@end
+
+@implementation TlwHidManager
++(TlwHidManager *)shared{
+ static TlwHidManager *manager = nil;
+ static dispatch_once_t oncePredicate;
+ dispatch_once(&oncePredicate, ^{
+ manager = [[TlwHidManager alloc]init];
+ });
+ return manager;
+}
+
+- (instancetype)init{
+ self = [super init];
+ if (self) {
+ [self initHid];
+ [self open];
+ }
+ return self;
+}
+
+- (void)initHid{
+
+}
+
+- (void)open{
+ self.hidManager = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone);
+ IOHIDManagerScheduleWithRunLoop(self.hidManager, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
+ IOReturn ret = IOHIDManagerOpen(self.hidManager, 0L);
+ if (ret != kIOReturnSuccess) {
+ NSLog(@"打开设备失败!");
+ }else{
+ NSLog(@"打开设备成功!");
+ }
+ //设置匹配设备
+ //供应商id
+ const long vendorID = 0x10D6;
+ //产品id
+ const long productID = 0xB008;
+ NSMutableDictionary* dict= [NSMutableDictionary dictionary];
+ [dict setValue:[NSNumber numberWithLong:productID] forKey:[NSString stringWithCString:kIOHIDProductIDKey encoding:NSUTF8StringEncoding]];
+ [dict setValue:[NSNumber numberWithLong:vendorID] forKey:[NSString stringWithCString:kIOHIDVendorIDKey encoding:NSUTF8StringEncoding]];
+ IOHIDManagerSetDeviceMatching(self.hidManager, (__bridge CFMutableDictionaryRef)dict);
+ //设置匹配到设备回调
+ IOHIDManagerRegisterDeviceMatchingCallback(self.hidManager, &hidAppearDevice, NULL);
+ //设置移除设备回调
+ IOHIDManagerRegisterDeviceRemovalCallback(self.hidManager, &hidDisAppearDevice, NULL);
+}
+
+- (void)close{
+ IOReturn ret = IOHIDManagerClose(self.hidManager, 0);
+ if (ret != kIOReturnSuccess) {
+ NSLog(@"关闭设备失败!");
+ }else{
+ NSLog(@"关闭设备成功!");
+ }
+}
+
+#pragma mark - Hid CallBack
+/// 匹配到设备回调
+static void hidAppearDevice(void *inContext,IOReturn inResult,void *inSender,IOHIDDeviceRef inIOHIDDeviceRef) {
+ [[TlwHidManager shared] showLog:[NSString stringWithFormat:@"发现设备 %@\n ",inIOHIDDeviceRef]];
+ [TlwHidManager shared].deviceInfoCha = inIOHIDDeviceRef;
+ [[TlwHidManager shared] connectDevice];
+ //注册消息回调
+ unsigned char InputBuffer[64];
+ IOHIDDeviceRegisterInputReportCallback(inIOHIDDeviceRef, InputBuffer, sizeof(InputBuffer), hidReceiveData, NULL);
+ IOReturn result = IOHIDDeviceOpen(inIOHIDDeviceRef, kIOHIDOptionsTypeNone);
+ if (result != kIOReturnSuccess) {
+ NSLog([NSString stringWithFormat:@"打开hid失败! %d",result]);
+ }else{
+ NSLog(@"打开hid成功!");
+ }
+ CFRetain(inIOHIDDeviceRef);
+ IOHIDDeviceScheduleWithRunLoop(inIOHIDDeviceRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
+}
+
+/// 设备移除回调
+static void hidDisAppearDevice(void *inContext,IOReturn inResult,void *inSender,IOHIDDeviceRef inIOHIDDeviceRef) {
+ [[TlwHidManager shared] showLog:[NSString stringWithFormat:@"拔出设备 %@ ",inIOHIDDeviceRef]];
+ uint32_t PrimaryUsagePage = IOHIDDevGetUInt32Property(inIOHIDDeviceRef, CFSTR(kIOHIDPrimaryUsagePageKey));
+ uint32_t PrimaryUsage = IOHIDDevGetUInt32Property(inIOHIDDeviceRef, CFSTR(kIOHIDPrimaryUsageKey));
+
+ if(PrimaryUsagePage == 1 && PrimaryUsage == 0){
+ [TlwHidManager shared].deviceInfoCha = nil;
+ [[TlwMouse shared] didDisconnect];
+ }
+}
+
+static void hidReceiveData(void* context, IOReturn result, void* sender, IOHIDReportType type, uint32_t reportID, uint8_t *report,CFIndex reportLength){
+
+ if (report[0] == 0x01 || report[0] == 0x02) {
+ //鼠标键盘活动事件
+ return;
+ }
+ [[TlwHidManager shared] showLog:[NSString stringWithFormat:@"[receive] 处理前 %@",[[TlwHidManager shared] dataToHexString:[[NSData alloc] initWithBytes:report length:reportLength]]]];
+
+ NSInteger len = get_data_len(report, reportLength);
+ NSData *data = [[NSData alloc] initWithBytes:report length:len];
+ [[TlwMouse shared] sendDeviceDataToSdk:data];
+}
+
+#pragma mark - AiDelegate
+/// 设备信息数据回调,需要将此数据通过设备信息特征转发给蓝牙设备
+/// - Parameter data: 数据
+-(void)tlwMouseSendDeviceInfoData:(NSData *)data{
+ [self sendData:data toDevice:self.deviceInfoCha];
+}
+
+/// 鼠标按键指令回调
+/// - Parameter data: 数据。
+/// 前 单击0x06, 按下0x13(开始录音)抬起0x14(结束录音)
+/// 中 单击0x03, 按下0x11(开始录音)抬起0x12(结束录音)
+/// 后 第一次单击0x01, 第二次单击0x02(结束录音) , 按下0x09(开始录音)抬起0x10(结束录音)
+/// 其他未定义
+- (void)tlwMouseSendCmdData:(NSData *)data{
+ uint8 cmd;
+ [data getBytes:&cmd length:1];
+
+ if(cmd == 0x13 || cmd == 0x11 || cmd == 0x01 ||cmd == 0x09){
+ [self showLog:@"开始录音"];
+ self.recordData = [[NSMutableData alloc] init];
+ }
+ else if(cmd == 0x14 || cmd == 0x12 || cmd == 0x02 ||cmd == 0x10){
+ [self showLog:@"结束录音"];
+ [self finishRecored:self.recordData];
+ }
+}
+/// 录音回调
+/// - Parameter data: pcm格式语音数据
+- (void)tlwMouseSendRecordData:(NSData *)data{
+ [self.recordData appendData:data];
+}
+/// 输出日志
+- (void)aiMouseAddLog:(NSString *)log {
+// [self showLog:log];
+}
+
+// 连接状态改变
+- (void)aiMouseConnectStateDidChange:(BOOL)connected{
+ [TlwHidManager shared].connectStateCallBack(connected);
+}
+
+#pragma mark - public
+/// 获取设备信息
+- (void)getDeviceInfo:(void (^)(TlwDeviceInfo * _Nonnull, NSError * _Nonnull))completation{
+ [[TlwMouse shared] getDeviceInfo:completation];
+}
+/// setDPI
+- (void)setDPI:(int)value completation:(void (^)(BOOL isSuccess,NSError *error))finished{
+ [[TlwMouse shared] setDPI:value completation:finished];
+}
+/// 打开录音
+- (void)openRecord:(void (^)(BOOL isSuccess,NSError *error))finished{
+ [[TlwMouse shared] openRecord:finished];
+}
+/// 停止录音
+- (void)closeRecord:(void (^)(BOOL isSuccess,NSError *error))finished{
+ [[TlwMouse shared] closeRecord:finished];
+}
+
+#pragma mark - other
+-(void)connectDevice{
+ //设置代理
+ [TlwMouse shared].delegate = self;
+ //切换当前连接类型
+// [[TlwMouse shared] switchConnect:AiMouseConnectType_hid];
+}
+
+/// 发送数据给设备
+-(void)sendData:(NSData *)data toDevice:(IOHIDDeviceRef)device{
+ if(device == nil){
+ [self showLog:@"请先连上设备"];
+ return;
+ }
+
+ IOReturn ret = IOHIDDeviceSetReport(device, kIOHIDReportTypeOutput, 0, data.bytes, data.length);
+ if (ret != kIOReturnSuccess) {
+ [self showLog:[NSString stringWithFormat:@"数据发送失败! code = %d",ret]];
+ }else{
+ [self showLog:@"数据发送成功!"];
+ }
+}
+
+//将录音数据保存
+- (void)finishRecored:(NSData *)data{
+ NSString *doc = NSTemporaryDirectory();
+ NSString *fullPath = [NSString stringWithFormat:@"%@1.pcm",doc];
+ NSError *err;
+ [data writeToFile:fullPath options:NSDataWritingAtomic error:&err];
+ if (err) {
+ [self showLog:[NSString stringWithFormat:@"录音保存失败 %@",err.description]];
+ }
+ else{
+ [self showLog:[NSString stringWithFormat:@"录音保存成功 path = %@",fullPath]];
+ }
+}
+- (void)showLog:(NSString *)log{
+ NSLog(@"%@",log);
+}
+
+
+/// 实际到数据长度
+static inline int get_data_len(uint8_t *buf, u_long len) {
+ if (len <= 0 ) return 0;
+ int url_len = 0;
+ while (buf[url_len] != 0x00) url_len++;
+ return url_len;
+}
+
+/// 获取对应属性值
+static uint32_t IOHIDDevGetUInt32Property(IOHIDDeviceRef inIOHIDDeviceRef, CFStringRef inKey) {
+ uint32_t outValue = 0;
+ if (inIOHIDDeviceRef != NULL) {
+ CFTypeRef tCFTypeRef = IOHIDDeviceGetProperty(inIOHIDDeviceRef, inKey);
+ if (tCFTypeRef != NULL && (CFNumberGetTypeID() == CFGetTypeID(tCFTypeRef)) ) {
+ Boolean result = CFNumberGetValue((CFNumberRef) tCFTypeRef, kCFNumberSInt32Type, &outValue);
+ if (!result) {
+ [[TlwHidManager shared] showLog:[NSString stringWithFormat:@"get %@ failed.", inKey]];
+ }
+ }
+ }
+ return outValue;
+}
+- (NSString *)dataToHexString:(NSData *)data {
+ NSUInteger length = data.length;
+ NSMutableString *result = [NSMutableString stringWithCapacity:length * 2];
+ const unsigned char *byte = data.bytes;
+ for (int i = 0; i < length; i++, byte++) {
+ [result appendFormat:@"%02X", *byte];
+ }
+ return result;
+}
+@end
--- /dev/null
+//
+// TlwScanVC.h
+// MouseSdk
+//
+// Created by incar on 2024/8/21.
+//
+
+#import <Cocoa/Cocoa.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface TlwScanVC : NSViewController
+
+@end
+
+NS_ASSUME_NONNULL_END
--- /dev/null
+//
+// TlwScanVC.m
+// MouseSdk
+//
+// Created by incar on 2024/8/21.
+//
+
+#import "TlwScanVC.h"
+
+#import "ScanCell.h"
+@interface TlwScanVC ()<NSTableViewDelegate,NSTableViewDataSource>
+@property (nonatomic,strong) NSTableView *tableView;
+@property (nonatomic,strong) NSMutableArray<CBPeripheral *> *scanArray;
+@end
+
+@implementation TlwScanVC
+-(NSMutableArray<CBPeripheral *> *)scanArray{
+ if (_scanArray == nil) {
+ _scanArray = [[NSMutableArray alloc] init];
+ }
+ return _scanArray;
+}
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+ // Do view setup here.
+ [self setupUI];
+ [self setupBleManger];
+}
+- (void)loadView{
+ self.view = [[NSView alloc] initWithFrame:CGRectMake(0, 0, 500, 500)];
+}
+
+- (void)setupUI{
+ CALayer *viewLayer = [CALayer layer];
+ NSView *backgroundView= [[NSView alloc]init];
+ [backgroundView setWantsLayer:YES];
+ [backgroundView setLayer:viewLayer];
+ backgroundView.layer.backgroundColor = [NSColor greenColor].CGColor;
+ [backgroundView setNeedsDisplay:YES];
+ [self.view addSubview:backgroundView];
+
+ //实现tableview的滚动效果
+ NSScrollView *scrollView = [[NSScrollView alloc] initWithFrame:self.view.bounds];
+ scrollView.backgroundColor = [NSColor redColor];
+ [scrollView setDrawsBackground:NO];//不画背景(背景默认画成白色)
+ [scrollView setHasVerticalScroller:YES];//有垂直滚动条
+ //[_tableContainer setHasHorizontalScroller:YES]; //有水平滚动条
+ scrollView.autohidesScrollers = YES;//自动隐藏滚动条(滚动的时候出现)
+ [self.view addSubview:scrollView];
+
+ self.tableView = [[NSTableView alloc] initWithFrame:scrollView.bounds];
+ [scrollView setDocumentView:self.tableView];
+
+ NSTableColumn *column1 = [[NSTableColumn alloc] initWithIdentifier:@"columnFrist"];
+ column1.title = @"设备名称";
+ [column1 setWidth:self.tableView.bounds.size.width];
+ [self.tableView addTableColumn:column1];
+
+// self.tableView.focusRingType = NSFocusRingTypeNone;//tableview获得焦点时的风格
+// self.tableView.selectionHighlightStyle = NSTableViewSelectionHighlightStyleRegular;//行高亮的风格
+// self.tableView.backgroundColor = [NSColor greenColor];
+// self.tableView.usesAlternatingRowBackgroundColors = YES; //背景颜色的交替,一行白色,一行灰色。设置后,原来设置的 backgroundColor 就无效了。
+ self.tableView.delegate = self;
+ self.tableView.dataSource = self;
+ self.tableView.gridStyleMask = NSTableViewSolidHorizontalGridLineMask;
+}
+
+- (void)setupBleManger{
+// TlwBleManager *manager = [TlwDeviceManger shared].ble;
+// __weak typeof(self) weakSelf= self;
+// manager.discoverDevice = ^(CBPeripheral *peripheral){
+// if ([weakSelf.scanArray containsObject:peripheral]){
+// return;
+// }
+// if(peripheral.name.length == 0){
+// return;
+// }
+// [weakSelf.scanArray addObject:peripheral];
+// [weakSelf.tableView reloadData];
+// };
+// manager.didConnectDevice = ^(CBPeripheral * _Nonnull peripheral) {
+// [weakSelf connectSuccess];
+// };
+// [manager startScanDevice];
+}
+
+- (void)tapDevice:(CBPeripheral *)peripheral{
+// [[TlwDeviceManger shared].ble connectPeripheral:peripheral];
+}
+
+- (void)connectSuccess{
+// [[TlwDeviceManger shared].ble stopScanDevice];
+// dispatch_async(dispatch_get_main_queue(), ^{
+// NSAlert *alert = [NSAlert new];
+// [alert addButtonWithTitle:@"确定"];
+// [alert setMessageText:@"连接成功"];
+// [alert setAlertStyle:NSAlertStyleInformational];
+// [alert beginSheetModalForWindow:[self.view window] completionHandler:^(NSModalResponse returnCode) {
+// [self dismissViewController:self];
+// }];
+// });
+}
+#pragma mark - NSTableViewDelegate,NSTableViewDataSource
+-(NSInteger)numberOfRowsInTableView:(NSTableView *)tableView{
+ return self.scanArray.count;
+}
+
+-(NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row{
+ ScanCell *cell = [[ScanCell alloc] initWithFrame:CGRectMake(0, 0, self.tableView.bounds.size.width, 44)];
+ cell.peripheral = self.scanArray[row];
+ __weak typeof(self) weakSelf = self;
+ cell.connecBtnActionCallBack = ^(CBPeripheral * _Nonnull peripheral) {
+ [weakSelf tapDevice:peripheral];
+ };
+ return cell;
+}
+-(CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row{
+ return 44;
+}
+
+@end
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11134" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11134"/>
+ </dependencies>
+ <objects>
+ <customObject id="-2" userLabel="File's Owner" customClass="TlwScanVC">
+ <connections>
+ <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
+ </connections>
+ </customObject>
+ <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+ <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+ <customView id="Hz6-mo-xeY">
+ <rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+ </customView>
+ </objects>
+</document>
--- /dev/null
+//
+// ViewController.h
+// MouseSdk
+//
+// Created by incar on 2024/2/18.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface ViewController : NSViewController
+
+
+@end
+
--- /dev/null
+
+#import "ViewController.h"
+#import "ScanVC.h"
+#import "DeviceManger.h"
+#import "Config.h"
+@interface ViewController ()
+@property(nonatomic,strong)NSTextField *typeLabel;///当前模式状态
+@property(nonatomic,strong)NSTextField *connectLabel;///连接状态
+@property(nonatomic,strong)NSTextField *authLabel;///鉴权状态
+@property(nonatomic,strong)NSTextField *deviceInfoLabel;///设备信息
+@end
+
+@implementation ViewController
+
+-(instancetype)init{
+ if (self = [super init]) {
+ }
+ return self;
+}
+
+-(void)dealloc{
+}
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+
+ // Do any additional setup after loading the view.
+ [self setupUI];
+ [self setupDeviceManger];
+}
+
+- (void)loadView{
+ self.view = [[NSView alloc] initWithFrame:CGRectMake(0, 0, 500, 800)];
+}
+
+- (void)setupUI{
+ CALayer *viewLayer = [CALayer layer];
+ NSView *backgroundView= [[NSView alloc]init];
+ [backgroundView setWantsLayer:YES];
+ [backgroundView setLayer:viewLayer];
+ backgroundView.layer.backgroundColor = [NSColor greenColor].CGColor;
+ [backgroundView setNeedsDisplay:YES];
+ [self.view addSubview:backgroundView];
+
+ self.title = @"AI SDK";
+ {
+ NSButton *btn = [[NSButton alloc]initWithFrame:NSMakeRect(50, self.view.bounds.size.height - 200, 100, 45)];
+ btn.bordered = true;
+ btn.title = @"更多指令";
+ [btn setTarget:self];
+ [btn setAction:@selector(moreAction:)];
+ btn.state = 1;
+ [self.view addSubview:btn];
+ }
+ {
+ NSTextField *label = [[NSTextField alloc] initWithFrame:CGRectMake(180, self.view.bounds.size.height - 80, 300, 35)];
+ label.editable = NO;
+ label.bordered = NO;
+ label.stringValue = @"连接模式:--";
+ label.backgroundColor = NSColor.clearColor;
+ self.typeLabel = label;
+ [self.view addSubview:label];
+ }
+ {
+ NSTextField *label = [[NSTextField alloc] initWithFrame:CGRectMake(180, self.view.bounds.size.height - 120, 300, 35)];
+ label.editable = NO;
+ label.bordered = NO;
+ label.stringValue = @"连接状态:未连接";
+ label.backgroundColor = NSColor.clearColor;
+ self.connectLabel = label;
+ [self.view addSubview:label];
+ }
+ {
+ NSTextField *label = [[NSTextField alloc] initWithFrame:CGRectMake(180, self.view.bounds.size.height - 160, 300, 35)];
+ label.editable = NO;
+ label.bordered = NO;
+ label.stringValue = @"鉴权状态:--";
+ label.backgroundColor = NSColor.clearColor;
+ self.authLabel = label;
+ [self.view addSubview:label];
+ }
+ {
+ NSTextField *label = [[NSTextField alloc] initWithFrame:CGRectMake(180, self.view.bounds.size.height - 560, 400, 400)];
+ label.editable = NO;
+ label.bordered = NO;
+ label.stringValue = @"";
+ label.backgroundColor = NSColor.clearColor;
+ self.deviceInfoLabel = label;
+ [self.view addSubview:label];
+ }
+
+}
+
+#pragma mark - action
+- (void)setupDeviceManger{
+ DeviceManger *manager = [DeviceManger shared];
+ [manager initSdk:2];
+ __weak typeof(self) ws = self;
+ manager.aiMouseAddLogCallBack = ^(NSString * _Nonnull log) {
+ NSLog(@"%@",log);
+ };
+ manager.authCallBack = ^(BOOL isSuccess) {
+ dispatch_async(dispatch_get_main_queue(), ^{
+ ws.authLabel.stringValue = isSuccess?@"鉴权状态:鉴权成功":@"鉴权状态:鉴权失败";
+ if(isSuccess){
+ [ws geviceInfoAction];
+ }
+ });
+ };
+ [manager begainMonitorAiMouseConnectStateDidChange:@"NMMouse" callBack:^(int connectType, BOOL connected) {
+ dispatch_async(dispatch_get_main_queue(), ^{
+ if(connected){
+ ws.typeLabel.stringValue = connectType == 0 ?@"连接模式:蓝牙":@"连接模式:hid";
+ ws.connectLabel.stringValue = connected?@"连接状态:已连接":@"连接状态:未连接";
+ }
+ else{
+ ws.typeLabel.stringValue = @"连接模式:--";
+ ws.connectLabel.stringValue = @"连接状态:未连接";
+ }
+ });
+ }];
+}
+
+
+- (void)moreAction:(NSButton *)sender {
+ NSMenu *popupMenu = [[NSMenu alloc] initWithTitle:@"Popup Menu"];
+ NSMenuItem *item1 = [[NSMenuItem alloc] initWithTitle:@"语音开启" action:@selector(voiceStart:) keyEquivalent:@"1"];
+ NSMenuItem *item2 = [[NSMenuItem alloc] initWithTitle:@"语音停止" action:@selector(voiceStop:) keyEquivalent:@"2"];
+ NSMenuItem *item3 = [[NSMenuItem alloc] initWithTitle:@"设置DPI" action:@selector(setDPI:) keyEquivalent:@"3"];
+ NSMenuItem *item4 = [[NSMenuItem alloc] initWithTitle:@"鼠标状态查询" action:@selector(searchState:) keyEquivalent:@"4"];
+ NSMenuItem *item5 = [[NSMenuItem alloc] initWithTitle:@"设置滚轮开关" action:@selector(setUrlState:) keyEquivalent:@"5"];
+ NSMenuItem *item6 = [[NSMenuItem alloc] initWithTitle:@"获取滚轮开关" action:@selector(getUrlState:) keyEquivalent:@"6"];
+
+ [popupMenu addItem:item1];
+ [popupMenu addItem:item2];
+ [popupMenu addItem:item3];
+ [popupMenu addItem:item4];
+ [popupMenu addItem:item5];
+ [popupMenu addItem:item6];
+
+ NSPoint buttonLocation = [sender convertPoint:NSZeroPoint toView:self.view];
+ [popupMenu popUpMenuPositioningItem:nil atLocation:buttonLocation inView:self.view];
+}
+
+- (void)voiceStart:(NSMenuItem*)sender {
+ [[DeviceManger shared] openRecord:^(BOOL isSuccess, NSError * _Nonnull error) {
+
+ }];
+}
+- (void)voiceStop:(NSMenuItem*)sender {
+ [[DeviceManger shared] closeRecord:^(BOOL isSuccess, NSError * _Nonnull error) {
+
+ }];
+}
+- (void)setDPI:(NSMenuItem*)sender {
+ [[DeviceManger shared] setCPI:1600 completation:^(BOOL isSuccess, NSError * _Nonnull error) {
+
+ }];
+}
+- (void)searchState:(NSMenuItem*)sender {
+ [self geviceInfoAction];
+}
+
+- (void)setUrlState:(NSMenuItem*)sender{
+ [[DeviceManger shared] setUrlState:0 completation:^(BOOL isSuccess, NSError * _Nonnull error) {
+ NSLog(isSuccess? @"设置滚轮开关成功":@"设置滚轮开关失败");
+ }];
+}
+
+- (void)getUrlState:(NSMenuItem*)sender{
+ [[DeviceManger shared] getUrlState:^(int state, NSError * _Nonnull error) {
+ if (error == nil) {
+ NSLog(@"滚轮开关 %d",state);
+ }
+ else{
+ NSLog(error.description);
+ }
+ }];
+}
+
+
+
+
+- (void)geviceInfoAction{
+// [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"x-apple.systempreferences:com.apple.preference.security?Privacy_ListenEvent"]];
+// return;
+ [[DeviceManger shared] getDeviceInfo:^(AiMouseDeviceInfo *deviceInfo, NSError *error) {
+ if (deviceInfo) {
+ NSString *info = deviceInfo.description;
+ dispatch_async(dispatch_get_main_queue(), ^{
+ self.deviceInfoLabel.stringValue = info;
+ });
+ }
+ else{
+ NSString *info = [NSString stringWithFormat:@"error == %@",error.description];
+ NSLog(@"%@",info);
+ dispatch_async(dispatch_get_main_queue(), ^{
+ self.deviceInfoLabel.stringValue = info;
+ });
+ }
+ }];
+}
+
+@end
--- /dev/null
+//
+// main.m
+// MouseSdk
+//
+// Created by incar on 2024/2/18.
+//
+
+#import <Cocoa/Cocoa.h>
+
+int main(int argc, const char * argv[]) {
+ @autoreleasepool {
+ // Setup code that might create autoreleased objects goes here.
+ }
+ return NSApplicationMain(argc, argv);
+}
--- /dev/null
+//
+// MouseSdkTests.m
+// MouseSdkTests
+//
+// Created by incar on 2024/2/18.
+//
+
+#import <XCTest/XCTest.h>
+
+@interface MouseSdkTests : XCTestCase
+
+@end
+
+@implementation MouseSdkTests
+
+- (void)setUp {
+ // Put setup code here. This method is called before the invocation of each test method in the class.
+}
+
+- (void)tearDown {
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
+}
+
+- (void)testExample {
+ // This is an example of a functional test case.
+ // Use XCTAssert and related functions to verify your tests produce the correct results.
+}
+
+- (void)testPerformanceExample {
+ // This is an example of a performance test case.
+ [self measureBlock:^{
+ // Put the code you want to measure the time of here.
+ }];
+}
+
+@end
--- /dev/null
+//
+// MouseSdkUITests.m
+// MouseSdkUITests
+//
+// Created by incar on 2024/2/18.
+//
+
+#import <XCTest/XCTest.h>
+
+@interface MouseSdkUITests : XCTestCase
+
+@end
+
+@implementation MouseSdkUITests
+
+- (void)setUp {
+ // Put setup code here. This method is called before the invocation of each test method in the class.
+
+ // In UI tests it is usually best to stop immediately when a failure occurs.
+ self.continueAfterFailure = NO;
+
+ // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
+}
+
+- (void)tearDown {
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
+}
+
+- (void)testExample {
+ // UI tests must launch the application that they test.
+ XCUIApplication *app = [[XCUIApplication alloc] init];
+ [app launch];
+
+ // Use XCTAssert and related functions to verify your tests produce the correct results.
+}
+
+- (void)testLaunchPerformance {
+ if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *)) {
+ // This measures how long it takes to launch your application.
+ [self measureWithMetrics:@[[[XCTApplicationLaunchMetric alloc] init]] block:^{
+ [[[XCUIApplication alloc] init] launch];
+ }];
+ }
+}
+
+@end
--- /dev/null
+//
+// MouseSdkUITestsLaunchTests.m
+// MouseSdkUITests
+//
+// Created by incar on 2024/2/18.
+//
+
+#import <XCTest/XCTest.h>
+
+@interface MouseSdkUITestsLaunchTests : XCTestCase
+
+@end
+
+@implementation MouseSdkUITestsLaunchTests
+
++ (BOOL)runsForEachTargetApplicationUIConfiguration {
+ return YES;
+}
+
+- (void)setUp {
+ self.continueAfterFailure = NO;
+}
+
+- (void)testLaunch {
+ XCUIApplication *app = [[XCUIApplication alloc] init];
+ [app launch];
+
+ // Insert steps here to perform after app launch but before taking a screenshot,
+ // such as logging into a test account or navigating somewhere in the app
+
+ XCTAttachment *attachment = [XCTAttachment attachmentWithScreenshot:XCUIScreen.mainScreen.screenshot];
+ attachment.name = @"Launch Screen";
+ attachment.lifetime = XCTAttachmentLifetimeKeepAlways;
+ [self addAttachment:attachment];
+}
+
+@end
--- /dev/null
+# Uncomment the next line to define a global platform for your project
+# platform :ios, '11.0'
+platform :osx, '11.0'
+#source 'https://kkgithub.com/CocoaPods/Specs.git'
+source 'https://kkgithub.com/CocoaPods/Specs.git'
+# source 'https://gitee.com/mirrors/CocoaPods-Specs.git'
+
+target 'MouseSdk' do
+ # Comment the next line if you don't want to use dynamic frameworks
+
+ pod 'Masonry'
+ pod 'FFmpeg-MacOS'
+
+
+end
+
--- /dev/null
+PODS:
+ - Masonry (1.1.0)
+
+DEPENDENCIES:
+ - Masonry
+
+SPEC REPOS:
+ https://github.com/CocoaPods/Specs.git:
+ - Masonry
+
+SPEC CHECKSUMS:
+ Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
+
+PODFILE CHECKSUM: e9c631636c7e1eba003a71c21764458427cfbc68
+
+COCOAPODS: 1.14.3
--- /dev/null
+../../../Masonry/Masonry/MASCompositeConstraint.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASConstraint+Private.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASConstraint.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASConstraintMaker.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASLayoutConstraint.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASUtilities.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASViewAttribute.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASViewConstraint.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/Masonry.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/NSArray+MASAdditions.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/View+MASAdditions.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/View+MASShorthandAdditions.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/ViewController+MASAdditions.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASCompositeConstraint.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASConstraint+Private.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASConstraint.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASConstraintMaker.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASLayoutConstraint.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASUtilities.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASViewAttribute.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/MASViewConstraint.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/Masonry.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/NSArray+MASAdditions.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/View+MASAdditions.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/View+MASShorthandAdditions.h
\ No newline at end of file
--- /dev/null
+../../../Masonry/Masonry/ViewController+MASAdditions.h
\ No newline at end of file
--- /dev/null
+PODS:
+ - Masonry (1.1.0)
+
+DEPENDENCIES:
+ - Masonry
+
+SPEC REPOS:
+ https://github.com/CocoaPods/Specs.git:
+ - Masonry
+
+SPEC CHECKSUMS:
+ Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
+
+PODFILE CHECKSUM: e9c631636c7e1eba003a71c21764458427cfbc68
+
+COCOAPODS: 1.14.3
--- /dev/null
+Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
--- /dev/null
+//
+// MASCompositeConstraint.h
+// Masonry
+//
+// Created by Jonas Budelmann on 21/07/13.
+// Copyright (c) 2013 cloudling. All rights reserved.
+//
+
+#import "MASConstraint.h"
+#import "MASUtilities.h"
+
+/**
+ * A group of MASConstraint objects
+ */
+@interface MASCompositeConstraint : MASConstraint
+
+/**
+ * Creates a composite with a predefined array of children
+ *
+ * @param children child MASConstraints
+ *
+ * @return a composite constraint
+ */
+- (id)initWithChildren:(NSArray *)children;
+
+@end
--- /dev/null
+//
+// MASCompositeConstraint.m
+// Masonry
+//
+// Created by Jonas Budelmann on 21/07/13.
+// Copyright (c) 2013 cloudling. All rights reserved.
+//
+
+#import "MASCompositeConstraint.h"
+#import "MASConstraint+Private.h"
+
+@interface MASCompositeConstraint () <MASConstraintDelegate>
+
+@property (nonatomic, strong) id mas_key;
+@property (nonatomic, strong) NSMutableArray *childConstraints;
+
+@end
+
+@implementation MASCompositeConstraint
+
+- (id)initWithChildren:(NSArray *)children {
+ self = [super init];
+ if (!self) return nil;
+
+ _childConstraints = [children mutableCopy];
+ for (MASConstraint *constraint in _childConstraints) {
+ constraint.delegate = self;
+ }
+
+ return self;
+}
+
+#pragma mark - MASConstraintDelegate
+
+- (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint {
+ NSUInteger index = [self.childConstraints indexOfObject:constraint];
+ NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint);
+ [self.childConstraints replaceObjectAtIndex:index withObject:replacementConstraint];
+}
+
+- (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute {
+ id<MASConstraintDelegate> strongDelegate = self.delegate;
+ MASConstraint *newConstraint = [strongDelegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute];
+ newConstraint.delegate = self;
+ [self.childConstraints addObject:newConstraint];
+ return newConstraint;
+}
+
+#pragma mark - NSLayoutConstraint multiplier proxies
+
+- (MASConstraint * (^)(CGFloat))multipliedBy {
+ return ^id(CGFloat multiplier) {
+ for (MASConstraint *constraint in self.childConstraints) {
+ constraint.multipliedBy(multiplier);
+ }
+ return self;
+ };
+}
+
+- (MASConstraint * (^)(CGFloat))dividedBy {
+ return ^id(CGFloat divider) {
+ for (MASConstraint *constraint in self.childConstraints) {
+ constraint.dividedBy(divider);
+ }
+ return self;
+ };
+}
+
+#pragma mark - MASLayoutPriority proxy
+
+- (MASConstraint * (^)(MASLayoutPriority))priority {
+ return ^id(MASLayoutPriority priority) {
+ for (MASConstraint *constraint in self.childConstraints) {
+ constraint.priority(priority);
+ }
+ return self;
+ };
+}
+
+#pragma mark - NSLayoutRelation proxy
+
+- (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation {
+ return ^id(id attr, NSLayoutRelation relation) {
+ for (MASConstraint *constraint in self.childConstraints.copy) {
+ constraint.equalToWithRelation(attr, relation);
+ }
+ return self;
+ };
+}
+
+#pragma mark - attribute chaining
+
+- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute {
+ [self constraint:self addConstraintWithLayoutAttribute:layoutAttribute];
+ return self;
+}
+
+#pragma mark - Animator proxy
+
+#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV)
+
+- (MASConstraint *)animator {
+ for (MASConstraint *constraint in self.childConstraints) {
+ [constraint animator];
+ }
+ return self;
+}
+
+#endif
+
+#pragma mark - debug helpers
+
+- (MASConstraint * (^)(id))key {
+ return ^id(id key) {
+ self.mas_key = key;
+ int i = 0;
+ for (MASConstraint *constraint in self.childConstraints) {
+ constraint.key([NSString stringWithFormat:@"%@[%d]", key, i++]);
+ }
+ return self;
+ };
+}
+
+#pragma mark - NSLayoutConstraint constant setters
+
+- (void)setInsets:(MASEdgeInsets)insets {
+ for (MASConstraint *constraint in self.childConstraints) {
+ constraint.insets = insets;
+ }
+}
+
+- (void)setInset:(CGFloat)inset {
+ for (MASConstraint *constraint in self.childConstraints) {
+ constraint.inset = inset;
+ }
+}
+
+- (void)setOffset:(CGFloat)offset {
+ for (MASConstraint *constraint in self.childConstraints) {
+ constraint.offset = offset;
+ }
+}
+
+- (void)setSizeOffset:(CGSize)sizeOffset {
+ for (MASConstraint *constraint in self.childConstraints) {
+ constraint.sizeOffset = sizeOffset;
+ }
+}
+
+- (void)setCenterOffset:(CGPoint)centerOffset {
+ for (MASConstraint *constraint in self.childConstraints) {
+ constraint.centerOffset = centerOffset;
+ }
+}
+
+#pragma mark - MASConstraint
+
+- (void)activate {
+ for (MASConstraint *constraint in self.childConstraints) {
+ [constraint activate];
+ }
+}
+
+- (void)deactivate {
+ for (MASConstraint *constraint in self.childConstraints) {
+ [constraint deactivate];
+ }
+}
+
+- (void)install {
+ for (MASConstraint *constraint in self.childConstraints) {
+ constraint.updateExisting = self.updateExisting;
+ [constraint install];
+ }
+}
+
+- (void)uninstall {
+ for (MASConstraint *constraint in self.childConstraints) {
+ [constraint uninstall];
+ }
+}
+
+@end
--- /dev/null
+//
+// MASConstraint+Private.h
+// Masonry
+//
+// Created by Nick Tymchenko on 29/04/14.
+// Copyright (c) 2014 cloudling. All rights reserved.
+//
+
+#import "MASConstraint.h"
+
+@protocol MASConstraintDelegate;
+
+
+@interface MASConstraint ()
+
+/**
+ * Whether or not to check for an existing constraint instead of adding constraint
+ */
+@property (nonatomic, assign) BOOL updateExisting;
+
+/**
+ * Usually MASConstraintMaker but could be a parent MASConstraint
+ */
+@property (nonatomic, weak) id<MASConstraintDelegate> delegate;
+
+/**
+ * Based on a provided value type, is equal to calling:
+ * NSNumber - setOffset:
+ * NSValue with CGPoint - setPointOffset:
+ * NSValue with CGSize - setSizeOffset:
+ * NSValue with MASEdgeInsets - setInsets:
+ */
+- (void)setLayoutConstantWithValue:(NSValue *)value;
+
+@end
+
+
+@interface MASConstraint (Abstract)
+
+/**
+ * Sets the constraint relation to given NSLayoutRelation
+ * returns a block which accepts one of the following:
+ * MASViewAttribute, UIView, NSValue, NSArray
+ * see readme for more details.
+ */
+- (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation;
+
+/**
+ * Override to set a custom chaining behaviour
+ */
+- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute;
+
+@end
+
+
+@protocol MASConstraintDelegate <NSObject>
+
+/**
+ * Notifies the delegate when the constraint needs to be replaced with another constraint. For example
+ * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks
+ */
+- (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint;
+
+- (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute;
+
+@end
--- /dev/null
+//
+// MASConstraint.h
+// Masonry
+//
+// Created by Jonas Budelmann on 22/07/13.
+// Copyright (c) 2013 cloudling. All rights reserved.
+//
+
+#import "MASUtilities.h"
+
+/**
+ * Enables Constraints to be created with chainable syntax
+ * Constraint can represent single NSLayoutConstraint (MASViewConstraint)
+ * or a group of NSLayoutConstraints (MASComposisteConstraint)
+ */
+@interface MASConstraint : NSObject
+
+// Chaining Support
+
+/**
+ * Modifies the NSLayoutConstraint constant,
+ * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
+ * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight
+ */
+- (MASConstraint * (^)(MASEdgeInsets insets))insets;
+
+/**
+ * Modifies the NSLayoutConstraint constant,
+ * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
+ * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight
+ */
+- (MASConstraint * (^)(CGFloat inset))inset;
+
+/**
+ * Modifies the NSLayoutConstraint constant,
+ * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
+ * NSLayoutAttributeWidth, NSLayoutAttributeHeight
+ */
+- (MASConstraint * (^)(CGSize offset))sizeOffset;
+
+/**
+ * Modifies the NSLayoutConstraint constant,
+ * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
+ * NSLayoutAttributeCenterX, NSLayoutAttributeCenterY
+ */
+- (MASConstraint * (^)(CGPoint offset))centerOffset;
+
+/**
+ * Modifies the NSLayoutConstraint constant
+ */
+- (MASConstraint * (^)(CGFloat offset))offset;
+
+/**
+ * Modifies the NSLayoutConstraint constant based on a value type
+ */
+- (MASConstraint * (^)(NSValue *value))valueOffset;
+
+/**
+ * Sets the NSLayoutConstraint multiplier property
+ */
+- (MASConstraint * (^)(CGFloat multiplier))multipliedBy;
+
+/**
+ * Sets the NSLayoutConstraint multiplier to 1.0/dividedBy
+ */
+- (MASConstraint * (^)(CGFloat divider))dividedBy;
+
+/**
+ * Sets the NSLayoutConstraint priority to a float or MASLayoutPriority
+ */
+- (MASConstraint * (^)(MASLayoutPriority priority))priority;
+
+/**
+ * Sets the NSLayoutConstraint priority to MASLayoutPriorityLow
+ */
+- (MASConstraint * (^)(void))priorityLow;
+
+/**
+ * Sets the NSLayoutConstraint priority to MASLayoutPriorityMedium
+ */
+- (MASConstraint * (^)(void))priorityMedium;
+
+/**
+ * Sets the NSLayoutConstraint priority to MASLayoutPriorityHigh
+ */
+- (MASConstraint * (^)(void))priorityHigh;
+
+/**
+ * Sets the constraint relation to NSLayoutRelationEqual
+ * returns a block which accepts one of the following:
+ * MASViewAttribute, UIView, NSValue, NSArray
+ * see readme for more details.
+ */
+- (MASConstraint * (^)(id attr))equalTo;
+
+/**
+ * Sets the constraint relation to NSLayoutRelationGreaterThanOrEqual
+ * returns a block which accepts one of the following:
+ * MASViewAttribute, UIView, NSValue, NSArray
+ * see readme for more details.
+ */
+- (MASConstraint * (^)(id attr))greaterThanOrEqualTo;
+
+/**
+ * Sets the constraint relation to NSLayoutRelationLessThanOrEqual
+ * returns a block which accepts one of the following:
+ * MASViewAttribute, UIView, NSValue, NSArray
+ * see readme for more details.
+ */
+- (MASConstraint * (^)(id attr))lessThanOrEqualTo;
+
+/**
+ * Optional semantic property which has no effect but improves the readability of constraint
+ */
+- (MASConstraint *)with;
+
+/**
+ * Optional semantic property which has no effect but improves the readability of constraint
+ */
+- (MASConstraint *)and;
+
+/**
+ * Creates a new MASCompositeConstraint with the called attribute and reciever
+ */
+- (MASConstraint *)left;
+- (MASConstraint *)top;
+- (MASConstraint *)right;
+- (MASConstraint *)bottom;
+- (MASConstraint *)leading;
+- (MASConstraint *)trailing;
+- (MASConstraint *)width;
+- (MASConstraint *)height;
+- (MASConstraint *)centerX;
+- (MASConstraint *)centerY;
+- (MASConstraint *)baseline;
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+
+- (MASConstraint *)firstBaseline;
+- (MASConstraint *)lastBaseline;
+
+#endif
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
+
+- (MASConstraint *)leftMargin;
+- (MASConstraint *)rightMargin;
+- (MASConstraint *)topMargin;
+- (MASConstraint *)bottomMargin;
+- (MASConstraint *)leadingMargin;
+- (MASConstraint *)trailingMargin;
+- (MASConstraint *)centerXWithinMargins;
+- (MASConstraint *)centerYWithinMargins;
+
+#endif
+
+
+/**
+ * Sets the constraint debug name
+ */
+- (MASConstraint * (^)(id key))key;
+
+// NSLayoutConstraint constant Setters
+// for use outside of mas_updateConstraints/mas_makeConstraints blocks
+
+/**
+ * Modifies the NSLayoutConstraint constant,
+ * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
+ * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight
+ */
+- (void)setInsets:(MASEdgeInsets)insets;
+
+/**
+ * Modifies the NSLayoutConstraint constant,
+ * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
+ * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight
+ */
+- (void)setInset:(CGFloat)inset;
+
+/**
+ * Modifies the NSLayoutConstraint constant,
+ * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
+ * NSLayoutAttributeWidth, NSLayoutAttributeHeight
+ */
+- (void)setSizeOffset:(CGSize)sizeOffset;
+
+/**
+ * Modifies the NSLayoutConstraint constant,
+ * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
+ * NSLayoutAttributeCenterX, NSLayoutAttributeCenterY
+ */
+- (void)setCenterOffset:(CGPoint)centerOffset;
+
+/**
+ * Modifies the NSLayoutConstraint constant
+ */
+- (void)setOffset:(CGFloat)offset;
+
+
+// NSLayoutConstraint Installation support
+
+#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV)
+/**
+ * Whether or not to go through the animator proxy when modifying the constraint
+ */
+@property (nonatomic, copy, readonly) MASConstraint *animator;
+#endif
+
+/**
+ * Activates an NSLayoutConstraint if it's supported by an OS.
+ * Invokes install otherwise.
+ */
+- (void)activate;
+
+/**
+ * Deactivates previously installed/activated NSLayoutConstraint.
+ */
+- (void)deactivate;
+
+/**
+ * Creates a NSLayoutConstraint and adds it to the appropriate view.
+ */
+- (void)install;
+
+/**
+ * Removes previously installed NSLayoutConstraint
+ */
+- (void)uninstall;
+
+@end
+
+
+/**
+ * Convenience auto-boxing macros for MASConstraint methods.
+ *
+ * Defining MAS_SHORTHAND_GLOBALS will turn on auto-boxing for default syntax.
+ * A potential drawback of this is that the unprefixed macros will appear in global scope.
+ */
+#define mas_equalTo(...) equalTo(MASBoxValue((__VA_ARGS__)))
+#define mas_greaterThanOrEqualTo(...) greaterThanOrEqualTo(MASBoxValue((__VA_ARGS__)))
+#define mas_lessThanOrEqualTo(...) lessThanOrEqualTo(MASBoxValue((__VA_ARGS__)))
+
+#define mas_offset(...) valueOffset(MASBoxValue((__VA_ARGS__)))
+
+
+#ifdef MAS_SHORTHAND_GLOBALS
+
+#define equalTo(...) mas_equalTo(__VA_ARGS__)
+#define greaterThanOrEqualTo(...) mas_greaterThanOrEqualTo(__VA_ARGS__)
+#define lessThanOrEqualTo(...) mas_lessThanOrEqualTo(__VA_ARGS__)
+
+#define offset(...) mas_offset(__VA_ARGS__)
+
+#endif
+
+
+@interface MASConstraint (AutoboxingSupport)
+
+/**
+ * Aliases to corresponding relation methods (for shorthand macros)
+ * Also needed to aid autocompletion
+ */
+- (MASConstraint * (^)(id attr))mas_equalTo;
+- (MASConstraint * (^)(id attr))mas_greaterThanOrEqualTo;
+- (MASConstraint * (^)(id attr))mas_lessThanOrEqualTo;
+
+/**
+ * A dummy method to aid autocompletion
+ */
+- (MASConstraint * (^)(id offset))mas_offset;
+
+@end
--- /dev/null
+//
+// MASConstraint.m
+// Masonry
+//
+// Created by Nick Tymchenko on 1/20/14.
+//
+
+#import "MASConstraint.h"
+#import "MASConstraint+Private.h"
+
+#define MASMethodNotImplemented() \
+ @throw [NSException exceptionWithName:NSInternalInconsistencyException \
+ reason:[NSString stringWithFormat:@"You must override %@ in a subclass.", NSStringFromSelector(_cmd)] \
+ userInfo:nil]
+
+@implementation MASConstraint
+
+#pragma mark - Init
+
+- (id)init {
+ NSAssert(![self isMemberOfClass:[MASConstraint class]], @"MASConstraint is an abstract class, you should not instantiate it directly.");
+ return [super init];
+}
+
+#pragma mark - NSLayoutRelation proxies
+
+- (MASConstraint * (^)(id))equalTo {
+ return ^id(id attribute) {
+ return self.equalToWithRelation(attribute, NSLayoutRelationEqual);
+ };
+}
+
+- (MASConstraint * (^)(id))mas_equalTo {
+ return ^id(id attribute) {
+ return self.equalToWithRelation(attribute, NSLayoutRelationEqual);
+ };
+}
+
+- (MASConstraint * (^)(id))greaterThanOrEqualTo {
+ return ^id(id attribute) {
+ return self.equalToWithRelation(attribute, NSLayoutRelationGreaterThanOrEqual);
+ };
+}
+
+- (MASConstraint * (^)(id))mas_greaterThanOrEqualTo {
+ return ^id(id attribute) {
+ return self.equalToWithRelation(attribute, NSLayoutRelationGreaterThanOrEqual);
+ };
+}
+
+- (MASConstraint * (^)(id))lessThanOrEqualTo {
+ return ^id(id attribute) {
+ return self.equalToWithRelation(attribute, NSLayoutRelationLessThanOrEqual);
+ };
+}
+
+- (MASConstraint * (^)(id))mas_lessThanOrEqualTo {
+ return ^id(id attribute) {
+ return self.equalToWithRelation(attribute, NSLayoutRelationLessThanOrEqual);
+ };
+}
+
+#pragma mark - MASLayoutPriority proxies
+
+- (MASConstraint * (^)(void))priorityLow {
+ return ^id{
+ self.priority(MASLayoutPriorityDefaultLow);
+ return self;
+ };
+}
+
+- (MASConstraint * (^)(void))priorityMedium {
+ return ^id{
+ self.priority(MASLayoutPriorityDefaultMedium);
+ return self;
+ };
+}
+
+- (MASConstraint * (^)(void))priorityHigh {
+ return ^id{
+ self.priority(MASLayoutPriorityDefaultHigh);
+ return self;
+ };
+}
+
+#pragma mark - NSLayoutConstraint constant proxies
+
+- (MASConstraint * (^)(MASEdgeInsets))insets {
+ return ^id(MASEdgeInsets insets){
+ self.insets = insets;
+ return self;
+ };
+}
+
+- (MASConstraint * (^)(CGFloat))inset {
+ return ^id(CGFloat inset){
+ self.inset = inset;
+ return self;
+ };
+}
+
+- (MASConstraint * (^)(CGSize))sizeOffset {
+ return ^id(CGSize offset) {
+ self.sizeOffset = offset;
+ return self;
+ };
+}
+
+- (MASConstraint * (^)(CGPoint))centerOffset {
+ return ^id(CGPoint offset) {
+ self.centerOffset = offset;
+ return self;
+ };
+}
+
+- (MASConstraint * (^)(CGFloat))offset {
+ return ^id(CGFloat offset){
+ self.offset = offset;
+ return self;
+ };
+}
+
+- (MASConstraint * (^)(NSValue *value))valueOffset {
+ return ^id(NSValue *offset) {
+ NSAssert([offset isKindOfClass:NSValue.class], @"expected an NSValue offset, got: %@", offset);
+ [self setLayoutConstantWithValue:offset];
+ return self;
+ };
+}
+
+- (MASConstraint * (^)(id offset))mas_offset {
+ // Will never be called due to macro
+ return nil;
+}
+
+#pragma mark - NSLayoutConstraint constant setter
+
+- (void)setLayoutConstantWithValue:(NSValue *)value {
+ if ([value isKindOfClass:NSNumber.class]) {
+ self.offset = [(NSNumber *)value doubleValue];
+ } else if (strcmp(value.objCType, @encode(CGPoint)) == 0) {
+ CGPoint point;
+ [value getValue:&point];
+ self.centerOffset = point;
+ } else if (strcmp(value.objCType, @encode(CGSize)) == 0) {
+ CGSize size;
+ [value getValue:&size];
+ self.sizeOffset = size;
+ } else if (strcmp(value.objCType, @encode(MASEdgeInsets)) == 0) {
+ MASEdgeInsets insets;
+ [value getValue:&insets];
+ self.insets = insets;
+ } else {
+ NSAssert(NO, @"attempting to set layout constant with unsupported value: %@", value);
+ }
+}
+
+#pragma mark - Semantic properties
+
+- (MASConstraint *)with {
+ return self;
+}
+
+- (MASConstraint *)and {
+ return self;
+}
+
+#pragma mark - Chaining
+
+- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute __unused)layoutAttribute {
+ MASMethodNotImplemented();
+}
+
+- (MASConstraint *)left {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeft];
+}
+
+- (MASConstraint *)top {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTop];
+}
+
+- (MASConstraint *)right {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRight];
+}
+
+- (MASConstraint *)bottom {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottom];
+}
+
+- (MASConstraint *)leading {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeading];
+}
+
+- (MASConstraint *)trailing {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailing];
+}
+
+- (MASConstraint *)width {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeWidth];
+}
+
+- (MASConstraint *)height {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeHeight];
+}
+
+- (MASConstraint *)centerX {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterX];
+}
+
+- (MASConstraint *)centerY {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterY];
+}
+
+- (MASConstraint *)baseline {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBaseline];
+}
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+
+- (MASConstraint *)firstBaseline {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeFirstBaseline];
+}
+- (MASConstraint *)lastBaseline {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLastBaseline];
+}
+
+#endif
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
+
+- (MASConstraint *)leftMargin {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin];
+}
+
+- (MASConstraint *)rightMargin {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRightMargin];
+}
+
+- (MASConstraint *)topMargin {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTopMargin];
+}
+
+- (MASConstraint *)bottomMargin {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottomMargin];
+}
+
+- (MASConstraint *)leadingMargin {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeadingMargin];
+}
+
+- (MASConstraint *)trailingMargin {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailingMargin];
+}
+
+- (MASConstraint *)centerXWithinMargins {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterXWithinMargins];
+}
+
+- (MASConstraint *)centerYWithinMargins {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterYWithinMargins];
+}
+
+#endif
+
+#pragma mark - Abstract
+
+- (MASConstraint * (^)(CGFloat multiplier))multipliedBy { MASMethodNotImplemented(); }
+
+- (MASConstraint * (^)(CGFloat divider))dividedBy { MASMethodNotImplemented(); }
+
+- (MASConstraint * (^)(MASLayoutPriority priority))priority { MASMethodNotImplemented(); }
+
+- (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { MASMethodNotImplemented(); }
+
+- (MASConstraint * (^)(id key))key { MASMethodNotImplemented(); }
+
+- (void)setInsets:(MASEdgeInsets __unused)insets { MASMethodNotImplemented(); }
+
+- (void)setInset:(CGFloat __unused)inset { MASMethodNotImplemented(); }
+
+- (void)setSizeOffset:(CGSize __unused)sizeOffset { MASMethodNotImplemented(); }
+
+- (void)setCenterOffset:(CGPoint __unused)centerOffset { MASMethodNotImplemented(); }
+
+- (void)setOffset:(CGFloat __unused)offset { MASMethodNotImplemented(); }
+
+#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV)
+
+- (MASConstraint *)animator { MASMethodNotImplemented(); }
+
+#endif
+
+- (void)activate { MASMethodNotImplemented(); }
+
+- (void)deactivate { MASMethodNotImplemented(); }
+
+- (void)install { MASMethodNotImplemented(); }
+
+- (void)uninstall { MASMethodNotImplemented(); }
+
+@end
--- /dev/null
+//
+// MASConstraintMaker.h
+// Masonry
+//
+// Created by Jonas Budelmann on 20/07/13.
+// Copyright (c) 2013 cloudling. All rights reserved.
+//
+
+#import "MASConstraint.h"
+#import "MASUtilities.h"
+
+typedef NS_OPTIONS(NSInteger, MASAttribute) {
+ MASAttributeLeft = 1 << NSLayoutAttributeLeft,
+ MASAttributeRight = 1 << NSLayoutAttributeRight,
+ MASAttributeTop = 1 << NSLayoutAttributeTop,
+ MASAttributeBottom = 1 << NSLayoutAttributeBottom,
+ MASAttributeLeading = 1 << NSLayoutAttributeLeading,
+ MASAttributeTrailing = 1 << NSLayoutAttributeTrailing,
+ MASAttributeWidth = 1 << NSLayoutAttributeWidth,
+ MASAttributeHeight = 1 << NSLayoutAttributeHeight,
+ MASAttributeCenterX = 1 << NSLayoutAttributeCenterX,
+ MASAttributeCenterY = 1 << NSLayoutAttributeCenterY,
+ MASAttributeBaseline = 1 << NSLayoutAttributeBaseline,
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+
+ MASAttributeFirstBaseline = 1 << NSLayoutAttributeFirstBaseline,
+ MASAttributeLastBaseline = 1 << NSLayoutAttributeLastBaseline,
+
+#endif
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
+
+ MASAttributeLeftMargin = 1 << NSLayoutAttributeLeftMargin,
+ MASAttributeRightMargin = 1 << NSLayoutAttributeRightMargin,
+ MASAttributeTopMargin = 1 << NSLayoutAttributeTopMargin,
+ MASAttributeBottomMargin = 1 << NSLayoutAttributeBottomMargin,
+ MASAttributeLeadingMargin = 1 << NSLayoutAttributeLeadingMargin,
+ MASAttributeTrailingMargin = 1 << NSLayoutAttributeTrailingMargin,
+ MASAttributeCenterXWithinMargins = 1 << NSLayoutAttributeCenterXWithinMargins,
+ MASAttributeCenterYWithinMargins = 1 << NSLayoutAttributeCenterYWithinMargins,
+
+#endif
+
+};
+
+/**
+ * Provides factory methods for creating MASConstraints.
+ * Constraints are collected until they are ready to be installed
+ *
+ */
+@interface MASConstraintMaker : NSObject
+
+/**
+ * The following properties return a new MASViewConstraint
+ * with the first item set to the makers associated view and the appropriate MASViewAttribute
+ */
+@property (nonatomic, strong, readonly) MASConstraint *left;
+@property (nonatomic, strong, readonly) MASConstraint *top;
+@property (nonatomic, strong, readonly) MASConstraint *right;
+@property (nonatomic, strong, readonly) MASConstraint *bottom;
+@property (nonatomic, strong, readonly) MASConstraint *leading;
+@property (nonatomic, strong, readonly) MASConstraint *trailing;
+@property (nonatomic, strong, readonly) MASConstraint *width;
+@property (nonatomic, strong, readonly) MASConstraint *height;
+@property (nonatomic, strong, readonly) MASConstraint *centerX;
+@property (nonatomic, strong, readonly) MASConstraint *centerY;
+@property (nonatomic, strong, readonly) MASConstraint *baseline;
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+
+@property (nonatomic, strong, readonly) MASConstraint *firstBaseline;
+@property (nonatomic, strong, readonly) MASConstraint *lastBaseline;
+
+#endif
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
+
+@property (nonatomic, strong, readonly) MASConstraint *leftMargin;
+@property (nonatomic, strong, readonly) MASConstraint *rightMargin;
+@property (nonatomic, strong, readonly) MASConstraint *topMargin;
+@property (nonatomic, strong, readonly) MASConstraint *bottomMargin;
+@property (nonatomic, strong, readonly) MASConstraint *leadingMargin;
+@property (nonatomic, strong, readonly) MASConstraint *trailingMargin;
+@property (nonatomic, strong, readonly) MASConstraint *centerXWithinMargins;
+@property (nonatomic, strong, readonly) MASConstraint *centerYWithinMargins;
+
+#endif
+
+/**
+ * Returns a block which creates a new MASCompositeConstraint with the first item set
+ * to the makers associated view and children corresponding to the set bits in the
+ * MASAttribute parameter. Combine multiple attributes via binary-or.
+ */
+@property (nonatomic, strong, readonly) MASConstraint *(^attributes)(MASAttribute attrs);
+
+/**
+ * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeEdges
+ * which generates the appropriate MASViewConstraint children (top, left, bottom, right)
+ * with the first item set to the makers associated view
+ */
+@property (nonatomic, strong, readonly) MASConstraint *edges;
+
+/**
+ * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeSize
+ * which generates the appropriate MASViewConstraint children (width, height)
+ * with the first item set to the makers associated view
+ */
+@property (nonatomic, strong, readonly) MASConstraint *size;
+
+/**
+ * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeCenter
+ * which generates the appropriate MASViewConstraint children (centerX, centerY)
+ * with the first item set to the makers associated view
+ */
+@property (nonatomic, strong, readonly) MASConstraint *center;
+
+/**
+ * Whether or not to check for an existing constraint instead of adding constraint
+ */
+@property (nonatomic, assign) BOOL updateExisting;
+
+/**
+ * Whether or not to remove existing constraints prior to installing
+ */
+@property (nonatomic, assign) BOOL removeExisting;
+
+/**
+ * initialises the maker with a default view
+ *
+ * @param view any MASConstraint are created with this view as the first item
+ *
+ * @return a new MASConstraintMaker
+ */
+- (id)initWithView:(MAS_VIEW *)view;
+
+/**
+ * Calls install method on any MASConstraints which have been created by this maker
+ *
+ * @return an array of all the installed MASConstraints
+ */
+- (NSArray *)install;
+
+- (MASConstraint * (^)(dispatch_block_t))group;
+
+@end
--- /dev/null
+//
+// MASConstraintMaker.m
+// Masonry
+//
+// Created by Jonas Budelmann on 20/07/13.
+// Copyright (c) 2013 cloudling. All rights reserved.
+//
+
+#import "MASConstraintMaker.h"
+#import "MASViewConstraint.h"
+#import "MASCompositeConstraint.h"
+#import "MASConstraint+Private.h"
+#import "MASViewAttribute.h"
+#import "View+MASAdditions.h"
+
+@interface MASConstraintMaker () <MASConstraintDelegate>
+
+@property (nonatomic, weak) MAS_VIEW *view;
+@property (nonatomic, strong) NSMutableArray *constraints;
+
+@end
+
+@implementation MASConstraintMaker
+
+- (id)initWithView:(MAS_VIEW *)view {
+ self = [super init];
+ if (!self) return nil;
+
+ self.view = view;
+ self.constraints = NSMutableArray.new;
+
+ return self;
+}
+
+- (NSArray *)install {
+ if (self.removeExisting) {
+ NSArray *installedConstraints = [MASViewConstraint installedConstraintsForView:self.view];
+ for (MASConstraint *constraint in installedConstraints) {
+ [constraint uninstall];
+ }
+ }
+ NSArray *constraints = self.constraints.copy;
+ for (MASConstraint *constraint in constraints) {
+ constraint.updateExisting = self.updateExisting;
+ [constraint install];
+ }
+ [self.constraints removeAllObjects];
+ return constraints;
+}
+
+#pragma mark - MASConstraintDelegate
+
+- (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint {
+ NSUInteger index = [self.constraints indexOfObject:constraint];
+ NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint);
+ [self.constraints replaceObjectAtIndex:index withObject:replacementConstraint];
+}
+
+- (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute {
+ MASViewAttribute *viewAttribute = [[MASViewAttribute alloc] initWithView:self.view layoutAttribute:layoutAttribute];
+ MASViewConstraint *newConstraint = [[MASViewConstraint alloc] initWithFirstViewAttribute:viewAttribute];
+ if ([constraint isKindOfClass:MASViewConstraint.class]) {
+ //replace with composite constraint
+ NSArray *children = @[constraint, newConstraint];
+ MASCompositeConstraint *compositeConstraint = [[MASCompositeConstraint alloc] initWithChildren:children];
+ compositeConstraint.delegate = self;
+ [self constraint:constraint shouldBeReplacedWithConstraint:compositeConstraint];
+ return compositeConstraint;
+ }
+ if (!constraint) {
+ newConstraint.delegate = self;
+ [self.constraints addObject:newConstraint];
+ }
+ return newConstraint;
+}
+
+- (MASConstraint *)addConstraintWithAttributes:(MASAttribute)attrs {
+ __unused MASAttribute anyAttribute = (MASAttributeLeft | MASAttributeRight | MASAttributeTop | MASAttributeBottom | MASAttributeLeading
+ | MASAttributeTrailing | MASAttributeWidth | MASAttributeHeight | MASAttributeCenterX
+ | MASAttributeCenterY | MASAttributeBaseline
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+ | MASAttributeFirstBaseline | MASAttributeLastBaseline
+#endif
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
+ | MASAttributeLeftMargin | MASAttributeRightMargin | MASAttributeTopMargin | MASAttributeBottomMargin
+ | MASAttributeLeadingMargin | MASAttributeTrailingMargin | MASAttributeCenterXWithinMargins
+ | MASAttributeCenterYWithinMargins
+#endif
+ );
+
+ NSAssert((attrs & anyAttribute) != 0, @"You didn't pass any attribute to make.attributes(...)");
+
+ NSMutableArray *attributes = [NSMutableArray array];
+
+ if (attrs & MASAttributeLeft) [attributes addObject:self.view.mas_left];
+ if (attrs & MASAttributeRight) [attributes addObject:self.view.mas_right];
+ if (attrs & MASAttributeTop) [attributes addObject:self.view.mas_top];
+ if (attrs & MASAttributeBottom) [attributes addObject:self.view.mas_bottom];
+ if (attrs & MASAttributeLeading) [attributes addObject:self.view.mas_leading];
+ if (attrs & MASAttributeTrailing) [attributes addObject:self.view.mas_trailing];
+ if (attrs & MASAttributeWidth) [attributes addObject:self.view.mas_width];
+ if (attrs & MASAttributeHeight) [attributes addObject:self.view.mas_height];
+ if (attrs & MASAttributeCenterX) [attributes addObject:self.view.mas_centerX];
+ if (attrs & MASAttributeCenterY) [attributes addObject:self.view.mas_centerY];
+ if (attrs & MASAttributeBaseline) [attributes addObject:self.view.mas_baseline];
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+
+ if (attrs & MASAttributeFirstBaseline) [attributes addObject:self.view.mas_firstBaseline];
+ if (attrs & MASAttributeLastBaseline) [attributes addObject:self.view.mas_lastBaseline];
+
+#endif
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
+
+ if (attrs & MASAttributeLeftMargin) [attributes addObject:self.view.mas_leftMargin];
+ if (attrs & MASAttributeRightMargin) [attributes addObject:self.view.mas_rightMargin];
+ if (attrs & MASAttributeTopMargin) [attributes addObject:self.view.mas_topMargin];
+ if (attrs & MASAttributeBottomMargin) [attributes addObject:self.view.mas_bottomMargin];
+ if (attrs & MASAttributeLeadingMargin) [attributes addObject:self.view.mas_leadingMargin];
+ if (attrs & MASAttributeTrailingMargin) [attributes addObject:self.view.mas_trailingMargin];
+ if (attrs & MASAttributeCenterXWithinMargins) [attributes addObject:self.view.mas_centerXWithinMargins];
+ if (attrs & MASAttributeCenterYWithinMargins) [attributes addObject:self.view.mas_centerYWithinMargins];
+
+#endif
+
+ NSMutableArray *children = [NSMutableArray arrayWithCapacity:attributes.count];
+
+ for (MASViewAttribute *a in attributes) {
+ [children addObject:[[MASViewConstraint alloc] initWithFirstViewAttribute:a]];
+ }
+
+ MASCompositeConstraint *constraint = [[MASCompositeConstraint alloc] initWithChildren:children];
+ constraint.delegate = self;
+ [self.constraints addObject:constraint];
+ return constraint;
+}
+
+#pragma mark - standard Attributes
+
+- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute {
+ return [self constraint:nil addConstraintWithLayoutAttribute:layoutAttribute];
+}
+
+- (MASConstraint *)left {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeft];
+}
+
+- (MASConstraint *)top {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTop];
+}
+
+- (MASConstraint *)right {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRight];
+}
+
+- (MASConstraint *)bottom {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottom];
+}
+
+- (MASConstraint *)leading {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeading];
+}
+
+- (MASConstraint *)trailing {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailing];
+}
+
+- (MASConstraint *)width {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeWidth];
+}
+
+- (MASConstraint *)height {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeHeight];
+}
+
+- (MASConstraint *)centerX {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterX];
+}
+
+- (MASConstraint *)centerY {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterY];
+}
+
+- (MASConstraint *)baseline {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBaseline];
+}
+
+- (MASConstraint *(^)(MASAttribute))attributes {
+ return ^(MASAttribute attrs){
+ return [self addConstraintWithAttributes:attrs];
+ };
+}
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+
+- (MASConstraint *)firstBaseline {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeFirstBaseline];
+}
+
+- (MASConstraint *)lastBaseline {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLastBaseline];
+}
+
+#endif
+
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
+
+- (MASConstraint *)leftMargin {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin];
+}
+
+- (MASConstraint *)rightMargin {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRightMargin];
+}
+
+- (MASConstraint *)topMargin {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTopMargin];
+}
+
+- (MASConstraint *)bottomMargin {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottomMargin];
+}
+
+- (MASConstraint *)leadingMargin {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeadingMargin];
+}
+
+- (MASConstraint *)trailingMargin {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailingMargin];
+}
+
+- (MASConstraint *)centerXWithinMargins {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterXWithinMargins];
+}
+
+- (MASConstraint *)centerYWithinMargins {
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterYWithinMargins];
+}
+
+#endif
+
+
+#pragma mark - composite Attributes
+
+- (MASConstraint *)edges {
+ return [self addConstraintWithAttributes:MASAttributeTop | MASAttributeLeft | MASAttributeRight | MASAttributeBottom];
+}
+
+- (MASConstraint *)size {
+ return [self addConstraintWithAttributes:MASAttributeWidth | MASAttributeHeight];
+}
+
+- (MASConstraint *)center {
+ return [self addConstraintWithAttributes:MASAttributeCenterX | MASAttributeCenterY];
+}
+
+#pragma mark - grouping
+
+- (MASConstraint *(^)(dispatch_block_t group))group {
+ return ^id(dispatch_block_t group) {
+ NSInteger previousCount = self.constraints.count;
+ group();
+
+ NSArray *children = [self.constraints subarrayWithRange:NSMakeRange(previousCount, self.constraints.count - previousCount)];
+ MASCompositeConstraint *constraint = [[MASCompositeConstraint alloc] initWithChildren:children];
+ constraint.delegate = self;
+ return constraint;
+ };
+}
+
+@end
--- /dev/null
+//
+// MASLayoutConstraint.h
+// Masonry
+//
+// Created by Jonas Budelmann on 3/08/13.
+// Copyright (c) 2013 Jonas Budelmann. All rights reserved.
+//
+
+#import "MASUtilities.h"
+
+/**
+ * When you are debugging or printing the constraints attached to a view this subclass
+ * makes it easier to identify which constraints have been created via Masonry
+ */
+@interface MASLayoutConstraint : NSLayoutConstraint
+
+/**
+ * a key to associate with this constraint
+ */
+@property (nonatomic, strong) id mas_key;
+
+@end
--- /dev/null
+//
+// MASLayoutConstraint.m
+// Masonry
+//
+// Created by Jonas Budelmann on 3/08/13.
+// Copyright (c) 2013 Jonas Budelmann. All rights reserved.
+//
+
+#import "MASLayoutConstraint.h"
+
+@implementation MASLayoutConstraint
+
+@end
--- /dev/null
+//
+// MASUtilities.h
+// Masonry
+//
+// Created by Jonas Budelmann on 19/08/13.
+// Copyright (c) 2013 Jonas Budelmann. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+
+
+#if TARGET_OS_IPHONE || TARGET_OS_TV
+
+ #import <UIKit/UIKit.h>
+ #define MAS_VIEW UIView
+ #define MAS_VIEW_CONTROLLER UIViewController
+ #define MASEdgeInsets UIEdgeInsets
+
+ typedef UILayoutPriority MASLayoutPriority;
+ static const MASLayoutPriority MASLayoutPriorityRequired = UILayoutPriorityRequired;
+ static const MASLayoutPriority MASLayoutPriorityDefaultHigh = UILayoutPriorityDefaultHigh;
+ static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 500;
+ static const MASLayoutPriority MASLayoutPriorityDefaultLow = UILayoutPriorityDefaultLow;
+ static const MASLayoutPriority MASLayoutPriorityFittingSizeLevel = UILayoutPriorityFittingSizeLevel;
+
+#elif TARGET_OS_MAC
+
+ #import <AppKit/AppKit.h>
+ #define MAS_VIEW NSView
+ #define MASEdgeInsets NSEdgeInsets
+
+ typedef NSLayoutPriority MASLayoutPriority;
+ static const MASLayoutPriority MASLayoutPriorityRequired = NSLayoutPriorityRequired;
+ static const MASLayoutPriority MASLayoutPriorityDefaultHigh = NSLayoutPriorityDefaultHigh;
+ static const MASLayoutPriority MASLayoutPriorityDragThatCanResizeWindow = NSLayoutPriorityDragThatCanResizeWindow;
+ static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 501;
+ static const MASLayoutPriority MASLayoutPriorityWindowSizeStayPut = NSLayoutPriorityWindowSizeStayPut;
+ static const MASLayoutPriority MASLayoutPriorityDragThatCannotResizeWindow = NSLayoutPriorityDragThatCannotResizeWindow;
+ static const MASLayoutPriority MASLayoutPriorityDefaultLow = NSLayoutPriorityDefaultLow;
+ static const MASLayoutPriority MASLayoutPriorityFittingSizeCompression = NSLayoutPriorityFittingSizeCompression;
+
+#endif
+
+/**
+ * Allows you to attach keys to objects matching the variable names passed.
+ *
+ * view1.mas_key = @"view1", view2.mas_key = @"view2";
+ *
+ * is equivalent to:
+ *
+ * MASAttachKeys(view1, view2);
+ */
+#define MASAttachKeys(...) \
+ { \
+ NSDictionary *keyPairs = NSDictionaryOfVariableBindings(__VA_ARGS__); \
+ for (id key in keyPairs.allKeys) { \
+ id obj = keyPairs[key]; \
+ NSAssert([obj respondsToSelector:@selector(setMas_key:)], \
+ @"Cannot attach mas_key to %@", obj); \
+ [obj setMas_key:key]; \
+ } \
+ }
+
+/**
+ * Used to create object hashes
+ * Based on http://www.mikeash.com/pyblog/friday-qa-2010-06-18-implementing-equality-and-hashing.html
+ */
+#define MAS_NSUINT_BIT (CHAR_BIT * sizeof(NSUInteger))
+#define MAS_NSUINTROTATE(val, howmuch) ((((NSUInteger)val) << howmuch) | (((NSUInteger)val) >> (MAS_NSUINT_BIT - howmuch)))
+
+/**
+ * Given a scalar or struct value, wraps it in NSValue
+ * Based on EXPObjectify: https://github.com/specta/expecta
+ */
+static inline id _MASBoxValue(const char *type, ...) {
+ va_list v;
+ va_start(v, type);
+ id obj = nil;
+ if (strcmp(type, @encode(id)) == 0) {
+ id actual = va_arg(v, id);
+ obj = actual;
+ } else if (strcmp(type, @encode(CGPoint)) == 0) {
+ CGPoint actual = (CGPoint)va_arg(v, CGPoint);
+ obj = [NSValue value:&actual withObjCType:type];
+ } else if (strcmp(type, @encode(CGSize)) == 0) {
+ CGSize actual = (CGSize)va_arg(v, CGSize);
+ obj = [NSValue value:&actual withObjCType:type];
+ } else if (strcmp(type, @encode(MASEdgeInsets)) == 0) {
+ MASEdgeInsets actual = (MASEdgeInsets)va_arg(v, MASEdgeInsets);
+ obj = [NSValue value:&actual withObjCType:type];
+ } else if (strcmp(type, @encode(double)) == 0) {
+ double actual = (double)va_arg(v, double);
+ obj = [NSNumber numberWithDouble:actual];
+ } else if (strcmp(type, @encode(float)) == 0) {
+ float actual = (float)va_arg(v, double);
+ obj = [NSNumber numberWithFloat:actual];
+ } else if (strcmp(type, @encode(int)) == 0) {
+ int actual = (int)va_arg(v, int);
+ obj = [NSNumber numberWithInt:actual];
+ } else if (strcmp(type, @encode(long)) == 0) {
+ long actual = (long)va_arg(v, long);
+ obj = [NSNumber numberWithLong:actual];
+ } else if (strcmp(type, @encode(long long)) == 0) {
+ long long actual = (long long)va_arg(v, long long);
+ obj = [NSNumber numberWithLongLong:actual];
+ } else if (strcmp(type, @encode(short)) == 0) {
+ short actual = (short)va_arg(v, int);
+ obj = [NSNumber numberWithShort:actual];
+ } else if (strcmp(type, @encode(char)) == 0) {
+ char actual = (char)va_arg(v, int);
+ obj = [NSNumber numberWithChar:actual];
+ } else if (strcmp(type, @encode(bool)) == 0) {
+ bool actual = (bool)va_arg(v, int);
+ obj = [NSNumber numberWithBool:actual];
+ } else if (strcmp(type, @encode(unsigned char)) == 0) {
+ unsigned char actual = (unsigned char)va_arg(v, unsigned int);
+ obj = [NSNumber numberWithUnsignedChar:actual];
+ } else if (strcmp(type, @encode(unsigned int)) == 0) {
+ unsigned int actual = (unsigned int)va_arg(v, unsigned int);
+ obj = [NSNumber numberWithUnsignedInt:actual];
+ } else if (strcmp(type, @encode(unsigned long)) == 0) {
+ unsigned long actual = (unsigned long)va_arg(v, unsigned long);
+ obj = [NSNumber numberWithUnsignedLong:actual];
+ } else if (strcmp(type, @encode(unsigned long long)) == 0) {
+ unsigned long long actual = (unsigned long long)va_arg(v, unsigned long long);
+ obj = [NSNumber numberWithUnsignedLongLong:actual];
+ } else if (strcmp(type, @encode(unsigned short)) == 0) {
+ unsigned short actual = (unsigned short)va_arg(v, unsigned int);
+ obj = [NSNumber numberWithUnsignedShort:actual];
+ }
+ va_end(v);
+ return obj;
+}
+
+#define MASBoxValue(value) _MASBoxValue(@encode(__typeof__((value))), (value))
--- /dev/null
+//
+// MASViewAttribute.h
+// Masonry
+//
+// Created by Jonas Budelmann on 21/07/13.
+// Copyright (c) 2013 cloudling. All rights reserved.
+//
+
+#import "MASUtilities.h"
+
+/**
+ * An immutable tuple which stores the view and the related NSLayoutAttribute.
+ * Describes part of either the left or right hand side of a constraint equation
+ */
+@interface MASViewAttribute : NSObject
+
+/**
+ * The view which the reciever relates to. Can be nil if item is not a view.
+ */
+@property (nonatomic, weak, readonly) MAS_VIEW *view;
+
+/**
+ * The item which the reciever relates to.
+ */
+@property (nonatomic, weak, readonly) id item;
+
+/**
+ * The attribute which the reciever relates to
+ */
+@property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute;
+
+/**
+ * Convenience initializer.
+ */
+- (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute;
+
+/**
+ * The designated initializer.
+ */
+- (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute;
+
+/**
+ * Determine whether the layoutAttribute is a size attribute
+ *
+ * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight
+ */
+- (BOOL)isSizeAttribute;
+
+@end
--- /dev/null
+//
+// MASViewAttribute.m
+// Masonry
+//
+// Created by Jonas Budelmann on 21/07/13.
+// Copyright (c) 2013 cloudling. All rights reserved.
+//
+
+#import "MASViewAttribute.h"
+
+@implementation MASViewAttribute
+
+- (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute {
+ self = [self initWithView:view item:view layoutAttribute:layoutAttribute];
+ return self;
+}
+
+- (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute {
+ self = [super init];
+ if (!self) return nil;
+
+ _view = view;
+ _item = item;
+ _layoutAttribute = layoutAttribute;
+
+ return self;
+}
+
+- (BOOL)isSizeAttribute {
+ return self.layoutAttribute == NSLayoutAttributeWidth
+ || self.layoutAttribute == NSLayoutAttributeHeight;
+}
+
+- (BOOL)isEqual:(MASViewAttribute *)viewAttribute {
+ if ([viewAttribute isKindOfClass:self.class]) {
+ return self.view == viewAttribute.view
+ && self.layoutAttribute == viewAttribute.layoutAttribute;
+ }
+ return [super isEqual:viewAttribute];
+}
+
+- (NSUInteger)hash {
+ return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute;
+}
+
+@end
--- /dev/null
+//
+// MASViewConstraint.h
+// Masonry
+//
+// Created by Jonas Budelmann on 20/07/13.
+// Copyright (c) 2013 cloudling. All rights reserved.
+//
+
+#import "MASViewAttribute.h"
+#import "MASConstraint.h"
+#import "MASLayoutConstraint.h"
+#import "MASUtilities.h"
+
+/**
+ * A single constraint.
+ * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view
+ */
+@interface MASViewConstraint : MASConstraint <NSCopying>
+
+/**
+ * First item/view and first attribute of the NSLayoutConstraint
+ */
+@property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute;
+
+/**
+ * Second item/view and second attribute of the NSLayoutConstraint
+ */
+@property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute;
+
+/**
+ * initialises the MASViewConstraint with the first part of the equation
+ *
+ * @param firstViewAttribute view.mas_left, view.mas_width etc.
+ *
+ * @return a new view constraint
+ */
+- (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute;
+
+/**
+ * Returns all MASViewConstraints installed with this view as a first item.
+ *
+ * @param view A view to retrieve constraints for.
+ *
+ * @return An array of MASViewConstraints.
+ */
++ (NSArray *)installedConstraintsForView:(MAS_VIEW *)view;
+
+@end
--- /dev/null
+//
+// MASViewConstraint.m
+// Masonry
+//
+// Created by Jonas Budelmann on 20/07/13.
+// Copyright (c) 2013 cloudling. All rights reserved.
+//
+
+#import "MASViewConstraint.h"
+#import "MASConstraint+Private.h"
+#import "MASCompositeConstraint.h"
+#import "MASLayoutConstraint.h"
+#import "View+MASAdditions.h"
+#import <objc/runtime.h>
+
+@interface MAS_VIEW (MASConstraints)
+
+@property (nonatomic, readonly) NSMutableSet *mas_installedConstraints;
+
+@end
+
+@implementation MAS_VIEW (MASConstraints)
+
+static char kInstalledConstraintsKey;
+
+- (NSMutableSet *)mas_installedConstraints {
+ NSMutableSet *constraints = objc_getAssociatedObject(self, &kInstalledConstraintsKey);
+ if (!constraints) {
+ constraints = [NSMutableSet set];
+ objc_setAssociatedObject(self, &kInstalledConstraintsKey, constraints, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+ }
+ return constraints;
+}
+
+@end
+
+
+@interface MASViewConstraint ()
+
+@property (nonatomic, strong, readwrite) MASViewAttribute *secondViewAttribute;
+@property (nonatomic, weak) MAS_VIEW *installedView;
+@property (nonatomic, weak) MASLayoutConstraint *layoutConstraint;
+@property (nonatomic, assign) NSLayoutRelation layoutRelation;
+@property (nonatomic, assign) MASLayoutPriority layoutPriority;
+@property (nonatomic, assign) CGFloat layoutMultiplier;
+@property (nonatomic, assign) CGFloat layoutConstant;
+@property (nonatomic, assign) BOOL hasLayoutRelation;
+@property (nonatomic, strong) id mas_key;
+@property (nonatomic, assign) BOOL useAnimator;
+
+@end
+
+@implementation MASViewConstraint
+
+- (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute {
+ self = [super init];
+ if (!self) return nil;
+
+ _firstViewAttribute = firstViewAttribute;
+ self.layoutPriority = MASLayoutPriorityRequired;
+ self.layoutMultiplier = 1;
+
+ return self;
+}
+
+#pragma mark - NSCoping
+
+- (id)copyWithZone:(NSZone __unused *)zone {
+ MASViewConstraint *constraint = [[MASViewConstraint alloc] initWithFirstViewAttribute:self.firstViewAttribute];
+ constraint.layoutConstant = self.layoutConstant;
+ constraint.layoutRelation = self.layoutRelation;
+ constraint.layoutPriority = self.layoutPriority;
+ constraint.layoutMultiplier = self.layoutMultiplier;
+ constraint.delegate = self.delegate;
+ return constraint;
+}
+
+#pragma mark - Public
+
++ (NSArray *)installedConstraintsForView:(MAS_VIEW *)view {
+ return [view.mas_installedConstraints allObjects];
+}
+
+#pragma mark - Private
+
+- (void)setLayoutConstant:(CGFloat)layoutConstant {
+ _layoutConstant = layoutConstant;
+
+#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV)
+ if (self.useAnimator) {
+ [self.layoutConstraint.animator setConstant:layoutConstant];
+ } else {
+ self.layoutConstraint.constant = layoutConstant;
+ }
+#else
+ self.layoutConstraint.constant = layoutConstant;
+#endif
+}
+
+- (void)setLayoutRelation:(NSLayoutRelation)layoutRelation {
+ _layoutRelation = layoutRelation;
+ self.hasLayoutRelation = YES;
+}
+
+- (BOOL)supportsActiveProperty {
+ return [self.layoutConstraint respondsToSelector:@selector(isActive)];
+}
+
+- (BOOL)isActive {
+ BOOL active = YES;
+ if ([self supportsActiveProperty]) {
+ active = [self.layoutConstraint isActive];
+ }
+
+ return active;
+}
+
+- (BOOL)hasBeenInstalled {
+ return (self.layoutConstraint != nil) && [self isActive];
+}
+
+- (void)setSecondViewAttribute:(id)secondViewAttribute {
+ if ([secondViewAttribute isKindOfClass:NSValue.class]) {
+ [self setLayoutConstantWithValue:secondViewAttribute];
+ } else if ([secondViewAttribute isKindOfClass:MAS_VIEW.class]) {
+ _secondViewAttribute = [[MASViewAttribute alloc] initWithView:secondViewAttribute layoutAttribute:self.firstViewAttribute.layoutAttribute];
+ } else if ([secondViewAttribute isKindOfClass:MASViewAttribute.class]) {
+ _secondViewAttribute = secondViewAttribute;
+ } else {
+ NSAssert(NO, @"attempting to add unsupported attribute: %@", secondViewAttribute);
+ }
+}
+
+#pragma mark - NSLayoutConstraint multiplier proxies
+
+- (MASConstraint * (^)(CGFloat))multipliedBy {
+ return ^id(CGFloat multiplier) {
+ NSAssert(!self.hasBeenInstalled,
+ @"Cannot modify constraint multiplier after it has been installed");
+
+ self.layoutMultiplier = multiplier;
+ return self;
+ };
+}
+
+
+- (MASConstraint * (^)(CGFloat))dividedBy {
+ return ^id(CGFloat divider) {
+ NSAssert(!self.hasBeenInstalled,
+ @"Cannot modify constraint multiplier after it has been installed");
+
+ self.layoutMultiplier = 1.0/divider;
+ return self;
+ };
+}
+
+#pragma mark - MASLayoutPriority proxy
+
+- (MASConstraint * (^)(MASLayoutPriority))priority {
+ return ^id(MASLayoutPriority priority) {
+ NSAssert(!self.hasBeenInstalled,
+ @"Cannot modify constraint priority after it has been installed");
+
+ self.layoutPriority = priority;
+ return self;
+ };
+}
+
+#pragma mark - NSLayoutRelation proxy
+
+- (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation {
+ return ^id(id attribute, NSLayoutRelation relation) {
+ if ([attribute isKindOfClass:NSArray.class]) {
+ NSAssert(!self.hasLayoutRelation, @"Redefinition of constraint relation");
+ NSMutableArray *children = NSMutableArray.new;
+ for (id attr in attribute) {
+ MASViewConstraint *viewConstraint = [self copy];
+ viewConstraint.layoutRelation = relation;
+ viewConstraint.secondViewAttribute = attr;
+ [children addObject:viewConstraint];
+ }
+ MASCompositeConstraint *compositeConstraint = [[MASCompositeConstraint alloc] initWithChildren:children];
+ compositeConstraint.delegate = self.delegate;
+ [self.delegate constraint:self shouldBeReplacedWithConstraint:compositeConstraint];
+ return compositeConstraint;
+ } else {
+ NSAssert(!self.hasLayoutRelation || self.layoutRelation == relation && [attribute isKindOfClass:NSValue.class], @"Redefinition of constraint relation");
+ self.layoutRelation = relation;
+ self.secondViewAttribute = attribute;
+ return self;
+ }
+ };
+}
+
+#pragma mark - Semantic properties
+
+- (MASConstraint *)with {
+ return self;
+}
+
+- (MASConstraint *)and {
+ return self;
+}
+
+#pragma mark - attribute chaining
+
+- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute {
+ NSAssert(!self.hasLayoutRelation, @"Attributes should be chained before defining the constraint relation");
+
+ return [self.delegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute];
+}
+
+#pragma mark - Animator proxy
+
+#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV)
+
+- (MASConstraint *)animator {
+ self.useAnimator = YES;
+ return self;
+}
+
+#endif
+
+#pragma mark - debug helpers
+
+- (MASConstraint * (^)(id))key {
+ return ^id(id key) {
+ self.mas_key = key;
+ return self;
+ };
+}
+
+#pragma mark - NSLayoutConstraint constant setters
+
+- (void)setInsets:(MASEdgeInsets)insets {
+ NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute;
+ switch (layoutAttribute) {
+ case NSLayoutAttributeLeft:
+ case NSLayoutAttributeLeading:
+ self.layoutConstant = insets.left;
+ break;
+ case NSLayoutAttributeTop:
+ self.layoutConstant = insets.top;
+ break;
+ case NSLayoutAttributeBottom:
+ self.layoutConstant = -insets.bottom;
+ break;
+ case NSLayoutAttributeRight:
+ case NSLayoutAttributeTrailing:
+ self.layoutConstant = -insets.right;
+ break;
+ default:
+ break;
+ }
+}
+
+- (void)setInset:(CGFloat)inset {
+ [self setInsets:(MASEdgeInsets){.top = inset, .left = inset, .bottom = inset, .right = inset}];
+}
+
+- (void)setOffset:(CGFloat)offset {
+ self.layoutConstant = offset;
+}
+
+- (void)setSizeOffset:(CGSize)sizeOffset {
+ NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute;
+ switch (layoutAttribute) {
+ case NSLayoutAttributeWidth:
+ self.layoutConstant = sizeOffset.width;
+ break;
+ case NSLayoutAttributeHeight:
+ self.layoutConstant = sizeOffset.height;
+ break;
+ default:
+ break;
+ }
+}
+
+- (void)setCenterOffset:(CGPoint)centerOffset {
+ NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute;
+ switch (layoutAttribute) {
+ case NSLayoutAttributeCenterX:
+ self.layoutConstant = centerOffset.x;
+ break;
+ case NSLayoutAttributeCenterY:
+ self.layoutConstant = centerOffset.y;
+ break;
+ default:
+ break;
+ }
+}
+
+#pragma mark - MASConstraint
+
+- (void)activate {
+ [self install];
+}
+
+- (void)deactivate {
+ [self uninstall];
+}
+
+- (void)install {
+ if (self.hasBeenInstalled) {
+ return;
+ }
+
+ if ([self supportsActiveProperty] && self.layoutConstraint) {
+ self.layoutConstraint.active = YES;
+ [self.firstViewAttribute.view.mas_installedConstraints addObject:self];
+ return;
+ }
+
+ MAS_VIEW *firstLayoutItem = self.firstViewAttribute.item;
+ NSLayoutAttribute firstLayoutAttribute = self.firstViewAttribute.layoutAttribute;
+ MAS_VIEW *secondLayoutItem = self.secondViewAttribute.item;
+ NSLayoutAttribute secondLayoutAttribute = self.secondViewAttribute.layoutAttribute;
+
+ // alignment attributes must have a secondViewAttribute
+ // therefore we assume that is refering to superview
+ // eg make.left.equalTo(@10)
+ if (!self.firstViewAttribute.isSizeAttribute && !self.secondViewAttribute) {
+ secondLayoutItem = self.firstViewAttribute.view.superview;
+ secondLayoutAttribute = firstLayoutAttribute;
+ }
+
+ MASLayoutConstraint *layoutConstraint
+ = [MASLayoutConstraint constraintWithItem:firstLayoutItem
+ attribute:firstLayoutAttribute
+ relatedBy:self.layoutRelation
+ toItem:secondLayoutItem
+ attribute:secondLayoutAttribute
+ multiplier:self.layoutMultiplier
+ constant:self.layoutConstant];
+
+ layoutConstraint.priority = self.layoutPriority;
+ layoutConstraint.mas_key = self.mas_key;
+
+ if (self.secondViewAttribute.view) {
+ MAS_VIEW *closestCommonSuperview = [self.firstViewAttribute.view mas_closestCommonSuperview:self.secondViewAttribute.view];
+ NSAssert(closestCommonSuperview,
+ @"couldn't find a common superview for %@ and %@",
+ self.firstViewAttribute.view, self.secondViewAttribute.view);
+ self.installedView = closestCommonSuperview;
+ } else if (self.firstViewAttribute.isSizeAttribute) {
+ self.installedView = self.firstViewAttribute.view;
+ } else {
+ self.installedView = self.firstViewAttribute.view.superview;
+ }
+
+
+ MASLayoutConstraint *existingConstraint = nil;
+ if (self.updateExisting) {
+ existingConstraint = [self layoutConstraintSimilarTo:layoutConstraint];
+ }
+ if (existingConstraint) {
+ // just update the constant
+ existingConstraint.constant = layoutConstraint.constant;
+ self.layoutConstraint = existingConstraint;
+ } else {
+ [self.installedView addConstraint:layoutConstraint];
+ self.layoutConstraint = layoutConstraint;
+ [firstLayoutItem.mas_installedConstraints addObject:self];
+ }
+}
+
+- (MASLayoutConstraint *)layoutConstraintSimilarTo:(MASLayoutConstraint *)layoutConstraint {
+ // check if any constraints are the same apart from the only mutable property constant
+
+ // go through constraints in reverse as we do not want to match auto-resizing or interface builder constraints
+ // and they are likely to be added first.
+ for (NSLayoutConstraint *existingConstraint in self.installedView.constraints.reverseObjectEnumerator) {
+ if (![existingConstraint isKindOfClass:MASLayoutConstraint.class]) continue;
+ if (existingConstraint.firstItem != layoutConstraint.firstItem) continue;
+ if (existingConstraint.secondItem != layoutConstraint.secondItem) continue;
+ if (existingConstraint.firstAttribute != layoutConstraint.firstAttribute) continue;
+ if (existingConstraint.secondAttribute != layoutConstraint.secondAttribute) continue;
+ if (existingConstraint.relation != layoutConstraint.relation) continue;
+ if (existingConstraint.multiplier != layoutConstraint.multiplier) continue;
+ if (existingConstraint.priority != layoutConstraint.priority) continue;
+
+ return (id)existingConstraint;
+ }
+ return nil;
+}
+
+- (void)uninstall {
+ if ([self supportsActiveProperty]) {
+ self.layoutConstraint.active = NO;
+ [self.firstViewAttribute.view.mas_installedConstraints removeObject:self];
+ return;
+ }
+
+ [self.installedView removeConstraint:self.layoutConstraint];
+ self.layoutConstraint = nil;
+ self.installedView = nil;
+
+ [self.firstViewAttribute.view.mas_installedConstraints removeObject:self];
+}
+
+@end
--- /dev/null
+//
+// Masonry.h
+// Masonry
+//
+// Created by Jonas Budelmann on 20/07/13.
+// Copyright (c) 2013 cloudling. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+//! Project version number for Masonry.
+FOUNDATION_EXPORT double MasonryVersionNumber;
+
+//! Project version string for Masonry.
+FOUNDATION_EXPORT const unsigned char MasonryVersionString[];
+
+#import "MASUtilities.h"
+#import "View+MASAdditions.h"
+#import "View+MASShorthandAdditions.h"
+#import "ViewController+MASAdditions.h"
+#import "NSArray+MASAdditions.h"
+#import "NSArray+MASShorthandAdditions.h"
+#import "MASConstraint.h"
+#import "MASCompositeConstraint.h"
+#import "MASViewAttribute.h"
+#import "MASViewConstraint.h"
+#import "MASConstraintMaker.h"
+#import "MASLayoutConstraint.h"
+#import "NSLayoutConstraint+MASDebugAdditions.h"
--- /dev/null
+//
+// NSArray+MASAdditions.h
+//
+//
+// Created by Daniel Hammond on 11/26/13.
+//
+//
+
+#import "MASUtilities.h"
+#import "MASConstraintMaker.h"
+#import "MASViewAttribute.h"
+
+typedef NS_ENUM(NSUInteger, MASAxisType) {
+ MASAxisTypeHorizontal,
+ MASAxisTypeVertical
+};
+
+@interface NSArray (MASAdditions)
+
+/**
+ * Creates a MASConstraintMaker with each view in the callee.
+ * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view
+ *
+ * @param block scope within which you can build up the constraints which you wish to apply to each view.
+ *
+ * @return Array of created MASConstraints
+ */
+- (NSArray *)mas_makeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block;
+
+/**
+ * Creates a MASConstraintMaker with each view in the callee.
+ * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view.
+ * If an existing constraint exists then it will be updated instead.
+ *
+ * @param block scope within which you can build up the constraints which you wish to apply to each view.
+ *
+ * @return Array of created/updated MASConstraints
+ */
+- (NSArray *)mas_updateConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block;
+
+/**
+ * Creates a MASConstraintMaker with each view in the callee.
+ * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view.
+ * All constraints previously installed for the views will be removed.
+ *
+ * @param block scope within which you can build up the constraints which you wish to apply to each view.
+ *
+ * @return Array of created/updated MASConstraints
+ */
+- (NSArray *)mas_remakeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block;
+
+/**
+ * distribute with fixed spacing
+ *
+ * @param axisType which axis to distribute items along
+ * @param fixedSpacing the spacing between each item
+ * @param leadSpacing the spacing before the first item and the container
+ * @param tailSpacing the spacing after the last item and the container
+ */
+- (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing;
+
+/**
+ * distribute with fixed item size
+ *
+ * @param axisType which axis to distribute items along
+ * @param fixedItemLength the fixed length of each item
+ * @param leadSpacing the spacing before the first item and the container
+ * @param tailSpacing the spacing after the last item and the container
+ */
+- (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing;
+
+@end
--- /dev/null
+//
+// NSArray+MASAdditions.m
+//
+//
+// Created by Daniel Hammond on 11/26/13.
+//
+//
+
+#import "NSArray+MASAdditions.h"
+#import "View+MASAdditions.h"
+
+@implementation NSArray (MASAdditions)
+
+- (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block {
+ NSMutableArray *constraints = [NSMutableArray array];
+ for (MAS_VIEW *view in self) {
+ NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views");
+ [constraints addObjectsFromArray:[view mas_makeConstraints:block]];
+ }
+ return constraints;
+}
+
+- (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block {
+ NSMutableArray *constraints = [NSMutableArray array];
+ for (MAS_VIEW *view in self) {
+ NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views");
+ [constraints addObjectsFromArray:[view mas_updateConstraints:block]];
+ }
+ return constraints;
+}
+
+- (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block {
+ NSMutableArray *constraints = [NSMutableArray array];
+ for (MAS_VIEW *view in self) {
+ NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views");
+ [constraints addObjectsFromArray:[view mas_remakeConstraints:block]];
+ }
+ return constraints;
+}
+
+- (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing {
+ if (self.count < 2) {
+ NSAssert(self.count>1,@"views to distribute need to bigger than one");
+ return;
+ }
+
+ MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews];
+ if (axisType == MASAxisTypeHorizontal) {
+ MAS_VIEW *prev;
+ for (int i = 0; i < self.count; i++) {
+ MAS_VIEW *v = self[i];
+ [v mas_makeConstraints:^(MASConstraintMaker *make) {
+ if (prev) {
+ make.width.equalTo(prev);
+ make.left.equalTo(prev.mas_right).offset(fixedSpacing);
+ if (i == self.count - 1) {//last one
+ make.right.equalTo(tempSuperView).offset(-tailSpacing);
+ }
+ }
+ else {//first one
+ make.left.equalTo(tempSuperView).offset(leadSpacing);
+ }
+
+ }];
+ prev = v;
+ }
+ }
+ else {
+ MAS_VIEW *prev;
+ for (int i = 0; i < self.count; i++) {
+ MAS_VIEW *v = self[i];
+ [v mas_makeConstraints:^(MASConstraintMaker *make) {
+ if (prev) {
+ make.height.equalTo(prev);
+ make.top.equalTo(prev.mas_bottom).offset(fixedSpacing);
+ if (i == self.count - 1) {//last one
+ make.bottom.equalTo(tempSuperView).offset(-tailSpacing);
+ }
+ }
+ else {//first one
+ make.top.equalTo(tempSuperView).offset(leadSpacing);
+ }
+
+ }];
+ prev = v;
+ }
+ }
+}
+
+- (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing {
+ if (self.count < 2) {
+ NSAssert(self.count>1,@"views to distribute need to bigger than one");
+ return;
+ }
+
+ MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews];
+ if (axisType == MASAxisTypeHorizontal) {
+ MAS_VIEW *prev;
+ for (int i = 0; i < self.count; i++) {
+ MAS_VIEW *v = self[i];
+ [v mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.width.equalTo(@(fixedItemLength));
+ if (prev) {
+ if (i == self.count - 1) {//last one
+ make.right.equalTo(tempSuperView).offset(-tailSpacing);
+ }
+ else {
+ CGFloat offset = (1-(i/((CGFloat)self.count-1)))*(fixedItemLength+leadSpacing)-i*tailSpacing/(((CGFloat)self.count-1));
+ make.right.equalTo(tempSuperView).multipliedBy(i/((CGFloat)self.count-1)).with.offset(offset);
+ }
+ }
+ else {//first one
+ make.left.equalTo(tempSuperView).offset(leadSpacing);
+ }
+ }];
+ prev = v;
+ }
+ }
+ else {
+ MAS_VIEW *prev;
+ for (int i = 0; i < self.count; i++) {
+ MAS_VIEW *v = self[i];
+ [v mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.height.equalTo(@(fixedItemLength));
+ if (prev) {
+ if (i == self.count - 1) {//last one
+ make.bottom.equalTo(tempSuperView).offset(-tailSpacing);
+ }
+ else {
+ CGFloat offset = (1-(i/((CGFloat)self.count-1)))*(fixedItemLength+leadSpacing)-i*tailSpacing/(((CGFloat)self.count-1));
+ make.bottom.equalTo(tempSuperView).multipliedBy(i/((CGFloat)self.count-1)).with.offset(offset);
+ }
+ }
+ else {//first one
+ make.top.equalTo(tempSuperView).offset(leadSpacing);
+ }
+ }];
+ prev = v;
+ }
+ }
+}
+
+- (MAS_VIEW *)mas_commonSuperviewOfViews
+{
+ MAS_VIEW *commonSuperview = nil;
+ MAS_VIEW *previousView = nil;
+ for (id object in self) {
+ if ([object isKindOfClass:[MAS_VIEW class]]) {
+ MAS_VIEW *view = (MAS_VIEW *)object;
+ if (previousView) {
+ commonSuperview = [view mas_closestCommonSuperview:commonSuperview];
+ } else {
+ commonSuperview = view;
+ }
+ previousView = view;
+ }
+ }
+ NSAssert(commonSuperview, @"Can't constrain views that do not share a common superview. Make sure that all the views in this array have been added into the same view hierarchy.");
+ return commonSuperview;
+}
+
+@end
--- /dev/null
+//
+// NSArray+MASShorthandAdditions.h
+// Masonry
+//
+// Created by Jonas Budelmann on 22/07/13.
+// Copyright (c) 2013 Jonas Budelmann. All rights reserved.
+//
+
+#import "NSArray+MASAdditions.h"
+
+#ifdef MAS_SHORTHAND
+
+/**
+ * Shorthand array additions without the 'mas_' prefixes,
+ * only enabled if MAS_SHORTHAND is defined
+ */
+@interface NSArray (MASShorthandAdditions)
+
+- (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block;
+- (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block;
+- (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block;
+
+@end
+
+@implementation NSArray (MASShorthandAdditions)
+
+- (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block {
+ return [self mas_makeConstraints:block];
+}
+
+- (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block {
+ return [self mas_updateConstraints:block];
+}
+
+- (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block {
+ return [self mas_remakeConstraints:block];
+}
+
+@end
+
+#endif
--- /dev/null
+//
+// NSLayoutConstraint+MASDebugAdditions.h
+// Masonry
+//
+// Created by Jonas Budelmann on 3/08/13.
+// Copyright (c) 2013 Jonas Budelmann. All rights reserved.
+//
+
+#import "MASUtilities.h"
+
+/**
+ * makes debug and log output of NSLayoutConstraints more readable
+ */
+@interface NSLayoutConstraint (MASDebugAdditions)
+
+@end
--- /dev/null
+//
+// NSLayoutConstraint+MASDebugAdditions.m
+// Masonry
+//
+// Created by Jonas Budelmann on 3/08/13.
+// Copyright (c) 2013 Jonas Budelmann. All rights reserved.
+//
+
+#import "NSLayoutConstraint+MASDebugAdditions.h"
+#import "MASConstraint.h"
+#import "MASLayoutConstraint.h"
+
+@implementation NSLayoutConstraint (MASDebugAdditions)
+
+#pragma mark - description maps
+
++ (NSDictionary *)layoutRelationDescriptionsByValue {
+ static dispatch_once_t once;
+ static NSDictionary *descriptionMap;
+ dispatch_once(&once, ^{
+ descriptionMap = @{
+ @(NSLayoutRelationEqual) : @"==",
+ @(NSLayoutRelationGreaterThanOrEqual) : @">=",
+ @(NSLayoutRelationLessThanOrEqual) : @"<=",
+ };
+ });
+ return descriptionMap;
+}
+
++ (NSDictionary *)layoutAttributeDescriptionsByValue {
+ static dispatch_once_t once;
+ static NSDictionary *descriptionMap;
+ dispatch_once(&once, ^{
+ descriptionMap = @{
+ @(NSLayoutAttributeTop) : @"top",
+ @(NSLayoutAttributeLeft) : @"left",
+ @(NSLayoutAttributeBottom) : @"bottom",
+ @(NSLayoutAttributeRight) : @"right",
+ @(NSLayoutAttributeLeading) : @"leading",
+ @(NSLayoutAttributeTrailing) : @"trailing",
+ @(NSLayoutAttributeWidth) : @"width",
+ @(NSLayoutAttributeHeight) : @"height",
+ @(NSLayoutAttributeCenterX) : @"centerX",
+ @(NSLayoutAttributeCenterY) : @"centerY",
+ @(NSLayoutAttributeBaseline) : @"baseline",
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+ @(NSLayoutAttributeFirstBaseline) : @"firstBaseline",
+ @(NSLayoutAttributeLastBaseline) : @"lastBaseline",
+#endif
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
+ @(NSLayoutAttributeLeftMargin) : @"leftMargin",
+ @(NSLayoutAttributeRightMargin) : @"rightMargin",
+ @(NSLayoutAttributeTopMargin) : @"topMargin",
+ @(NSLayoutAttributeBottomMargin) : @"bottomMargin",
+ @(NSLayoutAttributeLeadingMargin) : @"leadingMargin",
+ @(NSLayoutAttributeTrailingMargin) : @"trailingMargin",
+ @(NSLayoutAttributeCenterXWithinMargins) : @"centerXWithinMargins",
+ @(NSLayoutAttributeCenterYWithinMargins) : @"centerYWithinMargins",
+#endif
+
+ };
+
+ });
+ return descriptionMap;
+}
+
+
++ (NSDictionary *)layoutPriorityDescriptionsByValue {
+ static dispatch_once_t once;
+ static NSDictionary *descriptionMap;
+ dispatch_once(&once, ^{
+#if TARGET_OS_IPHONE || TARGET_OS_TV
+ descriptionMap = @{
+ @(MASLayoutPriorityDefaultHigh) : @"high",
+ @(MASLayoutPriorityDefaultLow) : @"low",
+ @(MASLayoutPriorityDefaultMedium) : @"medium",
+ @(MASLayoutPriorityRequired) : @"required",
+ @(MASLayoutPriorityFittingSizeLevel) : @"fitting size",
+ };
+#elif TARGET_OS_MAC
+ descriptionMap = @{
+ @(MASLayoutPriorityDefaultHigh) : @"high",
+ @(MASLayoutPriorityDragThatCanResizeWindow) : @"drag can resize window",
+ @(MASLayoutPriorityDefaultMedium) : @"medium",
+ @(MASLayoutPriorityWindowSizeStayPut) : @"window size stay put",
+ @(MASLayoutPriorityDragThatCannotResizeWindow) : @"drag cannot resize window",
+ @(MASLayoutPriorityDefaultLow) : @"low",
+ @(MASLayoutPriorityFittingSizeCompression) : @"fitting size",
+ @(MASLayoutPriorityRequired) : @"required",
+ };
+#endif
+ });
+ return descriptionMap;
+}
+
+#pragma mark - description override
+
++ (NSString *)descriptionForObject:(id)obj {
+ if ([obj respondsToSelector:@selector(mas_key)] && [obj mas_key]) {
+ return [NSString stringWithFormat:@"%@:%@", [obj class], [obj mas_key]];
+ }
+ return [NSString stringWithFormat:@"%@:%p", [obj class], obj];
+}
+
+- (NSString *)description {
+ NSMutableString *description = [[NSMutableString alloc] initWithString:@"<"];
+
+ [description appendString:[self.class descriptionForObject:self]];
+
+ [description appendFormat:@" %@", [self.class descriptionForObject:self.firstItem]];
+ if (self.firstAttribute != NSLayoutAttributeNotAnAttribute) {
+ [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.firstAttribute)]];
+ }
+
+ [description appendFormat:@" %@", self.class.layoutRelationDescriptionsByValue[@(self.relation)]];
+
+ if (self.secondItem) {
+ [description appendFormat:@" %@", [self.class descriptionForObject:self.secondItem]];
+ }
+ if (self.secondAttribute != NSLayoutAttributeNotAnAttribute) {
+ [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.secondAttribute)]];
+ }
+
+ if (self.multiplier != 1) {
+ [description appendFormat:@" * %g", self.multiplier];
+ }
+
+ if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) {
+ [description appendFormat:@" %g", self.constant];
+ } else {
+ if (self.constant) {
+ [description appendFormat:@" %@ %g", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)];
+ }
+ }
+
+ if (self.priority != MASLayoutPriorityRequired) {
+ [description appendFormat:@" ^%@", self.class.layoutPriorityDescriptionsByValue[@(self.priority)] ?: [NSNumber numberWithDouble:self.priority]];
+ }
+
+ [description appendString:@">"];
+ return description;
+}
+
+@end
--- /dev/null
+//
+// UIView+MASAdditions.h
+// Masonry
+//
+// Created by Jonas Budelmann on 20/07/13.
+// Copyright (c) 2013 cloudling. All rights reserved.
+//
+
+#import "MASUtilities.h"
+#import "MASConstraintMaker.h"
+#import "MASViewAttribute.h"
+
+/**
+ * Provides constraint maker block
+ * and convience methods for creating MASViewAttribute which are view + NSLayoutAttribute pairs
+ */
+@interface MAS_VIEW (MASAdditions)
+
+/**
+ * following properties return a new MASViewAttribute with current view and appropriate NSLayoutAttribute
+ */
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_left;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_top;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_right;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottom;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_leading;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_trailing;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_width;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_height;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_centerX;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_centerY;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_baseline;
+@property (nonatomic, strong, readonly) MASViewAttribute *(^mas_attribute)(NSLayoutAttribute attr);
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_firstBaseline;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_lastBaseline;
+
+#endif
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
+
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_leftMargin;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_rightMargin;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_topMargin;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomMargin;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_leadingMargin;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_trailingMargin;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_centerXWithinMargins;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_centerYWithinMargins;
+
+#endif
+
+#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000)
+
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuide API_AVAILABLE(ios(11.0),tvos(11.0));
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0));
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0));
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0));
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0));
+
+#endif
+
+/**
+ * a key to associate with this view
+ */
+@property (nonatomic, strong) id mas_key;
+
+/**
+ * Finds the closest common superview between this view and another view
+ *
+ * @param view other view
+ *
+ * @return returns nil if common superview could not be found
+ */
+- (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view;
+
+/**
+ * Creates a MASConstraintMaker with the callee view.
+ * Any constraints defined are added to the view or the appropriate superview once the block has finished executing
+ *
+ * @param block scope within which you can build up the constraints which you wish to apply to the view.
+ *
+ * @return Array of created MASConstraints
+ */
+- (NSArray *)mas_makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block;
+
+/**
+ * Creates a MASConstraintMaker with the callee view.
+ * Any constraints defined are added to the view or the appropriate superview once the block has finished executing.
+ * If an existing constraint exists then it will be updated instead.
+ *
+ * @param block scope within which you can build up the constraints which you wish to apply to the view.
+ *
+ * @return Array of created/updated MASConstraints
+ */
+- (NSArray *)mas_updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block;
+
+/**
+ * Creates a MASConstraintMaker with the callee view.
+ * Any constraints defined are added to the view or the appropriate superview once the block has finished executing.
+ * All constraints previously installed for the view will be removed.
+ *
+ * @param block scope within which you can build up the constraints which you wish to apply to the view.
+ *
+ * @return Array of created/updated MASConstraints
+ */
+- (NSArray *)mas_remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block;
+
+@end
--- /dev/null
+//
+// UIView+MASAdditions.m
+// Masonry
+//
+// Created by Jonas Budelmann on 20/07/13.
+// Copyright (c) 2013 cloudling. All rights reserved.
+//
+
+#import "View+MASAdditions.h"
+#import <objc/runtime.h>
+
+@implementation MAS_VIEW (MASAdditions)
+
+- (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *))block {
+ self.translatesAutoresizingMaskIntoConstraints = NO;
+ MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self];
+ block(constraintMaker);
+ return [constraintMaker install];
+}
+
+- (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *))block {
+ self.translatesAutoresizingMaskIntoConstraints = NO;
+ MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self];
+ constraintMaker.updateExisting = YES;
+ block(constraintMaker);
+ return [constraintMaker install];
+}
+
+- (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block {
+ self.translatesAutoresizingMaskIntoConstraints = NO;
+ MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self];
+ constraintMaker.removeExisting = YES;
+ block(constraintMaker);
+ return [constraintMaker install];
+}
+
+#pragma mark - NSLayoutAttribute properties
+
+- (MASViewAttribute *)mas_left {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeft];
+}
+
+- (MASViewAttribute *)mas_top {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTop];
+}
+
+- (MASViewAttribute *)mas_right {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRight];
+}
+
+- (MASViewAttribute *)mas_bottom {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottom];
+}
+
+- (MASViewAttribute *)mas_leading {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeading];
+}
+
+- (MASViewAttribute *)mas_trailing {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailing];
+}
+
+- (MASViewAttribute *)mas_width {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeWidth];
+}
+
+- (MASViewAttribute *)mas_height {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeHeight];
+}
+
+- (MASViewAttribute *)mas_centerX {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterX];
+}
+
+- (MASViewAttribute *)mas_centerY {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterY];
+}
+
+- (MASViewAttribute *)mas_baseline {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBaseline];
+}
+
+- (MASViewAttribute *(^)(NSLayoutAttribute))mas_attribute
+{
+ return ^(NSLayoutAttribute attr) {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:attr];
+ };
+}
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+
+- (MASViewAttribute *)mas_firstBaseline {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeFirstBaseline];
+}
+- (MASViewAttribute *)mas_lastBaseline {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLastBaseline];
+}
+
+#endif
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
+
+- (MASViewAttribute *)mas_leftMargin {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeftMargin];
+}
+
+- (MASViewAttribute *)mas_rightMargin {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRightMargin];
+}
+
+- (MASViewAttribute *)mas_topMargin {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTopMargin];
+}
+
+- (MASViewAttribute *)mas_bottomMargin {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottomMargin];
+}
+
+- (MASViewAttribute *)mas_leadingMargin {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeadingMargin];
+}
+
+- (MASViewAttribute *)mas_trailingMargin {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailingMargin];
+}
+
+- (MASViewAttribute *)mas_centerXWithinMargins {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterXWithinMargins];
+}
+
+- (MASViewAttribute *)mas_centerYWithinMargins {
+ return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterYWithinMargins];
+}
+
+#endif
+
+#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000)
+
+- (MASViewAttribute *)mas_safeAreaLayoutGuide {
+ return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
+}
+- (MASViewAttribute *)mas_safeAreaLayoutGuideTop {
+ return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeTop];
+}
+- (MASViewAttribute *)mas_safeAreaLayoutGuideBottom {
+ return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
+}
+- (MASViewAttribute *)mas_safeAreaLayoutGuideLeft {
+ return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeLeft];
+}
+- (MASViewAttribute *)mas_safeAreaLayoutGuideRight {
+ return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeRight];
+}
+
+#endif
+
+#pragma mark - associated properties
+
+- (id)mas_key {
+ return objc_getAssociatedObject(self, @selector(mas_key));
+}
+
+- (void)setMas_key:(id)key {
+ objc_setAssociatedObject(self, @selector(mas_key), key, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+}
+
+#pragma mark - heirachy
+
+- (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view {
+ MAS_VIEW *closestCommonSuperview = nil;
+
+ MAS_VIEW *secondViewSuperview = view;
+ while (!closestCommonSuperview && secondViewSuperview) {
+ MAS_VIEW *firstViewSuperview = self;
+ while (!closestCommonSuperview && firstViewSuperview) {
+ if (secondViewSuperview == firstViewSuperview) {
+ closestCommonSuperview = secondViewSuperview;
+ }
+ firstViewSuperview = firstViewSuperview.superview;
+ }
+ secondViewSuperview = secondViewSuperview.superview;
+ }
+ return closestCommonSuperview;
+}
+
+@end
--- /dev/null
+//
+// UIView+MASShorthandAdditions.h
+// Masonry
+//
+// Created by Jonas Budelmann on 22/07/13.
+// Copyright (c) 2013 Jonas Budelmann. All rights reserved.
+//
+
+#import "View+MASAdditions.h"
+
+#ifdef MAS_SHORTHAND
+
+/**
+ * Shorthand view additions without the 'mas_' prefixes,
+ * only enabled if MAS_SHORTHAND is defined
+ */
+@interface MAS_VIEW (MASShorthandAdditions)
+
+@property (nonatomic, strong, readonly) MASViewAttribute *left;
+@property (nonatomic, strong, readonly) MASViewAttribute *top;
+@property (nonatomic, strong, readonly) MASViewAttribute *right;
+@property (nonatomic, strong, readonly) MASViewAttribute *bottom;
+@property (nonatomic, strong, readonly) MASViewAttribute *leading;
+@property (nonatomic, strong, readonly) MASViewAttribute *trailing;
+@property (nonatomic, strong, readonly) MASViewAttribute *width;
+@property (nonatomic, strong, readonly) MASViewAttribute *height;
+@property (nonatomic, strong, readonly) MASViewAttribute *centerX;
+@property (nonatomic, strong, readonly) MASViewAttribute *centerY;
+@property (nonatomic, strong, readonly) MASViewAttribute *baseline;
+@property (nonatomic, strong, readonly) MASViewAttribute *(^attribute)(NSLayoutAttribute attr);
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+
+@property (nonatomic, strong, readonly) MASViewAttribute *firstBaseline;
+@property (nonatomic, strong, readonly) MASViewAttribute *lastBaseline;
+
+#endif
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
+
+@property (nonatomic, strong, readonly) MASViewAttribute *leftMargin;
+@property (nonatomic, strong, readonly) MASViewAttribute *rightMargin;
+@property (nonatomic, strong, readonly) MASViewAttribute *topMargin;
+@property (nonatomic, strong, readonly) MASViewAttribute *bottomMargin;
+@property (nonatomic, strong, readonly) MASViewAttribute *leadingMargin;
+@property (nonatomic, strong, readonly) MASViewAttribute *trailingMargin;
+@property (nonatomic, strong, readonly) MASViewAttribute *centerXWithinMargins;
+@property (nonatomic, strong, readonly) MASViewAttribute *centerYWithinMargins;
+
+#endif
+
+#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000)
+
+@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0));
+@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0));
+@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0));
+@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0));
+
+#endif
+
+- (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block;
+- (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block;
+- (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block;
+
+@end
+
+#define MAS_ATTR_FORWARD(attr) \
+- (MASViewAttribute *)attr { \
+ return [self mas_##attr]; \
+}
+
+@implementation MAS_VIEW (MASShorthandAdditions)
+
+MAS_ATTR_FORWARD(top);
+MAS_ATTR_FORWARD(left);
+MAS_ATTR_FORWARD(bottom);
+MAS_ATTR_FORWARD(right);
+MAS_ATTR_FORWARD(leading);
+MAS_ATTR_FORWARD(trailing);
+MAS_ATTR_FORWARD(width);
+MAS_ATTR_FORWARD(height);
+MAS_ATTR_FORWARD(centerX);
+MAS_ATTR_FORWARD(centerY);
+MAS_ATTR_FORWARD(baseline);
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
+
+MAS_ATTR_FORWARD(firstBaseline);
+MAS_ATTR_FORWARD(lastBaseline);
+
+#endif
+
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
+
+MAS_ATTR_FORWARD(leftMargin);
+MAS_ATTR_FORWARD(rightMargin);
+MAS_ATTR_FORWARD(topMargin);
+MAS_ATTR_FORWARD(bottomMargin);
+MAS_ATTR_FORWARD(leadingMargin);
+MAS_ATTR_FORWARD(trailingMargin);
+MAS_ATTR_FORWARD(centerXWithinMargins);
+MAS_ATTR_FORWARD(centerYWithinMargins);
+
+#endif
+
+#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000)
+
+MAS_ATTR_FORWARD(safeAreaLayoutGuideTop);
+MAS_ATTR_FORWARD(safeAreaLayoutGuideBottom);
+MAS_ATTR_FORWARD(safeAreaLayoutGuideLeft);
+MAS_ATTR_FORWARD(safeAreaLayoutGuideRight);
+
+#endif
+
+- (MASViewAttribute *(^)(NSLayoutAttribute))attribute {
+ return [self mas_attribute];
+}
+
+- (NSArray *)makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block {
+ return [self mas_makeConstraints:block];
+}
+
+- (NSArray *)updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block {
+ return [self mas_updateConstraints:block];
+}
+
+- (NSArray *)remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block {
+ return [self mas_remakeConstraints:block];
+}
+
+@end
+
+#endif
--- /dev/null
+//
+// UIViewController+MASAdditions.h
+// Masonry
+//
+// Created by Craig Siemens on 2015-06-23.
+//
+//
+
+#import "MASUtilities.h"
+#import "MASConstraintMaker.h"
+#import "MASViewAttribute.h"
+
+#ifdef MAS_VIEW_CONTROLLER
+
+@interface MAS_VIEW_CONTROLLER (MASAdditions)
+
+/**
+ * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute
+ */
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom;
+
+
+@end
+
+#endif
--- /dev/null
+//
+// UIViewController+MASAdditions.m
+// Masonry
+//
+// Created by Craig Siemens on 2015-06-23.
+//
+//
+
+#import "ViewController+MASAdditions.h"
+
+#ifdef MAS_VIEW_CONTROLLER
+
+@implementation MAS_VIEW_CONTROLLER (MASAdditions)
+
+- (MASViewAttribute *)mas_topLayoutGuide {
+ return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
+}
+- (MASViewAttribute *)mas_topLayoutGuideTop {
+ return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop];
+}
+- (MASViewAttribute *)mas_topLayoutGuideBottom {
+ return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
+}
+
+- (MASViewAttribute *)mas_bottomLayoutGuide {
+ return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
+}
+- (MASViewAttribute *)mas_bottomLayoutGuideTop {
+ return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
+}
+- (MASViewAttribute *)mas_bottomLayoutGuideBottom {
+ return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
+}
+
+
+
+@end
+
+#endif
--- /dev/null
+# Masonry [](https://travis-ci.org/SnapKit/Masonry) [](https://coveralls.io/r/SnapKit/Masonry) [](https://github.com/Carthage/Carthage) 
+
+**Masonry is still actively maintained, we are committed to fixing bugs and merging good quality PRs from the wider community. However if you're using Swift in your project, we recommend using [SnapKit](https://github.com/SnapKit/SnapKit) as it provides better type safety with a simpler API.**
+
+Masonry is a light-weight layout framework which wraps AutoLayout with a nicer syntax. Masonry has its own layout DSL which provides a chainable way of describing your NSLayoutConstraints which results in layout code that is more concise and readable.
+Masonry supports iOS and Mac OS X.
+
+For examples take a look at the **Masonry iOS Examples** project in the Masonry workspace. You will need to run `pod install` after downloading.
+
+## What's wrong with NSLayoutConstraints?
+
+Under the hood Auto Layout is a powerful and flexible way of organising and laying out your views. However creating constraints from code is verbose and not very descriptive.
+Imagine a simple example in which you want to have a view fill its superview but inset by 10 pixels on every side
+```obj-c
+UIView *superview = self.view;
+
+UIView *view1 = [[UIView alloc] init];
+view1.translatesAutoresizingMaskIntoConstraints = NO;
+view1.backgroundColor = [UIColor greenColor];
+[superview addSubview:view1];
+
+UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10);
+
+[superview addConstraints:@[
+
+ //view1 constraints
+ [NSLayoutConstraint constraintWithItem:view1
+ attribute:NSLayoutAttributeTop
+ relatedBy:NSLayoutRelationEqual
+ toItem:superview
+ attribute:NSLayoutAttributeTop
+ multiplier:1.0
+ constant:padding.top],
+
+ [NSLayoutConstraint constraintWithItem:view1
+ attribute:NSLayoutAttributeLeft
+ relatedBy:NSLayoutRelationEqual
+ toItem:superview
+ attribute:NSLayoutAttributeLeft
+ multiplier:1.0
+ constant:padding.left],
+
+ [NSLayoutConstraint constraintWithItem:view1
+ attribute:NSLayoutAttributeBottom
+ relatedBy:NSLayoutRelationEqual
+ toItem:superview
+ attribute:NSLayoutAttributeBottom
+ multiplier:1.0
+ constant:-padding.bottom],
+
+ [NSLayoutConstraint constraintWithItem:view1
+ attribute:NSLayoutAttributeRight
+ relatedBy:NSLayoutRelationEqual
+ toItem:superview
+ attribute:NSLayoutAttributeRight
+ multiplier:1
+ constant:-padding.right],
+
+ ]];
+```
+Even with such a simple example the code needed is quite verbose and quickly becomes unreadable when you have more than 2 or 3 views.
+Another option is to use Visual Format Language (VFL), which is a bit less long winded.
+However the ASCII type syntax has its own pitfalls and its also a bit harder to animate as `NSLayoutConstraint constraintsWithVisualFormat:` returns an array.
+
+## Prepare to meet your Maker!
+
+Heres the same constraints created using MASConstraintMaker
+
+```obj-c
+UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10);
+
+[view1 mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.top.equalTo(superview.mas_top).with.offset(padding.top); //with is an optional semantic filler
+ make.left.equalTo(superview.mas_left).with.offset(padding.left);
+ make.bottom.equalTo(superview.mas_bottom).with.offset(-padding.bottom);
+ make.right.equalTo(superview.mas_right).with.offset(-padding.right);
+}];
+```
+Or even shorter
+
+```obj-c
+[view1 mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.edges.equalTo(superview).with.insets(padding);
+}];
+```
+
+Also note in the first example we had to add the constraints to the superview `[superview addConstraints:...`.
+Masonry however will automagically add constraints to the appropriate view.
+
+Masonry will also call `view1.translatesAutoresizingMaskIntoConstraints = NO;` for you.
+
+## Not all things are created equal
+
+> `.equalTo` equivalent to **NSLayoutRelationEqual**
+
+> `.lessThanOrEqualTo` equivalent to **NSLayoutRelationLessThanOrEqual**
+
+> `.greaterThanOrEqualTo` equivalent to **NSLayoutRelationGreaterThanOrEqual**
+
+These three equality constraints accept one argument which can be any of the following:
+
+#### 1. MASViewAttribute
+
+```obj-c
+make.centerX.lessThanOrEqualTo(view2.mas_left);
+```
+
+MASViewAttribute | NSLayoutAttribute
+------------------------- | --------------------------
+view.mas_left | NSLayoutAttributeLeft
+view.mas_right | NSLayoutAttributeRight
+view.mas_top | NSLayoutAttributeTop
+view.mas_bottom | NSLayoutAttributeBottom
+view.mas_leading | NSLayoutAttributeLeading
+view.mas_trailing | NSLayoutAttributeTrailing
+view.mas_width | NSLayoutAttributeWidth
+view.mas_height | NSLayoutAttributeHeight
+view.mas_centerX | NSLayoutAttributeCenterX
+view.mas_centerY | NSLayoutAttributeCenterY
+view.mas_baseline | NSLayoutAttributeBaseline
+
+#### 2. UIView/NSView
+
+if you want view.left to be greater than or equal to label.left :
+```obj-c
+//these two constraints are exactly the same
+make.left.greaterThanOrEqualTo(label);
+make.left.greaterThanOrEqualTo(label.mas_left);
+```
+
+#### 3. NSNumber
+
+Auto Layout allows width and height to be set to constant values.
+if you want to set view to have a minimum and maximum width you could pass a number to the equality blocks:
+```obj-c
+//width >= 200 && width <= 400
+make.width.greaterThanOrEqualTo(@200);
+make.width.lessThanOrEqualTo(@400)
+```
+
+However Auto Layout does not allow alignment attributes such as left, right, centerY etc to be set to constant values.
+So if you pass a NSNumber for these attributes Masonry will turn these into constraints relative to the view’s superview ie:
+```obj-c
+//creates view.left = view.superview.left + 10
+make.left.lessThanOrEqualTo(@10)
+```
+
+Instead of using NSNumber, you can use primitives and structs to build your constraints, like so:
+```obj-c
+make.top.mas_equalTo(42);
+make.height.mas_equalTo(20);
+make.size.mas_equalTo(CGSizeMake(50, 100));
+make.edges.mas_equalTo(UIEdgeInsetsMake(10, 0, 10, 0));
+make.left.mas_equalTo(view).mas_offset(UIEdgeInsetsMake(10, 0, 10, 0));
+```
+
+By default, macros which support [autoboxing](https://en.wikipedia.org/wiki/Autoboxing#Autoboxing) are prefixed with `mas_`. Unprefixed versions are available by defining `MAS_SHORTHAND_GLOBALS` before importing Masonry.
+
+#### 4. NSArray
+
+An array of a mixture of any of the previous types
+```obj-c
+make.height.equalTo(@[view1.mas_height, view2.mas_height]);
+make.height.equalTo(@[view1, view2]);
+make.left.equalTo(@[view1, @100, view3.right]);
+````
+
+## Learn to prioritize
+
+> `.priority` allows you to specify an exact priority
+
+> `.priorityHigh` equivalent to **UILayoutPriorityDefaultHigh**
+
+> `.priorityMedium` is half way between high and low
+
+> `.priorityLow` equivalent to **UILayoutPriorityDefaultLow**
+
+Priorities are can be tacked on to the end of a constraint chain like so:
+```obj-c
+make.left.greaterThanOrEqualTo(label.mas_left).with.priorityLow();
+
+make.top.equalTo(label.mas_top).with.priority(600);
+```
+
+## Composition, composition, composition
+
+Masonry also gives you a few convenience methods which create multiple constraints at the same time. These are called MASCompositeConstraints
+
+#### edges
+
+```obj-c
+// make top, left, bottom, right equal view2
+make.edges.equalTo(view2);
+
+// make top = superview.top + 5, left = superview.left + 10,
+// bottom = superview.bottom - 15, right = superview.right - 20
+make.edges.equalTo(superview).insets(UIEdgeInsetsMake(5, 10, 15, 20))
+```
+
+#### size
+
+```obj-c
+// make width and height greater than or equal to titleLabel
+make.size.greaterThanOrEqualTo(titleLabel)
+
+// make width = superview.width + 100, height = superview.height - 50
+make.size.equalTo(superview).sizeOffset(CGSizeMake(100, -50))
+```
+
+#### center
+```obj-c
+// make centerX and centerY = button1
+make.center.equalTo(button1)
+
+// make centerX = superview.centerX - 5, centerY = superview.centerY + 10
+make.center.equalTo(superview).centerOffset(CGPointMake(-5, 10))
+```
+
+You can chain view attributes for increased readability:
+
+```obj-c
+// All edges but the top should equal those of the superview
+make.left.right.and.bottom.equalTo(superview);
+make.top.equalTo(otherView);
+```
+
+## Hold on for dear life
+
+Sometimes you need modify existing constraints in order to animate or remove/replace constraints.
+In Masonry there are a few different approaches to updating constraints.
+
+#### 1. References
+You can hold on to a reference of a particular constraint by assigning the result of a constraint make expression to a local variable or a class property.
+You could also reference multiple constraints by storing them away in an array.
+
+```obj-c
+// in public/private interface
+@property (nonatomic, strong) MASConstraint *topConstraint;
+
+...
+
+// when making constraints
+[view1 mas_makeConstraints:^(MASConstraintMaker *make) {
+ self.topConstraint = make.top.equalTo(superview.mas_top).with.offset(padding.top);
+ make.left.equalTo(superview.mas_left).with.offset(padding.left);
+}];
+
+...
+// then later you can call
+[self.topConstraint uninstall];
+```
+
+#### 2. mas_updateConstraints
+Alternatively if you are only updating the constant value of the constraint you can use the convience method `mas_updateConstraints` instead of `mas_makeConstraints`
+
+```obj-c
+// this is Apple's recommended place for adding/updating constraints
+// this method can get called multiple times in response to setNeedsUpdateConstraints
+// which can be called by UIKit internally or in your code if you need to trigger an update to your constraints
+- (void)updateConstraints {
+ [self.growingButton mas_updateConstraints:^(MASConstraintMaker *make) {
+ make.center.equalTo(self);
+ make.width.equalTo(@(self.buttonSize.width)).priorityLow();
+ make.height.equalTo(@(self.buttonSize.height)).priorityLow();
+ make.width.lessThanOrEqualTo(self);
+ make.height.lessThanOrEqualTo(self);
+ }];
+
+ //according to apple super should be called at end of method
+ [super updateConstraints];
+}
+```
+
+### 3. mas_remakeConstraints
+`mas_updateConstraints` is useful for updating a set of constraints, but doing anything beyond updating constant values can get exhausting. That's where `mas_remakeConstraints` comes in.
+
+`mas_remakeConstraints` is similar to `mas_updateConstraints`, but instead of updating constant values, it will remove all of its constraints before installing them again. This lets you provide different constraints without having to keep around references to ones which you want to remove.
+
+```obj-c
+- (void)changeButtonPosition {
+ [self.button mas_remakeConstraints:^(MASConstraintMaker *make) {
+ make.size.equalTo(self.buttonSize);
+
+ if (topLeft) {
+ make.top.and.left.offset(10);
+ } else {
+ make.bottom.and.right.offset(-10);
+ }
+ }];
+}
+```
+
+You can find more detailed examples of all three approaches in the **Masonry iOS Examples** project.
+
+## When the ^&*!@ hits the fan!
+
+Laying out your views doesn't always goto plan. So when things literally go pear shaped, you don't want to be looking at console output like this:
+
+```obj-c
+Unable to simultaneously satisfy constraints.....blah blah blah....
+(
+ "<NSLayoutConstraint:0x7189ac0 V:[UILabel:0x7186980(>=5000)]>",
+ "<NSAutoresizingMaskLayoutConstraint:0x839ea20 h=--& v=--& V:[MASExampleDebuggingView:0x7186560(416)]>",
+ "<NSLayoutConstraint:0x7189c70 UILabel:0x7186980.bottom == MASExampleDebuggingView:0x7186560.bottom - 10>",
+ "<NSLayoutConstraint:0x7189560 V:|-(1)-[UILabel:0x7186980] (Names: '|':MASExampleDebuggingView:0x7186560 )>"
+)
+
+Will attempt to recover by breaking constraint
+<NSLayoutConstraint:0x7189ac0 V:[UILabel:0x7186980(>=5000)]>
+```
+
+Masonry adds a category to NSLayoutConstraint which overrides the default implementation of `- (NSString *)description`.
+Now you can give meaningful names to views and constraints, and also easily pick out the constraints created by Masonry.
+
+which means your console output can now look like this:
+
+```obj-c
+Unable to simultaneously satisfy constraints......blah blah blah....
+(
+ "<NSAutoresizingMaskLayoutConstraint:0x8887740 MASExampleDebuggingView:superview.height == 416>",
+ "<MASLayoutConstraint:ConstantConstraint UILabel:messageLabel.height >= 5000>",
+ "<MASLayoutConstraint:BottomConstraint UILabel:messageLabel.bottom == MASExampleDebuggingView:superview.bottom - 10>",
+ "<MASLayoutConstraint:ConflictingConstraint[0] UILabel:messageLabel.top == MASExampleDebuggingView:superview.top + 1>"
+)
+
+Will attempt to recover by breaking constraint
+<MASLayoutConstraint:ConstantConstraint UILabel:messageLabel.height >= 5000>
+```
+
+For an example of how to set this up take a look at the **Masonry iOS Examples** project in the Masonry workspace.
+
+## Where should I create my constraints?
+
+```objc
+@implementation DIYCustomView
+
+- (id)init {
+ self = [super init];
+ if (!self) return nil;
+
+ // --- Create your views here ---
+ self.button = [[UIButton alloc] init];
+
+ return self;
+}
+
+// tell UIKit that you are using AutoLayout
++ (BOOL)requiresConstraintBasedLayout {
+ return YES;
+}
+
+// this is Apple's recommended place for adding/updating constraints
+- (void)updateConstraints {
+
+ // --- remake/update constraints here
+ [self.button remakeConstraints:^(MASConstraintMaker *make) {
+ make.width.equalTo(@(self.buttonSize.width));
+ make.height.equalTo(@(self.buttonSize.height));
+ }];
+
+ //according to apple super should be called at end of method
+ [super updateConstraints];
+}
+
+- (void)didTapButton:(UIButton *)button {
+ // --- Do your changes ie change variables that affect your layout etc ---
+ self.buttonSize = CGSize(200, 200);
+
+ // tell constraints they need updating
+ [self setNeedsUpdateConstraints];
+}
+
+@end
+```
+
+## Installation
+Use the [orsome](http://www.youtube.com/watch?v=YaIZF8uUTtk) [CocoaPods](http://github.com/CocoaPods/CocoaPods).
+
+In your Podfile
+>`pod 'Masonry'`
+
+If you want to use masonry without all those pesky 'mas_' prefixes. Add #define MAS_SHORTHAND to your prefix.pch before importing Masonry
+>`#define MAS_SHORTHAND`
+
+Get busy Masoning
+>`#import "Masonry.h"`
+
+## Code Snippets
+
+Copy the included code snippets to ``~/Library/Developer/Xcode/UserData/CodeSnippets`` to write your masonry blocks at lightning speed!
+
+`mas_make` -> ` [<#view#> mas_makeConstraints:^(MASConstraintMaker *make) {
+ <#code#>
+ }];`
+
+`mas_update` -> ` [<#view#> mas_updateConstraints:^(MASConstraintMaker *make) {
+ <#code#>
+ }];`
+
+`mas_remake` -> ` [<#view#> mas_remakeConstraints:^(MASConstraintMaker *make) {
+ <#code#>
+ }];`
+
+## Features
+* Not limited to subset of Auto Layout. Anything NSLayoutConstraint can do, Masonry can do too!
+* Great debug support, give your views and constraints meaningful names.
+* Constraints read like sentences.
+* No crazy macro magic. Masonry won't pollute the global namespace with macros.
+* Not string or dictionary based and hence you get compile time checking.
+
+## TODO
+* Eye candy
+* Mac example project
+* More tests and examples
+
--- /dev/null
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 56;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 01D5FBC350E24AD4BF493C0AF742E47E /* MASLayoutConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = C8E52D0D54D9FDA8B5EE9BC43560E445 /* MASLayoutConstraint.h */; settings = {ATTRIBUTES = (Project, ); }; };
+ 24AB0EAAC4F37AD303D1BB86AB39F736 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DB032F0BEDBBDDF91030E59ACA7DC98 /* NSLayoutConstraint+MASDebugAdditions.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
+ 26D2184CF3105C9CCCEF9FF9C4D5FDEA /* Pods-MouseSdk-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 585C3A15C5CB6B03146AA00AAD335C03 /* Pods-MouseSdk-dummy.m */; };
+ 379902484CC10B58ACBD21D949702DC1 /* View+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 64C2B405D244ABC4F0728546D75B2D86 /* View+MASAdditions.h */; settings = {ATTRIBUTES = (Project, ); }; };
+ 3AF45D1B033D1A4B64453248E928BC36 /* ViewController+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA0898FAC44183744D557073E2F8AA5 /* ViewController+MASAdditions.h */; settings = {ATTRIBUTES = (Project, ); }; };
+ 3B749B0DA006A8EC75B9F9D0765EBE6F /* NSLayoutConstraint+MASDebugAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = AA56AA7AF365E444271F9F4BE178D5A0 /* NSLayoutConstraint+MASDebugAdditions.h */; settings = {ATTRIBUTES = (Project, ); }; };
+ 42E543C6C23AF4792D82D23CAC723C12 /* MASConstraint+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = D5BA9F847C587E22F8DD9250EDEC7CDA /* MASConstraint+Private.h */; settings = {ATTRIBUTES = (Project, ); }; };
+ 5115E32226F17A2433E71BC15A2822F3 /* MASViewAttribute.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EE1660D370806B3EFD74C49D3471C1C /* MASViewAttribute.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
+ 704E6E494A06EA86348E495BBF3C0590 /* MASViewAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 49AC5D4983C8BEF841BBE185811C5FB0 /* MASViewAttribute.h */; settings = {ATTRIBUTES = (Project, ); }; };
+ 727EA7C5B2FF764A03E45CAE98724D26 /* MASCompositeConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D0AEA8F34CAE43AA76247FF577BAA68 /* MASCompositeConstraint.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
+ 827971675DDE1BD225031B3F3C89450B /* MASConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 411CCCE6A707DDA02AF236A6F4DD8B74 /* MASConstraint.h */; settings = {ATTRIBUTES = (Project, ); }; };
+ 8562329F59D19A5D42E8189AEC5C9F74 /* ViewController+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 553DA097256D24886D70E33FBA786911 /* ViewController+MASAdditions.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
+ 94254125B423FF3CCCEEEA678C45D409 /* View+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 587E0B8E883D6AD4B29DA2365B8C2EFA /* View+MASAdditions.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
+ 9B9D5BF5A9583E295E2DC177F33044E5 /* MASConstraintMaker.h in Headers */ = {isa = PBXBuildFile; fileRef = 72A1A97E52C283A47BA4E8F48BC313FB /* MASConstraintMaker.h */; settings = {ATTRIBUTES = (Project, ); }; };
+ 9D575416E156D30605981CDCC2B28AAB /* NSArray+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FBB3725D2C0052C8143BF229622340A /* NSArray+MASAdditions.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
+ 9FFB593F45C2C9350C28928F6ED3C091 /* Masonry-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 16AEBAAA2225352CFA3BA703D5C21510 /* Masonry-dummy.m */; };
+ ACE84EB117EDD90B79AF71B105CCCBD9 /* NSArray+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = C5C44599FE7C1C51F94F910C9C3E7827 /* NSArray+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Project, ); }; };
+ B238C8D8E125203D933A6D5C6DCD1076 /* MASViewConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F8160CD72114EFF3597CD4BF6F7F1F7 /* MASViewConstraint.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
+ CB191345BCC56C623BB5B802261183A7 /* MASUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 5EFED6E52B374EE53B8B532C8A65A293 /* MASUtilities.h */; settings = {ATTRIBUTES = (Project, ); }; };
+ CD12B6AC301CC6D3E89D64742EADC39F /* Masonry.h in Headers */ = {isa = PBXBuildFile; fileRef = 45892546416F43C43E8AA0E2AA27BC95 /* Masonry.h */; settings = {ATTRIBUTES = (Project, ); }; };
+ D282CD515ECB4D344D99048D72F2186D /* MASCompositeConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 558B2763E324B8D237D904287AE7A690 /* MASCompositeConstraint.h */; settings = {ATTRIBUTES = (Project, ); }; };
+ D295690DD8FF928B0F83D9C8B9F700E4 /* MASConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = A301E9D7640CAAE872D2257184D64010 /* MASConstraint.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
+ D43380309815EEA67C52B47B4DE0A025 /* NSArray+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8967E66A2FCB5BA81BFA1E139139A237 /* NSArray+MASAdditions.h */; settings = {ATTRIBUTES = (Project, ); }; };
+ D588A4509D9AECD888834F18E34B8DA3 /* MASConstraintMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = 935171CB319C057FAEE8F843F46825FE /* MASConstraintMaker.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
+ D94606FD6932B455C44EDAE275073C9F /* View+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 370F325DDBF27B3EF280D0011A024B35 /* View+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Project, ); }; };
+ DDEA7B10C38C2E9E7ABC712878E90043 /* MASLayoutConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = AA01142B191C535B620A7D90F8B79380 /* MASLayoutConstraint.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
+ F12EB7DF51A64F59A4D4DF3D69E4A5AF /* MASViewConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = A9244EA17B6E04FACE497603F0088190 /* MASViewConstraint.h */; settings = {ATTRIBUTES = (Project, ); }; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 64C4BAD846FDF39F71C0BE0B4D3A7FD2 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 55AF53E6C77A10ED4985E04D74A8878E;
+ remoteInfo = Masonry;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 0D0AEA8F34CAE43AA76247FF577BAA68 /* MASCompositeConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASCompositeConstraint.m; path = Masonry/MASCompositeConstraint.m; sourceTree = "<group>"; };
+ 16AEBAAA2225352CFA3BA703D5C21510 /* Masonry-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Masonry-dummy.m"; sourceTree = "<group>"; };
+ 1FFED36A657123030ABB700256D73F15 /* Masonry */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = Masonry; path = libMasonry.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 2F8160CD72114EFF3597CD4BF6F7F1F7 /* MASViewConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASViewConstraint.m; path = Masonry/MASViewConstraint.m; sourceTree = "<group>"; };
+ 370F325DDBF27B3EF280D0011A024B35 /* View+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "View+MASShorthandAdditions.h"; path = "Masonry/View+MASShorthandAdditions.h"; sourceTree = "<group>"; };
+ 411CCCE6A707DDA02AF236A6F4DD8B74 /* MASConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASConstraint.h; path = Masonry/MASConstraint.h; sourceTree = "<group>"; };
+ 44AEC6462659DC0098D6E58E0470E73F /* Masonry.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Masonry.release.xcconfig; sourceTree = "<group>"; };
+ 45892546416F43C43E8AA0E2AA27BC95 /* Masonry.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Masonry.h; path = Masonry/Masonry.h; sourceTree = "<group>"; };
+ 49AC5D4983C8BEF841BBE185811C5FB0 /* MASViewAttribute.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASViewAttribute.h; path = Masonry/MASViewAttribute.h; sourceTree = "<group>"; };
+ 553DA097256D24886D70E33FBA786911 /* ViewController+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "ViewController+MASAdditions.m"; path = "Masonry/ViewController+MASAdditions.m"; sourceTree = "<group>"; };
+ 558B2763E324B8D237D904287AE7A690 /* MASCompositeConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASCompositeConstraint.h; path = Masonry/MASCompositeConstraint.h; sourceTree = "<group>"; };
+ 585C3A15C5CB6B03146AA00AAD335C03 /* Pods-MouseSdk-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-MouseSdk-dummy.m"; sourceTree = "<group>"; };
+ 587E0B8E883D6AD4B29DA2365B8C2EFA /* View+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "View+MASAdditions.m"; path = "Masonry/View+MASAdditions.m"; sourceTree = "<group>"; };
+ 5DB032F0BEDBBDDF91030E59ACA7DC98 /* NSLayoutConstraint+MASDebugAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSLayoutConstraint+MASDebugAdditions.m"; path = "Masonry/NSLayoutConstraint+MASDebugAdditions.m"; sourceTree = "<group>"; };
+ 5EFED6E52B374EE53B8B532C8A65A293 /* MASUtilities.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASUtilities.h; path = Masonry/MASUtilities.h; sourceTree = "<group>"; };
+ 64C2B405D244ABC4F0728546D75B2D86 /* View+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "View+MASAdditions.h"; path = "Masonry/View+MASAdditions.h"; sourceTree = "<group>"; };
+ 6FBB3725D2C0052C8143BF229622340A /* NSArray+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+MASAdditions.m"; path = "Masonry/NSArray+MASAdditions.m"; sourceTree = "<group>"; };
+ 72A1A97E52C283A47BA4E8F48BC313FB /* MASConstraintMaker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASConstraintMaker.h; path = Masonry/MASConstraintMaker.h; sourceTree = "<group>"; };
+ 72D98643BA30A79011275CBE433EF86F /* Masonry.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Masonry.debug.xcconfig; sourceTree = "<group>"; };
+ 7EE1660D370806B3EFD74C49D3471C1C /* MASViewAttribute.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASViewAttribute.m; path = Masonry/MASViewAttribute.m; sourceTree = "<group>"; };
+ 8967E66A2FCB5BA81BFA1E139139A237 /* NSArray+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+MASAdditions.h"; path = "Masonry/NSArray+MASAdditions.h"; sourceTree = "<group>"; };
+ 8BA0898FAC44183744D557073E2F8AA5 /* ViewController+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "ViewController+MASAdditions.h"; path = "Masonry/ViewController+MASAdditions.h"; sourceTree = "<group>"; };
+ 91F10A7E4BAA437E4DF7B3CED9B560B4 /* Masonry-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Masonry-prefix.pch"; sourceTree = "<group>"; };
+ 935171CB319C057FAEE8F843F46825FE /* MASConstraintMaker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASConstraintMaker.m; path = Masonry/MASConstraintMaker.m; sourceTree = "<group>"; };
+ 9A8CA8C9D66D3BFAB6F6CCFC79DC31C9 /* Pods-MouseSdk */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "Pods-MouseSdk"; path = "libPods-MouseSdk.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
+ A301E9D7640CAAE872D2257184D64010 /* MASConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASConstraint.m; path = Masonry/MASConstraint.m; sourceTree = "<group>"; };
+ A9244EA17B6E04FACE497603F0088190 /* MASViewConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASViewConstraint.h; path = Masonry/MASViewConstraint.h; sourceTree = "<group>"; };
+ AA01142B191C535B620A7D90F8B79380 /* MASLayoutConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASLayoutConstraint.m; path = Masonry/MASLayoutConstraint.m; sourceTree = "<group>"; };
+ AA56AA7AF365E444271F9F4BE178D5A0 /* NSLayoutConstraint+MASDebugAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSLayoutConstraint+MASDebugAdditions.h"; path = "Masonry/NSLayoutConstraint+MASDebugAdditions.h"; sourceTree = "<group>"; };
+ C5C44599FE7C1C51F94F910C9C3E7827 /* NSArray+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+MASShorthandAdditions.h"; path = "Masonry/NSArray+MASShorthandAdditions.h"; sourceTree = "<group>"; };
+ C852EDA6DDC5C8053C7F2FF7149F31E3 /* Pods-MouseSdk-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MouseSdk-acknowledgements.plist"; sourceTree = "<group>"; };
+ C8E52D0D54D9FDA8B5EE9BC43560E445 /* MASLayoutConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASLayoutConstraint.h; path = Masonry/MASLayoutConstraint.h; sourceTree = "<group>"; };
+ D5BA9F847C587E22F8DD9250EDEC7CDA /* MASConstraint+Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "MASConstraint+Private.h"; path = "Masonry/MASConstraint+Private.h"; sourceTree = "<group>"; };
+ F9872DA2CEBC0ECDA2FC315617F2419F /* Pods-MouseSdk.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MouseSdk.release.xcconfig"; sourceTree = "<group>"; };
+ F9B0189607C6CE102AD4898A68202943 /* Pods-MouseSdk-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-MouseSdk-acknowledgements.markdown"; sourceTree = "<group>"; };
+ FF7FB93BB5F5277C8A2E23AFB399BC2B /* Pods-MouseSdk.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MouseSdk.debug.xcconfig"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 907AD26A9F98C723CE396A46535B55F5 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ B29ADE130CB709212BBF0317DEB79D6B /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 0B3367E8FD03BB99810868B1CA43FAFE /* Targets Support Files */ = {
+ isa = PBXGroup;
+ children = (
+ 6E9E886ECCB3454D14D1DF90A3C68B2B /* Pods-MouseSdk */,
+ );
+ name = "Targets Support Files";
+ sourceTree = "<group>";
+ };
+ 4357C9F6652A94DC2CBCC1A30010EE33 /* Support Files */ = {
+ isa = PBXGroup;
+ children = (
+ 16AEBAAA2225352CFA3BA703D5C21510 /* Masonry-dummy.m */,
+ 91F10A7E4BAA437E4DF7B3CED9B560B4 /* Masonry-prefix.pch */,
+ 72D98643BA30A79011275CBE433EF86F /* Masonry.debug.xcconfig */,
+ 44AEC6462659DC0098D6E58E0470E73F /* Masonry.release.xcconfig */,
+ );
+ name = "Support Files";
+ path = "../Target Support Files/Masonry";
+ sourceTree = "<group>";
+ };
+ 6E9E886ECCB3454D14D1DF90A3C68B2B /* Pods-MouseSdk */ = {
+ isa = PBXGroup;
+ children = (
+ F9B0189607C6CE102AD4898A68202943 /* Pods-MouseSdk-acknowledgements.markdown */,
+ C852EDA6DDC5C8053C7F2FF7149F31E3 /* Pods-MouseSdk-acknowledgements.plist */,
+ 585C3A15C5CB6B03146AA00AAD335C03 /* Pods-MouseSdk-dummy.m */,
+ FF7FB93BB5F5277C8A2E23AFB399BC2B /* Pods-MouseSdk.debug.xcconfig */,
+ F9872DA2CEBC0ECDA2FC315617F2419F /* Pods-MouseSdk.release.xcconfig */,
+ );
+ name = "Pods-MouseSdk";
+ path = "Target Support Files/Pods-MouseSdk";
+ sourceTree = "<group>";
+ };
+ 7529FD53BCE26816CCD46658378AAF1B /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ F47FDAAE8298DEBC98D156CFA4146C99 /* Masonry */,
+ );
+ name = Pods;
+ sourceTree = "<group>";
+ };
+ 90F18A9011FE1A18734ECDE301C5D702 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 1FFED36A657123030ABB700256D73F15 /* Masonry */,
+ 9A8CA8C9D66D3BFAB6F6CCFC79DC31C9 /* Pods-MouseSdk */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ CF1408CF629C7361332E53B88F7BD30C = {
+ isa = PBXGroup;
+ children = (
+ 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */,
+ D89477F20FB1DE18A04690586D7808C4 /* Frameworks */,
+ 7529FD53BCE26816CCD46658378AAF1B /* Pods */,
+ 90F18A9011FE1A18734ECDE301C5D702 /* Products */,
+ 0B3367E8FD03BB99810868B1CA43FAFE /* Targets Support Files */,
+ );
+ sourceTree = "<group>";
+ };
+ D89477F20FB1DE18A04690586D7808C4 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ F47FDAAE8298DEBC98D156CFA4146C99 /* Masonry */ = {
+ isa = PBXGroup;
+ children = (
+ 558B2763E324B8D237D904287AE7A690 /* MASCompositeConstraint.h */,
+ 0D0AEA8F34CAE43AA76247FF577BAA68 /* MASCompositeConstraint.m */,
+ 411CCCE6A707DDA02AF236A6F4DD8B74 /* MASConstraint.h */,
+ A301E9D7640CAAE872D2257184D64010 /* MASConstraint.m */,
+ D5BA9F847C587E22F8DD9250EDEC7CDA /* MASConstraint+Private.h */,
+ 72A1A97E52C283A47BA4E8F48BC313FB /* MASConstraintMaker.h */,
+ 935171CB319C057FAEE8F843F46825FE /* MASConstraintMaker.m */,
+ C8E52D0D54D9FDA8B5EE9BC43560E445 /* MASLayoutConstraint.h */,
+ AA01142B191C535B620A7D90F8B79380 /* MASLayoutConstraint.m */,
+ 45892546416F43C43E8AA0E2AA27BC95 /* Masonry.h */,
+ 5EFED6E52B374EE53B8B532C8A65A293 /* MASUtilities.h */,
+ 49AC5D4983C8BEF841BBE185811C5FB0 /* MASViewAttribute.h */,
+ 7EE1660D370806B3EFD74C49D3471C1C /* MASViewAttribute.m */,
+ A9244EA17B6E04FACE497603F0088190 /* MASViewConstraint.h */,
+ 2F8160CD72114EFF3597CD4BF6F7F1F7 /* MASViewConstraint.m */,
+ 8967E66A2FCB5BA81BFA1E139139A237 /* NSArray+MASAdditions.h */,
+ 6FBB3725D2C0052C8143BF229622340A /* NSArray+MASAdditions.m */,
+ C5C44599FE7C1C51F94F910C9C3E7827 /* NSArray+MASShorthandAdditions.h */,
+ AA56AA7AF365E444271F9F4BE178D5A0 /* NSLayoutConstraint+MASDebugAdditions.h */,
+ 5DB032F0BEDBBDDF91030E59ACA7DC98 /* NSLayoutConstraint+MASDebugAdditions.m */,
+ 64C2B405D244ABC4F0728546D75B2D86 /* View+MASAdditions.h */,
+ 587E0B8E883D6AD4B29DA2365B8C2EFA /* View+MASAdditions.m */,
+ 370F325DDBF27B3EF280D0011A024B35 /* View+MASShorthandAdditions.h */,
+ 8BA0898FAC44183744D557073E2F8AA5 /* ViewController+MASAdditions.h */,
+ 553DA097256D24886D70E33FBA786911 /* ViewController+MASAdditions.m */,
+ 4357C9F6652A94DC2CBCC1A30010EE33 /* Support Files */,
+ );
+ name = Masonry;
+ path = Masonry;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 2A3EBFC0646B1C38B42A258D68224E28 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D282CD515ECB4D344D99048D72F2186D /* MASCompositeConstraint.h in Headers */,
+ 827971675DDE1BD225031B3F3C89450B /* MASConstraint.h in Headers */,
+ 42E543C6C23AF4792D82D23CAC723C12 /* MASConstraint+Private.h in Headers */,
+ 9B9D5BF5A9583E295E2DC177F33044E5 /* MASConstraintMaker.h in Headers */,
+ 01D5FBC350E24AD4BF493C0AF742E47E /* MASLayoutConstraint.h in Headers */,
+ CD12B6AC301CC6D3E89D64742EADC39F /* Masonry.h in Headers */,
+ CB191345BCC56C623BB5B802261183A7 /* MASUtilities.h in Headers */,
+ 704E6E494A06EA86348E495BBF3C0590 /* MASViewAttribute.h in Headers */,
+ F12EB7DF51A64F59A4D4DF3D69E4A5AF /* MASViewConstraint.h in Headers */,
+ D43380309815EEA67C52B47B4DE0A025 /* NSArray+MASAdditions.h in Headers */,
+ ACE84EB117EDD90B79AF71B105CCCBD9 /* NSArray+MASShorthandAdditions.h in Headers */,
+ 3B749B0DA006A8EC75B9F9D0765EBE6F /* NSLayoutConstraint+MASDebugAdditions.h in Headers */,
+ 379902484CC10B58ACBD21D949702DC1 /* View+MASAdditions.h in Headers */,
+ D94606FD6932B455C44EDAE275073C9F /* View+MASShorthandAdditions.h in Headers */,
+ 3AF45D1B033D1A4B64453248E928BC36 /* ViewController+MASAdditions.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ B3290CEF5B95A8F8482CE29E2923A692 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 488F4A0D7D6DE42ABD3D07A259BE62C3 /* Pods-MouseSdk */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 567A9A3B2E7F22AA77D5FE5ADD55B9CC /* Build configuration list for PBXNativeTarget "Pods-MouseSdk" */;
+ buildPhases = (
+ B3290CEF5B95A8F8482CE29E2923A692 /* Headers */,
+ 9A7DEE6CA1CAF0843CC9BB49294F871C /* Sources */,
+ B29ADE130CB709212BBF0317DEB79D6B /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 7016EED728ADD4F8B970342169922D3C /* PBXTargetDependency */,
+ );
+ name = "Pods-MouseSdk";
+ productName = "Pods-MouseSdk";
+ productReference = 9A8CA8C9D66D3BFAB6F6CCFC79DC31C9 /* Pods-MouseSdk */;
+ productType = "com.apple.product-type.library.static";
+ };
+ 55AF53E6C77A10ED4985E04D74A8878E /* Masonry */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 6525CCFB5FEEBC36FDDE16A88CD85B83 /* Build configuration list for PBXNativeTarget "Masonry" */;
+ buildPhases = (
+ 2A3EBFC0646B1C38B42A258D68224E28 /* Headers */,
+ E707C1A87E08D1505E9E592237845A37 /* Sources */,
+ 907AD26A9F98C723CE396A46535B55F5 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Masonry;
+ productName = Masonry;
+ productReference = 1FFED36A657123030ABB700256D73F15 /* Masonry */;
+ productType = "com.apple.product-type.library.static";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ BFDFE7DC352907FC980B868725387E98 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastSwiftUpdateCheck = 1500;
+ LastUpgradeCheck = 1500;
+ };
+ buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */;
+ compatibilityVersion = "Xcode 14.0";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ Base,
+ en,
+ );
+ mainGroup = CF1408CF629C7361332E53B88F7BD30C;
+ productRefGroup = 90F18A9011FE1A18734ECDE301C5D702 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 55AF53E6C77A10ED4985E04D74A8878E /* Masonry */,
+ 488F4A0D7D6DE42ABD3D07A259BE62C3 /* Pods-MouseSdk */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 9A7DEE6CA1CAF0843CC9BB49294F871C /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 26D2184CF3105C9CCCEF9FF9C4D5FDEA /* Pods-MouseSdk-dummy.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ E707C1A87E08D1505E9E592237845A37 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 727EA7C5B2FF764A03E45CAE98724D26 /* MASCompositeConstraint.m in Sources */,
+ D295690DD8FF928B0F83D9C8B9F700E4 /* MASConstraint.m in Sources */,
+ D588A4509D9AECD888834F18E34B8DA3 /* MASConstraintMaker.m in Sources */,
+ DDEA7B10C38C2E9E7ABC712878E90043 /* MASLayoutConstraint.m in Sources */,
+ 9FFB593F45C2C9350C28928F6ED3C091 /* Masonry-dummy.m in Sources */,
+ 5115E32226F17A2433E71BC15A2822F3 /* MASViewAttribute.m in Sources */,
+ B238C8D8E125203D933A6D5C6DCD1076 /* MASViewConstraint.m in Sources */,
+ 9D575416E156D30605981CDCC2B28AAB /* NSArray+MASAdditions.m in Sources */,
+ 24AB0EAAC4F37AD303D1BB86AB39F736 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */,
+ 94254125B423FF3CCCEEEA678C45D409 /* View+MASAdditions.m in Sources */,
+ 8562329F59D19A5D42E8189AEC5C9F74 /* ViewController+MASAdditions.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 7016EED728ADD4F8B970342169922D3C /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ name = Masonry;
+ target = 55AF53E6C77A10ED4985E04D74A8878E /* Masonry */;
+ targetProxy = 64C4BAD846FDF39F71C0BE0B4D3A7FD2 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ 339EA37EE0DD2CE9A82B29DCA14B18B2 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 44AEC6462659DC0098D6E58E0470E73F /* Masonry.release.xcconfig */;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
+ "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
+ EXECUTABLE_PREFIX = lib;
+ GCC_PREFIX_HEADER = "Target Support Files/Masonry/Masonry-prefix.pch";
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ OTHER_LDFLAGS = "";
+ OTHER_LIBTOOLFLAGS = "";
+ PRIVATE_HEADERS_FOLDER_PATH = "";
+ PRODUCT_MODULE_NAME = Masonry;
+ PRODUCT_NAME = Masonry;
+ PUBLIC_HEADERS_FOLDER_PATH = "";
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Release;
+ };
+ 6D85457611610EBB09B7E1CFF82925CC /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = FF7FB93BB5F5277C8A2E23AFB399BC2B /* Pods-MouseSdk.debug.xcconfig */;
+ buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
+ "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
+ EXECUTABLE_PREFIX = lib;
+ MACH_O_TYPE = staticlib;
+ MACOSX_DEPLOYMENT_TARGET = 11.0;
+ OTHER_LDFLAGS = "";
+ OTHER_LIBTOOLFLAGS = "";
+ PODS_ROOT = "$(SRCROOT)";
+ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ };
+ name = Debug;
+ };
+ 82E73717A2562031D5E1F4D85DD1A982 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "POD_CONFIGURATION_RELEASE=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;
+ MACOSX_DEPLOYMENT_TARGET = 11.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ MTL_FAST_MATH = YES;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ STRIP_INSTALLED_PRODUCT = NO;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ SWIFT_VERSION = 5.0;
+ SYMROOT = "${SRCROOT}/../build";
+ };
+ name = Release;
+ };
+ C4BA89ED58953BE573688CF2F91E85E2 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = F9872DA2CEBC0ECDA2FC315617F2419F /* Pods-MouseSdk.release.xcconfig */;
+ buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
+ "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
+ EXECUTABLE_PREFIX = lib;
+ MACH_O_TYPE = staticlib;
+ MACOSX_DEPLOYMENT_TARGET = 11.0;
+ OTHER_LDFLAGS = "";
+ OTHER_LIBTOOLFLAGS = "";
+ PODS_ROOT = "$(SRCROOT)";
+ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ };
+ name = Release;
+ };
+ C8C03C0DDA19B089DA0782EAA6FAEB16 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 72D98643BA30A79011275CBE433EF86F /* Masonry.debug.xcconfig */;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
+ "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
+ EXECUTABLE_PREFIX = lib;
+ GCC_PREFIX_HEADER = "Target Support Files/Masonry/Masonry-prefix.pch";
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ OTHER_LDFLAGS = "";
+ OTHER_LIBTOOLFLAGS = "";
+ PRIVATE_HEADERS_FOLDER_PATH = "";
+ PRODUCT_MODULE_NAME = Masonry;
+ PRODUCT_NAME = Masonry;
+ PUBLIC_HEADERS_FOLDER_PATH = "";
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Debug;
+ };
+ D39E634FC2CFF97419EB3682DD2807FA /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "POD_CONFIGURATION_DEBUG=1",
+ "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;
+ MACOSX_DEPLOYMENT_TARGET = 11.0;
+ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+ MTL_FAST_MATH = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ STRIP_INSTALLED_PRODUCT = NO;
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ SYMROOT = "${SRCROOT}/../build";
+ };
+ name = Debug;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ D39E634FC2CFF97419EB3682DD2807FA /* Debug */,
+ 82E73717A2562031D5E1F4D85DD1A982 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 567A9A3B2E7F22AA77D5FE5ADD55B9CC /* Build configuration list for PBXNativeTarget "Pods-MouseSdk" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 6D85457611610EBB09B7E1CFF82925CC /* Debug */,
+ C4BA89ED58953BE573688CF2F91E85E2 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 6525CCFB5FEEBC36FDDE16A88CD85B83 /* Build configuration list for PBXNativeTarget "Masonry" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C8C03C0DDA19B089DA0782EAA6FAEB16 /* Debug */,
+ 339EA37EE0DD2CE9A82B29DCA14B18B2 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */;
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1500"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "55AF53E6C77A10ED4985E04D74A8878E"
+ BuildableName = "libMasonry.a"
+ BlueprintName = "Masonry"
+ ReferencedContainer = "container:Pods.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1500"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "488F4A0D7D6DE42ABD3D07A259BE62C3"
+ BuildableName = "libPods-MouseSdk.a"
+ BlueprintName = "Pods-MouseSdk"
+ ReferencedContainer = "container:Pods.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>Masonry.xcscheme</key>
+ <dict>
+ <key>isShown</key>
+ <false/>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ <key>Pods-MouseSdk.xcscheme</key>
+ <dict>
+ <key>isShown</key>
+ <false/>
+ <key>orderHint</key>
+ <integer>1</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict/>
+</dict>
+</plist>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>Masonry.xcscheme_^#shared#^_</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>1</integer>
+ </dict>
+ <key>Pods-MouseSdk.xcscheme_^#shared#^_</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>2</integer>
+ </dict>
+ </dict>
+</dict>
+</plist>
--- /dev/null
+#import <Foundation/Foundation.h>
+@interface PodsDummy_Masonry : NSObject
+@end
+@implementation PodsDummy_Masonry
+@end
--- /dev/null
+#ifdef __OBJC__
+#import <Cocoa/Cocoa.h>
+#else
+#ifndef FOUNDATION_EXPORT
+#if defined(__cplusplus)
+#define FOUNDATION_EXPORT extern "C"
+#else
+#define FOUNDATION_EXPORT extern
+#endif
+#endif
+#endif
+
--- /dev/null
+CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
+CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry
+GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
+HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry"
+PODS_BUILD_DIR = ${BUILD_DIR}
+PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
+PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
+PODS_ROOT = ${SRCROOT}
+PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry
+PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
+PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
+SKIP_INSTALL = YES
+USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
--- /dev/null
+CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
+CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry
+GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
+HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry"
+PODS_BUILD_DIR = ${BUILD_DIR}
+PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
+PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
+PODS_ROOT = ${SRCROOT}
+PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry
+PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
+PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
+SKIP_INSTALL = YES
+USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
--- /dev/null
+# Acknowledgements
+This application makes use of the following third party libraries:
+
+## Masonry
+
+Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+Generated by CocoaPods - https://cocoapods.org
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>PreferenceSpecifiers</key>
+ <array>
+ <dict>
+ <key>FooterText</key>
+ <string>This application makes use of the following third party libraries:</string>
+ <key>Title</key>
+ <string>Acknowledgements</string>
+ <key>Type</key>
+ <string>PSGroupSpecifier</string>
+ </dict>
+ <dict>
+ <key>FooterText</key>
+ <string>Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.</string>
+ <key>License</key>
+ <string>MIT</string>
+ <key>Title</key>
+ <string>Masonry</string>
+ <key>Type</key>
+ <string>PSGroupSpecifier</string>
+ </dict>
+ <dict>
+ <key>FooterText</key>
+ <string>Generated by CocoaPods - https://cocoapods.org</string>
+ <key>Title</key>
+ <string></string>
+ <key>Type</key>
+ <string>PSGroupSpecifier</string>
+ </dict>
+ </array>
+ <key>StringsTable</key>
+ <string>Acknowledgements</string>
+ <key>Title</key>
+ <string>Acknowledgements</string>
+</dict>
+</plist>
--- /dev/null
+#import <Foundation/Foundation.h>
+@interface PodsDummy_Pods_MouseSdk : NSObject
+@end
+@implementation PodsDummy_Pods_MouseSdk
+@end
--- /dev/null
+CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
+GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
+HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry"
+LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry"
+OTHER_LDFLAGS = $(inherited) -ObjC -l"Masonry" -framework "AppKit" -framework "Foundation"
+PODS_BUILD_DIR = ${BUILD_DIR}
+PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
+PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
+PODS_ROOT = ${SRCROOT}/Pods
+PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
+USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
--- /dev/null
+CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
+GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
+HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry"
+LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Masonry"
+OTHER_LDFLAGS = $(inherited) -ObjC -l"Masonry" -framework "AppKit" -framework "Foundation"
+PODS_BUILD_DIR = ${BUILD_DIR}
+PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
+PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
+PODS_ROOT = ${SRCROOT}/Pods
+PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
+USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
--- /dev/null
+ 10:39:59:506 ~ [AiMouseSdk] MouseSdk_v2024120303\r
+开始初始化\r
+[STBS]\r
+Version:1.0.3\r
+timeout not support. will lock forever.\r
+[STBS]\r
+wating for Recv Sem\r
+ 10:39:59:538 ~ [HidManager] 关闭hid\r
+ 10:39:59:539 ~ [HidManager] 关闭hid成功!\r
+ 10:39:59:539 ~ [HidManager] 打开hid成功!\r
+ 10:39:59:624 ~ [BleManager] 当前电脑蓝牙状态 = 5\r
+ 10:40:04:540 ~ [HidManager] 关闭hid\r
+ 10:40:04:541 ~ [HidManager] 关闭hid成功!\r
+ 10:40:04:542 ~ [HidManager] 打开hid成功!\r
+ 10:40:04:547 ~ [BleManager] 配对匹配过的设备VMouse\r
+ 10:40:04:547 ~ [BleManager] 连接设备 <CBPeripheral: 0x600002340000, identifier = C730BE9C-EB76-0B05-F828-0D0EC87C9A38, name = VMouse, mtu = 0, state = disconnected>\r
+ 10:40:04:549 ~ [BleManager] 发现服务\r
+BOOL _NSPersistentUIDeleteItemAtFileURL(NSURL *const __strong) Failed to stat item: file:///Users/yaozuopan/Library/Containers/zhihuishixun.MouseSdk/Data/Library/Saved%20Application%20State/zhihuishixun.MouseSdk.savedState/restorecount.plist\r
+ 10:40:05:597 ~ [BleManager] 连接成功 = VMouse\r
+ 10:40:05:598 ~ [frk]sdk切换到蓝牙模式\r
+ 10:40:05:598 ~ 蓝牙 设备连接状态返回: true\r
+[STBS]\r
+BLE manager Process Thread Sem\r
+timeout not support. will lock forever.\r
+[STBS]\r
+MGNT:SEND BLE DATA\r
+send_data2device = 01\r
+ 10:40:05:600 ~ [frk][send][info][byte] 2D24240124242D\r
+[STBS]\r
+wating for Recv Sem\r
+ 10:40:05:629 ~ [frk][receive][info] 0200\r
+timeout not support. will lock forever.\r
+[STBS]\r
+BLE manager Process Thread Sem\r
+timeout not support. will lock forever.\r
+[STBS]\r
+MGNT:RECV BLE DATA\r
+[STBS]\r
+BIZBUS_CMDTYPE_CHK_DS_RSP\r
+[STBS]\r
+devcie has no ds\r
+[STBS]\r
+time = 1735094405631\r
+[STBS]\r
+wating for Recv Sem\r
+[STBS]\r
+BLE manager Process Thread Sem\r
+timeout not support. will lock forever.\r
+[STBS]\r
+MGNT:SEND BLE DATA\r
+send_data2device = 03 31 37 33 35 30 39 34 34 30 35 36 33 31\r
+ 10:40:05:633 ~ [frk][send][info][byte] 2D2424033137333530393434303536333124242D\r
+[STBS]\r
+wating for Recv Sem\r
+ 10:40:05:673 ~ [frk][receive][info] 046B317238644E655932556934633163616235620033A176868AFCC1EE4D48CDEA86ED6A4083C00DB1433033313030303041353833\r
+timeout not support. will lock forever.\r
+[STBS]\r
+BLE manager Process Thread Sem\r
+timeout not support. will lock forever.\r
+[STBS]\r
+MGNT:RECV BLE DATA\r
+[STBS]\r
+BIZBUS_CMDTYPE_GETDS_AUTHCODE_RSP\r
+[STBS]\r
+auth_code_str:33a176868afcc1ee4d48cdea86ed6a4083c00db1\r
+[STBS]\r
+scons_str:4c1cab5b\r
+[STBS]\r
+product_key_str:k1r8dNeY2Ui\r
+[STBS]\r
+device_name_str:C0310000A583\r
+[STBS]\r
+establish tcp connection with server(host='iot-auth.cn-shanghai.aliyuncs.com', port=[443])\r
+[STBS]\r
+success to establish tcp, fd=8\r
+[STBS]\r
+local port: 50743\r
+[STBS]\r
+[1735094405.749][LK-1000] establish mbedtls connection with server(host='iot-auth.cn-shanghai.aliyuncs.com', port=[443])\r
+[STBS]\r
+[1735094405.892][LK-1000] success to establish mbedtls connection, (cost 51315 bytes in total, max used 54391 bytes)\r
+[STBS]\r
+[1735094405.892][LK-040B] > POST /auth/register/device HTTP/1.1\r
+[STBS]\r
+[1735094405.892][LK-040B] > Host: iot-auth.cn-shanghai.aliyuncs.com\r
+[STBS]\r
+[1735094405.892][LK-040B] > Accept: text/xml,text/javascript,text/html,application/json\r
+[STBS]\r
+[1735094405.893][LK-040B] > Content-Type: application/x-www-form-urlencoded\r
+[STBS]\r
+[1735094405.893][LK-040B] > Content-Length: 133\r
+[STBS]\r
+[1735094405.893][LK-040B] >\r
+[STBS]\r
+\r
+[STBS]\r
+[LK-040C] > 70 72 6F 64 75 63 74 4B 65 79 3D 6B 31 72 38 64 | productKey=k1r8d\r
+[STBS]\r
+[LK-040C] > 4E 65 59 32 55 69 26 64 65 76 69 63 65 4E 61 6D | NeY2Ui&deviceNam\r
+[STBS]\r
+[LK-040C] > 65 3D 43 30 33 31 30 30 30 30 41 35 38 33 26 72 | e=C0310000A583&r\r
+[STBS]\r
+[LK-040C] > 61 6E 64 6F 6D 3D 31 37 33 35 30 39 34 34 30 35 | andom=1735094405\r
+[STBS]\r
+[LK-040C] > 36 33 31 26 73 69 67 6E 3D 33 33 61 31 37 36 38 | 631&sign=33a1768\r
+[STBS]\r
+[LK-040C] > 36 38 61 66 63 63 31 65 65 34 64 34 38 63 64 65 | 68afcc1ee4d48cde\r
+[STBS]\r
+[LK-040C] > 61 38 36 65 64 36 61 34 30 38 33 63 30 30 64 62 | a86ed6a4083c00db\r
+[STBS]\r
+[LK-040C] > 31 26 73 69 67 6E 4D 65 74 68 6F 64 3D 68 6D 61 | 1&signMethod=hma\r
+[STBS]\r
+[LK-040C] > 63 73 68 61 31 | csha1\r
+[STBS]\r
+\r
+[STBS]\r
+[1735094406.042][LK-040D] < HTTP/1.1 200 OK\r
+[STBS]\r
+[1735094406.042][LK-040D] < X-Application-Context: iotx-base:vpc-sh-nc:7001\r
+[STBS]\r
+[1735094406.042][LK-040D] < Content-Type: text/xml\r
+[STBS]\r
+[1735094406.042][LK-040D] < Content-Length: 146\r
+[STBS]\r
+[1735094406.042][LK-040D] < Date: Wed, 25 Dec 2024 02:40:05 GMT\r
+[STBS]\r
+[1735094406.042][LK-040D] <\r
+[STBS]\r
+\r
+[STBS]\r
+[LK-040E] < 7B 22 63 6F 64 65 22 3A 32 30 30 2C 22 64 61 74 | {"code":200,"dat\r
+[STBS]\r
+[LK-040E] < 61 22 3A 7B 22 64 65 76 69 63 65 4E 61 6D 65 22 | a":{"deviceName"\r
+[STBS]\r
+[LK-040E] < 3A 22 43 30 33 31 30 30 30 30 41 35 38 33 22 2C | :"C0310000A583",\r
+[STBS]\r
+[LK-040E] < 22 64 65 76 69 63 65 53 65 63 72 65 74 22 3A 22 | "deviceSecret":"\r
+[STBS]\r
+[LK-040E] < 39 36 38 61 37 62 31 35 39 34 63 30 34 35 35 36 | 968a7b1594c04556\r
+[STBS]\r
+[LK-040E] < 35 32 30 38 66 32 62 30 38 36 63 61 65 62 36 31 | 5208f2b086caeb61\r
+[STBS]\r
+[LK-040E] < 22 2C 22 70 72 6F 64 75 63 74 4B 65 79 22 3A 22 | ","productKey":"\r
+[STBS]\r
+[LK-040E] < 6B 31 72 38 64 4E 65 59 32 55 69 22 7D 2C 22 6D | k1r8dNeY2Ui"},"m\r
+[STBS]\r
+[LK-040E] < 65 73 73 61 67 65 22 3A 22 73 75 63 63 65 73 73 | essage":"success\r
+[STBS]\r
+[LK-040E] < 22 7D | "}\r
+[STBS]\r
+\r
+[STBS]\r
+status code: 200\r
+[STBS]\r
+device secret: 968a7b1594c045565208f2b086caeb61\r
+STB_DYNREG_SUCCESS\r
+event_callback type = 4278190080,data = {length = 0, bytes = 0x},data_len = 0\r
+[STBS]\r
+[1735094406.044][LK-1000] adapter_network_deinit\r
+[STBS]\r
+dynreg success, start download ds\r
+[STBS]\r
+ds[32] = 968a7b1594c045565208f2b086caeb61\r
+[STBS]\r
+wating for Recv Sem\r
+[STBS]\r
+BLE manager Process Thread Sem\r
+timeout not support. will lock forever.\r
+[STBS]\r
+MGNT:SEND BLE DATA\r
+send_data2device = 05 5C E6 FD 95 91 E2 84 6E E5 50 46 D6 07 49 D9 90 7A B9 C5 87 BC 7B 30 40 F1 7A DC 81 1B 8F E3 36\r
+ 10:40:06:045 ~ [frk][send][info][byte] 2D2424055CE6FD9591E2846EE55046D60749D9907AB9C587BC7B3040F17ADC811B8FE33624242D\r
+[STBS]\r
+wating for Recv Sem\r
+ 10:40:06:122 ~ [frk][receive][info] 0600\r
+timeout not support. will lock forever.\r
+[STBS]\r
+BLE manager Process Thread Sem\r
+timeout not support. will lock forever.\r
+[STBS]\r
+MGNT:RECV BLE DATA\r
+[STBS]\r
+BIZBUS_CMDTYPE_DOWNLOAD_DS_RSP\r
+[STBS]\r
+ds save success\r
+[STBS]\r
+start get mqtt connect info\r
+[STBS]\r
+wating for Recv Sem\r
+[STBS]\r
+BLE manager Process Thread Sem\r
+timeout not support. will lock forever.\r
+[STBS]\r
+MGNT:SEND BLE DATA\r
+send_data2device = 07 31 37 33 35 30 39 34 34 30 36 31 32 33\r
+ 10:40:06:129 ~ [frk][send][info][byte] 2D2424073137333530393434303631323324242D\r
+[STBS]\r
+wating for Recv Sem\r
+ 10:40:06:168 ~ [frk][receive][info] 086B317238644E655932556900FF6AF90FE6A5FB58C343E1A618183A8B9A4E4BAB433033313030303041353833\r
+timeout not support. will lock forever.\r
+[STBS]\r
+BLE manager Process Thread Sem\r
+timeout not support. will lock forever.\r
+[STBS]\r
+MGNT:RECV BLE DATA\r
+[STBS]\r
+BIZBUS_CMDTYPE_GETMQTT_INFO_RSP\r
+[STBS]\r
+product_key = k1r8dNeY2Ui\r
+[STBS]\r
+device_name = C0310000A583\r
+[STBS]\r
+auth_code = ff6af90fe6a5fb58c343e1a618183a8b9a4e4bab\r
+timeout not support. will lock forever.\r
+[STBS]\r
+[STBS]\r
+wating for Recv Sem\r
+mqtt_client_id:k1r8dNeY2Ui&C0310000A583|timestamp=1735094406123,securemode=2,signmethod=hmacsha1|\r
+[STBS]\r
+mqtt_username:C0310000A583&k1r8dNeY2Ui\r
+[STBS]\r
+mqtt_pwd:ff6af90fe6a5fb58c343e1a618183a8b9a4e4bab\r
+[STBS]\r
+[1735094406.169][LK-0313] MQTT user calls aiot_mqtt_connect api, connect\r
+[STBS]\r
+establish tcp connection with server(host='iot-060aenzm.mqtt.iothub.aliyuncs.com', port=[8883])\r
+[STBS]\r
+success to establish tcp, fd=8\r
+[STBS]\r
+local port: 50744\r
+[STBS]\r
+[1735094406.220][LK-1000] establish mbedtls connection with server(host='iot-060aenzm.mqtt.iothub.aliyuncs.com', port=[8883])\r
+[STBS]\r
+[1735094406.384][LK-1000] success to establish mbedtls connection, (cost 50394 bytes in total, max used 53470 bytes)\r
+[STBS]\r
+[1735094406.455][LK-0313] MQTT connect success in 286 ms\r
+[STBS]\r
+AIOT_MQTTEVT_CONNECT\r
+[STBS]\r
+cust_bytecmd_linksdk_appp_event_callback,146,cust_linksdk_appp_event_callback\r
+[STBS]\r
+event_type = 0\r
+[STBS]\r
+cust_bytecmd_linksdk_appp_event_callback,151,LINKSDK_APP_MQTT_CONNECT_SUCCESS\r
+STB_MQTT_CONNECT_SUCCESS\r
+[STBS]\r
+event_callback type = 4278255616,data = {length = 0, bytes = 0x},data_len = 0\r
+BLE manager Process Thread Sem\r
+timeout not support. will lock forever.\r
+[STBS]\r
+MGNT:SEND BLE DATA\r
+send_data2device = 09 00\r
+STB_MQTT_CONNECT_ONLINE\r
+event_callback type = 4278255620,data = {length = 0, bytes = 0x},data_len = 0\r
+ 10:40:06:457 ~ [frk][send][info][byte] 2D2424090024242D\r
+[STBS]\r
+wating for Mqtt Sem\r
+[STBS]\r
+wating for Recv Sem\r
+[STBS]\r
+[1735094406.500][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094431.594][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094456.684][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094481.761][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094506.848][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094531.920][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094557.016][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094582.099][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094607.126][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094632.150][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094657.168][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094682.196][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094707.223][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094732.244][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094757.265][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735094782.288][LK-0000] MQTT Packet Type: 53456\r
+ 10:46:44:360 ~ [BleManager] 断开连接。。。Error Domain=CBErrorDomain Code=7 "The specified device has disconnected from us." UserInfo={NSLocalizedDescription=The specified device has disconnected from us.}\r
+ 10:46:44:360 ~ [frk][send] {length = 1, bytes = 0x00}\r
+ 10:46:44:361 ~ 蓝牙 设备连接状态返回: false\r
+ 10:46:44:370 ~ [HidManager] 拔出设备 <IOHIDDevice 0x116104b00 [0x2050888c0] 'ClassName=IOHIDUserDevice' Transport=Bluetooth Low Energy Product=VMouse PrimaryUsagePage=1 PrimaryUsage=2 ReportInterval=8000> \r
+ 10:46:44:539 ~ [HidManager] 关闭hid\r
+ 10:46:44:540 ~ [HidManager] 关闭hid成功!\r
+ 10:46:44:541 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735094807.318][LK-0000] MQTT Packet Type: 53456\r
+ 10:46:49:539 ~ [HidManager] 关闭hid\r
+ 10:46:49:540 ~ [HidManager] 关闭hid成功!\r
+ 10:46:49:540 ~ [HidManager] 打开hid成功!\r
+ 10:46:54:539 ~ [HidManager] 关闭hid\r
+ 10:46:54:540 ~ [HidManager] 关闭hid成功!\r
+ 10:46:54:540 ~ [HidManager] 打开hid成功!\r
+ 10:46:59:539 ~ [HidManager] 关闭hid\r
+ 10:46:59:540 ~ [HidManager] 关闭hid成功!\r
+ 10:46:59:540 ~ [HidManager] 打开hid成功!\r
+ 10:47:04:538 ~ [HidManager] 关闭hid\r
+ 10:47:04:539 ~ [HidManager] 关闭hid成功!\r
+ 10:47:04:540 ~ [HidManager] 打开hid成功!\r
+ 10:47:09:539 ~ [HidManager] 关闭hid\r
+ 10:47:09:540 ~ [HidManager] 关闭hid成功!\r
+ 10:47:09:541 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735094832.402][LK-0000] MQTT Packet Type: 53456\r
+ 10:47:14:539 ~ [HidManager] 关闭hid\r
+ 10:47:14:540 ~ [HidManager] 关闭hid成功!\r
+ 10:47:14:540 ~ [HidManager] 打开hid成功!\r
+ 10:47:19:538 ~ [HidManager] 关闭hid\r
+ 10:47:19:540 ~ [HidManager] 关闭hid成功!\r
+ 10:47:19:540 ~ [HidManager] 打开hid成功!\r
+ 10:47:24:539 ~ [HidManager] 关闭hid\r
+ 10:47:24:540 ~ [HidManager] 关闭hid成功!\r
+ 10:47:24:541 ~ [HidManager] 打开hid成功!\r
+ 10:47:29:539 ~ [HidManager] 关闭hid\r
+ 10:47:29:541 ~ [HidManager] 关闭hid成功!\r
+ 10:47:29:541 ~ [HidManager] 打开hid成功!\r
+ 10:47:34:539 ~ [HidManager] 关闭hid\r
+ 10:47:34:541 ~ [HidManager] 关闭hid成功!\r
+ 10:47:34:541 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735094857.472][LK-0000] MQTT Packet Type: 53456\r
+ 10:47:39:539 ~ [HidManager] 关闭hid\r
+ 10:47:39:541 ~ [HidManager] 关闭hid成功!\r
+ 10:47:39:541 ~ [HidManager] 打开hid成功!\r
+ 10:47:44:538 ~ [HidManager] 关闭hid\r
+ 10:47:44:541 ~ [HidManager] 关闭hid成功!\r
+ 10:47:44:541 ~ [HidManager] 打开hid成功!\r
+ 10:47:49:538 ~ [HidManager] 关闭hid\r
+ 10:47:49:541 ~ [HidManager] 关闭hid成功!\r
+ 10:47:49:541 ~ [HidManager] 打开hid成功!\r
+ 10:47:54:538 ~ [HidManager] 关闭hid\r
+ 10:47:54:541 ~ [HidManager] 关闭hid成功!\r
+ 10:47:54:541 ~ [HidManager] 打开hid成功!\r
+ 10:47:59:538 ~ [HidManager] 关闭hid\r
+ 10:47:59:541 ~ [HidManager] 关闭hid成功!\r
+ 10:47:59:541 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735094882.507][LK-0000] MQTT Packet Type: 53456\r
+ 10:48:04:538 ~ [HidManager] 关闭hid\r
+ 10:48:04:541 ~ [HidManager] 关闭hid成功!\r
+ 10:48:04:541 ~ [HidManager] 打开hid成功!\r
+ 10:48:09:538 ~ [HidManager] 关闭hid\r
+ 10:48:09:541 ~ [HidManager] 关闭hid成功!\r
+ 10:48:09:541 ~ [HidManager] 打开hid成功!\r
+ 10:48:14:538 ~ [HidManager] 关闭hid\r
+ 10:48:14:541 ~ [HidManager] 关闭hid成功!\r
+ 10:48:14:541 ~ [HidManager] 打开hid成功!\r
+ 10:48:19:538 ~ [HidManager] 关闭hid\r
+ 10:48:19:541 ~ [HidManager] 关闭hid成功!\r
+ 10:48:19:542 ~ [HidManager] 打开hid成功!\r
+ 10:48:24:538 ~ [HidManager] 关闭hid\r
+ 10:48:24:541 ~ [HidManager] 关闭hid成功!\r
+ 10:48:24:541 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735094907.521][LK-0000] MQTT Packet Type: 53456\r
+ 10:48:29:538 ~ [HidManager] 关闭hid\r
+ 10:48:29:541 ~ [HidManager] 关闭hid成功!\r
+ 10:48:29:542 ~ [HidManager] 打开hid成功!\r
+ 10:48:34:538 ~ [HidManager] 关闭hid\r
+ 10:48:34:540 ~ [HidManager] 关闭hid成功!\r
+ 10:48:34:541 ~ [HidManager] 打开hid成功!\r
+ 10:48:39:538 ~ [HidManager] 关闭hid\r
+ 10:48:39:540 ~ [HidManager] 关闭hid成功!\r
+ 10:48:39:540 ~ [HidManager] 打开hid成功!\r
+ 10:48:44:539 ~ [HidManager] 关闭hid\r
+ 10:48:44:542 ~ [HidManager] 关闭hid成功!\r
+ 10:48:44:542 ~ [HidManager] 打开hid成功!\r
+ 10:48:49:539 ~ [HidManager] 关闭hid\r
+ 10:48:49:542 ~ [HidManager] 关闭hid成功!\r
+ 10:48:49:544 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735094932.560][LK-0000] MQTT Packet Type: 53456\r
+ 10:48:54:539 ~ [HidManager] 关闭hid\r
+ 10:48:54:542 ~ [HidManager] 关闭hid成功!\r
+ 10:48:54:542 ~ [HidManager] 打开hid成功!\r
+ 10:48:59:539 ~ [HidManager] 关闭hid\r
+ 10:48:59:542 ~ [HidManager] 关闭hid成功!\r
+ 10:48:59:542 ~ [HidManager] 打开hid成功!\r
+ 10:49:04:539 ~ [HidManager] 关闭hid\r
+ 10:49:04:542 ~ [HidManager] 关闭hid成功!\r
+ 10:49:04:543 ~ [HidManager] 打开hid成功!\r
+ 10:49:09:539 ~ [HidManager] 关闭hid\r
+ 10:49:09:541 ~ [HidManager] 关闭hid成功!\r
+ 10:49:09:541 ~ [HidManager] 打开hid成功!\r
+ 10:49:14:539 ~ [HidManager] 关闭hid\r
+ 10:49:14:543 ~ [HidManager] 关闭hid成功!\r
+ 10:49:14:543 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735094957.595][LK-0000] MQTT Packet Type: 53456\r
+ 10:49:19:539 ~ [HidManager] 关闭hid\r
+ 10:49:19:542 ~ [HidManager] 关闭hid成功!\r
+ 10:49:19:542 ~ [HidManager] 打开hid成功!\r
+ 10:49:24:539 ~ [HidManager] 关闭hid\r
+ 10:49:24:542 ~ [HidManager] 关闭hid成功!\r
+ 10:49:24:543 ~ [HidManager] 打开hid成功!\r
+ 10:49:29:538 ~ [HidManager] 关闭hid\r
+ 10:49:29:540 ~ [HidManager] 关闭hid成功!\r
+ 10:49:29:540 ~ [HidManager] 打开hid成功!\r
+ 10:49:34:539 ~ [HidManager] 关闭hid\r
+ 10:49:34:541 ~ [HidManager] 关闭hid成功!\r
+ 10:49:34:541 ~ [HidManager] 打开hid成功!\r
+ 10:49:39:537 ~ [HidManager] 关闭hid\r
+ 10:49:39:540 ~ [HidManager] 关闭hid成功!\r
+ 10:49:39:540 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735094982.637][LK-0000] MQTT Packet Type: 53456\r
+ 10:49:44:539 ~ [HidManager] 关闭hid\r
+ 10:49:44:543 ~ [HidManager] 关闭hid成功!\r
+ 10:49:44:544 ~ [HidManager] 打开hid成功!\r
+ 10:49:49:539 ~ [HidManager] 关闭hid\r
+ 10:49:49:543 ~ [HidManager] 关闭hid成功!\r
+ 10:49:49:544 ~ [HidManager] 打开hid成功!\r
+ 10:49:54:538 ~ [HidManager] 关闭hid\r
+ 10:49:54:542 ~ [HidManager] 关闭hid成功!\r
+ 10:49:54:542 ~ [HidManager] 打开hid成功!\r
+ 10:49:59:539 ~ [HidManager] 关闭hid\r
+ 10:49:59:543 ~ [HidManager] 关闭hid成功!\r
+ 10:49:59:543 ~ [HidManager] 打开hid成功!\r
+ 10:50:04:538 ~ [HidManager] 关闭hid\r
+ 10:50:04:541 ~ [HidManager] 关闭hid成功!\r
+ 10:50:04:542 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095007.681][LK-0000] MQTT Packet Type: 53456\r
+ 10:50:09:538 ~ [HidManager] 关闭hid\r
+ 10:50:09:542 ~ [HidManager] 关闭hid成功!\r
+ 10:50:09:543 ~ [HidManager] 打开hid成功!\r
+ 10:50:14:539 ~ [HidManager] 关闭hid\r
+ 10:50:14:543 ~ [HidManager] 关闭hid成功!\r
+ 10:50:14:544 ~ [HidManager] 打开hid成功!\r
+ 10:50:19:539 ~ [HidManager] 关闭hid\r
+ 10:50:19:543 ~ [HidManager] 关闭hid成功!\r
+ 10:50:19:543 ~ [HidManager] 打开hid成功!\r
+ 10:50:24:538 ~ [HidManager] 关闭hid\r
+ 10:50:24:542 ~ [HidManager] 关闭hid成功!\r
+ 10:50:24:543 ~ [HidManager] 打开hid成功!\r
+ 10:50:29:539 ~ [HidManager] 关闭hid\r
+ 10:50:29:543 ~ [HidManager] 关闭hid成功!\r
+ 10:50:29:543 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095032.715][LK-0000] MQTT Packet Type: 53456\r
+ 10:50:34:539 ~ [HidManager] 关闭hid\r
+ 10:50:34:544 ~ [HidManager] 关闭hid成功!\r
+ 10:50:34:544 ~ [HidManager] 打开hid成功!\r
+ 10:50:39:539 ~ [HidManager] 关闭hid\r
+ 10:50:39:543 ~ [HidManager] 关闭hid成功!\r
+ 10:50:39:544 ~ [HidManager] 打开hid成功!\r
+ 10:50:44:539 ~ [HidManager] 关闭hid\r
+ 10:50:44:543 ~ [HidManager] 关闭hid成功!\r
+ 10:50:44:544 ~ [HidManager] 打开hid成功!\r
+ 10:50:49:539 ~ [HidManager] 关闭hid\r
+ 10:50:49:543 ~ [HidManager] 关闭hid成功!\r
+ 10:50:49:544 ~ [HidManager] 打开hid成功!\r
+ 10:50:54:539 ~ [HidManager] 关闭hid\r
+ 10:50:54:544 ~ [HidManager] 关闭hid成功!\r
+ 10:50:54:544 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095057.761][LK-0000] MQTT Packet Type: 53456\r
+ 10:50:59:538 ~ [HidManager] 关闭hid\r
+ 10:50:59:542 ~ [HidManager] 关闭hid成功!\r
+ 10:50:59:542 ~ [HidManager] 打开hid成功!\r
+ 10:51:04:539 ~ [HidManager] 关闭hid\r
+ 10:51:04:543 ~ [HidManager] 关闭hid成功!\r
+ 10:51:04:544 ~ [HidManager] 打开hid成功!\r
+ 10:51:09:539 ~ [HidManager] 关闭hid\r
+ 10:51:09:543 ~ [HidManager] 关闭hid成功!\r
+ 10:51:09:545 ~ [HidManager] 打开hid成功!\r
+ 10:51:14:539 ~ [HidManager] 关闭hid\r
+ 10:51:14:543 ~ [HidManager] 关闭hid成功!\r
+ 10:51:14:544 ~ [HidManager] 打开hid成功!\r
+ 10:51:19:538 ~ [HidManager] 关闭hid\r
+ 10:51:19:543 ~ [HidManager] 关闭hid成功!\r
+ 10:51:19:543 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095082.794][LK-0000] MQTT Packet Type: 53456\r
+ 10:51:24:539 ~ [HidManager] 关闭hid\r
+ 10:51:24:543 ~ [HidManager] 关闭hid成功!\r
+ 10:51:24:544 ~ [HidManager] 打开hid成功!\r
+ 10:51:29:539 ~ [HidManager] 关闭hid\r
+ 10:51:29:544 ~ [HidManager] 关闭hid成功!\r
+ 10:51:29:544 ~ [HidManager] 打开hid成功!\r
+ 10:51:34:537 ~ [HidManager] 关闭hid\r
+ 10:51:34:542 ~ [HidManager] 关闭hid成功!\r
+ 10:51:34:542 ~ [HidManager] 打开hid成功!\r
+ 10:51:39:538 ~ [HidManager] 关闭hid\r
+ 10:51:39:543 ~ [HidManager] 关闭hid成功!\r
+ 10:51:39:543 ~ [HidManager] 打开hid成功!\r
+ 10:51:44:539 ~ [HidManager] 关闭hid\r
+ 10:51:44:544 ~ [HidManager] 关闭hid成功!\r
+ 10:51:44:544 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095107.842][LK-0000] MQTT Packet Type: 53456\r
+ 10:51:49:539 ~ [HidManager] 关闭hid\r
+ 10:51:49:544 ~ [HidManager] 关闭hid成功!\r
+ 10:51:49:545 ~ [HidManager] 打开hid成功!\r
+ 10:51:54:538 ~ [HidManager] 关闭hid\r
+ 10:51:54:543 ~ [HidManager] 关闭hid成功!\r
+ 10:51:54:543 ~ [HidManager] 打开hid成功!\r
+ 10:51:59:539 ~ [HidManager] 关闭hid\r
+ 10:51:59:544 ~ [HidManager] 关闭hid成功!\r
+ 10:51:59:545 ~ [HidManager] 打开hid成功!\r
+ 10:52:04:538 ~ [HidManager] 关闭hid\r
+ 10:52:04:543 ~ [HidManager] 关闭hid成功!\r
+ 10:52:04:544 ~ [HidManager] 打开hid成功!\r
+ 10:52:09:539 ~ [HidManager] 关闭hid\r
+ 10:52:09:543 ~ [HidManager] 关闭hid成功!\r
+ 10:52:09:544 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095132.882][LK-0000] MQTT Packet Type: 53456\r
+ 10:52:14:539 ~ [HidManager] 关闭hid\r
+ 10:52:14:545 ~ [HidManager] 关闭hid成功!\r
+ 10:52:14:545 ~ [HidManager] 打开hid成功!\r
+ 10:52:19:539 ~ [HidManager] 关闭hid\r
+ 10:52:19:544 ~ [HidManager] 关闭hid成功!\r
+ 10:52:19:545 ~ [HidManager] 打开hid成功!\r
+ 10:52:24:539 ~ [HidManager] 关闭hid\r
+ 10:52:24:542 ~ [HidManager] 关闭hid成功!\r
+ 10:52:24:542 ~ [HidManager] 打开hid成功!\r
+ 10:52:29:538 ~ [HidManager] 关闭hid\r
+ 10:52:29:541 ~ [HidManager] 关闭hid成功!\r
+ 10:52:29:542 ~ [HidManager] 打开hid成功!\r
+ 10:52:34:539 ~ [HidManager] 关闭hid\r
+ 10:52:34:542 ~ [HidManager] 关闭hid成功!\r
+ 10:52:34:542 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095157.942][LK-0000] MQTT Packet Type: 53456\r
+ 10:52:39:538 ~ [HidManager] 关闭hid\r
+ 10:52:39:543 ~ [HidManager] 关闭hid成功!\r
+ 10:52:39:544 ~ [HidManager] 打开hid成功!\r
+ 10:52:44:539 ~ [HidManager] 关闭hid\r
+ 10:52:44:545 ~ [HidManager] 关闭hid成功!\r
+ 10:52:44:545 ~ [HidManager] 打开hid成功!\r
+ 10:52:49:538 ~ [HidManager] 关闭hid\r
+ 10:52:49:543 ~ [HidManager] 关闭hid成功!\r
+ 10:52:49:544 ~ [HidManager] 打开hid成功!\r
+ 10:52:54:539 ~ [HidManager] 关闭hid\r
+ 10:52:54:544 ~ [HidManager] 关闭hid成功!\r
+ 10:52:54:545 ~ [HidManager] 打开hid成功!\r
+ 10:52:59:539 ~ [HidManager] 关闭hid\r
+ 10:52:59:544 ~ [HidManager] 关闭hid成功!\r
+ 10:52:59:544 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095182.964][LK-0000] MQTT Packet Type: 53456\r
+ 10:53:04:537 ~ [HidManager] 关闭hid\r
+ 10:53:04:542 ~ [HidManager] 关闭hid成功!\r
+ 10:53:04:543 ~ [HidManager] 打开hid成功!\r
+ 10:53:09:539 ~ [HidManager] 关闭hid\r
+ 10:53:09:544 ~ [HidManager] 关闭hid成功!\r
+ 10:53:09:545 ~ [HidManager] 打开hid成功!\r
+ 10:53:14:539 ~ [HidManager] 关闭hid\r
+ 10:53:14:544 ~ [HidManager] 关闭hid成功!\r
+ 10:53:14:544 ~ [HidManager] 打开hid成功!\r
+ 10:53:19:539 ~ [HidManager] 关闭hid\r
+ 10:53:19:544 ~ [HidManager] 关闭hid成功!\r
+ 10:53:19:544 ~ [HidManager] 打开hid成功!\r
+ 10:53:24:538 ~ [HidManager] 关闭hid\r
+ 10:53:24:543 ~ [HidManager] 关闭hid成功!\r
+ 10:53:24:544 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095208.001][LK-0000] MQTT Packet Type: 53456\r
+ 10:53:29:538 ~ [HidManager] 关闭hid\r
+ 10:53:29:543 ~ [HidManager] 关闭hid成功!\r
+ 10:53:29:544 ~ [HidManager] 打开hid成功!\r
+ 10:53:34:539 ~ [HidManager] 关闭hid\r
+ 10:53:34:544 ~ [HidManager] 关闭hid成功!\r
+ 10:53:34:545 ~ [HidManager] 打开hid成功!\r
+ 10:53:39:539 ~ [HidManager] 关闭hid\r
+ 10:53:39:544 ~ [HidManager] 关闭hid成功!\r
+ 10:53:39:545 ~ [HidManager] 打开hid成功!\r
+ 10:53:44:539 ~ [HidManager] 关闭hid\r
+ 10:53:44:544 ~ [HidManager] 关闭hid成功!\r
+ 10:53:44:545 ~ [HidManager] 打开hid成功!\r
+ 10:53:49:539 ~ [HidManager] 关闭hid\r
+ 10:53:49:544 ~ [HidManager] 关闭hid成功!\r
+ 10:53:49:545 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095233.048][LK-0000] MQTT Packet Type: 53456\r
+ 10:53:54:539 ~ [HidManager] 关闭hid\r
+ 10:53:54:544 ~ [HidManager] 关闭hid成功!\r
+ 10:53:54:545 ~ [HidManager] 打开hid成功!\r
+ 10:53:59:537 ~ [HidManager] 关闭hid\r
+ 10:53:59:544 ~ [HidManager] 关闭hid成功!\r
+ 10:53:59:544 ~ [HidManager] 打开hid成功!\r
+ 10:54:04:539 ~ [HidManager] 关闭hid\r
+ 10:54:04:544 ~ [HidManager] 关闭hid成功!\r
+ 10:54:04:545 ~ [HidManager] 打开hid成功!\r
+ 10:54:09:538 ~ [HidManager] 关闭hid\r
+ 10:54:09:543 ~ [HidManager] 关闭hid成功!\r
+ 10:54:09:544 ~ [HidManager] 打开hid成功!\r
+ 10:54:14:538 ~ [HidManager] 关闭hid\r
+ 10:54:14:543 ~ [HidManager] 关闭hid成功!\r
+ 10:54:14:544 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095258.075][LK-0000] MQTT Packet Type: 53456\r
+ 10:54:19:538 ~ [HidManager] 关闭hid\r
+ 10:54:19:543 ~ [HidManager] 关闭hid成功!\r
+ 10:54:19:543 ~ [HidManager] 打开hid成功!\r
+ 10:54:24:538 ~ [HidManager] 关闭hid\r
+ 10:54:24:543 ~ [HidManager] 关闭hid成功!\r
+ 10:54:24:544 ~ [HidManager] 打开hid成功!\r
+ 10:54:29:538 ~ [HidManager] 关闭hid\r
+ 10:54:29:543 ~ [HidManager] 关闭hid成功!\r
+ 10:54:29:544 ~ [HidManager] 打开hid成功!\r
+ 10:54:34:537 ~ [HidManager] 关闭hid\r
+ 10:54:34:543 ~ [HidManager] 关闭hid成功!\r
+ 10:54:34:543 ~ [HidManager] 打开hid成功!\r
+ 10:54:39:538 ~ [HidManager] 关闭hid\r
+ 10:54:39:543 ~ [HidManager] 关闭hid成功!\r
+ 10:54:39:544 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095283.103][LK-0000] MQTT Packet Type: 53456\r
+ 10:54:44:538 ~ [HidManager] 关闭hid\r
+ 10:54:44:544 ~ [HidManager] 关闭hid成功!\r
+ 10:54:44:544 ~ [HidManager] 打开hid成功!\r
+ 10:54:49:538 ~ [HidManager] 关闭hid\r
+ 10:54:49:541 ~ [HidManager] 关闭hid成功!\r
+ 10:54:49:541 ~ [HidManager] 打开hid成功!\r
+ 10:54:54:538 ~ [HidManager] 关闭hid\r
+ 10:54:54:541 ~ [HidManager] 关闭hid成功!\r
+ 10:54:54:541 ~ [HidManager] 打开hid成功!\r
+ 10:54:59:538 ~ [HidManager] 关闭hid\r
+ 10:54:59:543 ~ [HidManager] 关闭hid成功!\r
+ 10:54:59:544 ~ [HidManager] 打开hid成功!\r
+ 10:55:04:537 ~ [HidManager] 关闭hid\r
+ 10:55:04:543 ~ [HidManager] 关闭hid成功!\r
+ 10:55:04:544 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095308.138][LK-0000] MQTT Packet Type: 53456\r
+ 10:55:09:537 ~ [HidManager] 关闭hid\r
+ 10:55:09:543 ~ [HidManager] 关闭hid成功!\r
+ 10:55:09:543 ~ [HidManager] 打开hid成功!\r
+ 10:55:14:538 ~ [HidManager] 关闭hid\r
+ 10:55:14:544 ~ [HidManager] 关闭hid成功!\r
+ 10:55:14:544 ~ [HidManager] 打开hid成功!\r
+ 10:55:19:538 ~ [HidManager] 关闭hid\r
+ 10:55:19:544 ~ [HidManager] 关闭hid成功!\r
+ 10:55:19:544 ~ [HidManager] 打开hid成功!\r
+ 10:55:24:538 ~ [HidManager] 关闭hid\r
+ 10:55:24:544 ~ [HidManager] 关闭hid成功!\r
+ 10:55:24:544 ~ [HidManager] 打开hid成功!\r
+ 10:55:29:537 ~ [HidManager] 关闭hid\r
+ 10:55:29:544 ~ [HidManager] 关闭hid成功!\r
+ 10:55:29:544 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095333.151][LK-0000] MQTT Packet Type: 53456\r
+ 10:55:34:537 ~ [HidManager] 关闭hid\r
+ 10:55:34:544 ~ [HidManager] 关闭hid成功!\r
+ 10:55:34:544 ~ [HidManager] 打开hid成功!\r
+ 10:55:39:537 ~ [HidManager] 关闭hid\r
+ 10:55:39:544 ~ [HidManager] 关闭hid成功!\r
+ 10:55:39:544 ~ [HidManager] 打开hid成功!\r
+ 10:55:44:537 ~ [HidManager] 关闭hid\r
+ 10:55:44:544 ~ [HidManager] 关闭hid成功!\r
+ 10:55:44:544 ~ [HidManager] 打开hid成功!\r
+ 10:55:49:537 ~ [HidManager] 关闭hid\r
+ 10:55:49:544 ~ [HidManager] 关闭hid成功!\r
+ 10:55:49:544 ~ [HidManager] 打开hid成功!\r
+ 10:55:54:537 ~ [HidManager] 关闭hid\r
+ 10:55:54:544 ~ [HidManager] 关闭hid成功!\r
+ 10:55:54:544 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095358.187][LK-0000] MQTT Packet Type: 53456\r
+ 10:55:59:537 ~ [HidManager] 关闭hid\r
+ 10:55:59:544 ~ [HidManager] 关闭hid成功!\r
+ 10:55:59:544 ~ [HidManager] 打开hid成功!\r
+ 10:56:04:537 ~ [HidManager] 关闭hid\r
+ 10:56:04:543 ~ [HidManager] 关闭hid成功!\r
+ 10:56:04:544 ~ [HidManager] 打开hid成功!\r
+ 10:56:09:537 ~ [HidManager] 关闭hid\r
+ 10:56:09:544 ~ [HidManager] 关闭hid成功!\r
+ 10:56:09:544 ~ [HidManager] 打开hid成功!\r
+ 10:56:14:537 ~ [HidManager] 关闭hid\r
+ 10:56:14:544 ~ [HidManager] 关闭hid成功!\r
+ 10:56:14:544 ~ [HidManager] 打开hid成功!\r
+ 10:56:19:537 ~ [HidManager] 关闭hid\r
+ 10:56:19:544 ~ [HidManager] 关闭hid成功!\r
+ 10:56:19:544 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095383.211][LK-0000] MQTT Packet Type: 53456\r
+ 10:56:24:537 ~ [HidManager] 关闭hid\r
+ 10:56:24:543 ~ [HidManager] 关闭hid成功!\r
+ 10:56:24:544 ~ [HidManager] 打开hid成功!\r
+ 10:56:29:537 ~ [HidManager] 关闭hid\r
+ 10:56:29:543 ~ [HidManager] 关闭hid成功!\r
+ 10:56:29:543 ~ [HidManager] 打开hid成功!\r
+ 10:56:34:537 ~ [HidManager] 关闭hid\r
+ 10:56:34:544 ~ [HidManager] 关闭hid成功!\r
+ 10:56:34:544 ~ [HidManager] 打开hid成功!\r
+ 10:56:39:537 ~ [HidManager] 关闭hid\r
+ 10:56:39:542 ~ [HidManager] 关闭hid成功!\r
+ 10:56:39:543 ~ [HidManager] 打开hid成功!\r
+ 10:56:44:537 ~ [HidManager] 关闭hid\r
+ 10:56:44:544 ~ [HidManager] 关闭hid成功!\r
+ 10:56:44:545 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095408.213][LK-0000] MQTT Packet Type: 53456\r
+ 10:56:49:537 ~ [HidManager] 关闭hid\r
+ 10:56:49:544 ~ [HidManager] 关闭hid成功!\r
+ 10:56:49:545 ~ [HidManager] 打开hid成功!\r
+ 10:56:54:537 ~ [HidManager] 关闭hid\r
+ 10:56:54:544 ~ [HidManager] 关闭hid成功!\r
+ 10:56:54:545 ~ [HidManager] 打开hid成功!\r
+ 10:56:59:537 ~ [HidManager] 关闭hid\r
+ 10:56:59:544 ~ [HidManager] 关闭hid成功!\r
+ 10:56:59:545 ~ [HidManager] 打开hid成功!\r
+ 10:57:04:537 ~ [HidManager] 关闭hid\r
+ 10:57:04:543 ~ [HidManager] 关闭hid成功!\r
+ 10:57:04:544 ~ [HidManager] 打开hid成功!\r
+ 10:57:09:537 ~ [HidManager] 关闭hid\r
+ 10:57:09:544 ~ [HidManager] 关闭hid成功!\r
+ 10:57:09:545 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095433.243][LK-0000] MQTT Packet Type: 53456\r
+ 10:57:14:537 ~ [HidManager] 关闭hid\r
+ 10:57:14:544 ~ [HidManager] 关闭hid成功!\r
+ 10:57:14:545 ~ [HidManager] 打开hid成功!\r
+ 10:57:19:537 ~ [HidManager] 关闭hid\r
+ 10:57:19:544 ~ [HidManager] 关闭hid成功!\r
+ 10:57:19:545 ~ [HidManager] 打开hid成功!\r
+ 10:57:24:537 ~ [HidManager] 关闭hid\r
+ 10:57:24:544 ~ [HidManager] 关闭hid成功!\r
+ 10:57:24:545 ~ [HidManager] 打开hid成功!\r
+ 10:57:29:537 ~ [HidManager] 关闭hid\r
+ 10:57:29:544 ~ [HidManager] 关闭hid成功!\r
+ 10:57:29:545 ~ [HidManager] 打开hid成功!\r
+ 10:57:34:537 ~ [HidManager] 关闭hid\r
+ 10:57:34:544 ~ [HidManager] 关闭hid成功!\r
+ 10:57:34:544 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095458.265][LK-0000] MQTT Packet Type: 53456\r
+ 10:57:39:537 ~ [HidManager] 关闭hid\r
+ 10:57:39:544 ~ [HidManager] 关闭hid成功!\r
+ 10:57:39:545 ~ [HidManager] 打开hid成功!\r
+ 10:57:44:537 ~ [HidManager] 关闭hid\r
+ 10:57:44:544 ~ [HidManager] 关闭hid成功!\r
+ 10:57:44:545 ~ [HidManager] 打开hid成功!\r
+ 10:57:49:537 ~ [HidManager] 关闭hid\r
+ 10:57:49:544 ~ [HidManager] 关闭hid成功!\r
+ 10:57:49:545 ~ [HidManager] 打开hid成功!\r
+ 10:57:54:537 ~ [HidManager] 关闭hid\r
+ 10:57:54:545 ~ [HidManager] 关闭hid成功!\r
+ 10:57:54:545 ~ [HidManager] 打开hid成功!\r
+ 10:57:59:537 ~ [HidManager] 关闭hid\r
+ 10:57:59:545 ~ [HidManager] 关闭hid成功!\r
+ 10:57:59:545 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095483.293][LK-0000] MQTT Packet Type: 53456\r
+ 10:58:04:537 ~ [HidManager] 关闭hid\r
+ 10:58:04:545 ~ [HidManager] 关闭hid成功!\r
+ 10:58:04:545 ~ [HidManager] 打开hid成功!\r
+ 10:58:09:537 ~ [HidManager] 关闭hid\r
+ 10:58:09:545 ~ [HidManager] 关闭hid成功!\r
+ 10:58:09:545 ~ [HidManager] 打开hid成功!\r
+ 10:58:14:537 ~ [HidManager] 关闭hid\r
+ 10:58:14:545 ~ [HidManager] 关闭hid成功!\r
+ 10:58:14:545 ~ [HidManager] 打开hid成功!\r
+ 10:58:19:537 ~ [HidManager] 关闭hid\r
+ 10:58:19:545 ~ [HidManager] 关闭hid成功!\r
+ 10:58:19:545 ~ [HidManager] 打开hid成功!\r
+ 10:58:24:537 ~ [HidManager] 关闭hid\r
+ 10:58:24:543 ~ [HidManager] 关闭hid成功!\r
+ 10:58:24:544 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095508.369][LK-0000] MQTT Packet Type: 53456\r
+ 10:58:29:537 ~ [HidManager] 关闭hid\r
+ 10:58:29:543 ~ [HidManager] 关闭hid成功!\r
+ 10:58:29:544 ~ [HidManager] 打开hid成功!\r
+ 10:58:34:537 ~ [HidManager] 关闭hid\r
+ 10:58:34:543 ~ [HidManager] 关闭hid成功!\r
+ 10:58:34:543 ~ [HidManager] 打开hid成功!\r
+ 10:58:39:537 ~ [HidManager] 关闭hid\r
+ 10:58:39:545 ~ [HidManager] 关闭hid成功!\r
+ 10:58:39:545 ~ [HidManager] 打开hid成功!\r
+ 10:58:44:537 ~ [HidManager] 关闭hid\r
+ 10:58:44:545 ~ [HidManager] 关闭hid成功!\r
+ 10:58:44:545 ~ [HidManager] 打开hid成功!\r
+ 10:58:49:537 ~ [HidManager] 关闭hid\r
+ 10:58:49:545 ~ [HidManager] 关闭hid成功!\r
+ 10:58:49:545 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095533.337][LK-0000] MQTT Packet Type: 53456\r
+ 10:58:54:537 ~ [HidManager] 关闭hid\r
+ 10:58:54:543 ~ [HidManager] 关闭hid成功!\r
+ 10:58:54:543 ~ [HidManager] 打开hid成功!\r
+ 10:58:59:531 ~ [HidManager] 关闭hid\r
+ 10:58:59:539 ~ [HidManager] 关闭hid成功!\r
+ 10:58:59:540 ~ [HidManager] 打开hid成功!\r
+ 10:59:04:525 ~ [HidManager] 关闭hid\r
+ 10:59:04:533 ~ [HidManager] 关闭hid成功!\r
+ 10:59:04:534 ~ [HidManager] 打开hid成功!\r
+ 10:59:09:523 ~ [HidManager] 关闭hid\r
+ 10:59:09:531 ~ [HidManager] 关闭hid成功!\r
+ 10:59:09:531 ~ [HidManager] 打开hid成功!\r
+ 10:59:14:520 ~ [HidManager] 关闭hid\r
+ 10:59:14:528 ~ [HidManager] 关闭hid成功!\r
+ 10:59:14:530 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095558.353][LK-0000] MQTT Packet Type: 53456\r
+ 10:59:19:518 ~ [HidManager] 关闭hid\r
+ 10:59:19:526 ~ [HidManager] 关闭hid成功!\r
+ 10:59:19:527 ~ [HidManager] 打开hid成功!\r
+ 10:59:24:516 ~ [HidManager] 关闭hid\r
+ 10:59:24:524 ~ [HidManager] 关闭hid成功!\r
+ 10:59:24:524 ~ [HidManager] 打开hid成功!\r
+ 10:59:29:515 ~ [HidManager] 关闭hid\r
+ 10:59:29:524 ~ [HidManager] 关闭hid成功!\r
+ 10:59:29:524 ~ [HidManager] 打开hid成功!\r
+ 10:59:34:513 ~ [HidManager] 关闭hid\r
+ 10:59:34:521 ~ [HidManager] 关闭hid成功!\r
+ 10:59:34:522 ~ [HidManager] 打开hid成功!\r
+ 10:59:39:514 ~ [HidManager] 关闭hid\r
+ 10:59:39:523 ~ [HidManager] 关闭hid成功!\r
+ 10:59:39:523 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095583.386][LK-0000] MQTT Packet Type: 53456\r
+ 10:59:44:513 ~ [HidManager] 关闭hid\r
+ 10:59:44:522 ~ [HidManager] 关闭hid成功!\r
+ 10:59:44:522 ~ [HidManager] 打开hid成功!\r
+ 10:59:49:513 ~ [HidManager] 关闭hid\r
+ 10:59:49:522 ~ [HidManager] 关闭hid成功!\r
+ 10:59:49:522 ~ [HidManager] 打开hid成功!\r
+ 10:59:54:513 ~ [HidManager] 关闭hid\r
+ 10:59:54:521 ~ [HidManager] 关闭hid成功!\r
+ 10:59:54:522 ~ [HidManager] 打开hid成功!\r
+ 10:59:59:511 ~ [HidManager] 关闭hid\r
+ 10:59:59:520 ~ [HidManager] 关闭hid成功!\r
+ 10:59:59:520 ~ [HidManager] 打开hid成功!\r
+ 11:00:04:513 ~ [HidManager] 关闭hid\r
+ 11:00:04:521 ~ [HidManager] 关闭hid成功!\r
+ 11:00:04:522 ~ [HidManager] 打开hid成功!\r
+[STBS]\r
+[1735095608.455][LK-0000] MQTT Packet Type: 53456\r
+ 11:00:09:512 ~ [HidManager] 关闭hid\r
+ 11:00:09:519 ~ [HidManager] 关闭hid成功!\r
+ 11:00:09:519 ~ [HidManager] 打开hid成功!\r
+ 11:00:09:532 ~ [BleManager] 配对匹配过的设备VMouse\r
+ 11:00:09:532 ~ [BleManager] 连接设备 <CBPeripheral: 0x600002340000, identifier = C730BE9C-EB76-0B05-F828-0D0EC87C9A38, name = VMouse, mtu = 247, state = disconnected>\r
+ 11:00:09:538 ~ [BleManager] 发现服务\r
+ 11:00:10:589 ~ [BleManager] 连接成功 = VMouse\r
+ 11:00:10:589 ~ [frk]sdk切换到蓝牙模式\r
+ 11:00:10:590 ~ 蓝牙 设备连接状态返回: true\r
+[STBS]\r
+BLE manager Process Thread Sem\r
+timeout not support. will lock forever.\r
+[STBS]\r
+MGNT:SEND BLE DATA\r
+send_data2device = 01\r
+ 11:00:10:592 ~ [frk][send][info][byte] 2D24240124242D\r
+[STBS]\r
+wating for Recv Sem\r
+ 11:00:10:614 ~ [frk][receive][info] 0201\r
+timeout not support. will lock forever.\r
+[STBS]\r
+BLE manager Process Thread Sem\r
+timeout not support. will lock forever.\r
+[STBS]\r
+MGNT:RECV BLE DATA\r
+[STBS]\r
+BIZBUS_CMDTYPE_CHK_DS_RSP\r
+[STBS]\r
+device has ds\r
+[STBS]\r
+wating for Recv Sem\r
+[STBS]\r
+BLE manager Process Thread Sem\r
+timeout not support. will lock forever.\r
+[STBS]\r
+MGNT:SEND BLE DATA\r
+send_data2device = 07 31 37 33 35 30 39 35 36 31 30 36 31 34\r
+ 11:00:10:616 ~ [frk][send][info][byte] 2D2424073137333530393536313036313424242D\r
+[STBS]\r
+wating for Recv Sem\r
+ 11:00:10:657 ~ [frk][receive][info] 086B317238644E65593255690079F9546FB14BD84CFF4E96124042B09E0770046C433033313030303041353833\r
+timeout not support. will lock forever.\r
+[STBS]\r
+BLE manager Process Thread Sem\r
+timeout not support. will lock forever.\r
+[STBS]\r
+MGNT:RECV BLE DATA\r
+[STBS]\r
+BIZBUS_CMDTYPE_GETMQTT_INFO_RSP\r
+[STBS]\r
+product_key = k1r8dNeY2Ui\r
+[STBS]\r
+device_name = C0310000A583\r
+[STBS]\r
+auth_code = 79f9546fb14bd84cff4e96124042b09e0770046c\r
+[STBS]\r
+mqtt thread already start\r
+[STBS]\r
+wating for Recv Sem\r
+[STBS]\r
+[1735095633.522][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735095658.621][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735095683.690][LK-0000] MQTT Packet Type: 53456\r
+[STBS]\r
+[1735095708.766][LK-0000] MQTT Packet Type: 53456
\ No newline at end of file