Skip to content

Commit fa0bd95

Browse files
committed
enable Swift Package Manager for the example
1 parent 137466e commit fa0bd95

File tree

5 files changed

+44
-1
lines changed

5 files changed

+44
-1
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ unlinked_spec.ds
104104
**/macos/Flutter/GeneratedPluginRegistrant.swift
105105
**/macos/Flutter/ephemeral
106106

107+
# Swift Package Manager related
108+
.build/
109+
.swiftpm/
110+
107111
# Coverage
108112
coverage/
109113

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Improvements:
1818
* Update the bundled MLKit model for Android to version `17.3.0`.
1919
* Added documentation in places where it was missing.
2020
* Added `color` and `style` properties to the `BarcodePainter` widget.
21+
* Enabled Swift Package Manager for the example app.
2122

2223
## 7.0.0-beta.3
2324

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
1717
A277671F4E603C31E191FCBF /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB50C06655B1959BAA8EAF64 /* Pods_Runner.framework */; };
1818
F8C489EFA0FC3A131EBA1838 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F20A7A668B7797BBB5443C1 /* Pods_RunnerTests.framework */; };
19+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
1920
/* End PBXBuildFile section */
2021

2122
/* Begin PBXContainerItemProxy section */
@@ -80,6 +81,7 @@
8081
isa = PBXFrameworksBuildPhase;
8182
buildActionMask = 2147483647;
8283
files = (
84+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
8385
A277671F4E603C31E191FCBF /* Pods_Runner.framework in Frameworks */,
8486
);
8587
runOnlyForDeploymentPostprocessing = 0;
@@ -187,6 +189,9 @@
187189
productType = "com.apple.product-type.bundle.unit-test";
188190
};
189191
97C146ED1CF9000F007C117D /* Runner */ = {
192+
packageProductDependencies = (
193+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
194+
);
190195
isa = PBXNativeTarget;
191196
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
192197
buildPhases = (
@@ -212,6 +217,9 @@
212217

213218
/* Begin PBXProject section */
214219
97C146E61CF9000F007C117D /* Project object */ = {
220+
packageReferences = (
221+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
222+
);
215223
isa = PBXProject;
216224
attributes = {
217225
BuildIndependentTargetsInParallel = YES;
@@ -728,6 +736,18 @@
728736
defaultConfigurationName = Release;
729737
};
730738
/* End XCConfigurationList section */
739+
/* Begin XCLocalSwiftPackageReference section */
740+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
741+
isa = XCLocalSwiftPackageReference;
742+
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
743+
};
744+
/* End XCLocalSwiftPackageReference section */
745+
/* Begin XCSwiftPackageProductDependency section */
746+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
747+
isa = XCSwiftPackageProductDependency;
748+
productName = FlutterGeneratedPluginSwiftPackage;
749+
};
750+
/* End XCSwiftPackageProductDependency section */
731751
};
732752
rootObject = 97C146E61CF9000F007C117D /* Project object */;
733753
}

example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@
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"

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ version: 0.0.1
77

88
environment:
99
sdk: ">=3.3.0 <4.0.0"
10-
flutter: ">=3.19.0"
10+
flutter: ">=3.27.0"
1111

1212
# Dependencies specify other packages that your package needs in order to work.
1313
# To automatically upgrade your package dependencies to the latest versions

0 commit comments

Comments
 (0)