diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 347f4e85..6372a00e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,3 +122,19 @@ jobs: # -project "$PROJECT" \ # -scheme "$SCHEME" \ # -destination "$DESTINATION" | xcpretty + + integration_tests_package_manager: + strategy: + fail-fast: false + matrix: + package_manager: ['SPM', 'COCOAPODS', 'CARTHAGE'] + runs-on: macos-latest + env: + PACKAGE_MANAGER: USE_${{matrix.package_manager}} + steps: + - uses: actions/checkout@v1 + - name: integration_tests + run: | + cd IntegrationTests/package-manager + bash test.sh + \ No newline at end of file diff --git a/IntegrationTests/package-manager/.gitignore b/IntegrationTests/package-manager/.gitignore new file mode 100644 index 00000000..e8f7bdb2 --- /dev/null +++ b/IntegrationTests/package-manager/.gitignore @@ -0,0 +1,20 @@ +# SPM + +test-spm/.build +test-spm/Packages +test-spm/*.xcodeproj +test-spm/xcuserdata/ +test-spm/DerivedData/ +test-spm/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata + +# CocoaPods + +test-cocoapods/Pods/ +test-cocoapods/Podfile.lock + +# Carthage + +test-carthage/Carthage/Checkouts +test-carthage/Carthage/Build +test-carthage/Cartfile +test-carthage/Cartfile.resolved diff --git a/IntegrationTests/package-manager/test-carthage/MyApp.xcodeproj/project.pbxproj b/IntegrationTests/package-manager/test-carthage/MyApp.xcodeproj/project.pbxproj new file mode 100644 index 00000000..0dd3f59b --- /dev/null +++ b/IntegrationTests/package-manager/test-carthage/MyApp.xcodeproj/project.pbxproj @@ -0,0 +1,385 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 52; + objects = { + +/* Begin PBXBuildFile section */ + 775DB67626670810002154AA /* MyAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 775DB67526670810002154AA /* MyAppApp.swift */; }; + 775DB67826670810002154AA /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 775DB67726670810002154AA /* ContentView.swift */; }; + 775DB67A26670813002154AA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 775DB67926670813002154AA /* Assets.xcassets */; }; + 775DB67D26670813002154AA /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 775DB67C26670813002154AA /* Preview Assets.xcassets */; }; + 775DB686266709B9002154AA /* CombineX.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 775DB685266709B9002154AA /* CombineX.xcframework */; }; + 775DB687266709B9002154AA /* CombineX.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 775DB685266709B9002154AA /* CombineX.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 775DB68A266709BD002154AA /* CXFoundation.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 775DB689266709BD002154AA /* CXFoundation.xcframework */; }; + 775DB68B266709BD002154AA /* CXFoundation.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 775DB689266709BD002154AA /* CXFoundation.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 775DB68F266709F6002154AA /* CXNamespace.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 775DB68C266709F6002154AA /* CXNamespace.xcframework */; }; + 775DB690266709F6002154AA /* CXNamespace.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 775DB68C266709F6002154AA /* CXNamespace.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 775DB691266709F6002154AA /* CXUtility.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 775DB68D266709F6002154AA /* CXUtility.xcframework */; }; + 775DB692266709F6002154AA /* CXUtility.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 775DB68D266709F6002154AA /* CXUtility.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 775DB693266709F6002154AA /* CXLibc.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 775DB68E266709F6002154AA /* CXLibc.xcframework */; }; + 775DB694266709F6002154AA /* CXLibc.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 775DB68E266709F6002154AA /* CXLibc.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 775DB688266709B9002154AA /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 775DB687266709B9002154AA /* CombineX.xcframework in Embed Frameworks */, + 775DB690266709F6002154AA /* CXNamespace.xcframework in Embed Frameworks */, + 775DB68B266709BD002154AA /* CXFoundation.xcframework in Embed Frameworks */, + 775DB694266709F6002154AA /* CXLibc.xcframework in Embed Frameworks */, + 775DB692266709F6002154AA /* CXUtility.xcframework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 775DB67226670810002154AA /* MyApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MyApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 775DB67526670810002154AA /* MyAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyAppApp.swift; sourceTree = ""; }; + 775DB67726670810002154AA /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 775DB67926670813002154AA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 775DB67C26670813002154AA /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 775DB67E26670813002154AA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 775DB685266709B9002154AA /* CombineX.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = CombineX.xcframework; path = Carthage/Build/CombineX.xcframework; sourceTree = ""; }; + 775DB689266709BD002154AA /* CXFoundation.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = CXFoundation.xcframework; path = Carthage/Build/CXFoundation.xcframework; sourceTree = ""; }; + 775DB68C266709F6002154AA /* CXNamespace.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = CXNamespace.xcframework; path = Carthage/Build/CXNamespace.xcframework; sourceTree = ""; }; + 775DB68D266709F6002154AA /* CXUtility.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = CXUtility.xcframework; path = Carthage/Build/CXUtility.xcframework; sourceTree = ""; }; + 775DB68E266709F6002154AA /* CXLibc.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = CXLibc.xcframework; path = Carthage/Build/CXLibc.xcframework; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 775DB66F26670810002154AA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 775DB686266709B9002154AA /* CombineX.xcframework in Frameworks */, + 775DB68F266709F6002154AA /* CXNamespace.xcframework in Frameworks */, + 775DB68A266709BD002154AA /* CXFoundation.xcframework in Frameworks */, + 775DB693266709F6002154AA /* CXLibc.xcframework in Frameworks */, + 775DB691266709F6002154AA /* CXUtility.xcframework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 775DB66926670810002154AA = { + isa = PBXGroup; + children = ( + 775DB67426670810002154AA /* MyApp */, + 775DB67326670810002154AA /* Products */, + 775DB684266709B9002154AA /* Frameworks */, + ); + sourceTree = ""; + }; + 775DB67326670810002154AA /* Products */ = { + isa = PBXGroup; + children = ( + 775DB67226670810002154AA /* MyApp.app */, + ); + name = Products; + sourceTree = ""; + }; + 775DB67426670810002154AA /* MyApp */ = { + isa = PBXGroup; + children = ( + 775DB67526670810002154AA /* MyAppApp.swift */, + 775DB67726670810002154AA /* ContentView.swift */, + 775DB67926670813002154AA /* Assets.xcassets */, + 775DB67E26670813002154AA /* Info.plist */, + 775DB67B26670813002154AA /* Preview Content */, + ); + path = MyApp; + sourceTree = ""; + }; + 775DB67B26670813002154AA /* Preview Content */ = { + isa = PBXGroup; + children = ( + 775DB67C26670813002154AA /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 775DB684266709B9002154AA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 775DB68E266709F6002154AA /* CXLibc.xcframework */, + 775DB68C266709F6002154AA /* CXNamespace.xcframework */, + 775DB68D266709F6002154AA /* CXUtility.xcframework */, + 775DB689266709BD002154AA /* CXFoundation.xcframework */, + 775DB685266709B9002154AA /* CombineX.xcframework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 775DB67126670810002154AA /* MyApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 775DB68126670813002154AA /* Build configuration list for PBXNativeTarget "MyApp" */; + buildPhases = ( + 775DB66E26670810002154AA /* Sources */, + 775DB66F26670810002154AA /* Frameworks */, + 775DB67026670810002154AA /* Resources */, + 775DB688266709B9002154AA /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MyApp; + productName = MyApp; + productReference = 775DB67226670810002154AA /* MyApp.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 775DB66A26670810002154AA /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1250; + LastUpgradeCheck = 1250; + TargetAttributes = { + 775DB67126670810002154AA = { + CreatedOnToolsVersion = 12.5; + }; + }; + }; + buildConfigurationList = 775DB66D26670810002154AA /* Build configuration list for PBXProject "MyApp" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 775DB66926670810002154AA; + productRefGroup = 775DB67326670810002154AA /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 775DB67126670810002154AA /* MyApp */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 775DB67026670810002154AA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 775DB67D26670813002154AA /* Preview Assets.xcassets in Resources */, + 775DB67A26670813002154AA /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 775DB66E26670810002154AA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 775DB67826670810002154AA /* ContentView.swift in Sources */, + 775DB67626670810002154AA /* MyAppApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 775DB67F26670813002154AA /* 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.5; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 775DB68026670813002154AA /* 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.5; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 775DB68226670813002154AA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"MyApp/Preview Content\""; + DEVELOPMENT_TEAM = 577MKWCJN8; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = MyApp/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.v2ambition.MyApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 775DB68326670813002154AA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"MyApp/Preview Content\""; + DEVELOPMENT_TEAM = 577MKWCJN8; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = MyApp/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.v2ambition.MyApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 775DB66D26670810002154AA /* Build configuration list for PBXProject "MyApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 775DB67F26670813002154AA /* Debug */, + 775DB68026670813002154AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 775DB68126670813002154AA /* Build configuration list for PBXNativeTarget "MyApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 775DB68226670813002154AA /* Debug */, + 775DB68326670813002154AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 775DB66A26670810002154AA /* Project object */; +} diff --git a/IntegrationTests/package-manager/test-carthage/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/IntegrationTests/package-manager/test-carthage/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/IntegrationTests/package-manager/test-carthage/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/IntegrationTests/package-manager/test-carthage/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/IntegrationTests/package-manager/test-carthage/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/IntegrationTests/package-manager/test-carthage/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/IntegrationTests/package-manager/test-carthage/MyApp/Assets.xcassets/AccentColor.colorset/Contents.json b/IntegrationTests/package-manager/test-carthage/MyApp/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 00000000..eb878970 --- /dev/null +++ b/IntegrationTests/package-manager/test-carthage/MyApp/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/IntegrationTests/package-manager/test-carthage/MyApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/IntegrationTests/package-manager/test-carthage/MyApp/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..9221b9bb --- /dev/null +++ b/IntegrationTests/package-manager/test-carthage/MyApp/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/IntegrationTests/package-manager/test-carthage/MyApp/Assets.xcassets/Contents.json b/IntegrationTests/package-manager/test-carthage/MyApp/Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/IntegrationTests/package-manager/test-carthage/MyApp/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/IntegrationTests/package-manager/test-carthage/MyApp/ContentView.swift b/IntegrationTests/package-manager/test-carthage/MyApp/ContentView.swift new file mode 100644 index 00000000..a207a38b --- /dev/null +++ b/IntegrationTests/package-manager/test-carthage/MyApp/ContentView.swift @@ -0,0 +1,53 @@ +// +// ContentView.swift +// +// +// Created by Quentin Jin on 2021/5/31. +// + + +import SwiftUI +import CombineX +import CXFoundation + +private var cancellable: AnyCancellable? + +struct ContentView: View { + @State + private var count = 1 + + @State + private var isRunning = false + + var body: some View { + VStack { + Text("\(count)") + Button(isRunning ? "STOP" : "START") { + defer { + isRunning.toggle() + } + + if isRunning { + cancellable?.cancel() + } else { + cancellable = CXWrappers.Timer + .publish( + every: 1, + on: .main, + in: .common + ) + .autoconnect() + .sink(receiveValue: { _ in + count += 1 + }) + } + } + } + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/IntegrationTests/package-manager/test-carthage/MyApp/Info.plist b/IntegrationTests/package-manager/test-carthage/MyApp/Info.plist new file mode 100644 index 00000000..efc211a0 --- /dev/null +++ b/IntegrationTests/package-manager/test-carthage/MyApp/Info.plist @@ -0,0 +1,50 @@ + + + + + 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 + + + UIApplicationSupportsIndirectInputEvents + + UILaunchScreen + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/IntegrationTests/package-manager/test-carthage/MyApp/MyAppApp.swift b/IntegrationTests/package-manager/test-carthage/MyApp/MyAppApp.swift new file mode 100644 index 00000000..672a9d11 --- /dev/null +++ b/IntegrationTests/package-manager/test-carthage/MyApp/MyAppApp.swift @@ -0,0 +1,18 @@ +// +// MyAppApp.swift +// +// +// Created by Quentin Jin on 2021/6/2. +// + + +import SwiftUI + +@main +struct MyAppApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/IntegrationTests/package-manager/test-carthage/MyApp/Preview Content/Preview Assets.xcassets/Contents.json b/IntegrationTests/package-manager/test-carthage/MyApp/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/IntegrationTests/package-manager/test-carthage/MyApp/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/IntegrationTests/package-manager/test-carthage/test.sh b/IntegrationTests/package-manager/test-carthage/test.sh new file mode 100644 index 00000000..23d4602d --- /dev/null +++ b/IntegrationTests/package-manager/test-carthage/test.sh @@ -0,0 +1,14 @@ +#! /usr/bin/env bash + +set -euxo pipefail + +GIT_PATH=$(cd ../../../ && pwd) +echo "git \"${GIT_PATH}\"" >| 'Cartfile' + +carthage update --platform ios --use-xcframeworks + +xcodebuild \ + -scheme MyApp \ + -project MyApp.xcodeproj \ + -sdk iphonesimulator \ + clean build | xcpretty \ No newline at end of file diff --git a/IntegrationTests/package-manager/test-cocoapods/MyApp.xcodeproj/project.pbxproj b/IntegrationTests/package-manager/test-cocoapods/MyApp.xcodeproj/project.pbxproj new file mode 100644 index 00000000..1cb0327d --- /dev/null +++ b/IntegrationTests/package-manager/test-cocoapods/MyApp.xcodeproj/project.pbxproj @@ -0,0 +1,404 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 69E13B0CF1CA871E92DC16D8 /* Pods_MyApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4883EF2A73D500342A3BD4D /* Pods_MyApp.framework */; }; + 775DB67626670810002154AA /* MyAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 775DB67526670810002154AA /* MyAppApp.swift */; }; + 775DB67826670810002154AA /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 775DB67726670810002154AA /* ContentView.swift */; }; + 775DB67A26670813002154AA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 775DB67926670813002154AA /* Assets.xcassets */; }; + 775DB67D26670813002154AA /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 775DB67C26670813002154AA /* Preview Assets.xcassets */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 6BC068C02A245B973FC3F3D5 /* Pods-MyApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MyApp.release.xcconfig"; path = "Target Support Files/Pods-MyApp/Pods-MyApp.release.xcconfig"; sourceTree = ""; }; + 775DB67226670810002154AA /* MyApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MyApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 775DB67526670810002154AA /* MyAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyAppApp.swift; sourceTree = ""; }; + 775DB67726670810002154AA /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 775DB67926670813002154AA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 775DB67C26670813002154AA /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 775DB67E26670813002154AA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D4883EF2A73D500342A3BD4D /* Pods_MyApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MyApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FDCF0AAE68E7C96DBBB4D057 /* Pods-MyApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MyApp.debug.xcconfig"; path = "Target Support Files/Pods-MyApp/Pods-MyApp.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 775DB66F26670810002154AA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 69E13B0CF1CA871E92DC16D8 /* Pods_MyApp.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 775DB66926670810002154AA = { + isa = PBXGroup; + children = ( + 775DB67426670810002154AA /* MyApp */, + 775DB67326670810002154AA /* Products */, + E226CAEA835E0E88158B5E9D /* Pods */, + E1F3867930712CFD4E16DC58 /* Frameworks */, + ); + sourceTree = ""; + }; + 775DB67326670810002154AA /* Products */ = { + isa = PBXGroup; + children = ( + 775DB67226670810002154AA /* MyApp.app */, + ); + name = Products; + sourceTree = ""; + }; + 775DB67426670810002154AA /* MyApp */ = { + isa = PBXGroup; + children = ( + 775DB67526670810002154AA /* MyAppApp.swift */, + 775DB67726670810002154AA /* ContentView.swift */, + 775DB67926670813002154AA /* Assets.xcassets */, + 775DB67E26670813002154AA /* Info.plist */, + 775DB67B26670813002154AA /* Preview Content */, + ); + path = MyApp; + sourceTree = ""; + }; + 775DB67B26670813002154AA /* Preview Content */ = { + isa = PBXGroup; + children = ( + 775DB67C26670813002154AA /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + E1F3867930712CFD4E16DC58 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D4883EF2A73D500342A3BD4D /* Pods_MyApp.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + E226CAEA835E0E88158B5E9D /* Pods */ = { + isa = PBXGroup; + children = ( + FDCF0AAE68E7C96DBBB4D057 /* Pods-MyApp.debug.xcconfig */, + 6BC068C02A245B973FC3F3D5 /* Pods-MyApp.release.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 775DB67126670810002154AA /* MyApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 775DB68126670813002154AA /* Build configuration list for PBXNativeTarget "MyApp" */; + buildPhases = ( + 333180171D28618743BCD937 /* [CP] Check Pods Manifest.lock */, + 775DB66E26670810002154AA /* Sources */, + 775DB66F26670810002154AA /* Frameworks */, + 775DB67026670810002154AA /* Resources */, + 0F5ECDBF43D7E37C0AFBCD69 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MyApp; + productName = MyApp; + productReference = 775DB67226670810002154AA /* MyApp.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 775DB66A26670810002154AA /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1250; + LastUpgradeCheck = 1250; + TargetAttributes = { + 775DB67126670810002154AA = { + CreatedOnToolsVersion = 12.5; + }; + }; + }; + buildConfigurationList = 775DB66D26670810002154AA /* Build configuration list for PBXProject "MyApp" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 775DB66926670810002154AA; + productRefGroup = 775DB67326670810002154AA /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 775DB67126670810002154AA /* MyApp */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 775DB67026670810002154AA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 775DB67D26670813002154AA /* Preview Assets.xcassets in Resources */, + 775DB67A26670813002154AA /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 0F5ECDBF43D7E37C0AFBCD69 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MyApp/Pods-MyApp-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MyApp/Pods-MyApp-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MyApp/Pods-MyApp-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 333180171D28618743BCD937 /* [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-MyApp-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 */ + 775DB66E26670810002154AA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 775DB67826670810002154AA /* ContentView.swift in Sources */, + 775DB67626670810002154AA /* MyAppApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 775DB67F26670813002154AA /* 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.5; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 775DB68026670813002154AA /* 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.5; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 775DB68226670813002154AA /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FDCF0AAE68E7C96DBBB4D057 /* Pods-MyApp.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"MyApp/Preview Content\""; + DEVELOPMENT_TEAM = 577MKWCJN8; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = MyApp/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.v2ambition.MyApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 775DB68326670813002154AA /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6BC068C02A245B973FC3F3D5 /* Pods-MyApp.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"MyApp/Preview Content\""; + DEVELOPMENT_TEAM = 577MKWCJN8; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = MyApp/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.v2ambition.MyApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 775DB66D26670810002154AA /* Build configuration list for PBXProject "MyApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 775DB67F26670813002154AA /* Debug */, + 775DB68026670813002154AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 775DB68126670813002154AA /* Build configuration list for PBXNativeTarget "MyApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 775DB68226670813002154AA /* Debug */, + 775DB68326670813002154AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 775DB66A26670810002154AA /* Project object */; +} diff --git a/IntegrationTests/package-manager/test-cocoapods/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/IntegrationTests/package-manager/test-cocoapods/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/IntegrationTests/package-manager/test-cocoapods/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/IntegrationTests/package-manager/test-cocoapods/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/IntegrationTests/package-manager/test-cocoapods/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/IntegrationTests/package-manager/test-cocoapods/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/IntegrationTests/package-manager/test-cocoapods/MyApp.xcworkspace/contents.xcworkspacedata b/IntegrationTests/package-manager/test-cocoapods/MyApp.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..39ce53b0 --- /dev/null +++ b/IntegrationTests/package-manager/test-cocoapods/MyApp.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/IntegrationTests/package-manager/test-cocoapods/MyApp/Assets.xcassets/AccentColor.colorset/Contents.json b/IntegrationTests/package-manager/test-cocoapods/MyApp/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 00000000..eb878970 --- /dev/null +++ b/IntegrationTests/package-manager/test-cocoapods/MyApp/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/IntegrationTests/package-manager/test-cocoapods/MyApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/IntegrationTests/package-manager/test-cocoapods/MyApp/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..9221b9bb --- /dev/null +++ b/IntegrationTests/package-manager/test-cocoapods/MyApp/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/IntegrationTests/package-manager/test-cocoapods/MyApp/Assets.xcassets/Contents.json b/IntegrationTests/package-manager/test-cocoapods/MyApp/Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/IntegrationTests/package-manager/test-cocoapods/MyApp/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/IntegrationTests/package-manager/test-cocoapods/MyApp/ContentView.swift b/IntegrationTests/package-manager/test-cocoapods/MyApp/ContentView.swift new file mode 100644 index 00000000..bb87527a --- /dev/null +++ b/IntegrationTests/package-manager/test-cocoapods/MyApp/ContentView.swift @@ -0,0 +1,52 @@ +// +// ContentView.swift +// +// +// Created by Quentin Jin on 2021/5/31. +// + + +import SwiftUI +import CombineX + +private var cancellable: AnyCancellable? + +struct ContentView: View { + @State + private var count = 1 + + @State + private var isRunning = false + + var body: some View { + VStack { + Text("\(count)") + Button(isRunning ? "STOP" : "START") { + defer { + isRunning.toggle() + } + + if isRunning { + cancellable?.cancel() + } else { + cancellable = CXWrappers.Timer + .publish( + every: 1, + on: .main, + in: .common + ) + .autoconnect() + .sink(receiveValue: { _ in + count += 1 + }) + } + } + } + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/IntegrationTests/package-manager/test-cocoapods/MyApp/Info.plist b/IntegrationTests/package-manager/test-cocoapods/MyApp/Info.plist new file mode 100644 index 00000000..efc211a0 --- /dev/null +++ b/IntegrationTests/package-manager/test-cocoapods/MyApp/Info.plist @@ -0,0 +1,50 @@ + + + + + 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 + + + UIApplicationSupportsIndirectInputEvents + + UILaunchScreen + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/IntegrationTests/package-manager/test-cocoapods/MyApp/MyAppApp.swift b/IntegrationTests/package-manager/test-cocoapods/MyApp/MyAppApp.swift new file mode 100644 index 00000000..672a9d11 --- /dev/null +++ b/IntegrationTests/package-manager/test-cocoapods/MyApp/MyAppApp.swift @@ -0,0 +1,18 @@ +// +// MyAppApp.swift +// +// +// Created by Quentin Jin on 2021/6/2. +// + + +import SwiftUI + +@main +struct MyAppApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/IntegrationTests/package-manager/test-cocoapods/MyApp/Preview Content/Preview Assets.xcassets/Contents.json b/IntegrationTests/package-manager/test-cocoapods/MyApp/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/IntegrationTests/package-manager/test-cocoapods/MyApp/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/IntegrationTests/package-manager/test-cocoapods/Podfile b/IntegrationTests/package-manager/test-cocoapods/Podfile new file mode 100644 index 00000000..44535fe0 --- /dev/null +++ b/IntegrationTests/package-manager/test-cocoapods/Podfile @@ -0,0 +1,12 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, '9.0' + +target 'MyApp' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + # Pods for CocoaPods + + pod 'CombineX/CXFoundation', :path => '../../../' + +end diff --git a/IntegrationTests/package-manager/test-cocoapods/test.sh b/IntegrationTests/package-manager/test-cocoapods/test.sh new file mode 100644 index 00000000..4e92f6d9 --- /dev/null +++ b/IntegrationTests/package-manager/test-cocoapods/test.sh @@ -0,0 +1,11 @@ +#! /usr/bin/env bash + +set -euxo pipefail + +pod install + +xcodebuild \ + -scheme MyApp \ + -workspace MyApp.xcworkspace \ + -sdk iphonesimulator \ + clean build | xcpretty \ No newline at end of file diff --git a/IntegrationTests/package-manager/test-spm/Package.swift b/IntegrationTests/package-manager/test-spm/Package.swift new file mode 100644 index 00000000..e03e13da --- /dev/null +++ b/IntegrationTests/package-manager/test-spm/Package.swift @@ -0,0 +1,32 @@ +// swift-tools-version:5.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "test-spm", + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "MyFramework", + targets: ["MyFramework"]), + .executable( + name: "MyApp", + targets: ["MyApp"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + .package(path: "../../../") + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "MyFramework", + dependencies: ["CombineX"]), + .target( + name: "MyApp", + dependencies: ["CombineX", "MyFramework"]), + ] +) diff --git a/IntegrationTests/package-manager/test-spm/Sources/MyApp/main.swift b/IntegrationTests/package-manager/test-spm/Sources/MyApp/main.swift new file mode 100644 index 00000000..6bacddd3 --- /dev/null +++ b/IntegrationTests/package-manager/test-spm/Sources/MyApp/main.swift @@ -0,0 +1,10 @@ +import MyFramework +import Foundation + + +func foo() async -> Int { + print(Thread.current) + return 1 +} + +dispatchMain() diff --git a/IntegrationTests/package-manager/test-spm/Sources/MyFramework/Framework.swift b/IntegrationTests/package-manager/test-spm/Sources/MyFramework/Framework.swift new file mode 100644 index 00000000..b4d4bbc9 --- /dev/null +++ b/IntegrationTests/package-manager/test-spm/Sources/MyFramework/Framework.swift @@ -0,0 +1,5 @@ +import CombineX + +//public func foo() -> Just { +// Just(1) +//} diff --git a/IntegrationTests/package-manager/test-spm/test.sh b/IntegrationTests/package-manager/test-spm/test.sh new file mode 100644 index 00000000..8c654d7a --- /dev/null +++ b/IntegrationTests/package-manager/test-spm/test.sh @@ -0,0 +1,7 @@ +#! /usr/bin/env bash + +set -euxo pipefail + +swift package clean + +swift run MyApp diff --git a/IntegrationTests/package-manager/test.sh b/IntegrationTests/package-manager/test.sh new file mode 100644 index 00000000..902038f2 --- /dev/null +++ b/IntegrationTests/package-manager/test.sh @@ -0,0 +1,25 @@ +#! /usr/bin/env bash + +set -euxo pipefail + +case $PACKAGE_MANAGER in + + USE_SPM) + cd test-spm + bash test.sh + ;; + + USE_COCOAPODS) + cd test-cocoapods + bash test.sh + ;; + + USE_CARTHAGE) + cd test-carthage + bash test.sh + ;; + + *) + echo 'noop' + ;; +esac diff --git a/Package.resolved b/Package.resolved index 8bead854..9cc2c6b9 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git", "state": { "branch": null, - "revision": "682841464136f8c66e04afe5dbd01ab51a3a56f2", - "version": "2.1.0" + "revision": "f809deb30dc5c9d9b78c872e553261a61177721a", + "version": "2.0.0" } }, { @@ -24,8 +24,8 @@ "repositoryURL": "https://github.com/Quick/Nimble.git", "state": { "branch": null, - "revision": "af1730dde4e6c0d45bf01b99f8a41713ce536790", - "version": "9.2.0" + "revision": "e491a6731307bb23783bf664d003be9b2fa59ab5", + "version": "9.0.0" } }, { @@ -33,8 +33,8 @@ "repositoryURL": "https://github.com/Quick/Quick.git", "state": { "branch": null, - "revision": "8cce6acd38f965f5baa3167b939f86500314022b", - "version": "3.1.2" + "revision": "0038bcbab4292f3b028632556507c124e5ba69f3", + "version": "3.0.0" } }, {