commit 58777807bc46afbace8bd69887ed989603f31c23 Author: James Magahern Date: Mon Nov 12 20:10:46 2018 -0800 Initial commit Message receiving works, sending sort of works diff --git a/MessagesBridge.xcodeproj/project.pbxproj b/MessagesBridge.xcodeproj/project.pbxproj new file mode 100644 index 0000000..fe974af --- /dev/null +++ b/MessagesBridge.xcodeproj/project.pbxproj @@ -0,0 +1,420 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 1A0C444C219A38E100F2AC00 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A0C444B219A38E100F2AC00 /* AppDelegate.m */; }; + 1A0C444E219A38E200F2AC00 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1A0C444D219A38E200F2AC00 /* Assets.xcassets */; }; + 1A0C4451219A38E200F2AC00 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1A0C444F219A38E200F2AC00 /* MainMenu.xib */; }; + 1A0C4454219A38E200F2AC00 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A0C4453219A38E200F2AC00 /* main.m */; }; + 1A0C4460219A45B400F2AC00 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A0C445F219A45B400F2AC00 /* Foundation.framework */; }; + 1A0C4462219A45BA00F2AC00 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A0C4461219A45B900F2AC00 /* AppKit.framework */; }; + 1A0C4465219A45C700F2AC00 /* MessagesKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A0C4463219A45C700F2AC00 /* MessagesKit.framework */; }; + 1A0C4466219A45C700F2AC00 /* MessagesHelperKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A0C4464219A45C700F2AC00 /* MessagesHelperKit.framework */; }; + 1A0C4468219A45D500F2AC00 /* IMCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A0C4467219A45D500F2AC00 /* IMCore.framework */; }; + 1A0C446B219A4BC300F2AC00 /* MBIMBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A0C446A219A4BC300F2AC00 /* MBIMBridge.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1A0C4447219A38E100F2AC00 /* MessagesBridge.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MessagesBridge.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A0C444A219A38E100F2AC00 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 1A0C444B219A38E100F2AC00 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 1A0C444D219A38E200F2AC00 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 1A0C4450219A38E200F2AC00 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 1A0C4452219A38E200F2AC00 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1A0C4453219A38E200F2AC00 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 1A0C4455219A38E200F2AC00 /* MessagesBridge.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MessagesBridge.entitlements; sourceTree = ""; }; + 1A0C445D219A458400F2AC00 /* SOAPlugInControllerProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SOAPlugInControllerProtocol.h; sourceTree = ""; }; + 1A0C445F219A45B400F2AC00 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.Internal.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 1A0C4461219A45B900F2AC00 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.Internal.sdk/System/Library/Frameworks/AppKit.framework; sourceTree = DEVELOPER_DIR; }; + 1A0C4463219A45C700F2AC00 /* MessagesKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessagesKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.Internal.sdk/System/Library/PrivateFrameworks/MessagesKit.framework; sourceTree = DEVELOPER_DIR; }; + 1A0C4464219A45C700F2AC00 /* MessagesHelperKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessagesHelperKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.Internal.sdk/System/Library/PrivateFrameworks/MessagesHelperKit.framework; sourceTree = DEVELOPER_DIR; }; + 1A0C4467219A45D500F2AC00 /* IMCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IMCore.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.Internal.sdk/System/Library/PrivateFrameworks/IMCore.framework; sourceTree = DEVELOPER_DIR; }; + 1A0C4469219A4BC300F2AC00 /* MBIMBridge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBIMBridge.h; sourceTree = ""; }; + 1A0C446A219A4BC300F2AC00 /* MBIMBridge.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBIMBridge.m; sourceTree = ""; }; + 1A33B43A219A5ACD0034485A /* OSXReleaseDefaults.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = OSXReleaseDefaults.xcconfig; sourceTree = ""; }; + 1A33B43B219A5ACD0034485A /* DebugDefaults.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DebugDefaults.xcconfig; sourceTree = ""; }; + 1A33B43C219A5ACD0034485A /* OSXDebugDefaults.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = OSXDebugDefaults.xcconfig; sourceTree = ""; }; + 1A33B43D219A5ACD0034485A /* ReleaseDefaults.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ReleaseDefaults.xcconfig; sourceTree = ""; }; + 1A33B43E219A5BD80034485A /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1A0C4444219A38E100F2AC00 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A0C4468219A45D500F2AC00 /* IMCore.framework in Frameworks */, + 1A0C4465219A45C700F2AC00 /* MessagesKit.framework in Frameworks */, + 1A0C4466219A45C700F2AC00 /* MessagesHelperKit.framework in Frameworks */, + 1A0C4462219A45BA00F2AC00 /* AppKit.framework in Frameworks */, + 1A0C4460219A45B400F2AC00 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1A0C443E219A38E100F2AC00 = { + isa = PBXGroup; + children = ( + 1A0C4449219A38E100F2AC00 /* MessagesBridge */, + 1A0C4448219A38E100F2AC00 /* Products */, + 1A0C445E219A45B400F2AC00 /* Frameworks */, + ); + sourceTree = ""; + }; + 1A0C4448219A38E100F2AC00 /* Products */ = { + isa = PBXGroup; + children = ( + 1A0C4447219A38E100F2AC00 /* MessagesBridge.app */, + ); + name = Products; + sourceTree = ""; + }; + 1A0C4449219A38E100F2AC00 /* MessagesBridge */ = { + isa = PBXGroup; + children = ( + 1A0C445C219A457C00F2AC00 /* Pilfered Headers */, + 1A0C444A219A38E100F2AC00 /* AppDelegate.h */, + 1A0C444B219A38E100F2AC00 /* AppDelegate.m */, + 1A0C446D219A4BCD00F2AC00 /* Bridge */, + 1A0C444D219A38E200F2AC00 /* Assets.xcassets */, + 1A0C444F219A38E200F2AC00 /* MainMenu.xib */, + 1A0C4452219A38E200F2AC00 /* Info.plist */, + 1A0C4453219A38E200F2AC00 /* main.m */, + 1A0C4455219A38E200F2AC00 /* MessagesBridge.entitlements */, + 1A33B43E219A5BD80034485A /* README.md */, + 1A33B439219A5ACD0034485A /* Config Files */, + ); + path = MessagesBridge; + sourceTree = ""; + }; + 1A0C445C219A457C00F2AC00 /* Pilfered Headers */ = { + isa = PBXGroup; + children = ( + 1A0C445D219A458400F2AC00 /* SOAPlugInControllerProtocol.h */, + ); + path = "Pilfered Headers"; + sourceTree = ""; + }; + 1A0C445E219A45B400F2AC00 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1A0C4467219A45D500F2AC00 /* IMCore.framework */, + 1A0C4464219A45C700F2AC00 /* MessagesHelperKit.framework */, + 1A0C4463219A45C700F2AC00 /* MessagesKit.framework */, + 1A0C4461219A45B900F2AC00 /* AppKit.framework */, + 1A0C445F219A45B400F2AC00 /* Foundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 1A0C446D219A4BCD00F2AC00 /* Bridge */ = { + isa = PBXGroup; + children = ( + 1A0C4469219A4BC300F2AC00 /* MBIMBridge.h */, + 1A0C446A219A4BC300F2AC00 /* MBIMBridge.m */, + ); + path = Bridge; + sourceTree = ""; + }; + 1A33B439219A5ACD0034485A /* Config Files */ = { + isa = PBXGroup; + children = ( + 1A33B43A219A5ACD0034485A /* OSXReleaseDefaults.xcconfig */, + 1A33B43B219A5ACD0034485A /* DebugDefaults.xcconfig */, + 1A33B43C219A5ACD0034485A /* OSXDebugDefaults.xcconfig */, + 1A33B43D219A5ACD0034485A /* ReleaseDefaults.xcconfig */, + ); + path = "Config Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1A0C4446219A38E100F2AC00 /* MessagesBridge */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1A0C4458219A38E200F2AC00 /* Build configuration list for PBXNativeTarget "MessagesBridge" */; + buildPhases = ( + 1A0C4443219A38E100F2AC00 /* Sources */, + 1A0C4444219A38E100F2AC00 /* Frameworks */, + 1A0C4445219A38E100F2AC00 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MessagesBridge; + productName = MessagesBridge; + productReference = 1A0C4447219A38E100F2AC00 /* MessagesBridge.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 1A0C443F219A38E100F2AC00 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1100; + ORGANIZATIONNAME = "James Magahern"; + TargetAttributes = { + 1A0C4446219A38E100F2AC00 = { + CreatedOnToolsVersion = 11.0; + }; + }; + }; + buildConfigurationList = 1A0C4442219A38E100F2AC00 /* Build configuration list for PBXProject "MessagesBridge" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 1A0C443E219A38E100F2AC00; + productRefGroup = 1A0C4448219A38E100F2AC00 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1A0C4446219A38E100F2AC00 /* MessagesBridge */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1A0C4445219A38E100F2AC00 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A0C444E219A38E200F2AC00 /* Assets.xcassets in Resources */, + 1A0C4451219A38E200F2AC00 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1A0C4443219A38E100F2AC00 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A0C4454219A38E200F2AC00 /* main.m in Sources */, + 1A0C444C219A38E100F2AC00 /* AppDelegate.m in Sources */, + 1A0C446B219A4BC300F2AC00 /* MBIMBridge.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 1A0C444F219A38E200F2AC00 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 1A0C4450219A38E200F2AC00 /* Base */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 1A0C4456219A38E200F2AC00 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = NO; + 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_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; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SYSTEM_FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"", + ); + }; + name = Debug; + }; + 1A0C4457219A38E200F2AC00 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = NO; + 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_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; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + SYSTEM_FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"", + ); + }; + name = Release; + }; + 1A0C4459219A38E200F2AC00 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1A33B43C219A5ACD0034485A /* OSXDebugDefaults.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = MessagesBridge/MessagesBridge.entitlements; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Manual; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = MessagesBridge/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = net.buzzert.MessagesBridge; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx.internal; + SYSTEM_FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", + ); + }; + name = Debug; + }; + 1A0C445A219A38E200F2AC00 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = MessagesBridge/MessagesBridge.entitlements; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Manual; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = MessagesBridge/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = net.buzzert.MessagesBridge; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx.internal; + SYSTEM_FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1A0C4442219A38E100F2AC00 /* Build configuration list for PBXProject "MessagesBridge" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1A0C4456219A38E200F2AC00 /* Debug */, + 1A0C4457219A38E200F2AC00 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1A0C4458219A38E200F2AC00 /* Build configuration list for PBXNativeTarget "MessagesBridge" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1A0C4459219A38E200F2AC00 /* Debug */, + 1A0C445A219A38E200F2AC00 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 1A0C443F219A38E100F2AC00 /* Project object */; +} diff --git a/MessagesBridge/AppDelegate.h b/MessagesBridge/AppDelegate.h new file mode 100644 index 0000000..86ea015 --- /dev/null +++ b/MessagesBridge/AppDelegate.h @@ -0,0 +1,15 @@ +// +// AppDelegate.h +// MessagesBridge +// +// Created by James Magahern on 11/12/18. +// Copyright © 2018 James Magahern. All rights reserved. +// + +#import + +@interface AppDelegate : NSObject + + +@end + diff --git a/MessagesBridge/AppDelegate.m b/MessagesBridge/AppDelegate.m new file mode 100644 index 0000000..471e24d --- /dev/null +++ b/MessagesBridge/AppDelegate.m @@ -0,0 +1,33 @@ +// +// AppDelegate.m +// MessagesBridge +// +// Created by James Magahern on 11/12/18. +// Copyright © 2018 James Magahern. All rights reserved. +// + +#import "AppDelegate.h" +#import "MBIMBridge.h" + +@interface AppDelegate () +@property (weak) IBOutlet NSWindow *window; +@property (nonatomic, strong) MBIMBridge *bridge; +@end + +@implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification +{ + self.bridge = [[MBIMBridge alloc] init]; + [self.bridge connect]; +} + + + + +- (void)applicationWillTerminate:(NSNotification *)aNotification { + // Insert code here to tear down your application +} + + +@end diff --git a/MessagesBridge/Assets.xcassets/AppIcon.appiconset/Contents.json b/MessagesBridge/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2db2b1c --- /dev/null +++ b/MessagesBridge/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MessagesBridge/Assets.xcassets/Contents.json b/MessagesBridge/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/MessagesBridge/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MessagesBridge/Base.lproj/MainMenu.xib b/MessagesBridge/Base.lproj/MainMenu.xib new file mode 100644 index 0000000..c60269e --- /dev/null +++ b/MessagesBridge/Base.lproj/MainMenu.xib @@ -0,0 +1,692 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MessagesBridge/Bridge/MBIMBridge.h b/MessagesBridge/Bridge/MBIMBridge.h new file mode 100644 index 0000000..d0fd1a3 --- /dev/null +++ b/MessagesBridge/Bridge/MBIMBridge.h @@ -0,0 +1,19 @@ +// +// MBIMBridge.h +// MessagesBridge +// +// Created by James Magahern on 11/12/18. +// Copyright © 2018 James Magahern. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface MBIMBridge : NSObject +- (void)connect; +- (void)disconnect; + +@end + +NS_ASSUME_NONNULL_END diff --git a/MessagesBridge/Bridge/MBIMBridge.m b/MessagesBridge/Bridge/MBIMBridge.m new file mode 100644 index 0000000..15d7cd8 --- /dev/null +++ b/MessagesBridge/Bridge/MBIMBridge.m @@ -0,0 +1,123 @@ +// +// MBIMBridge.m +// MessagesBridge +// +// Created by James Magahern on 11/12/18. +// Copyright © 2018 James Magahern. All rights reserved. +// + +#import "MBIMBridge.h" + +#import +#import + +#import +#import + +static NSString *const MBIMBridgeToken = @"net.buzzert.MBIMBridge"; + +@implementation MBIMBridge + +- (instancetype)init +{ + self = [super init]; + if (self) { + [self registerForNotifications]; + + [sDaemonController setDelegate:self]; + [sDaemonListener addHandler:self]; + } + + return self; +} + +#pragma mark - +#pragma mark Connection + +- (void)connect +{ + if (![sDaemonController hasListenerForID: MBIMBridgeToken]) { + if (![sDaemonController addListenerID:MBIMBridgeToken capabilities:(kFZListenerCapFileTransfers | kFZListenerCapManageStatus | kFZListenerCapChats | kFZListenerCapMessageHistory | kFZListenerCapIDQueries | kFZListenerCapSendMessages)]) { + NSLog(@"Failed to connect to imagent"); + } + } +} + +- (void)disconnect +{ + [sDaemonController removeListenerID:MBIMBridgeToken]; +} + +#pragma mark - +#pragma mark Notifications + +- (void)registerForNotifications +{ + (void)[IMChatRegistry sharedInstance]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_messageReceived:) name:IMChatMessageReceivedNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_chatRegistryDidLoad:) name:IMChatRegistryDidLoadNotification object:nil]; + + [[NSNotificationCenter defaultCenter] addObserverForName: IMChatRegistryUnreadCountChangedNotification + object: nil + queue: [NSOperationQueue mainQueue] + usingBlock:^(NSNotification *note) { + NSLog(@"Unread count changed: %d", (int)[[IMChatRegistry sharedInstance] unreadCount]); + }]; +} + +- (void)_messageReceived:(NSNotification *)notification +{ + NSLog(@"Received!"); + + // Automated reply + IMAccount *iMessageAccount = [[IMAccountController sharedInstance] bestAccountForService:[IMServiceImpl iMessageService]]; + IMHandle *handle = [[iMessageAccount arrayOfAllIMHandles] firstObject]; + + /* this caused a crazy loop for some reason!! */ + + /* + NSAttributedString *replyAttrString = [[NSAttributedString alloc] initWithString:@"This is a test automated reply. Please ignore."]; + IMMessage *reply = [IMMessage fromMeIMHandle:handle withText:replyAttrString fileTransferGUIDs:@[] flags:kIMMessageFinished]; + + IMChat *chat = [notification object]; + [chat sendMessage:reply]; + */ +} + +- (void)_chatRegistryDidLoad:(NSNotification *)notification +{ + NSLog(@"Loaded chat registry. %lu existing chats", (unsigned long)[sChatRegistry numberOfExistingChats]); +} + +#pragma mark - +#pragma mark Daemon lifecycle + +- (void)daemonControllerWillConnect +{ + NSLog(@"About to connect to daemon"); +} + +- (void)daemonControllerDidConnect +{ + NSLog(@"Did connect to daemon"); + + IMAccount *iMessageAccount = [[IMAccountController sharedInstance] bestAccountForService:[IMServiceImpl iMessageService]]; + if (iMessageAccount) { + NSLog(@"iMessage account connected: %@", iMessageAccount); + } else { + NSLog(@"Was not able to connect to iMessage account"); + } +} + +- (void)daemonControllerDidDisconnect +{ + NSLog(@"Did disconnect from daemon"); +} + +- (void)daemonConnectionLost +{ + NSLog(@"Connection lost to daemon"); +} + +@end diff --git a/MessagesBridge/Config Files/DebugDefaults.xcconfig b/MessagesBridge/Config Files/DebugDefaults.xcconfig new file mode 100644 index 0000000..a0dda08 --- /dev/null +++ b/MessagesBridge/Config Files/DebugDefaults.xcconfig @@ -0,0 +1,88 @@ +// +// Many defines in this file are based on the selected SDK; it does not set an SDK. +// NOTE: This is inherited by ALL projects and all types, be careful in here +// + +// ####################### HEADER SEARCH PATHS ######################## + +HEADER_SEARCH_PATHS = $(SDK_DIR)/usr/local/include $(SDK_DIR)/usr/include + +// ##################### FRAMEWORK SEARCH PATHS ####################### + +ALWAYS_SEARCH_USER_PATHS = NO +FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(SDK_DIR)/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks +FRAMEWORK_SEARCH_PATHS[sdk=embedded*] = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks +FRAMEWORK_SEARCH_PATHS[sdk=embeddedsimulator*] = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks + +// ###################### LIBRARY SEARCH PATHS ######################## + +LIBRARY_SEARCH_PATHS[sdk=embedded*] = $(SDK_DIR)/usr/local/lib $(SDK_DIR)/usr/lib +LIBRARY_SEARCH_PATHS[sdk=embeddedsimulator*] = $(SDK_DIR)/usr/local/lib $(SDK_DIR)/usr/lib + +// ############################# FLAGS ################################ + +OTHER_CFLAGS = -Wshadow -DIM_DEBUG -D_FORTIFY_SOURCE=2 -D__IMCORE_INTERNAL__ -Wno-error=deprecated-declarations +OTHER_CFLAGS[sdk=embedded*] = -Wshadow -DIM_DEBUG -D_FORTIFY_SOURCE=2 -DUSE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -D__IMCORE_INTERNAL__ -Wno-error=deprecated-declarations +OTHER_CFLAGS[sdk=embeddedsimulator*] = -Wshadow -DIM_DEBUG -D_FORTIFY_SOURCE=2 -DUSE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -D__IMCORE_INTERNAL__ -Wno-error=deprecated-declarations + +WARNING_CFLAGS = -Wno-error=deprecated-declarations + +// ######################### ARCHITECTURES ########################### + +ARCHS[sdk=macosx*] = $(ARCHS_STANDARD_64_BIT) + +VALID_ARCHS[sdk=macosx*] = x86_64 +VALID_ARCHS[sdk=embeddedsimulator*] = i386 x86_64 + +// ######################### CONFIGURATION ########################### + +CODE_SIGN_IDENTITY = - + +DYLIB_CURRENT_VERSION = 800 +DYLIB_COMPATIBILITY_VERSION = 1 + +CLANG_WARN_CONSTANT_CONVERSION = YES; +CLANG_WARN_ENUM_CONVERSION = YES; +CLANG_WARN_INT_CONVERSION = YES; +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + +GCC_WARN_UNINITIALIZED_AUTOS = YES; +GCC_WARN_UNUSED_VARIABLE = YES; + +ONLY_ACTIVE_ARCH = YES + +TARGETED_DEVICE_FAMILY = 1,2 +TARGETED_DEVICE_FAMILY[sdk=watch*] = 4 + +// ######################## INSTALLATION ############################# + +SKIP_INSTALL = NO + +// ########################### CLANG ################################# + +CLANG_MODULES_AUTOLINK = NO +RUN_CLANG_STATIC_ANALYZER = YES + +// ######################### COMPILER ################################ + +GCC_VERSION = com.apple.compilers.llvm.clang.1_0; +GCC_WARN_ABOUT_RETURN_TYPE = YES + +// ######################### LANGUAGE MISC ########################### + +GCC_C_LANGUAGE_STANDARD = c99 + +// ########################## DEBUGGING ############################## + +GCC_OPTIMIZATION_LEVEL = 0 + +// ############################ MISC ################################# + +VERSIONING_SYSTEM = apple-generic + +// ############################ USER OVERRIDE ################################# + +// Override global settings in a git ignored UserDebug.xcconfig file at the repo root. +// I seem to have to restart Xcode if I add/remove this file. +#include? "UserDebug.xcconfig" + diff --git a/MessagesBridge/Config Files/OSXDebugDefaults.xcconfig b/MessagesBridge/Config Files/OSXDebugDefaults.xcconfig new file mode 100644 index 0000000..5630ba2 --- /dev/null +++ b/MessagesBridge/Config Files/OSXDebugDefaults.xcconfig @@ -0,0 +1,5 @@ +// +// To be used by OSX targets +// + +SDKROOT = macosx.internal \ No newline at end of file diff --git a/MessagesBridge/Config Files/OSXReleaseDefaults.xcconfig b/MessagesBridge/Config Files/OSXReleaseDefaults.xcconfig new file mode 100644 index 0000000..695d65e --- /dev/null +++ b/MessagesBridge/Config Files/OSXReleaseDefaults.xcconfig @@ -0,0 +1,5 @@ +#include "OSXDebugDefaults.xcconfig" + +// +// To be used by OSX targets +// diff --git a/MessagesBridge/Config Files/ReleaseDefaults.xcconfig b/MessagesBridge/Config Files/ReleaseDefaults.xcconfig new file mode 100644 index 0000000..be6e3e4 --- /dev/null +++ b/MessagesBridge/Config Files/ReleaseDefaults.xcconfig @@ -0,0 +1,36 @@ +#include "DebugDefaults.xcconfig" + +// #################### INSTALLATION FLAGS ##################### + +SKIP_INSTALL = NO + +// ####################### DEBUG FLAGS ######################### + +STRIP_INSTALLED_PRODUCT = YES +STRIP_STYLE = non-global; + +COPY_PHASE_STRIP = YES + +GCC_OPTIMIZATION_LEVEL = s +GCC_GENERATE_DEBUGGING_SYMBOLS = YES +GCC_SYMBOLS_PRIVATE_EXTERN = YES + +ONLY_ACTIVE_ARCH = NO + +DEBUG_INFORMATION_FORMAT = dwarf-with-dsym + +// ######################### C FLAGS ########################### + +OTHER_CFLAGS = -Wshadow -D_FORTIFY_SOURCE=2 -D__IMCORE_INTERNAL__ +OTHER_CFLAGS[sdk=embedded*] = -Wshadow -D_FORTIFY_SOURCE=2 -DUSE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -D__IMCORE_INTERNAL__ -Wno-error=deprecated-declarations +OTHER_CFLAGS[sdk=embeddedsimulator*] = -Wshadow -D_FORTIFY_SOURCE=2 -DUSE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -D__IMCORE_INTERNAL__ -Wno-error=deprecated-declarations + +// ########################## CLANG ############################ + +RUN_CLANG_STATIC_ANALYZER = NO + +// ####################### Order File ########################## + +ORDER_FILE = Order Files/$(PROJECT_NAME).order + +GCC_PREPROCESSOR_DEFINITIONS = NDEBUG diff --git a/MessagesBridge/Info.plist b/MessagesBridge/Info.plist new file mode 100644 index 0000000..0d13e4a --- /dev/null +++ b/MessagesBridge/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2018 James Magahern. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/MessagesBridge/MessagesBridge.entitlements b/MessagesBridge/MessagesBridge.entitlements new file mode 100644 index 0000000..d61bb27 --- /dev/null +++ b/MessagesBridge/MessagesBridge.entitlements @@ -0,0 +1,47 @@ + + + + + com.apple.private.corespotlight.search.internal + + com.apple.private.corespotlight.internal + + com.apple.CommCenter.fine-grained + + spi + + com.apple.accounts.inactive.fullaccess + + com.apple.imagent + + com.apple.private.accounts.allaccounts + + com.apple.private.aps-connection-initiate + + com.apple.ess + com.apple.madrid + + com.apple.private.communicationsfilter + + com.apple.private.ids.idquery-cache + + com.apple.private.ids.remoteurlconnection + + com.apple.private.imcore.imdpersistence.database-access + + com.apple.private.tcc.allow + + kTCCServiceAddressBook + + keychain-access-groups + + appleaccount + InternetAccounts + IMCore + ichat + apple + + com.apple.logd.admin + + + diff --git a/MessagesBridge/Pilfered Headers/SOAPlugInControllerProtocol.h b/MessagesBridge/Pilfered Headers/SOAPlugInControllerProtocol.h new file mode 100644 index 0000000..90d4982 --- /dev/null +++ b/MessagesBridge/Pilfered Headers/SOAPlugInControllerProtocol.h @@ -0,0 +1,16 @@ +// +// MessagesHelperProtocol.h +// MessagesHelpers +// +// Created by Jeremy Payne on 7/10/12. +// Copyright (c) 2012 Apple. All rights reserved. +// + +#import + +@protocol SOAPlugInControllerProtocol + +- (oneway void)connectPlugIn:(NSString *)plugInName withConnectionHandler:(void (^)(NSXPCListenerEndpoint *))replyHandler; +- (void)reconnect; + +@end diff --git a/MessagesBridge/README.md b/MessagesBridge/README.md new file mode 100644 index 0000000..8ea8fd8 --- /dev/null +++ b/MessagesBridge/README.md @@ -0,0 +1,8 @@ +# Entitlements + +You might to enable this default to use private entitlements +``` +sudo defaults write /Library/Preferences/com.apple.security.coderequirements Entitlements -string always +``` + +Maybe a better thing to do is to DYLD_PRELOAD `imagent` and swizzle `IMDAuditTokenTaskHasEntitlement` to always return YES. diff --git a/MessagesBridge/main.m b/MessagesBridge/main.m new file mode 100644 index 0000000..7ff9331 --- /dev/null +++ b/MessagesBridge/main.m @@ -0,0 +1,13 @@ +// +// main.m +// MessagesBridge +// +// Created by James Magahern on 11/12/18. +// Copyright © 2018 James Magahern. All rights reserved. +// + +#import + +int main(int argc, const char * argv[]) { + return NSApplicationMain(argc, argv); +}