Skip to content

Commit 59cb44b

Browse files
authored
Fix Analytics SwiftPM platform availability. (#9032)
* Fix Analytics SwiftPM platform availability. For some reason this still works in a project, but Xcode gets confused and doesn't autocomplete the module appropriately. This should fix it for tvOS and macOS. Also cleaned up a few references to Analytics only being available on iOS. * Clearer comment about availability * Changelog * Review changes * Added a missing word in CHANGELOG
1 parent a2320db commit 59cb44b

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

.github/workflows/spm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
strategy:
5252
matrix:
5353
target: [tvOS, macOS, catalyst]
54-
# Full set of Firebase-Package tests only run on iOS because of Analytics.
54+
# Full set of Firebase-Package tests only run on iOS.
5555
steps:
5656
- uses: actions/checkout@v2
5757
- name: Initialize xcodebuild

FirebaseCore/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Firebase 8.10.1
2+
- [fixed] Fixed platform availability checks in Swift Package Manager that may prevent code
3+
completion for Analytics APIs on macOS and tvOS. (#9032)
4+
15
# Firebase 8.10.0
26
- [added] Firebase now includes community supported Combine publishers. More details can be found
37
[here](https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseCombineSwift/README.md). (#7295)

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ let package = Package(
268268
.target(
269269
name: "FirebaseAnalyticsTarget",
270270
dependencies: [.target(name: "FirebaseAnalyticsWrapper",
271-
condition: .when(platforms: [.iOS]))],
271+
condition: .when(platforms: [.iOS, .macOS, .tvOS]))],
272272
path: "SwiftPM-PlatformExclude/FirebaseAnalyticsWrap"
273273
),
274274

SwiftPackageManager.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ Prior to version 8.0.0 (starting with version 6.31.0) support was in Beta.
1515

1616
## Limitations
1717

18-
- Analytics is only supported for iOS and cannot be used in apps that support other platforms.
19-
- watchOS support is available for ABTesting, Auth, Crashlytics, Messaging, Realtime Database,
20-
RemoteConfig, and Storage.
18+
- Product availability varies by platform. See [the chart on this page](https://firebase.google.com/docs/ios/learn-more#firebase_library_support_by_platform)
19+
for information on product availabilty for each platform.
2120

2221
## Installation
2322

@@ -36,7 +35,7 @@ Search for the Firebase Apple SDK using the repo's URL:
3635
https://github.com/firebase/firebase-ios-sdk.git
3736
```
3837

39-
Next, set the **Dependency Rule** to be `Up to Next Major Version` and specify `8.0.0` as the lower bound.
38+
Next, set the **Dependency Rule** to be `Up to Next Major Version` and specify `8.10.0` as the lower bound.
4039

4140
Then, select **Add Package**.
4241

@@ -81,7 +80,7 @@ dependencies: [
8180
.package(
8281
name: "Firebase",
8382
url: "https://github.com/firebase/firebase-ios-sdk.git",
84-
.upToNextMajor(from: "8.0.0")
83+
.upToNextMajor(from: "8.10.0")
8584
),
8685

8786
// Any other dependencies you have...

0 commit comments

Comments
 (0)