diff --git a/README.md b/README.md index 5d35647..dd36dab 100644 --- a/README.md +++ b/README.md @@ -3,23 +3,13 @@ # Square In-App Payments iOS SDK -Build remarkable payments experiences in your own apps with Square’s [In-App Payments SDK](https://docs.connect.squareup.com/payments/in-app-payments-sdk/what-it-does). Use our pre-built UI to collect sensitive credit card details from your customers, while matching the look and feel of your app. Square takes care of all the complexity of payments - security, risk, and PCI compliance are managed for you, so that you can focus on building the rest of your application. +Build remarkable payments experiences in your own apps with Square’s [In-App Payments SDK](https://developer.squareup.com/docs/in-app-payments-sdk/what-it-does). Use our pre-built UI to collect sensitive credit card details from your customers, while matching the look and feel of your app. Square takes care of all the complexity of payments - security, risk, and PCI compliance are managed for you, so that you can focus on building the rest of your application. You can also pair our Square In-App Payments SDK with Square’s [Online Payments APIs](https://squareup.com/developers/online-payment-apis) and [Reader SDK](https://squareup.com/developers/reader-sdk) to accept payments across all channels - online, in-person and in-app - while keeping your back office reporting unified in a single system. ## Installation -### Add frameworks - -#### SPM - -[Swift Package Manager](https://www.swift.org/package-manager/) support is available for Swift 5.3 and above. Simply add the following to your top-level `dependencies` block within your `Package.swift`: - -```swift -dependencies: [ - .package(url: "https://github.com/square/in-app-payments-ios", .upToNextMajor(from: "1.6.0")), -] -``` +### 1. Add frameworks #### Cocoapods @@ -39,16 +29,29 @@ Install with [Carthage](https://github.com/Carthage/Carthage) by adding the foll github "square/in-app-payments-ios" ``` -## Add build phase to setup the SquareInAppPaymentsSDK and/or SquareBuyerVerificationSDK framework ## +### 2. Add build phase to setup the SquareInAppPaymentsSDK and/or SquareBuyerVerificationSDK framework ### After adding the framework using any of the above methods, follow the below instructions to complete the setup. On your application targets’ Build Phases settings tab, click the + icon and choose New Run Script Phase. Create a Run Script in which you specify your shell (ex: /bin/sh), add the following contents to the script area below the shell: + ``` FRAMEWORKS="${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}" "${FRAMEWORKS}/SquareInAppPaymentsSDK.framework/setup" ``` +Make sure the above run script is below any `[CP] Embed Pods Frameworks` or `Embed Frameworks` Build Phase. + +## Swift Package Manager + +[Swift Package Manager](https://www.swift.org/package-manager/) support is available for Swift 5.3 and above but is currently **not** the recommended method for adding the Square In-App Payments SDK dependency. + +Setup instructions can be found [here](SPM_README.md). + + +### iPhone and iPad apps on Mac with Apple silicon + +Square In-App Payments iOS SDK currently does not support iPhone and iPad apps on Mac with Apple silicon. ### Getting Started -For more information and setup instructions, please visit the [Square In-App Payments iOS SDK page](https://docs.connect.squareup.com/payments/in-app-payments-sdk/build-on-ios). +For more information and setup instructions, please visit the [Square In-App Payments iOS SDK page](https://developer.squareup.com/docs/in-app-payments-sdk/build-on-ios). diff --git a/SPM_README.md b/SPM_README.md new file mode 100644 index 0000000..34d8e86 --- /dev/null +++ b/SPM_README.md @@ -0,0 +1,22 @@ +## Swift Package Manager + +### 1. Add the following to your top-level `dependencies` block within your `Package.swift`: + +```swift +dependencies: [ + .package(url: "https://github.com/square/in-app-payments-ios", .upToNextMajor(from: "1.6.1")), +] +``` + +### 2. Add build phase to setup the SquareInAppPaymentsSDK and/or SquareBuyerVerificationSDK framework ### + +On your application targets’ Build Phases settings tab, click the + icon and choose New Run Script Phase. Create a Run Script in which you specify your shell (ex: /bin/sh), add the following contents to the script area below the shell: + +``` +SETUP_SCRIPT="${CONFIGURATION_BUILD_DIR}/SquareInAppPaymentsSDK.framework/setup" +if [ -f "$SETUP_SCRIPT" ]; then + "$SETUP_SCRIPT" +fi +``` + +**Important Note:** The build phase script requires you to reset your Swift Package Caches when switching from a debug build to a release build (archiving) or vice versa. This helps prevent errors during building or releasing. You can reset your cache by using `File -> Packages -> Reset Package Caches` in Xcode. \ No newline at end of file diff --git a/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64/SquareBuyerVerificationSDK.framework/Info.plist b/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64/SquareBuyerVerificationSDK.framework/Info.plist index 1c9f0ea..bd168da 100755 Binary files a/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64/SquareBuyerVerificationSDK.framework/Info.plist and b/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64/SquareBuyerVerificationSDK.framework/Info.plist differ diff --git a/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64/SquareBuyerVerificationSDK.framework/ThreeDSSDKResources.bundle/setup b/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64/SquareBuyerVerificationSDK.framework/ThreeDSSDKResources.bundle/setup index c27b1ab..3896607 100755 --- a/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64/SquareBuyerVerificationSDK.framework/ThreeDSSDKResources.bundle/setup +++ b/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64/SquareBuyerVerificationSDK.framework/ThreeDSSDKResources.bundle/setup @@ -8,10 +8,20 @@ IFS=$(echo "") IAP_SDK_FRAMEWORKS=("SquareInAppPaymentsSDK" "SquareBuyerVerificationSDK") MAIN_FRAMEWORKS_DIR="$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH" +SECONDARY_FRAMEWORKS_DIR="$CONFIGURATION_BUILD_DIR" # Unpack frameworks for FRAMEWORK_NAME in "${IAP_SDK_FRAMEWORKS[@]}"; do - NESTED_FRAMEWORKS_DIR="$MAIN_FRAMEWORKS_DIR/$FRAMEWORK_NAME.framework/Frameworks" + FRAMEWORK_PATH="$FRAMEWORK_NAME.framework/Frameworks" + MAIN_NESTED_FRAMEWORKS_DIR="$MAIN_FRAMEWORKS_DIR/$FRAMEWORK_PATH" + SECONDARY_NESTED_FRAMEWORKS_DIR="$SECONDARY_FRAMEWORKS_DIR/$FRAMEWORK_PATH" + + if [ -d "$MAIN_NESTED_FRAMEWORKS_DIR" ]; then + NESTED_FRAMEWORKS_DIR=$MAIN_NESTED_FRAMEWORKS_DIR + else + NESTED_FRAMEWORKS_DIR=$SECONDARY_NESTED_FRAMEWORKS_DIR + fi + if [ -d "$NESTED_FRAMEWORKS_DIR" ]; then # Handle all nested frameworks that are fat frameworks find "$NESTED_FRAMEWORKS_DIR" -name '*.framework' ! -path '*.xcframework/*' -type d | while read -r FRAMEWORK; do @@ -57,6 +67,24 @@ for FRAMEWORK_NAME in "${IAP_SDK_FRAMEWORKS[@]}"; do fi done +# Workaround for Swift Package Manager +SOURCE_PACKAGE_FRAMEWORK_DIR="${BUILD_DIR%Build/*}SourcePackages/checkouts/in-app-payments-ios/XCFrameworks" + +if [ -d "$SOURCE_PACKAGE_FRAMEWORK_DIR" ]; then + for FRAMEWORK_NAME in "${IAP_SDK_FRAMEWORKS[@]}"; do + FRAMEWORK_PATH="$FRAMEWORK_NAME.xcframework" + SOURCE_FRAMEWORK_NESTED_DIR="$SOURCE_PACKAGE_FRAMEWORK_DIR/$FRAMEWORK_PATH" + # Find root directory inside of regular and simulator folders + find "$SOURCE_FRAMEWORK_NESTED_DIR" -name '*.framework' ! -path '*.framework/Frameworks/*' -type d | while read -r FRAMEWORK_DIR; do + rm -rf "$FRAMEWORK_DIR/Frameworks" + # Delete the setup script if archiving + if [ "$ACTION" = "install" ]; then + rm -rf "$FRAMEWORK_DIR/setup" + fi + done + done +fi + IFS=$OLDIFS # Don't choke if projects or targets have spaces in the name @@ -77,4 +105,4 @@ find "${CODESIGNING_FOLDER_PATH}/Frameworks" -name "*.framework" | while read -r fi done -IFS=$OLDIFS +IFS=$OLDIFS \ No newline at end of file diff --git a/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64_x86_64-simulator/SquareBuyerVerificationSDK.framework/Info.plist b/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64_x86_64-simulator/SquareBuyerVerificationSDK.framework/Info.plist index 22f1ede..2f6ec07 100755 Binary files a/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64_x86_64-simulator/SquareBuyerVerificationSDK.framework/Info.plist and b/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64_x86_64-simulator/SquareBuyerVerificationSDK.framework/Info.plist differ diff --git a/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64_x86_64-simulator/SquareBuyerVerificationSDK.framework/ThreeDSSDKResources.bundle/setup b/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64_x86_64-simulator/SquareBuyerVerificationSDK.framework/ThreeDSSDKResources.bundle/setup index c27b1ab..3896607 100755 --- a/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64_x86_64-simulator/SquareBuyerVerificationSDK.framework/ThreeDSSDKResources.bundle/setup +++ b/XCFrameworks/SquareBuyerVerificationSDK.xcframework/ios-arm64_x86_64-simulator/SquareBuyerVerificationSDK.framework/ThreeDSSDKResources.bundle/setup @@ -8,10 +8,20 @@ IFS=$(echo "") IAP_SDK_FRAMEWORKS=("SquareInAppPaymentsSDK" "SquareBuyerVerificationSDK") MAIN_FRAMEWORKS_DIR="$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH" +SECONDARY_FRAMEWORKS_DIR="$CONFIGURATION_BUILD_DIR" # Unpack frameworks for FRAMEWORK_NAME in "${IAP_SDK_FRAMEWORKS[@]}"; do - NESTED_FRAMEWORKS_DIR="$MAIN_FRAMEWORKS_DIR/$FRAMEWORK_NAME.framework/Frameworks" + FRAMEWORK_PATH="$FRAMEWORK_NAME.framework/Frameworks" + MAIN_NESTED_FRAMEWORKS_DIR="$MAIN_FRAMEWORKS_DIR/$FRAMEWORK_PATH" + SECONDARY_NESTED_FRAMEWORKS_DIR="$SECONDARY_FRAMEWORKS_DIR/$FRAMEWORK_PATH" + + if [ -d "$MAIN_NESTED_FRAMEWORKS_DIR" ]; then + NESTED_FRAMEWORKS_DIR=$MAIN_NESTED_FRAMEWORKS_DIR + else + NESTED_FRAMEWORKS_DIR=$SECONDARY_NESTED_FRAMEWORKS_DIR + fi + if [ -d "$NESTED_FRAMEWORKS_DIR" ]; then # Handle all nested frameworks that are fat frameworks find "$NESTED_FRAMEWORKS_DIR" -name '*.framework' ! -path '*.xcframework/*' -type d | while read -r FRAMEWORK; do @@ -57,6 +67,24 @@ for FRAMEWORK_NAME in "${IAP_SDK_FRAMEWORKS[@]}"; do fi done +# Workaround for Swift Package Manager +SOURCE_PACKAGE_FRAMEWORK_DIR="${BUILD_DIR%Build/*}SourcePackages/checkouts/in-app-payments-ios/XCFrameworks" + +if [ -d "$SOURCE_PACKAGE_FRAMEWORK_DIR" ]; then + for FRAMEWORK_NAME in "${IAP_SDK_FRAMEWORKS[@]}"; do + FRAMEWORK_PATH="$FRAMEWORK_NAME.xcframework" + SOURCE_FRAMEWORK_NESTED_DIR="$SOURCE_PACKAGE_FRAMEWORK_DIR/$FRAMEWORK_PATH" + # Find root directory inside of regular and simulator folders + find "$SOURCE_FRAMEWORK_NESTED_DIR" -name '*.framework' ! -path '*.framework/Frameworks/*' -type d | while read -r FRAMEWORK_DIR; do + rm -rf "$FRAMEWORK_DIR/Frameworks" + # Delete the setup script if archiving + if [ "$ACTION" = "install" ]; then + rm -rf "$FRAMEWORK_DIR/setup" + fi + done + done +fi + IFS=$OLDIFS # Don't choke if projects or targets have spaces in the name @@ -77,4 +105,4 @@ find "${CODESIGNING_FOLDER_PATH}/Frameworks" -name "*.framework" | while read -r fi done -IFS=$OLDIFS +IFS=$OLDIFS \ No newline at end of file diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/Info.plist b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/Info.plist index 76a0ea6..53f1ea5 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/Info.plist and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/Info.plist differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ca-ES.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ca-ES.lproj/Localizable.strings index af0533b..4127508 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ca-ES.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ca-ES.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-AU.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-AU.lproj/Localizable.strings index 488c92d..b4f2243 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-AU.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-AU.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-CA.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-CA.lproj/Localizable.strings index 488c92d..fa605ed 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-CA.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-CA.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-GB.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-GB.lproj/Localizable.strings index ac9a3ba..18061e6 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-GB.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-GB.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-IE.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-IE.lproj/Localizable.strings index 7955650..79ef3c1 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-IE.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-IE.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ja.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ja.lproj/Localizable.strings index 9334155..32a700b 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ja.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ja.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-AU.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-AU.lproj/Localizable.strings index 96dc27b..76382be 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-AU.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-AU.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-CA.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-CA.lproj/Localizable.strings index 96dc27b..2d9f187 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-CA.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-CA.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-GB.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-GB.lproj/Localizable.strings index d796e7e..ac5c728 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-GB.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-GB.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-IE.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-IE.lproj/Localizable.strings index 0b0e3bb..fca2e84 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-IE.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-IE.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/ja.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/ja.lproj/Localizable.strings index 1a39246..1abd48e 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/ja.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/ja.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/setup b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/setup index c27b1ab..3896607 100755 --- a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/setup +++ b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64/SquareInAppPaymentsSDK.framework/setup @@ -8,10 +8,20 @@ IFS=$(echo "") IAP_SDK_FRAMEWORKS=("SquareInAppPaymentsSDK" "SquareBuyerVerificationSDK") MAIN_FRAMEWORKS_DIR="$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH" +SECONDARY_FRAMEWORKS_DIR="$CONFIGURATION_BUILD_DIR" # Unpack frameworks for FRAMEWORK_NAME in "${IAP_SDK_FRAMEWORKS[@]}"; do - NESTED_FRAMEWORKS_DIR="$MAIN_FRAMEWORKS_DIR/$FRAMEWORK_NAME.framework/Frameworks" + FRAMEWORK_PATH="$FRAMEWORK_NAME.framework/Frameworks" + MAIN_NESTED_FRAMEWORKS_DIR="$MAIN_FRAMEWORKS_DIR/$FRAMEWORK_PATH" + SECONDARY_NESTED_FRAMEWORKS_DIR="$SECONDARY_FRAMEWORKS_DIR/$FRAMEWORK_PATH" + + if [ -d "$MAIN_NESTED_FRAMEWORKS_DIR" ]; then + NESTED_FRAMEWORKS_DIR=$MAIN_NESTED_FRAMEWORKS_DIR + else + NESTED_FRAMEWORKS_DIR=$SECONDARY_NESTED_FRAMEWORKS_DIR + fi + if [ -d "$NESTED_FRAMEWORKS_DIR" ]; then # Handle all nested frameworks that are fat frameworks find "$NESTED_FRAMEWORKS_DIR" -name '*.framework' ! -path '*.xcframework/*' -type d | while read -r FRAMEWORK; do @@ -57,6 +67,24 @@ for FRAMEWORK_NAME in "${IAP_SDK_FRAMEWORKS[@]}"; do fi done +# Workaround for Swift Package Manager +SOURCE_PACKAGE_FRAMEWORK_DIR="${BUILD_DIR%Build/*}SourcePackages/checkouts/in-app-payments-ios/XCFrameworks" + +if [ -d "$SOURCE_PACKAGE_FRAMEWORK_DIR" ]; then + for FRAMEWORK_NAME in "${IAP_SDK_FRAMEWORKS[@]}"; do + FRAMEWORK_PATH="$FRAMEWORK_NAME.xcframework" + SOURCE_FRAMEWORK_NESTED_DIR="$SOURCE_PACKAGE_FRAMEWORK_DIR/$FRAMEWORK_PATH" + # Find root directory inside of regular and simulator folders + find "$SOURCE_FRAMEWORK_NESTED_DIR" -name '*.framework' ! -path '*.framework/Frameworks/*' -type d | while read -r FRAMEWORK_DIR; do + rm -rf "$FRAMEWORK_DIR/Frameworks" + # Delete the setup script if archiving + if [ "$ACTION" = "install" ]; then + rm -rf "$FRAMEWORK_DIR/setup" + fi + done + done +fi + IFS=$OLDIFS # Don't choke if projects or targets have spaces in the name @@ -77,4 +105,4 @@ find "${CODESIGNING_FOLDER_PATH}/Frameworks" -name "*.framework" | while read -r fi done -IFS=$OLDIFS +IFS=$OLDIFS \ No newline at end of file diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/Info.plist b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/Info.plist index beb5153..3440c09 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/Info.plist and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/Info.plist differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ca-ES.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ca-ES.lproj/Localizable.strings index af0533b..4127508 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ca-ES.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ca-ES.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-AU.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-AU.lproj/Localizable.strings index 488c92d..b4f2243 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-AU.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-AU.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-CA.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-CA.lproj/Localizable.strings index 488c92d..fa605ed 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-CA.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-CA.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-GB.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-GB.lproj/Localizable.strings index ac9a3ba..18061e6 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-GB.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-GB.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-IE.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-IE.lproj/Localizable.strings index 7955650..79ef3c1 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-IE.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/en-IE.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ja.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ja.lproj/Localizable.strings index 9334155..32a700b 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ja.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPAssetFinderResources.bundle/ja.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-AU.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-AU.lproj/Localizable.strings index 96dc27b..76382be 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-AU.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-AU.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-CA.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-CA.lproj/Localizable.strings index 96dc27b..2d9f187 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-CA.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-CA.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-GB.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-GB.lproj/Localizable.strings index d796e7e..ac5c728 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-GB.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-GB.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-IE.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-IE.lproj/Localizable.strings index 0b0e3bb..fca2e84 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-IE.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/en-IE.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/ja.lproj/Localizable.strings b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/ja.lproj/Localizable.strings index 1a39246..1abd48e 100755 Binary files a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/ja.lproj/Localizable.strings and b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/SQIPCardEntryViewResources.bundle/ja.lproj/Localizable.strings differ diff --git a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/setup b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/setup index c27b1ab..3896607 100755 --- a/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/setup +++ b/XCFrameworks/SquareInAppPaymentsSDK.xcframework/ios-arm64_x86_64-simulator/SquareInAppPaymentsSDK.framework/setup @@ -8,10 +8,20 @@ IFS=$(echo "") IAP_SDK_FRAMEWORKS=("SquareInAppPaymentsSDK" "SquareBuyerVerificationSDK") MAIN_FRAMEWORKS_DIR="$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH" +SECONDARY_FRAMEWORKS_DIR="$CONFIGURATION_BUILD_DIR" # Unpack frameworks for FRAMEWORK_NAME in "${IAP_SDK_FRAMEWORKS[@]}"; do - NESTED_FRAMEWORKS_DIR="$MAIN_FRAMEWORKS_DIR/$FRAMEWORK_NAME.framework/Frameworks" + FRAMEWORK_PATH="$FRAMEWORK_NAME.framework/Frameworks" + MAIN_NESTED_FRAMEWORKS_DIR="$MAIN_FRAMEWORKS_DIR/$FRAMEWORK_PATH" + SECONDARY_NESTED_FRAMEWORKS_DIR="$SECONDARY_FRAMEWORKS_DIR/$FRAMEWORK_PATH" + + if [ -d "$MAIN_NESTED_FRAMEWORKS_DIR" ]; then + NESTED_FRAMEWORKS_DIR=$MAIN_NESTED_FRAMEWORKS_DIR + else + NESTED_FRAMEWORKS_DIR=$SECONDARY_NESTED_FRAMEWORKS_DIR + fi + if [ -d "$NESTED_FRAMEWORKS_DIR" ]; then # Handle all nested frameworks that are fat frameworks find "$NESTED_FRAMEWORKS_DIR" -name '*.framework' ! -path '*.xcframework/*' -type d | while read -r FRAMEWORK; do @@ -57,6 +67,24 @@ for FRAMEWORK_NAME in "${IAP_SDK_FRAMEWORKS[@]}"; do fi done +# Workaround for Swift Package Manager +SOURCE_PACKAGE_FRAMEWORK_DIR="${BUILD_DIR%Build/*}SourcePackages/checkouts/in-app-payments-ios/XCFrameworks" + +if [ -d "$SOURCE_PACKAGE_FRAMEWORK_DIR" ]; then + for FRAMEWORK_NAME in "${IAP_SDK_FRAMEWORKS[@]}"; do + FRAMEWORK_PATH="$FRAMEWORK_NAME.xcframework" + SOURCE_FRAMEWORK_NESTED_DIR="$SOURCE_PACKAGE_FRAMEWORK_DIR/$FRAMEWORK_PATH" + # Find root directory inside of regular and simulator folders + find "$SOURCE_FRAMEWORK_NESTED_DIR" -name '*.framework' ! -path '*.framework/Frameworks/*' -type d | while read -r FRAMEWORK_DIR; do + rm -rf "$FRAMEWORK_DIR/Frameworks" + # Delete the setup script if archiving + if [ "$ACTION" = "install" ]; then + rm -rf "$FRAMEWORK_DIR/setup" + fi + done + done +fi + IFS=$OLDIFS # Don't choke if projects or targets have spaces in the name @@ -77,4 +105,4 @@ find "${CODESIGNING_FOLDER_PATH}/Frameworks" -name "*.framework" | while read -r fi done -IFS=$OLDIFS +IFS=$OLDIFS \ No newline at end of file diff --git a/podspec_constants.rb b/podspec_constants.rb index 86fe8ee..1a920ce 100644 --- a/podspec_constants.rb +++ b/podspec_constants.rb @@ -1,5 +1,5 @@ module SquareInAppPaymentsSDK - VERSION = '1.6.0' + VERSION = '1.6.1' LICENSE_TYPE = 'Square Developer License' LICENSE_TEXT = <<-LICENSE Copyright (c) 2018-present, Square, Inc. All rights reserved.