diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0711be7..7e69c34 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,33 +1,58 @@ name: reader-sdk-flutter-plugin + on: [push] + +env: + IOS_READER_SDK_VERSION: 1.7.4 + jobs: install-and-test: runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v3 + + - name: Cleanup + run: | + sudo rm -rf ~/Library/Developer/Xcode/DerivedData/* + sudo rm -rf ~/Library/Developer/Xcode/Archives/* + sudo rm -rf ~/Library/Caches/* + sudo rm -rf /Library/Developer/CoreSimulator/Profiles/Runtimes/* + sudo rm -rf /Users/runner/Library/Developer/CoreSimulator/Caches/* + sudo rm -rf /Users/runner/Library/Developer/CoreSimulator/Devices/* + sudo rm -rf /Users/runner/.gradle/caches + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up JDK + uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' - - uses: subosito/flutter-action@v1 + + - name: Set up Flutter + uses: subosito/flutter-action@v1 with: - channel: 'stable' # or: 'beta', 'dev' or 'master' - - run: flutter pub get - # Android - - run: | + channel: 'stable' + + - name: Install dependencies + run: flutter pub get + + - name: Android + run: | cd example flutter pub get cd android ./gradlew clean build -PSQUARE_READER_SDK_APPLICATION_ID=${{secrets.SQUARE_READER_SDK_APPLICATION_ID}} -PSQUARE_READER_SDK_REPOSITORY_PASSWORD=${{secrets.SQUARE_READER_SDK_REPOSITORY_PASSWORD}} - # #IOS - - run: | + + - name: iOS + run: | cd example flutter pub get cd ios - ruby <(curl https://connect.squareup.com/readersdk-installer) install --app-id ${{secrets.SQUARE_READER_SDK_APPLICATION_ID}} --repo-password ${{secrets.SQUARE_READER_SDK_REPOSITORY_PASSWORD}} --version 1.6.1 > /dev/null + ruby <(curl https://connect.squareup.com/readersdk-installer) install --app-id ${{secrets.SQUARE_READER_SDK_APPLICATION_ID}} --repo-password ${{secrets.SQUARE_READER_SDK_REPOSITORY_PASSWORD}} --version $IOS_READER_SDK_VERSION > /dev/null flutter clean - rm Pods && rm Podfile.lock + flutter pub get pod update Firebase/CoreOnly pod install --repo-update - xcodebuild -workspace Runner.xcworkspace -configuration Debug -scheme Runner -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14" \ No newline at end of file + xcodebuild -workspace Runner.xcworkspace -configuration Debug -scheme Runner -sdk iphoneos SKIP_SETUP_SCRIPT=YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b90d06..98dc561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Changelog +### v4.0.2 Sep 18, 2024 + +* Upgrade to Reader SDK 1.7.7 on Android. + ### v4.0.1 Aug 29st, 2024 * Upgrade to Reader SDK 1.7.5 on Android. diff --git a/README.md b/README.md index f345ebd..b6bfa88 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ you invoke any of Reader plugin method. The Flutter plugin for Reader SDK acts as a wrapper on the native SDKs and is currently compatible with the following native Reader SDK versions: - * iOS: 1.6.0 and above - * Android: 1.7.5 and above + * iOS: 1.7.4 and above + * Android: 1.7.7 and above Try the [sample app] to see the plugin in action or follow the instructions in the [getting started guide] to build a custom solution from scratch. diff --git a/android/build.gradle b/android/build.gradle index 1ae1ecf..c403dfd 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -44,7 +44,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' def DEFAULT_PLAY_SERVICES_BASE_VERSION = '16.0.1' -def READER_SDK_VERSION = '1.7.5' +def READER_SDK_VERSION = '1.7.7' android { compileSdkVersion 34 diff --git a/doc/get-started.md b/doc/get-started.md index 235200c..c370fda 100644 --- a/doc/get-started.md +++ b/doc/get-started.md @@ -51,7 +51,7 @@ dependencies: ... - square_reader_sdk: ^4.0.0 + square_reader_sdk: ^4.0.2 ``` ## Step 3: Request Reader SDK credentials diff --git a/example/android/build.gradle b/example/android/build.gradle index f7949ba..424e0e9 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -29,8 +29,8 @@ allprojects { ext { // Override the reader sdk version with this parameter - // Make sure the version is above min version 1.7.5 - readerSdkVersion = "1.7.5" + // Make sure the version is above min version 1.7.7 + readerSdkVersion = "1.7.7" } rootProject.buildDir = '../build' diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 8d4492f..7c56964 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 12.0 diff --git a/example/ios/Podfile b/example/ios/Podfile index 9df31d1..115e635 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '11.1' +platform :ios, '13.1' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -66,4 +66,4 @@ post_install do |installer| config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' end end -end \ No newline at end of file +end diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 48a2bd1..b623f72 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -160,7 +160,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -219,10 +219,11 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "FRAMEWORKS=\"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n\"${FRAMEWORKS}/SquareReaderSDK.framework/setup\"\n\n"; + shellScript = "# Skip the script in CI builds\nif [ \"$SKIP_SETUP_SCRIPT\" = \"YES\" ]; then\n exit 0\nfi\n\nFRAMEWORKS=\"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n\"${FRAMEWORKS}/SquareReaderSDK.framework/setup\"\n"; }; 324E410A8DA310037B0B821B /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -240,20 +241,23 @@ }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n"; }; 90342CCEE2EE75FC4F40EB89 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -276,6 +280,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -382,6 +387,7 @@ DEVELOPMENT_TEAM = C2UGS295KL; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -507,16 +513,20 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = C2UGS295KL; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = com.example.flutter.squareup.sdk.example; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -530,16 +540,20 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = C2UGS295KL; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = com.example.flutter.squareup.sdk.example; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c87d15a..5e31d3d 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ CADisableMinimumFrameDurationOnPhone + UIApplicationSupportsIndirectInputEvents + diff --git a/pubspec.yaml b/pubspec.yaml index 2b7c158..8b5404d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: square_reader_sdk description: An open source Flutter plugin for calling Square’s native Reader SDK implementations to take in-person payments on iOS and Android. -version: 4.0.1 +version: 4.0.2 homepage: https://github.com/square/reader-sdk-flutter-plugin environment: