Skip to content

Commit 83f4dad

Browse files
fix(core, ios): ensure iOS SDK version can be found from Package.swift (#13804)
1 parent ae0197f commit 83f4dad

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

.github/workflows/all_plugins.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
"flutter build web"
125125
swift-integration:
126126
runs-on: macos-latest
127-
timeout-minutes: 10
127+
timeout-minutes: 30
128128
steps:
129129
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
130130
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225
@@ -135,10 +135,10 @@ jobs:
135135
with:
136136
melos-version: '5.3.0'
137137
- name: 'Swift Integration Setup'
138-
run: flutter config --enable-swift-package-manager
138+
run: flutter config --enable-swift-package-manager
139139
- name: 'Build Apps with Swift Package Manager'
140140
run: ./.github/workflows/scripts/swift-integration.sh
141-
141+
142142
test:
143143
runs-on: ubuntu-latest
144144
timeout-minutes: 30

packages/firebase_core/firebase_core/ios/firebase_core/Package.swift

+8-7
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@ enum ConfigurationError: Error {
1414
case invalidFormat(String)
1515
}
1616

17-
let iosRootDirectory = String(URL(string: #file)!.deletingLastPathComponent().absoluteString
17+
let firebaseCoreDirectory = String(URL(string: #file)!.deletingLastPathComponent().absoluteString
1818
.dropLast())
1919

2020
func loadPubspecVersion() throws -> String {
21-
let pubspecPath = NSString.path(withComponents: [iosRootDirectory, "..", "..", "pubspec.yaml"])
21+
let pubspecPath = NSString.path(withComponents: [
22+
firebaseCoreDirectory,
23+
"..",
24+
"..",
25+
"pubspec.yaml",
26+
])
2227
do {
2328
let yamlString = try String(contentsOfFile: pubspecPath, encoding: .utf8)
2429
if let versionLine = yamlString.split(separator: "\n")
@@ -35,12 +40,8 @@ func loadPubspecVersion() throws -> String {
3540

3641
func loadFirebaseSDKVersion() throws -> String {
3742
let firebaseCoreScriptPath = NSString.path(withComponents: [
38-
iosRootDirectory,
39-
"..",
40-
"..",
43+
firebaseCoreDirectory,
4144
"..",
42-
"firebase_core",
43-
"ios",
4445
"firebase_sdk_version.rb",
4546
])
4647
do {

0 commit comments

Comments
 (0)