Skip to content

Commit b5993ae

Browse files
feat(storage): Swift Package Manager support (#16782)
1 parent 69abbe1 commit b5993ae

39 files changed

+402
-146
lines changed

.github/workflows/all_plugins.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
runs-on: macos-latest
127127
timeout-minutes: 30
128128
env:
129-
FLUTTER_DEPENDENCIES: "cloud_firestore firebase_remote_config cloud_functions firebase_database firebase_auth"
129+
FLUTTER_DEPENDENCIES: "cloud_firestore firebase_remote_config cloud_functions firebase_database firebase_auth firebase_storage"
130130
steps:
131131
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
132132
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225

packages/firebase_storage/firebase_storage/example/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214

1315
# IntelliJ related

packages/firebase_storage/firebase_storage/example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
<string>arm64</string>
2626
</array>
2727
<key>MinimumOSVersion</key>
28-
<string>11.0</string>
28+
<string>12.0</string>
2929
</dict>
3030
</plist>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
12
#include "Generated.xcconfig"
2-
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
12
#include "Generated.xcconfig"
2-
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"

packages/firebase_storage/firebase_storage/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 48 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
3844E91937B60ECC8231C3C9 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B87F8A9D34F2EDB6C0C3EC13 /* Pods_Runner.framework */; };
1011
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1112
5C6F5A711EC3CCCC008D64B5 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C6F5A701EC3CCCC008D64B5 /* GeneratedPluginRegistrant.m */; };
13+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
1214
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
1315
9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
1416
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
@@ -17,7 +19,6 @@
1719
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1820
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
1921
D2E2163194A154ACEE1A71C3 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = FFBFFC26A733835824F4674E /* GoogleService-Info.plist */; };
20-
DC8567D018F2AE94D675A78A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF094A0DADA46ACC57C9DE50 /* Pods_Runner.framework */; };
2122
/* End PBXBuildFile section */
2223

2324
/* Begin PBXCopyFilesBuildPhase section */
@@ -34,13 +35,15 @@
3435
/* End PBXCopyFilesBuildPhase section */
3536

3637
/* Begin PBXFileReference section */
38+
02CA5B04FD87E7B77B3477E2 /* 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>"; };
3739
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3840
5C6F5A6F1EC3CCCC008D64B5 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
3941
5C6F5A701EC3CCCC008D64B5 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
4042
7A1ECC901E8EDB6900309407 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
4143
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
4244
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
4345
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
46+
7D3FF503ADD31142011A1271 /* 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>"; };
4447
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
4548
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
4649
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -49,9 +52,7 @@
4952
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
5053
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
5154
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
52-
A544987EA824B5BDFE9E1325 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
53-
CF1EFF132203BF1EA356DADD /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
54-
FF094A0DADA46ACC57C9DE50 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
55+
B87F8A9D34F2EDB6C0C3EC13 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5556
FFBFFC26A733835824F4674E /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
5657
/* End PBXFileReference section */
5758

@@ -60,22 +61,14 @@
6061
isa = PBXFrameworksBuildPhase;
6162
buildActionMask = 2147483647;
6263
files = (
63-
DC8567D018F2AE94D675A78A /* Pods_Runner.framework in Frameworks */,
64+
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
65+
3844E91937B60ECC8231C3C9 /* Pods_Runner.framework in Frameworks */,
6466
);
6567
runOnlyForDeploymentPostprocessing = 0;
6668
};
6769
/* End PBXFrameworksBuildPhase section */
6870

6971
/* Begin PBXGroup section */
70-
840012C8B5EDBCF56B0E4AC1 /* Pods */ = {
71-
isa = PBXGroup;
72-
children = (
73-
A544987EA824B5BDFE9E1325 /* Pods-Runner.debug.xcconfig */,
74-
CF1EFF132203BF1EA356DADD /* Pods-Runner.release.xcconfig */,
75-
);
76-
name = Pods;
77-
sourceTree = "<group>";
78-
};
7972
9740EEB11CF90186004384FC /* Flutter */ = {
8073
isa = PBXGroup;
8174
children = (
@@ -93,9 +86,9 @@
9386
9740EEB11CF90186004384FC /* Flutter */,
9487
97C146F01CF9000F007C117D /* Runner */,
9588
97C146EF1CF9000F007C117D /* Products */,
96-
840012C8B5EDBCF56B0E4AC1 /* Pods */,
97-
CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
9889
FFBFFC26A733835824F4674E /* GoogleService-Info.plist */,
90+
E6FBE2EBD3E88C317FEF8092 /* Pods */,
91+
E437F81FDC10E2D0A1D19577 /* Frameworks */,
9992
);
10093
sourceTree = "<group>";
10194
};
@@ -132,35 +125,47 @@
132125
name = "Supporting Files";
133126
sourceTree = "<group>";
134127
};
135-
CF3B75C9A7D2FA2A4C99F110 /* Frameworks */ = {
128+
E437F81FDC10E2D0A1D19577 /* Frameworks */ = {
136129
isa = PBXGroup;
137130
children = (
138-
FF094A0DADA46ACC57C9DE50 /* Pods_Runner.framework */,
131+
B87F8A9D34F2EDB6C0C3EC13 /* Pods_Runner.framework */,
139132
);
140133
name = Frameworks;
141134
sourceTree = "<group>";
142135
};
136+
E6FBE2EBD3E88C317FEF8092 /* Pods */ = {
137+
isa = PBXGroup;
138+
children = (
139+
02CA5B04FD87E7B77B3477E2 /* Pods-Runner.debug.xcconfig */,
140+
7D3FF503ADD31142011A1271 /* Pods-Runner.release.xcconfig */,
141+
);
142+
name = Pods;
143+
path = Pods;
144+
sourceTree = "<group>";
145+
};
143146
/* End PBXGroup section */
144147

145148
/* Begin PBXNativeTarget section */
146149
97C146ED1CF9000F007C117D /* Runner */ = {
147150
isa = PBXNativeTarget;
148151
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
149152
buildPhases = (
150-
AB1344B0443C71CD721E1BB7 /* [CP] Check Pods Manifest.lock */,
153+
D8B88DC4DEDF810D55026CB6 /* [CP] Check Pods Manifest.lock */,
151154
9740EEB61CF901F6004384FC /* Run Script */,
152155
97C146EA1CF9000F007C117D /* Sources */,
153156
97C146EB1CF9000F007C117D /* Frameworks */,
154157
97C146EC1CF9000F007C117D /* Resources */,
155158
9705A1C41CF9048500538489 /* Embed Frameworks */,
156159
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
157-
55A75A6240F30C84619A3681 /* [CP] Embed Pods Frameworks */,
158160
);
159161
buildRules = (
160162
);
161163
dependencies = (
162164
);
163165
name = Runner;
166+
packageProductDependencies = (
167+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
168+
);
164169
productName = Runner;
165170
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
166171
productType = "com.apple.product-type.application";
@@ -171,7 +176,7 @@
171176
97C146E61CF9000F007C117D /* Project object */ = {
172177
isa = PBXProject;
173178
attributes = {
174-
LastUpgradeCheck = 1430;
179+
LastUpgradeCheck = 1510;
175180
ORGANIZATIONNAME = "The Chromium Authors";
176181
TargetAttributes = {
177182
97C146ED1CF9000F007C117D = {
@@ -189,6 +194,9 @@
189194
Base,
190195
);
191196
mainGroup = 97C146E51CF9000F007C117D;
197+
packageReferences = (
198+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
199+
);
192200
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
193201
projectDirPath = "";
194202
projectRoot = "";
@@ -232,42 +240,6 @@
232240
shellPath = /bin/sh;
233241
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
234242
};
235-
55A75A6240F30C84619A3681 /* [CP] Embed Pods Frameworks */ = {
236-
isa = PBXShellScriptBuildPhase;
237-
buildActionMask = 2147483647;
238-
files = (
239-
);
240-
inputPaths = (
241-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
242-
"${BUILT_PRODUCTS_DIR}/FirebaseAppCheckInterop/FirebaseAppCheckInterop.framework",
243-
"${BUILT_PRODUCTS_DIR}/FirebaseAuthInterop/FirebaseAuthInterop.framework",
244-
"${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework",
245-
"${BUILT_PRODUCTS_DIR}/FirebaseCoreExtension/FirebaseCoreExtension.framework",
246-
"${BUILT_PRODUCTS_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.framework",
247-
"${BUILT_PRODUCTS_DIR}/FirebaseStorage/FirebaseStorage.framework",
248-
"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
249-
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
250-
"${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework",
251-
"${BUILT_PRODUCTS_DIR}/image_picker_ios/image_picker_ios.framework",
252-
);
253-
name = "[CP] Embed Pods Frameworks";
254-
outputPaths = (
255-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseAppCheckInterop.framework",
256-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseAuthInterop.framework",
257-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework",
258-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreExtension.framework",
259-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreInternal.framework",
260-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseStorage.framework",
261-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
262-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
263-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework",
264-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker_ios.framework",
265-
);
266-
runOnlyForDeploymentPostprocessing = 0;
267-
shellPath = /bin/sh;
268-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
269-
showEnvVarsInLog = 0;
270-
};
271243
9740EEB61CF901F6004384FC /* Run Script */ = {
272244
isa = PBXShellScriptBuildPhase;
273245
alwaysOutOfDate = 1;
@@ -283,16 +255,20 @@
283255
shellPath = /bin/sh;
284256
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
285257
};
286-
AB1344B0443C71CD721E1BB7 /* [CP] Check Pods Manifest.lock */ = {
258+
D8B88DC4DEDF810D55026CB6 /* [CP] Check Pods Manifest.lock */ = {
287259
isa = PBXShellScriptBuildPhase;
288260
buildActionMask = 2147483647;
289261
files = (
290262
);
263+
inputFileListPaths = (
264+
);
291265
inputPaths = (
292266
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
293267
"${PODS_ROOT}/Manifest.lock",
294268
);
295269
name = "[CP] Check Pods Manifest.lock";
270+
outputFileListPaths = (
271+
);
296272
outputPaths = (
297273
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
298274
);
@@ -496,6 +472,20 @@
496472
defaultConfigurationName = Release;
497473
};
498474
/* End XCConfigurationList section */
475+
476+
/* Begin XCLocalSwiftPackageReference section */
477+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
478+
isa = XCLocalSwiftPackageReference;
479+
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
480+
};
481+
/* End XCLocalSwiftPackageReference section */
482+
483+
/* Begin XCSwiftPackageProductDependency section */
484+
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
485+
isa = XCSwiftPackageProductDependency;
486+
productName = FlutterGeneratedPluginSwiftPackage;
487+
};
488+
/* End XCSwiftPackageProductDependency section */
499489
};
500490
rootObject = 97C146E61CF9000F007C117D /* Project object */;
501491
}

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

Lines changed: 19 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 = "1430"
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"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
22
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
22
#include "ephemeral/Flutter-Generated.xcconfig"

0 commit comments

Comments
 (0)