From 96a5a2d0c7d16dd062f7700f8cd76218a5029cd4 Mon Sep 17 00:00:00 2001 From: Shinya Kumagai Date: Sat, 20 Jul 2024 22:09:47 +0900 Subject: [PATCH] Refactor iOS implementation package workflow --- .github/workflows/ios_implementation_package.yml | 9 +++++++-- flutter_custom_tabs_ios/example/Makefile | 15 +++++++++++++++ flutter_custom_tabs_ios/example/ios/Podfile | 2 +- flutter_custom_tabs_ios/example/ios/Podfile.lock | 2 +- .../example/ios/Runner.xcodeproj/project.pbxproj | 3 +++ 5 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 flutter_custom_tabs_ios/example/Makefile diff --git a/.github/workflows/ios_implementation_package.yml b/.github/workflows/ios_implementation_package.yml index a7b1caa..7d3773f 100644 --- a/.github/workflows/ios_implementation_package.yml +++ b/.github/workflows/ios_implementation_package.yml @@ -8,10 +8,12 @@ on: - develop paths: - 'flutter_custom_tabs_ios/**' + - '.github/workflows/ios_implementation_package.yml' - '!**.md' pull_request: paths: - 'flutter_custom_tabs_ios/**' + - '.github/workflows/ios_implementation_package.yml' - '!**.md' jobs: @@ -37,9 +39,12 @@ jobs: - name: Statically analyze the Swift code for any errors run: make lint working-directory: ./flutter_custom_tabs_ios - - name: Run unit tests + - name: Run flutter unit tests run: flutter test working-directory: ./flutter_custom_tabs_ios - name: Build example iOS app run: flutter build ios --no-codesign - working-directory: ./flutter_custom_tabs_ios/example \ No newline at end of file + working-directory: ./flutter_custom_tabs_ios/example + - name: Run iOS unit tests + run: make test + working-directory: ./flutter_custom_tabs_ios/example \ No newline at end of file diff --git a/flutter_custom_tabs_ios/example/Makefile b/flutter_custom_tabs_ios/example/Makefile new file mode 100644 index 0000000..f05fd57 --- /dev/null +++ b/flutter_custom_tabs_ios/example/Makefile @@ -0,0 +1,15 @@ +TEST_SCHEME := Runner +TEST_PROJECT := ios/Runner.xcworkspace +TEST_SDK := iphonesimulator +TESET_DESTINATION := 'platform=iOS Simulator,OS=latest,name=iPhone 15' + +.PHONY: test +test: + set -o pipefail && \ + xcodebuild test \ + -workspace $(TEST_PROJECT) \ + -configuration Debug \ + -scheme $(TEST_SCHEME) \ + -sdk $(TEST_SDK) \ + -destination $(TESET_DESTINATION) \ + CODE_SIGNING_ALLOWED='NO' diff --git a/flutter_custom_tabs_ios/example/ios/Podfile b/flutter_custom_tabs_ios/example/ios/Podfile index 345ef42..22d2611 100644 --- a/flutter_custom_tabs_ios/example/ios/Podfile +++ b/flutter_custom_tabs_ios/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '11.0' +platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/flutter_custom_tabs_ios/example/ios/Podfile.lock b/flutter_custom_tabs_ios/example/ios/Podfile.lock index beea477..daaa66a 100644 --- a/flutter_custom_tabs_ios/example/ios/Podfile.lock +++ b/flutter_custom_tabs_ios/example/ios/Podfile.lock @@ -23,6 +23,6 @@ SPEC CHECKSUMS: flutter_custom_tabs_ios: a651b18786388923b62de8c0537607de87c2eccf integration_test: 13825b8a9334a850581300559b8839134b124670 -PODFILE CHECKSUM: a1ecc920bdd4a2a706a17f3bc3db5d6a10f3cd6e +PODFILE CHECKSUM: 503b9a445cf73afeaacc1a6a56c1ff9c4b7f1238 COCOAPODS: 1.15.2 diff --git a/flutter_custom_tabs_ios/example/ios/Runner.xcodeproj/project.pbxproj b/flutter_custom_tabs_ios/example/ios/Runner.xcodeproj/project.pbxproj index 3c28fea..fdfe031 100644 --- a/flutter_custom_tabs_ios/example/ios/Runner.xcodeproj/project.pbxproj +++ b/flutter_custom_tabs_ios/example/ios/Runner.xcodeproj/project.pbxproj @@ -487,6 +487,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -615,6 +616,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -637,6 +639,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks",