Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/abtesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
target: [ios, tvos, macos]
target: [ios, tvos, macos, watchos]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/remoteconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

strategy:
matrix:
target: [ios, tvos, macos]
target: [ios, tvos, macos, watchos]
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
Expand Down
3 changes: 3 additions & 0 deletions Example/watchOSSample/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ target 'SampleWatchAppWatchKitExtension' do
pod 'FirebaseCoreDiagnostics', :path => '../../'
pod 'FirebaseInstallations', :path => '../../'
pod 'FirebaseStorage', :path => '../../'
pod 'FirebaseRemoteConfig', :path => '../../'
pod 'FirebaseABTesting', :path => '../../'


end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import WatchKit

import FirebaseCore
import FirebaseMessaging
import FirebaseRemoteConfig

/// Entry point of the watch app.
class ExtensionDelegate: NSObject, WKExtensionDelegate, MessagingDelegate {
Expand All @@ -29,17 +30,25 @@ class ExtensionDelegate: NSObject, WKExtensionDelegate, MessagingDelegate {
}
}
Messaging.messaging().delegate = self
let remoteConfig = RemoteConfig.remoteConfig()
remoteConfig.fetchAndActivate { status, error in
guard error == nil else {
print("error:" + error.debugDescription)
return
}
print("value:\n" + remoteConfig["test"].stringValue!)
}
}

/// MessagingDelegate
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String) {
print("token:\n" + fcmToken)
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
print("token:\n" + fcmToken!)
Messaging.messaging().subscribe(toTopic: "watch") { error in
if error != nil {
guard error == nil else {
print("error:" + error.debugDescription)
} else {
print("Successfully subscribed to topic")
return
}
print("Successfully subscribed to topic")
}
}

Expand Down
2 changes: 2 additions & 0 deletions FirebaseABTesting.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Firebase Cloud Messaging and Firebase Remote Config in your app.
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '6.0'

s.cocoapods_version = '>= 1.4.0'
s.prefix_header_file = false
Expand All @@ -44,6 +45,7 @@ Firebase Cloud Messaging and Firebase Remote Config in your app.

s.test_spec 'unit' do |unit_tests|
unit_tests.scheme = { :code_coverage => true }
unit_tests.platforms = {:ios => '10.0', :osx => '10.12', :tvos => '10.0'}
unit_tests.source_files = 'FirebaseABTesting/Tests/Unit/**/*.[mh]'
unit_tests.resources = 'FirebaseABTesting/Tests/Unit/Resources/*.txt'
unit_tests.requires_app_host = true
Expand Down
3 changes: 3 additions & 0 deletions FirebaseABTesting/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# unreleased
- [added] Added community support for watchOS. (#7481)

# v7.0.0
- [removed] Removed `FIRExperimentController.updateExperiments(serviceOrigin:events:policy:lastStartTime:payloads:)`, which was deprecated. (#6543)

Expand Down
1 change: 1 addition & 0 deletions FirebaseRemoteConfig.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ app update.
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '6.0'

s.cocoapods_version = '>= 1.4.0'
s.prefix_header_file = false
Expand Down
3 changes: 3 additions & 0 deletions FirebaseRemoteConfig/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# unreleased
- [added] Added community support for watchOS. (#7481)

# v7.6.0
- [fixed] Fixed build warnings introduced with Xcode 12.5. (#7432)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,15 @@ macOS/tvOS/watchOS/Catalyst.
To install, add a subset of the following to the Podfile:

```
pod 'Firebase/ABTesting' # No watchOS support yet
pod 'Firebase/ABTesting'
pod 'Firebase/Auth' # Limited watchOS support
pod 'Firebase/Crashlytics'
pod 'Firebase/Database' # No watchOS support yet
pod 'Firebase/Firestore' # No watchOS support yet
pod 'Firebase/Functions' # No watchOS support yet
pod 'Firebase/Messaging'
pod 'Firebase/Performance' # No macOS, tvOS, watchOS, and Catalyst support yet
pod 'Firebase/RemoteConfig' # No watchOS support yet
pod 'Firebase/RemoteConfig'
pod 'Firebase/Storage'
```

Expand Down