Skip to content

Commit 1b7fadf

Browse files
davidSchuppaLasOrimegamegax
committed
chore(pipeline): added manual signing for iOS
epic: SDK-468 ticket: SDK-497 Co-authored-by: LasOri <[email protected]> Co-authored-by: megamegax <[email protected]>
1 parent 0d8b2bd commit 1b7fadf

File tree

2 files changed

+90
-21
lines changed

2 files changed

+90
-21
lines changed

.github/workflows/on-commit.yml

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches: [ master ]
66
workflow_dispatch:
77
env:
8+
EXAMPLE_PROV_PROF_BASE64: ${{ secrets.EXAMPLE_PROV_PROF_BASE64 }}
9+
EXAMPLE_NOTIFICATION_SERVICE_PROV_PROF_BASE64: ${{ secrets.EXAMPLE_NOTIFICATION_SERVICE_PROV_PROF_BASE64 }}
810
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
911
SLACK_ICON: https://icons.iconarchive.com/icons/martz90/circle/256/android-icon.png
1012
SLACK_TITLE: Commit status
@@ -14,7 +16,7 @@ env:
1416
jobs:
1517
Android:
1618
needs: [Lint]
17-
runs-on: macos-14
19+
runs-on: macos-latest
1820
steps:
1921
- name: Checkout repo
2022
uses: actions/checkout@v4
@@ -46,7 +48,7 @@ jobs:
4648
run: (cd example/android && ./gradlew clean testDebugUnitTest -x lint -x :integration_test:testDebugUnitTest -x :integration_test:testProfileUnitTest -x :integration_test:testReleaseUnitTest)
4749

4850
IOS:
49-
runs-on: macos-14
51+
runs-on: macos-latest
5052
needs: [Lint]
5153
steps:
5254
- name: Checkout repo
@@ -61,25 +63,58 @@ jobs:
6163

6264
- name: Open simulator
6365
run: open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/
64-
65-
- name: Update dependencies
66-
run: flutter pub get
6766

6867
- name: Remove old directories
6968
run: rm -rf ~/tmp | rm -rf ~/Library/MobileDevice
7069
shell: bash
7170

71+
- name: Setup Example Provisioning Profile
72+
uses: davidSchuppa/base64Secret-toFile-action@v1
73+
with:
74+
destination-path: ~/Library/MobileDevice/Provisioning\ Profiles/
75+
filename: FlutterExampleProvProf.mobileprovision
76+
secret: ${{ secrets.EXAMPLE_PROV_PROF_BASE64 }}
77+
78+
- name: Setup ExampleNotificationService Provisioning Profile
79+
uses: davidSchuppa/base64Secret-toFile-action@v1
80+
with:
81+
destination-path: ~/Library/MobileDevice/Provisioning\ Profiles/
82+
filename: FlutterExampleNotificationServiceProvProf.mobileprovision
83+
secret: ${{ secrets.EXAMPLE_NOTIFICATION_SERVICE_PROV_PROF_BASE64 }}
84+
85+
- name: Install Dependencies
86+
run: (cd example/ios && pod install --no-repo-update)
87+
shell: bash
88+
89+
- name: Run iOS unit tests
90+
run: xcodebuild -workspace ~/work/flutter-plugin-for-sap-emarsys-customer-engagement/flutter-plugin-for-sap-emarsys-customer-engagement/example/ios/Runner.xcworkspace -scheme RunnerTests -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=18.4' test
91+
92+
Flutter:
93+
runs-on: macos-latest
94+
needs: [ Lint ]
95+
steps:
96+
- name: Checkout repo
97+
uses: actions/checkout@v4
98+
99+
- name: Setup flutter env
100+
uses: subosito/flutter-action@v2
101+
with:
102+
flutter-version: "3.35.1"
103+
architecture: x64
104+
channel: "stable"
105+
106+
- name: Update dependencies
107+
run: flutter pub get
108+
72109
- name: Install Dependencies
73110
run: (cd example/ios && pod install --no-repo-update --verbose)
74111
shell: bash
75112

76113
- name: Run Flutter Tests
77114
run: flutter test
78115

79-
- name: Run iOS unit tests
80-
run: xcodebuild -workspace ~/work/flutter-plugin-for-sap-emarsys-customer-engagement/flutter-plugin-for-sap-emarsys-customer-engagement/example/ios/Runner.xcworkspace -scheme RunnerTests -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=18.4' test CODE_SIGN_STYLE=Automatic
81116
Lint:
82-
runs-on: macos-14
117+
runs-on: macos-latest
83118
steps:
84119
- name: Setup flutter env
85120
uses: subosito/flutter-action@v2
@@ -90,4 +125,4 @@ jobs:
90125

91126
- name: Flutter lint
92127
run: dart analyze
93-
shell: bash
128+
shell: bash

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,14 @@
519519
inputFileListPaths = (
520520
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
521521
);
522+
inputPaths = (
523+
);
522524
name = "[CP] Copy Pods Resources";
523525
outputFileListPaths = (
524526
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
525527
);
528+
outputPaths = (
529+
);
526530
runOnlyForDeploymentPostprocessing = 0;
527531
shellPath = /bin/sh;
528532
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
@@ -558,10 +562,14 @@
558562
inputFileListPaths = (
559563
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
560564
);
565+
inputPaths = (
566+
);
561567
name = "[CP] Embed Pods Frameworks";
562568
outputFileListPaths = (
563569
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
564570
);
571+
outputPaths = (
572+
);
565573
runOnlyForDeploymentPostprocessing = 0;
566574
shellPath = /bin/sh;
567575
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
@@ -591,10 +599,14 @@
591599
inputFileListPaths = (
592600
"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-resources-${CONFIGURATION}-input-files.xcfilelist",
593601
);
602+
inputPaths = (
603+
);
594604
name = "[CP] Copy Pods Resources";
595605
outputFileListPaths = (
596606
"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-resources-${CONFIGURATION}-output-files.xcfilelist",
597607
);
608+
outputPaths = (
609+
);
598610
runOnlyForDeploymentPostprocessing = 0;
599611
shellPath = /bin/sh;
600612
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-resources.sh\"\n";
@@ -608,10 +620,14 @@
608620
inputFileListPaths = (
609621
"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
610622
);
623+
inputPaths = (
624+
);
611625
name = "[CP] Embed Pods Frameworks";
612626
outputFileListPaths = (
613627
"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
614628
);
629+
outputPaths = (
630+
);
615631
runOnlyForDeploymentPostprocessing = 0;
616632
shellPath = /bin/sh;
617633
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh\"\n";
@@ -757,9 +773,11 @@
757773
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
758774
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
759775
CODE_SIGN_IDENTITY = "Apple Development";
760-
CODE_SIGN_STYLE = Automatic;
776+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
777+
CODE_SIGN_STYLE = Manual;
761778
CURRENT_PROJECT_VERSION = 1;
762-
DEVELOPMENT_TEAM = 4J5FXBB97U;
779+
DEVELOPMENT_TEAM = "";
780+
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 4J5FXBB97U;
763781
ENABLE_USER_SCRIPT_SANDBOXING = YES;
764782
GCC_C_LANGUAGE_STANDARD = gnu17;
765783
GENERATE_INFOPLIST_FILE = YES;
@@ -779,6 +797,7 @@
779797
PRODUCT_BUNDLE_IDENTIFIER = com.emarsys.EmarsysExample.NotificationExtension;
780798
PRODUCT_NAME = "$(TARGET_NAME)";
781799
PROVISIONING_PROFILE_SPECIFIER = "";
800+
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = FlutterExampleNotificationServiceProvProf;
782801
SKIP_INSTALL = YES;
783802
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
784803
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -800,9 +819,11 @@
800819
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
801820
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
802821
CODE_SIGN_IDENTITY = "Apple Development";
803-
CODE_SIGN_STYLE = Automatic;
822+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
823+
CODE_SIGN_STYLE = Manual;
804824
CURRENT_PROJECT_VERSION = 1;
805-
DEVELOPMENT_TEAM = 4J5FXBB97U;
825+
DEVELOPMENT_TEAM = "";
826+
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 4J5FXBB97U;
806827
ENABLE_USER_SCRIPT_SANDBOXING = YES;
807828
GCC_C_LANGUAGE_STANDARD = gnu17;
808829
GENERATE_INFOPLIST_FILE = YES;
@@ -821,6 +842,7 @@
821842
PRODUCT_BUNDLE_IDENTIFIER = com.emarsys.EmarsysExample.NotificationExtension;
822843
PRODUCT_NAME = "$(TARGET_NAME)";
823844
PROVISIONING_PROFILE_SPECIFIER = "";
845+
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = FlutterExampleNotificationServiceProvProf;
824846
SKIP_INSTALL = YES;
825847
SWIFT_EMIT_LOC_STRINGS = YES;
826848
SWIFT_VERSION = 5.0;
@@ -840,9 +862,11 @@
840862
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
841863
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
842864
CODE_SIGN_IDENTITY = "Apple Development";
843-
CODE_SIGN_STYLE = Automatic;
865+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
866+
CODE_SIGN_STYLE = Manual;
844867
CURRENT_PROJECT_VERSION = 1;
845-
DEVELOPMENT_TEAM = 4J5FXBB97U;
868+
DEVELOPMENT_TEAM = "";
869+
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 4J5FXBB97U;
846870
ENABLE_USER_SCRIPT_SANDBOXING = YES;
847871
GCC_C_LANGUAGE_STANDARD = gnu17;
848872
GENERATE_INFOPLIST_FILE = YES;
@@ -861,6 +885,7 @@
861885
PRODUCT_BUNDLE_IDENTIFIER = com.emarsys.EmarsysExample.NotificationExtension;
862886
PRODUCT_NAME = "$(TARGET_NAME)";
863887
PROVISIONING_PROFILE_SPECIFIER = "";
888+
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = FlutterExampleNotificationServiceProvProf;
864889
SKIP_INSTALL = YES;
865890
SWIFT_EMIT_LOC_STRINGS = YES;
866891
SWIFT_VERSION = 5.0;
@@ -927,9 +952,11 @@
927952
CLANG_ENABLE_MODULES = YES;
928953
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
929954
CODE_SIGN_IDENTITY = "Apple Development";
930-
CODE_SIGN_STYLE = Automatic;
955+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
956+
CODE_SIGN_STYLE = Manual;
931957
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
932-
DEVELOPMENT_TEAM = 4J5FXBB97U;
958+
DEVELOPMENT_TEAM = "";
959+
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 4J5FXBB97U;
933960
ENABLE_BITCODE = NO;
934961
INFOPLIST_FILE = Runner/Info.plist;
935962
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
@@ -940,6 +967,7 @@
940967
PRODUCT_BUNDLE_IDENTIFIER = com.emarsys.EmarsysExample;
941968
PRODUCT_NAME = "$(TARGET_NAME)";
942969
PROVISIONING_PROFILE_SPECIFIER = "";
970+
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = FlutterExampleProvProf;
943971
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
944972
SWIFT_VERSION = 5.0;
945973
VERSIONING_SYSTEM = "apple-generic";
@@ -1124,9 +1152,11 @@
11241152
CLANG_ENABLE_MODULES = YES;
11251153
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
11261154
CODE_SIGN_IDENTITY = "Apple Development";
1127-
CODE_SIGN_STYLE = Automatic;
1155+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1156+
CODE_SIGN_STYLE = Manual;
11281157
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
1129-
DEVELOPMENT_TEAM = 4J5FXBB97U;
1158+
DEVELOPMENT_TEAM = "";
1159+
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 4J5FXBB97U;
11301160
ENABLE_BITCODE = NO;
11311161
INFOPLIST_FILE = Runner/Info.plist;
11321162
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
@@ -1137,6 +1167,7 @@
11371167
PRODUCT_BUNDLE_IDENTIFIER = com.emarsys.EmarsysExample;
11381168
PRODUCT_NAME = "$(TARGET_NAME)";
11391169
PROVISIONING_PROFILE_SPECIFIER = "";
1170+
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = FlutterExampleProvProf;
11401171
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
11411172
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
11421173
SWIFT_VERSION = 5.0;
@@ -1153,9 +1184,11 @@
11531184
CLANG_ENABLE_MODULES = YES;
11541185
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
11551186
CODE_SIGN_IDENTITY = "Apple Development";
1156-
CODE_SIGN_STYLE = Automatic;
1187+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1188+
CODE_SIGN_STYLE = Manual;
11571189
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
1158-
DEVELOPMENT_TEAM = 4J5FXBB97U;
1190+
DEVELOPMENT_TEAM = "";
1191+
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 4J5FXBB97U;
11591192
ENABLE_BITCODE = NO;
11601193
INFOPLIST_FILE = Runner/Info.plist;
11611194
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
@@ -1166,6 +1199,7 @@
11661199
PRODUCT_BUNDLE_IDENTIFIER = com.emarsys.EmarsysExample;
11671200
PRODUCT_NAME = "$(TARGET_NAME)";
11681201
PROVISIONING_PROFILE_SPECIFIER = "";
1202+
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = FlutterExampleProvProf;
11691203
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
11701204
SWIFT_VERSION = 5.0;
11711205
VERSIONING_SYSTEM = "apple-generic";

0 commit comments

Comments
 (0)