Skip to content

Commit ce48580

Browse files
loic-sharmaandroidseb
authored andcommitted
[pigeon] Add Swift Package Manager integration to example app (flutter#8225)
This migrates Pigeon's example app to have Swift Package Manager integration. This raises the example apps' Flutter SDK requirement to 3.24.0 or higher. This also checks-in CocoaPods integration stuff that was missing. I will get a text exemption for this change. The example apps were migrated using the following commands: ``` dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --swift-package-manager dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --swift-package-manager ``` Part of: flutter/flutter#159173
1 parent 1c715c9 commit ce48580

File tree

7 files changed

+104
-9
lines changed

7 files changed

+104
-9
lines changed

packages/pigeon/example/app/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>11.0</string>
24+
<string>12.0</string>
2525
</dict>
2626
</plist>

packages/pigeon/example/app/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '11.0'
2+
# platform :ios, '12.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

packages/pigeon/example/app/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 76 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
3368472729F02D040090029A /* Messages.g.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3368472629F02D040090029A /* Messages.g.swift */; };
1212
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13+
3EE8794C275F32088AD591EB /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A650BDD6F68BD8FFBF3F1780 /* Pods_Runner.framework */; };
1314
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
1416
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1517
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1618
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -32,6 +34,7 @@
3234
/* Begin PBXFileReference section */
3335
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
3436
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
37+
27CAC22A75533A4A7E343992 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
3538
3368472629F02D040090029A /* Messages.g.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Messages.g.swift; sourceTree = "<group>"; };
3639
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3740
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
@@ -44,19 +47,43 @@
4447
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4548
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4649
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
50+
A650BDD6F68BD8FFBF3F1780 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
51+
AE98FBE14AEFBBA591D3392B /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
52+
C9FCCD56B6FEFE59650B7D41 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
4753
/* End PBXFileReference section */
4854

4955
/* Begin PBXFrameworksBuildPhase section */
5056
97C146EB1CF9000F007C117D /* Frameworks */ = {
5157
isa = PBXFrameworksBuildPhase;
5258
buildActionMask = 2147483647;
5359
files = (
60+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
61+
3EE8794C275F32088AD591EB /* Pods_Runner.framework in Frameworks */,
5462
);
5563
runOnlyForDeploymentPostprocessing = 0;
5664
};
5765
/* End PBXFrameworksBuildPhase section */
5866

5967
/* Begin PBXGroup section */
68+
2DE1FB11A4049DEDD8609D3D /* Frameworks */ = {
69+
isa = PBXGroup;
70+
children = (
71+
A650BDD6F68BD8FFBF3F1780 /* Pods_Runner.framework */,
72+
);
73+
name = Frameworks;
74+
sourceTree = "<group>";
75+
};
76+
5AC2660E9756DE131CECB642 /* Pods */ = {
77+
isa = PBXGroup;
78+
children = (
79+
AE98FBE14AEFBBA591D3392B /* Pods-Runner.debug.xcconfig */,
80+
27CAC22A75533A4A7E343992 /* Pods-Runner.release.xcconfig */,
81+
C9FCCD56B6FEFE59650B7D41 /* Pods-Runner.profile.xcconfig */,
82+
);
83+
name = Pods;
84+
path = Pods;
85+
sourceTree = "<group>";
86+
};
6087
9740EEB11CF90186004384FC /* Flutter */ = {
6188
isa = PBXGroup;
6289
children = (
@@ -74,6 +101,8 @@
74101
9740EEB11CF90186004384FC /* Flutter */,
75102
97C146F01CF9000F007C117D /* Runner */,
76103
97C146EF1CF9000F007C117D /* Products */,
104+
5AC2660E9756DE131CECB642 /* Pods */,
105+
2DE1FB11A4049DEDD8609D3D /* Frameworks */,
77106
);
78107
sourceTree = "<group>";
79108
};
@@ -108,6 +137,7 @@
108137
isa = PBXNativeTarget;
109138
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
110139
buildPhases = (
140+
11874A3E3724772837B0A747 /* [CP] Check Pods Manifest.lock */,
111141
9740EEB61CF901F6004384FC /* Run Script */,
112142
97C146EA1CF9000F007C117D /* Sources */,
113143
97C146EB1CF9000F007C117D /* Frameworks */,
@@ -120,6 +150,9 @@
120150
dependencies = (
121151
);
122152
name = Runner;
153+
packageProductDependencies = (
154+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
155+
);
123156
productName = Runner;
124157
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
125158
productType = "com.apple.product-type.application";
@@ -130,7 +163,7 @@
130163
97C146E61CF9000F007C117D /* Project object */ = {
131164
isa = PBXProject;
132165
attributes = {
133-
LastUpgradeCheck = 1300;
166+
LastUpgradeCheck = 1510;
134167
ORGANIZATIONNAME = "";
135168
TargetAttributes = {
136169
97C146ED1CF9000F007C117D = {
@@ -148,6 +181,9 @@
148181
Base,
149182
);
150183
mainGroup = 97C146E51CF9000F007C117D;
184+
packageReferences = (
185+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
186+
);
151187
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
152188
projectDirPath = "";
153189
projectRoot = "";
@@ -172,6 +208,28 @@
172208
/* End PBXResourcesBuildPhase section */
173209

174210
/* Begin PBXShellScriptBuildPhase section */
211+
11874A3E3724772837B0A747 /* [CP] Check Pods Manifest.lock */ = {
212+
isa = PBXShellScriptBuildPhase;
213+
buildActionMask = 2147483647;
214+
files = (
215+
);
216+
inputFileListPaths = (
217+
);
218+
inputPaths = (
219+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
220+
"${PODS_ROOT}/Manifest.lock",
221+
);
222+
name = "[CP] Check Pods Manifest.lock";
223+
outputFileListPaths = (
224+
);
225+
outputPaths = (
226+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
227+
);
228+
runOnlyForDeploymentPostprocessing = 0;
229+
shellPath = /bin/sh;
230+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
231+
showEnvVarsInLog = 0;
232+
};
175233
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
176234
isa = PBXShellScriptBuildPhase;
177235
alwaysOutOfDate = 1;
@@ -279,7 +337,7 @@
279337
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
280338
GCC_WARN_UNUSED_FUNCTION = YES;
281339
GCC_WARN_UNUSED_VARIABLE = YES;
282-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
340+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
283341
MTL_ENABLE_DEBUG_INFO = NO;
284342
SDKROOT = iphoneos;
285343
SUPPORTED_PLATFORMS = iphoneos;
@@ -356,7 +414,7 @@
356414
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
357415
GCC_WARN_UNUSED_FUNCTION = YES;
358416
GCC_WARN_UNUSED_VARIABLE = YES;
359-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
417+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
360418
MTL_ENABLE_DEBUG_INFO = YES;
361419
ONLY_ACTIVE_ARCH = YES;
362420
SDKROOT = iphoneos;
@@ -405,7 +463,7 @@
405463
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
406464
GCC_WARN_UNUSED_FUNCTION = YES;
407465
GCC_WARN_UNUSED_VARIABLE = YES;
408-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
466+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
409467
MTL_ENABLE_DEBUG_INFO = NO;
410468
SDKROOT = iphoneos;
411469
SUPPORTED_PLATFORMS = iphoneos;
@@ -483,6 +541,20 @@
483541
defaultConfigurationName = Release;
484542
};
485543
/* End XCConfigurationList section */
544+
545+
/* Begin XCLocalSwiftPackageReference section */
546+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
547+
isa = XCLocalSwiftPackageReference;
548+
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
549+
};
550+
/* End XCLocalSwiftPackageReference section */
551+
552+
/* Begin XCSwiftPackageProductDependency section */
553+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
554+
isa = XCSwiftPackageProductDependency;
555+
productName = FlutterGeneratedPluginSwiftPackage;
556+
};
557+
/* End XCSwiftPackageProductDependency section */
486558
};
487559
rootObject = 97C146E61CF9000F007C117D /* Project object */;
488560
}

packages/pigeon/example/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1300"
3+
LastUpgradeVersion = "1510"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<PreActions>
9+
<ExecutionAction
10+
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
11+
<ActionContent
12+
title = "Run Prepare Flutter Framework Script"
13+
scriptText = "/bin/sh &quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
14+
<EnvironmentBuildable>
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
18+
BuildableName = "Runner.app"
19+
BlueprintName = "Runner"
20+
ReferencedContainer = "container:Runner.xcodeproj">
21+
</BuildableReference>
22+
</EnvironmentBuildable>
23+
</ActionContent>
24+
</ExecutionAction>
25+
</PreActions>
826
<BuildActionEntries>
927
<BuildActionEntry
1028
buildForTesting = "YES"
@@ -59,6 +77,7 @@
5977
ignoresPersistentStateOnLaunch = "NO"
6078
debugDocumentVersioning = "YES"
6179
debugServiceExtension = "internal"
80+
enableGPUValidationMode = "1"
6281
allowLocationSimulation = "YES">
6382
<BuildableProductRunnable
6483
runnableDebuggingMode = "0">

packages/pigeon/example/app/ios/Runner.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/pigeon/example/app/macos/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
isa = PBXProject;
206206
attributes = {
207207
LastSwiftUpdateCheck = 0920;
208-
LastUpgradeCheck = 1300;
208+
LastUpgradeCheck = 1510;
209209
ORGANIZATIONNAME = "";
210210
TargetAttributes = {
211211
33CC10EC2044A3C60003C045 = {

packages/pigeon/example/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1300"
3+
LastUpgradeVersion = "1510"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -59,6 +59,7 @@
5959
ignoresPersistentStateOnLaunch = "NO"
6060
debugDocumentVersioning = "YES"
6161
debugServiceExtension = "internal"
62+
enableGPUValidationMode = "1"
6263
allowLocationSimulation = "YES">
6364
<BuildableProductRunnable
6465
runnableDebuggingMode = "0">

0 commit comments

Comments
 (0)