From 4ed872bbef2baa0bb65e859bbaf5d1204a0a5e63 Mon Sep 17 00:00:00 2001 From: Nilay-squareup Date: Wed, 14 Aug 2024 16:12:30 +0530 Subject: [PATCH 01/21] changed targetSDK to 34 also required dependency to run the project on both platforms --- android/build.gradle | 14 ++++---- android/src/main/AndroidManifest.xml | 3 +- example/android/app/build.gradle | 36 +++++++++++++------ .../android/app/src/main/AndroidManifest.xml | 3 +- example/android/build.gradle | 11 +++--- example/android/gradle.properties | 3 ++ .../gradle/wrapper/gradle-wrapper.properties | 2 +- example/ios/Flutter/AppFrameworkInfo.plist | 2 +- example/ios/Podfile | 4 +-- example/ios/Runner.xcodeproj/project.pbxproj | 5 ++- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- example/ios/Runner/Info.plist | 2 ++ example/lib/main.dart | 22 ++++++------ example/lib/screens/widgets/buttons.dart | 7 ++-- example/pubspec.yaml | 6 ++-- 15 files changed, 71 insertions(+), 51 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 1dba8fb..1ae1ecf 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -19,18 +19,18 @@ version '2.0-SNAPSHOT' buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.2' + classpath 'com.android.tools.build:gradle:8.5.2' } } rootProject.allprojects { repositories { google() - jcenter() + mavenCentral() maven { url "https://sdk.squareup.com/android" credentials { @@ -44,14 +44,14 @@ rootProject.allprojects { apply plugin: 'com.android.library' def DEFAULT_PLAY_SERVICES_BASE_VERSION = '16.0.1' -def READER_SDK_VERSION = '[1.7.5, 2.0)' +def READER_SDK_VERSION = '1.7.5' android { - compileSdkVersion 32 - + compileSdkVersion 34 + namespace 'com.squareup.readersdkflutterplugin' defaultConfig { minSdkVersion 24 - targetSdkVersion 31 + targetSdkVersion 34 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" multiDexEnabled true } diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 7c16342..d5c94f3 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index b0fe577..8c98d59 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -26,13 +26,8 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply plugin: 'kotlin-android' android { - compileSdkVersion 33 - - lintOptions { - disable 'InvalidPackage' - checkReleaseBuilds false - } - compileSdkVersion 33 + namespace 'com.example.flutter.squareup.sdk.reader' + compileSdkVersion 34 ndkVersion = "21.4.7075529" sourceSets { @@ -43,13 +38,28 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.flutter.squareup.sdk.reader" minSdkVersion 26 - targetSdkVersion 33 + targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" multiDexEnabled true } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = "1.8" + } + + java { + toolchain { + languageVersion = JavaLanguageVersion.of(17) + } + } + buildTypes { release { // TODO: Add your own signing config for the release build. @@ -57,16 +67,22 @@ android { signingConfig signingConfigs.debug } } - packagingOptions { - exclude("META-INF/*.kotlin_module") + resources { + excludes += ['META-INF/*.kotlin_module'] + } } + dexOptions { preDexLibraries true jumboMode true keepRuntimeAnnotatedClasses false } + lint { + checkReleaseBuilds false + disable 'InvalidPackage' + } } flutter { diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 7408072..c812486 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + + + + From 5cfd44f1ab6d944561454040cc0aa382a4de9ed4 Mon Sep 17 00:00:00 2001 From: Nilay-squareup Date: Mon, 26 Aug 2024 18:14:45 +0530 Subject: [PATCH 06/21] fixing pipeling for minifyEnable --- example/android/app/build.gradle | 4 ++-- example/android/build.gradle | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index ee986a2..2d8e218 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -65,8 +65,8 @@ android { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } + minifyEnabled false + shrinkResources false } } packagingOptions { resources { diff --git a/example/android/build.gradle b/example/android/build.gradle index c041d66..f7949ba 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -10,7 +10,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:8.5.0' + classpath 'com.android.tools.build:gradle:8.5.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.dipien:bye-bye-jetifier:1.2.1' } From 812a0b3ad5157437a9f5db9387db6a14a74276d7 Mon Sep 17 00:00:00 2001 From: Nilay-squareup Date: Mon, 26 Aug 2024 18:43:10 +0530 Subject: [PATCH 07/21] fixing ios pipelines --- example/ios/Runner.xcodeproj/project.pbxproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index a383726..88547d6 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -240,7 +240,6 @@ }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -252,7 +251,7 @@ ); 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; From a018f91026e19958bc16524d49bcbe7850e7f7f1 Mon Sep 17 00:00:00 2001 From: Nilay-squareup Date: Mon, 26 Aug 2024 22:23:40 +0530 Subject: [PATCH 08/21] fixing pipelines for ios --- example/android/app/proguard-rules.pro | 5 ----- example/ios/Runner.xcodeproj/project.pbxproj | 7 +++++-- 2 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 example/android/app/proguard-rules.pro diff --git a/example/android/app/proguard-rules.pro b/example/android/app/proguard-rules.pro deleted file mode 100644 index 999ae6a..0000000 --- a/example/android/app/proguard-rules.pro +++ /dev/null @@ -1,5 +0,0 @@ -# Keep rules for missing classes --keep class com.google.j2objc.annotations.** { *; } --keep class com.squareup.shared.catalog.** { *; } - -# Add other keep rules as needed diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 88547d6..bea675a 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -384,6 +384,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", @@ -510,9 +511,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; 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", @@ -533,9 +535,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; 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", From 822ce073761d182ccda0337a05263904da00a302 Mon Sep 17 00:00:00 2001 From: Nilay-squareup Date: Tue, 27 Aug 2024 12:53:24 +0530 Subject: [PATCH 09/21] updated run script --- example/ios/Runner.xcodeproj/project.pbxproj | 1 - 1 file changed, 1 deletion(-) diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index bea675a..41a358d 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -277,7 +277,6 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); From 75fe91e68cb9e140a979930e51e88218b6a7dbce Mon Sep 17 00:00:00 2001 From: Nilay-squareup Date: Tue, 27 Aug 2024 13:13:03 +0530 Subject: [PATCH 10/21] updated run script --- example/ios/Runner.xcodeproj/project.pbxproj | 1 - 1 file changed, 1 deletion(-) diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 41a358d..84fe4e8 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -204,7 +204,6 @@ /* Begin PBXShellScriptBuildPhase section */ 17130ABE28ACDC4A007FE54B /* Square setup script */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); From 165ad9aacf0917bc2c8cc3bbcda480f4a0698b90 Mon Sep 17 00:00:00 2001 From: Nilay-squareup Date: Tue, 27 Aug 2024 13:35:39 +0530 Subject: [PATCH 11/21] updated run phase --- example/ios/Runner.xcodeproj/project.pbxproj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 84fe4e8..d21820d 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -204,6 +204,7 @@ /* Begin PBXShellScriptBuildPhase section */ 17130ABE28ACDC4A007FE54B /* Square setup script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -222,6 +223,7 @@ }; 324E410A8DA310037B0B821B /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -239,6 +241,7 @@ }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -254,6 +257,7 @@ }; 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 = ( ); From 1f39e5eb6d2eea2b224245b873178123cac9f088 Mon Sep 17 00:00:00 2001 From: Nilay-squareup Date: Wed, 14 Aug 2024 16:12:30 +0530 Subject: [PATCH 12/21] updated run phase updated run script fixing pipelines for ios fixing pipeling for minifyEnable fixing lint error for camera permission in pipelines fixing notification permissions issue in pipelines fixing proguard issue in pipeline --- example/ios/Flutter/AppFrameworkInfo.plist | 2 +- example/ios/Podfile | 4 ++-- example/ios/Runner.xcodeproj/project.pbxproj | 12 ++++++++++-- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- example/ios/Runner/Info.plist | 2 ++ 5 files changed, 16 insertions(+), 6 deletions(-) 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..e4f678b 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 = { @@ -223,6 +223,7 @@ }; 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", @@ -511,6 +517,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", @@ -534,6 +541,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", 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 + From 85266d62816208b25613c66065fd185842e11194 Mon Sep 17 00:00:00 2001 From: Nilay-squareup Date: Thu, 5 Sep 2024 14:31:49 +0530 Subject: [PATCH 13/21] updated main.yml file --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0711be7..0310219 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,4 +30,7 @@ jobs: 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 -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14" + CODE_SIGNING_ALLOWED=NO \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGN_IDENTITY=NO" \ No newline at end of file From 0699476eae95c885ba8d96503aa48d58586e98fc Mon Sep 17 00:00:00 2001 From: Nilay-squareup Date: Thu, 5 Sep 2024 16:10:03 +0530 Subject: [PATCH 14/21] updated main.yml file new --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0310219..7b02b01 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: flutter pub get pod update Firebase/CoreOnly pod install --repo-update + CODE_SIGNING_ALLOWED=NO + CODE_SIGNING_REQUIRED=NO + CODE_SIGN_IDENTITY=NO xcodebuild -workspace Runner.xcworkspace -configuration Debug -scheme Runner -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14" - CODE_SIGNING_ALLOWED=NO \ - CODE_SIGNING_REQUIRED=NO \ - CODE_SIGN_IDENTITY=NO" \ No newline at end of file From 0066174765c0faff7df46327213894693878608f Mon Sep 17 00:00:00 2001 From: Nilay-squareup Date: Thu, 5 Sep 2024 16:46:29 +0530 Subject: [PATCH 15/21] yml file change and project.pbx file add --- .github/workflows/main.yml | 8 ++++---- example/ios/Runner.xcodeproj/project.pbxproj | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7b02b01..6e0a399 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: flutter pub get pod update Firebase/CoreOnly pod install --repo-update - CODE_SIGNING_ALLOWED=NO - CODE_SIGNING_REQUIRED=NO - CODE_SIGN_IDENTITY=NO - xcodebuild -workspace Runner.xcworkspace -configuration Debug -scheme Runner -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14" + xcodebuild -workspace Runner.xcworkspace -configuration Debug -scheme Runner -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14 + CODE_SIGNING_ALLOWED=NO / + CODE_SIGNING_REQUIRED=NO / + CODE_SIGN_IDENTITY=NO" diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index d21820d..157534e 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -513,6 +513,8 @@ 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 = ""; ENABLE_BITCODE = NO; @@ -524,6 +526,7 @@ ); 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; @@ -537,6 +540,8 @@ 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 = ""; ENABLE_BITCODE = NO; @@ -548,6 +553,7 @@ ); 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"; From 3c0ec482e07d0db3cde4e5c9e15548c3d79af593 Mon Sep 17 00:00:00 2001 From: Brandon Jenniges Date: Mon, 9 Sep 2024 10:35:37 -0500 Subject: [PATCH 16/21] Update xcodebuild command to not using code signing --- .github/workflows/main.yml | 21 +++++++++++++------- example/ios/Runner.xcodeproj/project.pbxproj | 2 +- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e0a399..1b0e1f7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,7 @@ name: reader-sdk-flutter-plugin on: [push] jobs: - install-and-test: + install-and-test-android: runs-on: macos-latest steps: - uses: actions/checkout@v2 @@ -13,24 +13,31 @@ jobs: with: channel: 'stable' # or: 'beta', 'dev' or 'master' - run: flutter pub get + # 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 + + install-and-test-ios: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - uses: subosito/flutter-action@v1 + with: + channel: 'stable' # or: 'beta', 'dev' or 'master' + - run: flutter pub get + # 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 1.7.4 > /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 - CODE_SIGNING_ALLOWED=NO / - CODE_SIGNING_REQUIRED=NO / - CODE_SIGN_IDENTITY=NO" + xcodebuild -workspace Runner.xcworkspace -configuration Debug -scheme Runner -sdk iphoneos SKIP_SETUP_SCRIPT=YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 157534e..b623f72 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -219,7 +219,7 @@ ); 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; From f7137f0c85b8de0c9b31a603da93907ab2cf36d7 Mon Sep 17 00:00:00 2001 From: Nilay-squareup Date: Tue, 10 Sep 2024 14:13:49 +0530 Subject: [PATCH 17/21] Flutter ReaderSDK version update 4.0.2 --- android/build.gradle | 2 +- doc/get-started.md | 2 +- example/android/build.gradle | 2 +- pubspec.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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..6e8070b 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -30,7 +30,7 @@ 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" + readerSdkVersion = "1.7.7" } rootProject.buildDir = '../build' diff --git a/pubspec.yaml b/pubspec.yaml index f1b4b4a..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.0 +version: 4.0.2 homepage: https://github.com/square/reader-sdk-flutter-plugin environment: From bffe01abeee3ed5bf1d7cc1f07e63ee0fd9e6ba7 Mon Sep 17 00:00:00 2001 From: Brandon Jenniges Date: Mon, 9 Sep 2024 13:50:49 -0500 Subject: [PATCH 18/21] Try to clean derived data after to clean up space --- .github/workflows/main.yml | 48 +++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1b0e1f7..27ac715 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,42 +1,52 @@ name: reader-sdk-flutter-plugin on: [push] jobs: - install-and-test-android: + install-and-test: runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v3 + + - name: Cleanup + run: | + sudo rm -rf /Users/runner/.gradle/caches + sudo rm -rf /Library/Developer/CoreSimulator/Profiles/Runtimes/* + sudo rm -rf ~/Library/Developer/Xcode/DerivedData/* + sudo rm -rf ~/Library/Developer/Xcode/Archives/* + sudo rm -rf ~/Library/Caches/* + sudo rm -rf /Users/runner/Library/Developer/CoreSimulator/Caches/* + sudo rm -rf /Users/runner/Library/Developer/CoreSimulator/Devices/* + + - 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 + channel: 'stable' + + - name: Install dependencies + run: flutter pub get - # Android - - run: | + - 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}} - install-and-test-ios: - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - uses: subosito/flutter-action@v1 - with: - channel: 'stable' # or: 'beta', 'dev' or 'master' - - run: flutter pub get - # 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.7.4 > /dev/null flutter clean - rm Pods && rm Podfile.lock + flutter pub get pod update Firebase/CoreOnly pod install --repo-update From b537b2057e697305719b39694fe195577e9ae6cd Mon Sep 17 00:00:00 2001 From: Brandon Jenniges Date: Tue, 10 Sep 2024 12:15:05 -0500 Subject: [PATCH 19/21] Extract out ios r1 version and use an env variable --- .github/workflows/main.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 27ac715..7e69c34 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,10 @@ name: reader-sdk-flutter-plugin + on: [push] + +env: + IOS_READER_SDK_VERSION: 1.7.4 + jobs: install-and-test: runs-on: macos-latest @@ -7,13 +12,13 @@ jobs: - name: Cleanup run: | - sudo rm -rf /Users/runner/.gradle/caches - sudo rm -rf /Library/Developer/CoreSimulator/Profiles/Runtimes/* 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 @@ -44,7 +49,7 @@ jobs: 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.7.4 > /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 flutter pub get From e1bcc4a30a12cef7bc1b35358ce5a761350f0c82 Mon Sep 17 00:00:00 2001 From: Nilay-squareup Date: Mon, 16 Sep 2024 16:16:26 +0530 Subject: [PATCH 20/21] reader sdk ios version bump to 1.7.4 and android 1.7.7 --- CHANGELOG.md | 2 +- README.md | 4 ++-- example/android/build.gradle | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 057a753..116920e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ### v5.0.0 Aug 22st, 2023 -* Upgrade to Reader SDK 1.7.5 on Android. +* Upgrade to Reader SDK 1.7.7 on Android. * Support CompileSDK and targetSDK 33 on Android ### v4.0.0 Sep 1st, 2022 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/example/android/build.gradle b/example/android/build.gradle index 6e8070b..424e0e9 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -29,7 +29,7 @@ allprojects { ext { // Override the reader sdk version with this parameter - // Make sure the version is above min version 1.7.5 + // Make sure the version is above min version 1.7.7 readerSdkVersion = "1.7.7" } From 1bf1fae179023006af43f9f73ef1564306a36f2d Mon Sep 17 00:00:00 2001 From: Nilay-squareup Date: Thu, 19 Sep 2024 17:22:16 +0530 Subject: [PATCH 21/21] Resolve PR comments --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 528d829..98dc561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,12 @@ ## Changelog -### v4.0.1 Aug 29st, 2024 +### 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. * Support CompileSDK and targetSDK 34 on Android * Fixed the [issue](https://github.com/square/reader-sdk-flutter-plugin/pull/116) with resuming the app after process is killed on Android.