diff --git a/.travis.yml b/.travis.yml index 7260648faa2..a29e2447806 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,8 +29,9 @@ script: - '[ "$TEST_TYPE" != lint ] || ./ci_scripts/check_fauxpas.sh' - '[ "$TEST_TYPE" != tests ] || travis_retry ./ci_scripts/run_tests.sh' - '[ "$TEST_TYPE" != analyzer ] || ./ci_scripts/run_analyzer.sh' -- '[ "$TEST_TYPE" != installation_cocoapods ] || ./Tests/installation_tests/cocoapods/without_frameworks/test.sh' -- '[ "$TEST_TYPE" != installation_cocoapods_frameworks ] || ./Tests/installation_tests/cocoapods/with_frameworks/test.sh' +- '[ "$TEST_TYPE" != installation_cocoapods_objc ] || ./Tests/installation_tests/cocoapods/without_frameworks_objc/test.sh' +- '[ "$TEST_TYPE" != installation_cocoapods_frameworks_objc ] || ./Tests/installation_tests/cocoapods/with_frameworks_objc/test.sh' +- '[ "$TEST_TYPE" != installation_cocoapods_frameworks_swift ] || ./Tests/installation_tests/cocoapods/with_frameworks_swift/test.sh' - '[ "$TEST_TYPE" != installation_manual ] || travis_retry ./Tests/installation_tests/manual_installation/test.sh' - '[ "$TEST_TYPE" != installation_carthage ] || ./Tests/installation_tests/carthage/test.sh' - '[ "$TEST_TYPE" != documentation ] || ./ci_scripts/check_documentation.sh' diff --git a/Stripe/PublicHeaders/STPAddress.h b/Stripe/PublicHeaders/STPAddress.h index 9863fea38c4..29b3b0b4ec1 100644 --- a/Stripe/PublicHeaders/STPAddress.h +++ b/Stripe/PublicHeaders/STPAddress.h @@ -212,6 +212,8 @@ extern STPContactField const STPContactFieldName; */ - (BOOL)containsContentForShippingAddressFields:(nullable NSSet *)desiredFields; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated" /** Converts an STPBillingAddressFields enum value into the closest equivalent representation of PKAddressField options @@ -221,7 +223,10 @@ extern STPContactField const STPContactFieldName; a PKAddressField value. */ + (PKAddressField)applePayAddressFieldsFromBillingAddressFields:(STPBillingAddressFields)billingAddressFields; +#pragma clang diagnostic pop +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated" /** Converts a set of STPContactField values into the closest equivalent representation of PKAddressField options @@ -231,6 +236,7 @@ extern STPContactField const STPContactFieldName; a PKAddressField value. */ + (PKAddressField)pkAddressFieldsFromStripeContactFields:(nullable NSSet *)contactFields; +#pragma clang diagnostic pop /** Converts a set of STPContactField values into the closest equivalent diff --git a/Tests/installation_tests/cocoapods/with_frameworks/Podfile b/Tests/installation_tests/cocoapods/with_frameworks/Podfile deleted file mode 100644 index cf5db8d78bc..00000000000 --- a/Tests/installation_tests/cocoapods/with_frameworks/Podfile +++ /dev/null @@ -1,7 +0,0 @@ -use_frameworks! - -target 'CocoapodsTest' do - platform :ios, '9.0' - use_frameworks! - pod 'Stripe', path: '../../../..' -end diff --git a/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest.xcodeproj/project.pbxproj b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..9c9dd6b4ec7 --- /dev/null +++ b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest.xcodeproj/project.pbxproj @@ -0,0 +1,412 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + C176898820616C7E003DE895 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C176898720616C7E003DE895 /* AppDelegate.m */; }; + C176898B20616C7E003DE895 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C176898A20616C7E003DE895 /* ViewController.m */; }; + C176898E20616C7E003DE895 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C176898C20616C7E003DE895 /* Main.storyboard */; }; + C176899020616C7E003DE895 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C176898F20616C7E003DE895 /* Assets.xcassets */; }; + C176899320616C7E003DE895 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C176899120616C7E003DE895 /* LaunchScreen.storyboard */; }; + C176899620616C7E003DE895 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C176899520616C7E003DE895 /* main.m */; }; + EF875AB86D0502C9387C8D5A /* Pods_CocoapodsTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1D0EAD31E999790D81D5EF1 /* Pods_CocoapodsTest.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 52D1AA53FB42DC97E5C28F89 /* Pods-CocoapodsTest.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CocoapodsTest.release.xcconfig"; path = "Pods/Target Support Files/Pods-CocoapodsTest/Pods-CocoapodsTest.release.xcconfig"; sourceTree = ""; }; + A1D0EAD31E999790D81D5EF1 /* Pods_CocoapodsTest.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CocoapodsTest.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A79D19F036EB31BEE4DCA5DF /* Pods-CocoapodsTest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CocoapodsTest.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CocoapodsTest/Pods-CocoapodsTest.debug.xcconfig"; sourceTree = ""; }; + C176898320616C7E003DE895 /* CocoapodsTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CocoapodsTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; + C176898620616C7E003DE895 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + C176898720616C7E003DE895 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + C176898920616C7E003DE895 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + C176898A20616C7E003DE895 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + C176898D20616C7E003DE895 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + C176898F20616C7E003DE895 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + C176899220616C7E003DE895 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + C176899420616C7E003DE895 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C176899520616C7E003DE895 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + C176898020616C7E003DE895 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + EF875AB86D0502C9387C8D5A /* Pods_CocoapodsTest.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 95BA65A6C7D0129858740813 /* Pods */ = { + isa = PBXGroup; + children = ( + A79D19F036EB31BEE4DCA5DF /* Pods-CocoapodsTest.debug.xcconfig */, + 52D1AA53FB42DC97E5C28F89 /* Pods-CocoapodsTest.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + C176897A20616C7E003DE895 = { + isa = PBXGroup; + children = ( + C176898520616C7E003DE895 /* CocoapodsTest */, + C176898420616C7E003DE895 /* Products */, + 95BA65A6C7D0129858740813 /* Pods */, + CBB4622869490C3C489194BF /* Frameworks */, + ); + sourceTree = ""; + }; + C176898420616C7E003DE895 /* Products */ = { + isa = PBXGroup; + children = ( + C176898320616C7E003DE895 /* CocoapodsTest.app */, + ); + name = Products; + sourceTree = ""; + }; + C176898520616C7E003DE895 /* CocoapodsTest */ = { + isa = PBXGroup; + children = ( + C176898620616C7E003DE895 /* AppDelegate.h */, + C176898720616C7E003DE895 /* AppDelegate.m */, + C176898920616C7E003DE895 /* ViewController.h */, + C176898A20616C7E003DE895 /* ViewController.m */, + C176898C20616C7E003DE895 /* Main.storyboard */, + C176898F20616C7E003DE895 /* Assets.xcassets */, + C176899120616C7E003DE895 /* LaunchScreen.storyboard */, + C176899420616C7E003DE895 /* Info.plist */, + C176899520616C7E003DE895 /* main.m */, + ); + path = CocoapodsTest; + sourceTree = ""; + }; + CBB4622869490C3C489194BF /* Frameworks */ = { + isa = PBXGroup; + children = ( + A1D0EAD31E999790D81D5EF1 /* Pods_CocoapodsTest.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C176898220616C7E003DE895 /* CocoapodsTest */ = { + isa = PBXNativeTarget; + buildConfigurationList = C176899920616C7E003DE895 /* Build configuration list for PBXNativeTarget "CocoapodsTest" */; + buildPhases = ( + BAE1F562CDE0AA176C57A09B /* [CP] Check Pods Manifest.lock */, + C176897F20616C7E003DE895 /* Sources */, + C176898020616C7E003DE895 /* Frameworks */, + C176898120616C7E003DE895 /* Resources */, + 4F947172A0DBA39FF86CF48F /* [CP] Embed Pods Frameworks */, + C64AAB48F50BD20506D67B3A /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CocoapodsTest; + productName = CocoapodsTest; + productReference = C176898320616C7E003DE895 /* CocoapodsTest.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + C176897B20616C7E003DE895 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0920; + ORGANIZATIONNAME = Stripe; + TargetAttributes = { + C176898220616C7E003DE895 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = C176897E20616C7E003DE895 /* Build configuration list for PBXProject "CocoapodsTest" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = C176897A20616C7E003DE895; + productRefGroup = C176898420616C7E003DE895 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C176898220616C7E003DE895 /* CocoapodsTest */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + C176898120616C7E003DE895 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C176899320616C7E003DE895 /* LaunchScreen.storyboard in Resources */, + C176899020616C7E003DE895 /* Assets.xcassets in Resources */, + C176898E20616C7E003DE895 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4F947172A0DBA39FF86CF48F /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-CocoapodsTest/Pods-CocoapodsTest-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Stripe/Stripe.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Stripe.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CocoapodsTest/Pods-CocoapodsTest-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + BAE1F562CDE0AA176C57A09B /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-CocoapodsTest-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; + }; + C64AAB48F50BD20506D67B3A /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CocoapodsTest/Pods-CocoapodsTest-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + C176897F20616C7E003DE895 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C176898B20616C7E003DE895 /* ViewController.m in Sources */, + C176899620616C7E003DE895 /* main.m in Sources */, + C176898820616C7E003DE895 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + C176898C20616C7E003DE895 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + C176898D20616C7E003DE895 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + C176899120616C7E003DE895 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + C176899220616C7E003DE895 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C176899720616C7E003DE895 /* 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_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = 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_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + 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 = 11.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + C176899820616C7E003DE895 /* 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_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = 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_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + 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 = 11.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + C176899A20616C7E003DE895 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A79D19F036EB31BEE4DCA5DF /* Pods-CocoapodsTest.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + INFOPLIST_FILE = CocoapodsTest/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.stripe.CocoapodsTest; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + C176899B20616C7E003DE895 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 52D1AA53FB42DC97E5C28F89 /* Pods-CocoapodsTest.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + INFOPLIST_FILE = CocoapodsTest/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.stripe.CocoapodsTest; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C176897E20616C7E003DE895 /* Build configuration list for PBXProject "CocoapodsTest" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C176899720616C7E003DE895 /* Debug */, + C176899820616C7E003DE895 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C176899920616C7E003DE895 /* Build configuration list for PBXNativeTarget "CocoapodsTest" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C176899A20616C7E003DE895 /* Debug */, + C176899B20616C7E003DE895 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = C176897B20616C7E003DE895 /* Project object */; +} diff --git a/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..2b4efacbe18 --- /dev/null +++ b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Tests/installation_tests/cocoapods/with_frameworks/CocoapodsTest.xcworkspace/contents.xcworkspacedata b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Tests/installation_tests/cocoapods/with_frameworks/CocoapodsTest.xcworkspace/contents.xcworkspacedata rename to Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest.xcworkspace/contents.xcworkspacedata diff --git a/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/AppDelegate.h b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/AppDelegate.h new file mode 100644 index 00000000000..67cc764f2ac --- /dev/null +++ b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// CocoapodsTest +// +// Created by Ben Guo on 3/20/18. +// Copyright © 2018 Stripe. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/AppDelegate.m b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/AppDelegate.m new file mode 100644 index 00000000000..e1d916ec2b9 --- /dev/null +++ b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/AppDelegate.m @@ -0,0 +1,51 @@ +// +// AppDelegate.m +// CocoapodsTest +// +// Created by Ben Guo on 3/20/18. +// Copyright © 2018 Stripe. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + + +@end diff --git a/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/Assets.xcassets/AppIcon.appiconset/Contents.json b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000000..1d060ed2882 --- /dev/null +++ b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/Base.lproj/LaunchScreen.storyboard b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000000..f83f6fd5810 --- /dev/null +++ b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/Base.lproj/Main.storyboard b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/Base.lproj/Main.storyboard new file mode 100644 index 00000000000..d7c78a1255c --- /dev/null +++ b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/Info.plist b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/Info.plist new file mode 100644 index 00000000000..16be3b68112 --- /dev/null +++ b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/ViewController.h b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/ViewController.h new file mode 100644 index 00000000000..d7be3b4d068 --- /dev/null +++ b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// CocoapodsTest +// +// Created by Ben Guo on 3/20/18. +// Copyright © 2018 Stripe. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/ViewController.m b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/ViewController.m new file mode 100644 index 00000000000..c59c3e758fc --- /dev/null +++ b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/ViewController.m @@ -0,0 +1,30 @@ +// +// ViewController.m +// CocoapodsTest +// +// Created by Ben Guo on 3/20/18. +// Copyright © 2018 Stripe. All rights reserved. +// + +#import "ViewController.h" +#import + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + [Stripe setDefaultPublishableKey:@"foo"]; +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +@end diff --git a/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/main.m b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/main.m new file mode 100644 index 00000000000..60a0f203cd4 --- /dev/null +++ b/Tests/installation_tests/cocoapods/with_frameworks_objc/CocoapodsTest/main.m @@ -0,0 +1,16 @@ +// +// main.m +// CocoapodsTest +// +// Created by Ben Guo on 3/20/18. +// Copyright © 2018 Stripe. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/Tests/installation_tests/cocoapods/with_frameworks_objc/Podfile b/Tests/installation_tests/cocoapods/with_frameworks_objc/Podfile new file mode 100644 index 00000000000..1591311f09b --- /dev/null +++ b/Tests/installation_tests/cocoapods/with_frameworks_objc/Podfile @@ -0,0 +1,13 @@ +use_frameworks! + +target 'CocoapodsTest' do + platform :ios, '9.0' + use_frameworks! + pod 'Stripe', path: '../../../..' + + post_install do |installer| + installer.pods_project.build_configurations.each do |config| + config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = "YES" + end + end +end diff --git a/Tests/installation_tests/cocoapods/with_frameworks/test.sh b/Tests/installation_tests/cocoapods/with_frameworks_objc/test.sh similarity index 100% rename from Tests/installation_tests/cocoapods/with_frameworks/test.sh rename to Tests/installation_tests/cocoapods/with_frameworks_objc/test.sh diff --git a/Tests/installation_tests/cocoapods/with_frameworks/CocoapodsTest.xcodeproj/project.pbxproj b/Tests/installation_tests/cocoapods/with_frameworks_swift/CocoapodsTest.xcodeproj/project.pbxproj similarity index 92% rename from Tests/installation_tests/cocoapods/with_frameworks/CocoapodsTest.xcodeproj/project.pbxproj rename to Tests/installation_tests/cocoapods/with_frameworks_swift/CocoapodsTest.xcodeproj/project.pbxproj index 00f1a3c2b8a..b1eab764de0 100644 --- a/Tests/installation_tests/cocoapods/with_frameworks/CocoapodsTest.xcodeproj/project.pbxproj +++ b/Tests/installation_tests/cocoapods/with_frameworks_swift/CocoapodsTest.xcodeproj/project.pbxproj @@ -190,16 +190,16 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0920; ORGANIZATIONNAME = jflinter; TargetAttributes = { 04E6FCB21B714933000C8759 = { CreatedOnToolsVersion = 6.4; - LastSwiftMigration = 0800; + LastSwiftMigration = 0920; }; 04E6FCC71B714933000C8759 = { CreatedOnToolsVersion = 6.4; - LastSwiftMigration = 0800; + LastSwiftMigration = 0920; TestTargetID = 04E6FCB21B714933000C8759; }; }; @@ -250,13 +250,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-CocoapodsTest-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../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"; + 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; }; E76E35A1E013E33626CFDCFE /* [CP] Embed Pods Frameworks */ = { @@ -265,9 +268,12 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-CocoapodsTest/Pods-CocoapodsTest-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Stripe/Stripe.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Stripe.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -347,14 +353,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -394,14 +406,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -431,11 +449,13 @@ baseConfigurationReference = EAE250FC79C77BA1FF1ACB1A /* Pods-CocoapodsTest.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; INFOPLIST_FILE = CocoapodsTest/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.jflinter.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -444,11 +464,13 @@ baseConfigurationReference = 84A29F0654570559D6985E9C /* Pods-CocoapodsTest.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; INFOPLIST_FILE = CocoapodsTest/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.jflinter.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -464,7 +486,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.jflinter.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CocoapodsTest.app/CocoapodsTest"; }; name = Debug; @@ -477,7 +500,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.jflinter.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CocoapodsTest.app/CocoapodsTest"; }; name = Release; diff --git a/Tests/installation_tests/cocoapods/with_frameworks/CocoapodsTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Tests/installation_tests/cocoapods/with_frameworks_swift/CocoapodsTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Tests/installation_tests/cocoapods/with_frameworks/CocoapodsTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Tests/installation_tests/cocoapods/with_frameworks_swift/CocoapodsTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/Tests/installation_tests/cocoapods/with_frameworks/CocoapodsTest.xcodeproj/xcshareddata/xcschemes/CocoapodsTest.xcscheme b/Tests/installation_tests/cocoapods/with_frameworks_swift/CocoapodsTest.xcodeproj/xcshareddata/xcschemes/CocoapodsTest.xcscheme similarity index 98% rename from Tests/installation_tests/cocoapods/with_frameworks/CocoapodsTest.xcodeproj/xcshareddata/xcschemes/CocoapodsTest.xcscheme rename to Tests/installation_tests/cocoapods/with_frameworks_swift/CocoapodsTest.xcodeproj/xcshareddata/xcschemes/CocoapodsTest.xcscheme index a4ff24c3fa9..ef144003c66 100644 --- a/Tests/installation_tests/cocoapods/with_frameworks/CocoapodsTest.xcodeproj/xcshareddata/xcschemes/CocoapodsTest.xcscheme +++ b/Tests/installation_tests/cocoapods/with_frameworks_swift/CocoapodsTest.xcodeproj/xcshareddata/xcschemes/CocoapodsTest.xcscheme @@ -1,6 +1,6 @@ /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"; + 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; }; B2A9D9F6678A1B4817096B70 /* [CP] Copy Pods Resources */ = { @@ -284,9 +287,12 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-CocoapodsTest/Pods-CocoapodsTest-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/Stripe/Stripe.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Stripe.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -352,14 +358,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -398,14 +410,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -434,6 +452,7 @@ baseConfigurationReference = 6E05A95AD851959D1A082DA7 /* Pods-CocoapodsTest.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; INFOPLIST_FILE = CocoapodsTest/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -447,6 +466,7 @@ baseConfigurationReference = F136EA67596F401D18A88976 /* Pods-CocoapodsTest.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; INFOPLIST_FILE = CocoapodsTest/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; diff --git a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest.xcodeproj/xcshareddata/xcschemes/CocoapodsTest.xcscheme b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest.xcodeproj/xcshareddata/xcschemes/CocoapodsTest.xcscheme similarity index 98% rename from Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest.xcodeproj/xcshareddata/xcschemes/CocoapodsTest.xcscheme rename to Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest.xcodeproj/xcshareddata/xcschemes/CocoapodsTest.xcscheme index bf6f480789c..3d76afd1638 100644 --- a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest.xcodeproj/xcshareddata/xcschemes/CocoapodsTest.xcscheme +++ b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest.xcodeproj/xcshareddata/xcschemes/CocoapodsTest.xcscheme @@ -1,6 +1,6 @@ + + + + + + diff --git a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest.xcworkspace/xcshareddata/CocoapodsTest.xccheckout b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest.xcworkspace/xcshareddata/CocoapodsTest.xccheckout similarity index 100% rename from Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest.xcworkspace/xcshareddata/CocoapodsTest.xccheckout rename to Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest.xcworkspace/xcshareddata/CocoapodsTest.xccheckout diff --git a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/AppDelegate.h b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/AppDelegate.h similarity index 100% rename from Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/AppDelegate.h rename to Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/AppDelegate.h diff --git a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/AppDelegate.m b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/AppDelegate.m similarity index 100% rename from Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/AppDelegate.m rename to Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/AppDelegate.m diff --git a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/Base.lproj/LaunchScreen.xib b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/Base.lproj/LaunchScreen.xib similarity index 100% rename from Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/Base.lproj/LaunchScreen.xib rename to Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/Base.lproj/LaunchScreen.xib diff --git a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/Base.lproj/Main.storyboard b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/Base.lproj/Main.storyboard similarity index 100% rename from Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/Base.lproj/Main.storyboard rename to Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/Base.lproj/Main.storyboard diff --git a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/Images.xcassets/AppIcon.appiconset/Contents.json b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/Images.xcassets/AppIcon.appiconset/Contents.json rename to Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/Info.plist b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/Info.plist similarity index 100% rename from Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/Info.plist rename to Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/Info.plist diff --git a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/ViewController.h b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/ViewController.h similarity index 100% rename from Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/ViewController.h rename to Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/ViewController.h diff --git a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/ViewController.m b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/ViewController.m similarity index 100% rename from Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/ViewController.m rename to Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/ViewController.m diff --git a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/main.m b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/main.m similarity index 100% rename from Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTest/main.m rename to Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTest/main.m diff --git a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTestTests/CocoapodsTestTests.m b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTestTests/CocoapodsTestTests.m similarity index 100% rename from Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTestTests/CocoapodsTestTests.m rename to Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTestTests/CocoapodsTestTests.m diff --git a/Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTestTests/Info.plist b/Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTestTests/Info.plist similarity index 100% rename from Tests/installation_tests/cocoapods/without_frameworks/CocoapodsTestTests/Info.plist rename to Tests/installation_tests/cocoapods/without_frameworks_objc/CocoapodsTestTests/Info.plist diff --git a/Tests/installation_tests/cocoapods/without_frameworks/Podfile b/Tests/installation_tests/cocoapods/without_frameworks_objc/Podfile similarity index 100% rename from Tests/installation_tests/cocoapods/without_frameworks/Podfile rename to Tests/installation_tests/cocoapods/without_frameworks_objc/Podfile diff --git a/Tests/installation_tests/cocoapods/without_frameworks_objc/test.sh b/Tests/installation_tests/cocoapods/without_frameworks_objc/test.sh new file mode 100755 index 00000000000..79c69519c86 --- /dev/null +++ b/Tests/installation_tests/cocoapods/without_frameworks_objc/test.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +function info { + echo "[$(basename "${0}")] [INFO] ${1}" +} + +function die { + echo "[$(basename "${0}")] [ERROR] ${1}" + exit 1 +} + +# Verify xcpretty is installed +if ! command -v xcpretty > /dev/null; then + if [[ "${CI}" != "true" ]]; then + die "Please install xcpretty: https://github.com/supermarin/xcpretty#installation" + fi + + info "Installing xcpretty..." + gem install xcpretty --no-ri --no-rdoc || die "Executing \`gem install xcpretty\` failed" +fi + +# Verify cocoapods is installed +if ! command -v pod > /dev/null; then + if [[ "${CI}" != "true" ]]; then + die "Please install cocoapods: https://cocoapods.org" + fi + + info "Installing cocoapods..." + gem install cocoapods --no-ri --no-rdoc || die "Executing \`gem install cocoapods\` failed" +fi + +# Verify cocoapods is up to date +cocoapods_version_local="$(pod --version | grep --only-matching --extended-regexp "[0-9\.]+")" +cocoapods_version_remote="$(gem search ^cocoapods$ --remote --no-verbose | grep --only-matching --extended-regexp "[0-9\.]+")" + +if [[ "${cocoapods_version_local}" != "${cocoapods_version_remote}" ]]; then + if [[ "${CI}" != "true" ]]; then + die "Please update cocoapods: \`gem update cocoapods\`" + fi + + info "Updating cocoapods..." + gem update cocoapods --no-ri --no-rdoc || die "Executing \`gem update cocoapods\` failed" +fi + +# Switch to script directory +cd "${script_dir}" || die "Executing \`cd\` failed" + +# Clean cocoapods artifacts +info "Cleaning cocoapods artifacts..." + +rm -rf "Pods" +rm -f "Podfile.lock" + +# Perform cocoapods installation +info "Performing pod install..." + +pod install --no-repo-update || die "Executing \`pod install\` failed" + +# Execute xcodebuild +info "Executing xcodebuild..." + +xcodebuild clean build \ + -workspace "CocoapodsTest.xcworkspace" \ + -scheme "CocoapodsTest" \ + -sdk "iphonesimulator" \ + -destination "platform=iOS Simulator,name=iPhone 6,OS=11.2" \ + | xcpretty + +xcodebuild_exit_code="${PIPESTATUS[0]}" + +if [[ "${xcodebuild_exit_code}" != 0 ]]; then + die "Executing xcodebuild failed with status code: ${xcodebuild_exit_code}" +fi + +info "All good!"