From 6ae0defcd0a1232d94689d9b10ee2d527d876ffd Mon Sep 17 00:00:00 2001 From: Leo Natan Date: Tue, 26 Jan 2021 20:23:35 +0200 Subject: [PATCH] Add test project for testing of DetoxIPC --- .../DetoxIPCTest.xcodeproj/project.pbxproj | 576 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + DetoxIPCTest/DetoxIPCTest/AppDelegate.h | 14 + DetoxIPCTest/DetoxIPCTest/AppDelegate.m | 40 ++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 98 +++ .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 + .../DetoxIPCTest/Base.lproj/Main.storyboard | 24 + DetoxIPCTest/DetoxIPCTest/Info.plist | 66 ++ DetoxIPCTest/DetoxIPCTest/SceneDelegate.h | 15 + DetoxIPCTest/DetoxIPCTest/SceneDelegate.m | 57 ++ DetoxIPCTest/DetoxIPCTest/ViewController.h | 14 + DetoxIPCTest/DetoxIPCTest/ViewController.m | 61 ++ DetoxIPCTest/DetoxIPCTest/main.m | 18 + .../DetoxIPCTestUITests/DetoxIPCTestUITests.m | 98 +++ DetoxIPCTest/DetoxIPCTestUITests/Info.plist | 22 + DetoxIPCTest/TestProtocol.h | 19 + 18 files changed, 1171 insertions(+) create mode 100644 DetoxIPCTest/DetoxIPCTest.xcodeproj/project.pbxproj create mode 100644 DetoxIPCTest/DetoxIPCTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 DetoxIPCTest/DetoxIPCTest/AppDelegate.h create mode 100644 DetoxIPCTest/DetoxIPCTest/AppDelegate.m create mode 100644 DetoxIPCTest/DetoxIPCTest/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 DetoxIPCTest/DetoxIPCTest/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 DetoxIPCTest/DetoxIPCTest/Assets.xcassets/Contents.json create mode 100644 DetoxIPCTest/DetoxIPCTest/Base.lproj/LaunchScreen.storyboard create mode 100644 DetoxIPCTest/DetoxIPCTest/Base.lproj/Main.storyboard create mode 100644 DetoxIPCTest/DetoxIPCTest/Info.plist create mode 100644 DetoxIPCTest/DetoxIPCTest/SceneDelegate.h create mode 100644 DetoxIPCTest/DetoxIPCTest/SceneDelegate.m create mode 100644 DetoxIPCTest/DetoxIPCTest/ViewController.h create mode 100644 DetoxIPCTest/DetoxIPCTest/ViewController.m create mode 100644 DetoxIPCTest/DetoxIPCTest/main.m create mode 100644 DetoxIPCTest/DetoxIPCTestUITests/DetoxIPCTestUITests.m create mode 100644 DetoxIPCTest/DetoxIPCTestUITests/Info.plist create mode 100644 DetoxIPCTest/TestProtocol.h diff --git a/DetoxIPCTest/DetoxIPCTest.xcodeproj/project.pbxproj b/DetoxIPCTest/DetoxIPCTest.xcodeproj/project.pbxproj new file mode 100644 index 0000000..75c5cf7 --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest.xcodeproj/project.pbxproj @@ -0,0 +1,576 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 3968B53725C08006000CB6CB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3968B53625C08006000CB6CB /* AppDelegate.m */; }; + 3968B53A25C08006000CB6CB /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3968B53925C08006000CB6CB /* SceneDelegate.m */; }; + 3968B53D25C08006000CB6CB /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3968B53C25C08006000CB6CB /* ViewController.m */; }; + 3968B54025C08006000CB6CB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3968B53E25C08006000CB6CB /* Main.storyboard */; }; + 3968B54225C08008000CB6CB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3968B54125C08008000CB6CB /* Assets.xcassets */; }; + 3968B54525C08008000CB6CB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3968B54325C08008000CB6CB /* LaunchScreen.storyboard */; }; + 3968B54825C08008000CB6CB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3968B54725C08008000CB6CB /* main.m */; }; + 3968B55E25C08043000CB6CB /* DetoxIPCTestUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3968B55D25C08043000CB6CB /* DetoxIPCTestUITests.m */; }; + 3968B56C25C081A0000CB6CB /* DetoxIPC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3968B55425C08029000CB6CB /* DetoxIPC.framework */; }; + 3968B56D25C081A0000CB6CB /* DetoxIPC.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3968B55425C08029000CB6CB /* DetoxIPC.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 3968B57325C081BD000CB6CB /* DetoxIPC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3968B55425C08029000CB6CB /* DetoxIPC.framework */; }; + 3968B57525C081D8000CB6CB /* DetoxIPC.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3968B55425C08029000CB6CB /* DetoxIPC.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 3968B55325C08029000CB6CB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3968B54F25C08028000CB6CB /* DetoxIPC.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 397D3E2A233A293D00E69D28; + remoteInfo = DetoxIPC; + }; + 3968B56025C08043000CB6CB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3968B52A25C08006000CB6CB /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3968B53125C08006000CB6CB; + remoteInfo = DetoxIPCTest; + }; + 3968B56F25C081A8000CB6CB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3968B54F25C08028000CB6CB /* DetoxIPC.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 397D3E29233A293D00E69D28; + remoteInfo = DetoxIPC; + }; + 3968B57125C081AD000CB6CB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3968B54F25C08028000CB6CB /* DetoxIPC.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 397D3E29233A293D00E69D28; + remoteInfo = DetoxIPC; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 3968B56E25C081A0000CB6CB /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 3968B56D25C081A0000CB6CB /* DetoxIPC.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 3968B57425C081C5000CB6CB /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 3968B57525C081D8000CB6CB /* DetoxIPC.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 3968B53225C08006000CB6CB /* DetoxIPCTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DetoxIPCTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 3968B53525C08006000CB6CB /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 3968B53625C08006000CB6CB /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 3968B53825C08006000CB6CB /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; + 3968B53925C08006000CB6CB /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; + 3968B53B25C08006000CB6CB /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 3968B53C25C08006000CB6CB /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 3968B53F25C08006000CB6CB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 3968B54125C08008000CB6CB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 3968B54425C08008000CB6CB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 3968B54625C08008000CB6CB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3968B54725C08008000CB6CB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 3968B54F25C08028000CB6CB /* DetoxIPC.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = DetoxIPC.xcodeproj; path = ../DetoxIPC.xcodeproj; sourceTree = ""; }; + 3968B55B25C08043000CB6CB /* DetoxIPCTestUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DetoxIPCTestUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3968B55D25C08043000CB6CB /* DetoxIPCTestUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DetoxIPCTestUITests.m; sourceTree = ""; }; + 3968B55F25C08043000CB6CB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3968B59325C08941000CB6CB /* TestProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestProtocol.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 3968B52F25C08006000CB6CB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3968B56C25C081A0000CB6CB /* DetoxIPC.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3968B55825C08043000CB6CB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3968B57325C081BD000CB6CB /* DetoxIPC.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3968B52925C08006000CB6CB = { + isa = PBXGroup; + children = ( + 3968B59325C08941000CB6CB /* TestProtocol.h */, + 3968B54F25C08028000CB6CB /* DetoxIPC.xcodeproj */, + 3968B53425C08006000CB6CB /* DetoxIPCTest */, + 3968B55C25C08043000CB6CB /* DetoxIPCTestUITests */, + 3968B53325C08006000CB6CB /* Products */, + 3968B56B25C081A0000CB6CB /* Frameworks */, + ); + sourceTree = ""; + }; + 3968B53325C08006000CB6CB /* Products */ = { + isa = PBXGroup; + children = ( + 3968B53225C08006000CB6CB /* DetoxIPCTest.app */, + 3968B55B25C08043000CB6CB /* DetoxIPCTestUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 3968B53425C08006000CB6CB /* DetoxIPCTest */ = { + isa = PBXGroup; + children = ( + 3968B53525C08006000CB6CB /* AppDelegate.h */, + 3968B53625C08006000CB6CB /* AppDelegate.m */, + 3968B53825C08006000CB6CB /* SceneDelegate.h */, + 3968B53925C08006000CB6CB /* SceneDelegate.m */, + 3968B53B25C08006000CB6CB /* ViewController.h */, + 3968B53C25C08006000CB6CB /* ViewController.m */, + 3968B53E25C08006000CB6CB /* Main.storyboard */, + 3968B54125C08008000CB6CB /* Assets.xcassets */, + 3968B54325C08008000CB6CB /* LaunchScreen.storyboard */, + 3968B54625C08008000CB6CB /* Info.plist */, + 3968B54725C08008000CB6CB /* main.m */, + ); + path = DetoxIPCTest; + sourceTree = ""; + }; + 3968B55025C08028000CB6CB /* Products */ = { + isa = PBXGroup; + children = ( + 3968B55425C08029000CB6CB /* DetoxIPC.framework */, + ); + name = Products; + sourceTree = ""; + }; + 3968B55C25C08043000CB6CB /* DetoxIPCTestUITests */ = { + isa = PBXGroup; + children = ( + 3968B55D25C08043000CB6CB /* DetoxIPCTestUITests.m */, + 3968B55F25C08043000CB6CB /* Info.plist */, + ); + path = DetoxIPCTestUITests; + sourceTree = ""; + }; + 3968B56B25C081A0000CB6CB /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 3968B53125C08006000CB6CB /* DetoxIPCTest */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3968B54B25C08008000CB6CB /* Build configuration list for PBXNativeTarget "DetoxIPCTest" */; + buildPhases = ( + 3968B52E25C08006000CB6CB /* Sources */, + 3968B52F25C08006000CB6CB /* Frameworks */, + 3968B53025C08006000CB6CB /* Resources */, + 3968B56E25C081A0000CB6CB /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 3968B57025C081A8000CB6CB /* PBXTargetDependency */, + ); + name = DetoxIPCTest; + productName = DetoxIPCTest; + productReference = 3968B53225C08006000CB6CB /* DetoxIPCTest.app */; + productType = "com.apple.product-type.application"; + }; + 3968B55A25C08043000CB6CB /* DetoxIPCTestUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3968B56225C08043000CB6CB /* Build configuration list for PBXNativeTarget "DetoxIPCTestUITests" */; + buildPhases = ( + 3968B55725C08043000CB6CB /* Sources */, + 3968B55825C08043000CB6CB /* Frameworks */, + 3968B55925C08043000CB6CB /* Resources */, + 3968B57425C081C5000CB6CB /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 3968B57225C081AD000CB6CB /* PBXTargetDependency */, + 3968B56125C08043000CB6CB /* PBXTargetDependency */, + ); + name = DetoxIPCTestUITests; + productName = DetoxIPCTestUITests; + productReference = 3968B55B25C08043000CB6CB /* DetoxIPCTestUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 3968B52A25C08006000CB6CB /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1230; + TargetAttributes = { + 3968B53125C08006000CB6CB = { + CreatedOnToolsVersion = 12.3; + }; + 3968B55A25C08043000CB6CB = { + CreatedOnToolsVersion = 12.3; + TestTargetID = 3968B53125C08006000CB6CB; + }; + }; + }; + buildConfigurationList = 3968B52D25C08006000CB6CB /* Build configuration list for PBXProject "DetoxIPCTest" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 3968B52925C08006000CB6CB; + productRefGroup = 3968B53325C08006000CB6CB /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 3968B55025C08028000CB6CB /* Products */; + ProjectRef = 3968B54F25C08028000CB6CB /* DetoxIPC.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 3968B53125C08006000CB6CB /* DetoxIPCTest */, + 3968B55A25C08043000CB6CB /* DetoxIPCTestUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 3968B55425C08029000CB6CB /* DetoxIPC.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = DetoxIPC.framework; + remoteRef = 3968B55325C08029000CB6CB /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 3968B53025C08006000CB6CB /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3968B54525C08008000CB6CB /* LaunchScreen.storyboard in Resources */, + 3968B54225C08008000CB6CB /* Assets.xcassets in Resources */, + 3968B54025C08006000CB6CB /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3968B55925C08043000CB6CB /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 3968B52E25C08006000CB6CB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3968B53D25C08006000CB6CB /* ViewController.m in Sources */, + 3968B53725C08006000CB6CB /* AppDelegate.m in Sources */, + 3968B54825C08008000CB6CB /* main.m in Sources */, + 3968B53A25C08006000CB6CB /* SceneDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3968B55725C08043000CB6CB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3968B55E25C08043000CB6CB /* DetoxIPCTestUITests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 3968B56125C08043000CB6CB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3968B53125C08006000CB6CB /* DetoxIPCTest */; + targetProxy = 3968B56025C08043000CB6CB /* PBXContainerItemProxy */; + }; + 3968B57025C081A8000CB6CB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = DetoxIPC; + targetProxy = 3968B56F25C081A8000CB6CB /* PBXContainerItemProxy */; + }; + 3968B57225C081AD000CB6CB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = DetoxIPC; + targetProxy = 3968B57125C081AD000CB6CB /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 3968B53E25C08006000CB6CB /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 3968B53F25C08006000CB6CB /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 3968B54325C08008000CB6CB /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 3968B54425C08008000CB6CB /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 3968B54925C08008000CB6CB /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.3; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 3968B54A25C08008000CB6CB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.3; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 3968B54C25C08008000CB6CB /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = XPHGA2FMQQ; + INFOPLIST_FILE = DetoxIPCTest/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.wix.DetoxIPCTest; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 3968B54D25C08008000CB6CB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = XPHGA2FMQQ; + INFOPLIST_FILE = DetoxIPCTest/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.wix.DetoxIPCTest; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 3968B56325C08043000CB6CB /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = XPHGA2FMQQ; + INFOPLIST_FILE = DetoxIPCTestUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.wix.DetoxIPCTestUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = DetoxIPCTest; + }; + name = Debug; + }; + 3968B56425C08043000CB6CB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = XPHGA2FMQQ; + INFOPLIST_FILE = DetoxIPCTestUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.wix.DetoxIPCTestUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = DetoxIPCTest; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3968B52D25C08006000CB6CB /* Build configuration list for PBXProject "DetoxIPCTest" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3968B54925C08008000CB6CB /* Debug */, + 3968B54A25C08008000CB6CB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3968B54B25C08008000CB6CB /* Build configuration list for PBXNativeTarget "DetoxIPCTest" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3968B54C25C08008000CB6CB /* Debug */, + 3968B54D25C08008000CB6CB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3968B56225C08043000CB6CB /* Build configuration list for PBXNativeTarget "DetoxIPCTestUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3968B56325C08043000CB6CB /* Debug */, + 3968B56425C08043000CB6CB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 3968B52A25C08006000CB6CB /* Project object */; +} diff --git a/DetoxIPCTest/DetoxIPCTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DetoxIPCTest/DetoxIPCTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/DetoxIPCTest/DetoxIPCTest/AppDelegate.h b/DetoxIPCTest/DetoxIPCTest/AppDelegate.h new file mode 100644 index 0000000..e7ce88e --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest/AppDelegate.h @@ -0,0 +1,14 @@ +// +// AppDelegate.h +// DetoxIPCTest +// +// Created by Leo Natan on 1/26/21. +// + +#import + +@interface AppDelegate : UIResponder + + +@end + diff --git a/DetoxIPCTest/DetoxIPCTest/AppDelegate.m b/DetoxIPCTest/DetoxIPCTest/AppDelegate.m new file mode 100644 index 0000000..aa43f00 --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest/AppDelegate.m @@ -0,0 +1,40 @@ +// +// AppDelegate.m +// DetoxIPCTest +// +// Created by Leo Natan on 1/26/21. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + + +#pragma mark - UISceneSession lifecycle + + +- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; +} + + +- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. +} + + +@end diff --git a/DetoxIPCTest/DetoxIPCTest/Assets.xcassets/AccentColor.colorset/Contents.json b/DetoxIPCTest/DetoxIPCTest/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DetoxIPCTest/DetoxIPCTest/Assets.xcassets/AppIcon.appiconset/Contents.json b/DetoxIPCTest/DetoxIPCTest/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9221b9b --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DetoxIPCTest/DetoxIPCTest/Assets.xcassets/Contents.json b/DetoxIPCTest/DetoxIPCTest/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DetoxIPCTest/DetoxIPCTest/Base.lproj/LaunchScreen.storyboard b/DetoxIPCTest/DetoxIPCTest/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DetoxIPCTest/DetoxIPCTest/Base.lproj/Main.storyboard b/DetoxIPCTest/DetoxIPCTest/Base.lproj/Main.storyboard new file mode 100644 index 0000000..808a21c --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DetoxIPCTest/DetoxIPCTest/Info.plist b/DetoxIPCTest/DetoxIPCTest/Info.plist new file mode 100644 index 0000000..72bf2c4 --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest/Info.plist @@ -0,0 +1,66 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + UISceneStoryboardFile + Main + + + + + UIApplicationSupportsIndirectInputEvents + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/DetoxIPCTest/DetoxIPCTest/SceneDelegate.h b/DetoxIPCTest/DetoxIPCTest/SceneDelegate.h new file mode 100644 index 0000000..823f179 --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest/SceneDelegate.h @@ -0,0 +1,15 @@ +// +// SceneDelegate.h +// DetoxIPCTest +// +// Created by Leo Natan on 1/26/21. +// + +#import + +@interface SceneDelegate : UIResponder + +@property (strong, nonatomic) UIWindow * window; + +@end + diff --git a/DetoxIPCTest/DetoxIPCTest/SceneDelegate.m b/DetoxIPCTest/DetoxIPCTest/SceneDelegate.m new file mode 100644 index 0000000..18d0479 --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest/SceneDelegate.m @@ -0,0 +1,57 @@ +// +// SceneDelegate.m +// DetoxIPCTest +// +// Created by Leo Natan on 1/26/21. +// + +#import "SceneDelegate.h" + +@interface SceneDelegate () + +@end + +@implementation SceneDelegate + + +- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). +} + + +- (void)sceneDidDisconnect:(UIScene *)scene { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). +} + + +- (void)sceneDidBecomeActive:(UIScene *)scene { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. +} + + +- (void)sceneWillResignActive:(UIScene *)scene { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). +} + + +- (void)sceneWillEnterForeground:(UIScene *)scene { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. +} + + +- (void)sceneDidEnterBackground:(UIScene *)scene { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. +} + + +@end diff --git a/DetoxIPCTest/DetoxIPCTest/ViewController.h b/DetoxIPCTest/DetoxIPCTest/ViewController.h new file mode 100644 index 0000000..e7007db --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest/ViewController.h @@ -0,0 +1,14 @@ +// +// ViewController.h +// DetoxIPCTest +// +// Created by Leo Natan on 1/26/21. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/DetoxIPCTest/DetoxIPCTest/ViewController.m b/DetoxIPCTest/DetoxIPCTest/ViewController.m new file mode 100644 index 0000000..856640f --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest/ViewController.m @@ -0,0 +1,61 @@ +// +// ViewController.m +// DetoxIPCTest +// +// Created by Leo Natan on 1/26/21. +// + +#import "ViewController.h" +#import +#import "TestProtocol.h" + +@interface ViewController () +{ + DTXIPCConnection* _connection; +} + +@end + +@implementation ViewController + +- (void)asyncVoidBlockCallback:(dispatch_block_t)block +{ + block(); +} + +- (void)asyncMultipleVoidBlockCallback:(dispatch_block_t)block count:(NSUInteger)count +{ + for(NSUInteger idx = 0; idx < count; idx++) + { + block(); + } +} + +- (void)asyncArrayBlockCallback:(void (^)(NSArray *))block array:(NSArray*)array +{ + block(array); +} + +- (void)asyncIntegerBlockCallback:(void (^)(NSUInteger))block value:(NSUInteger)value +{ + block(value); +} + +- (void)asyncDictionaryBlockCallback:(void (^)(NSDictionary *))block dictionary:(NSDictionary*)dictionary +{ + block(dictionary); +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + _connection = [[DTXIPCConnection alloc] initWithServiceName:@"com.wix.DetoxIPCTest"]; + _connection.exportedInterface = [DTXIPCInterface interfaceWithProtocol:@protocol(TestProtocol)]; + _connection.exportedObject = self; + + [_connection resume]; +} + + +@end diff --git a/DetoxIPCTest/DetoxIPCTest/main.m b/DetoxIPCTest/DetoxIPCTest/main.m new file mode 100644 index 0000000..634b213 --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTest/main.m @@ -0,0 +1,18 @@ +// +// main.m +// DetoxIPCTest +// +// Created by Leo Natan on 1/26/21. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + NSString * appDelegateClassName; + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + appDelegateClassName = NSStringFromClass([AppDelegate class]); + } + return UIApplicationMain(argc, argv, nil, appDelegateClassName); +} diff --git a/DetoxIPCTest/DetoxIPCTestUITests/DetoxIPCTestUITests.m b/DetoxIPCTest/DetoxIPCTestUITests/DetoxIPCTestUITests.m new file mode 100644 index 0000000..4d69f9f --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTestUITests/DetoxIPCTestUITests.m @@ -0,0 +1,98 @@ +// +// DetoxIPCTestUITests.m +// DetoxIPCTestUITests +// +// Created by Leo Natan on 1/26/21. +// + +#import +#import "../TestProtocol.h" +#import + +@interface DetoxIPCTestUITests : XCTestCase +{ + DTXIPCConnection* _connection; +} + +@end + +@implementation DetoxIPCTestUITests + +- (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)testExample +{ + __block BOOL wasInvalidated = NO; + + __block XCUIApplication *app; + + _connection = [[DTXIPCConnection alloc] initWithServiceName:@"com.wix.DetoxIPCTest"]; + _connection.remoteObjectInterface = [DTXIPCInterface interfaceWithProtocol:@protocol(TestProtocol)]; + _connection.invalidationHandler = ^{ + wasInvalidated = YES; + }; + [_connection resume]; + + id proxy = [_connection synchronousRemoteObjectProxyWithErrorHandler:^(NSError * _Nonnull error) { + NSLog(@"ERROR:: %@", error); + }]; + + BOOL proxyObjectConforms = [proxy conformsToProtocol:@protocol(TestProtocol)]; + + app = [[XCUIApplication alloc] init]; + [app launch]; + + NSArray* arr1 = @[@1, @2, @3]; + __block NSArray* arr2 = nil; + + NSDictionary* dict1 = @{@"Test": @"Passed"}; + __block NSDictionary* dict2 = nil; + + const NSUInteger integer1 = 123; + __block NSUInteger integer2; + + __block BOOL callbackWasCalled; + + const NSUInteger count = 3; + __block NSUInteger callbackCount = 0; + + [proxy asyncVoidBlockCallback:^{ + callbackWasCalled = YES; + }]; + + [proxy asyncMultipleVoidBlockCallback:^{ + callbackCount += 1; + } count:count]; + + [proxy asyncIntegerBlockCallback:^(NSUInteger value) { + integer2 = value; + } value:integer1]; + + [proxy asyncArrayBlockCallback:^(NSArray *array) { + arr2 = array; + } array:arr1]; + + [proxy asyncDictionaryBlockCallback:^(NSDictionary *dictionary) { + dict2 = dictionary; + } dictionary:dict1]; + + [app terminate]; + + XCTAssertTrue(proxyObjectConforms); + XCTAssertEqualObjects(arr1, arr2); + XCTAssertEqualObjects(dict1, dict2); + XCTAssertEqual(integer1, integer2); + XCTAssertEqual(count, callbackCount); + XCTAssertTrue(callbackWasCalled); + XCTAssertTrue(wasInvalidated); +} + +@end diff --git a/DetoxIPCTest/DetoxIPCTestUITests/Info.plist b/DetoxIPCTest/DetoxIPCTestUITests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/DetoxIPCTest/DetoxIPCTestUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/DetoxIPCTest/TestProtocol.h b/DetoxIPCTest/TestProtocol.h new file mode 100644 index 0000000..a3faf4b --- /dev/null +++ b/DetoxIPCTest/TestProtocol.h @@ -0,0 +1,19 @@ +// +// TestProtocol.h +// DetoxIPCTest +// +// Created by Leo Natan on 1/26/21. +// + +#import + +@protocol TestProtocol + +- (void)asyncVoidBlockCallback:(dispatch_block_t)block; +- (void)asyncMultipleVoidBlockCallback:(dispatch_block_t)block count:(NSUInteger)count; +- (void)asyncIntegerBlockCallback:(void(^)(NSUInteger value))block value:(NSUInteger)value; +- (void)asyncDictionaryBlockCallback:(void(^)(NSDictionary* dictionary))block dictionary:(NSDictionary*)dictionary; +- (void)asyncArrayBlockCallback:(void(^)(NSArray* array))block array:(NSArray*)array; + +@end +