Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
37 changes: 33 additions & 4 deletions packages/cloud_firestore_tvos/.pubignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Local-development dependency overrides — resolve firebase_core_tvos from the
# sibling package before it is published. Committed so a fresh checkout builds,
# but excluded from the published package (consumers get the hosted `^0.0.1`
# constraint from pubspec.yaml).
# A .pubignore replaces this directory's .gitignore for `dart pub publish`, so
# the .gitignore rules are repeated below.
#
# pubspec_overrides.yaml (here and in example/) points firebase_core_tvos at the
# sibling package until firebase_core_tvos 0.0.4 is on pub.dev. It is for the
# repo's CI only and must not ship.
pubspec_overrides.yaml

# Dart / Flutter
.dart_tool/
build/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub/

# CocoaPods
tvos/Pods/
tvos/Podfile.lock
tvos/.symlinks/
tvos/Flutter/Flutter.framework
tvos/Flutter/Flutter.podspec

# Xcode / SwiftPM (per-user, generated when tvos/Package.swift is opened)
**/.swiftpm/
**/xcuserdata/

# IDE
.idea/
.vscode/
*.iml

# macOS
.DS_Store
15 changes: 15 additions & 0 deletions packages/cloud_firestore_tvos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## 0.0.2

* Add Swift Package Manager support: ships `tvos/Package.swift` (one Objective-C
target, with `firebase_core_tvos` as the sibling package
`../firebase_core_tvos`). flutter-tvos links a plugin that ships
`tvos/Package.swift` through Swift Package Manager and leaves it out of the
Podfile.
* Requires `firebase_core_tvos: ^0.0.4`, the first version with a
`tvos/Package.swift`. firebase_core_tvos 0.0.4 is no longer in the Podfile, so
this package's podspec could not resolve its `firebase_core_tvos` dependency.
* Imports firebase_core_tvos's headers as `<firebase_core/...>` when
`<firebase_core_tvos/...>` (the CocoaPods layout) is not there.
* `LIBRARY_VERSION` (podspec and Package.swift) now matches the package version.
It said 0.0.1.

## 0.0.1

* Initial tvOS scaffolding generated by `flutter-tvos plugin port` from
Expand Down
14 changes: 13 additions & 1 deletion packages/cloud_firestore_tvos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ it:
```yaml
dependencies:
cloud_firestore: ^6.6.0
cloud_firestore_tvos: ^0.0.1
cloud_firestore_tvos: ^0.0.2
```

The native plugin registers automatically through flutter-tvos' plugin
Expand Down Expand Up @@ -46,6 +46,18 @@ Firestore features are disabled here:
- Apple TV running tvOS 15.0 or later (the Firebase Apple SDK's minimum).
- `firebase_core_tvos` (pulled in automatically).

## Swift Package Manager

This package ships a `tvos/Package.swift`. flutter-tvos links a plugin that
ships `tvos/Package.swift` through Swift Package Manager and leaves it out of
the Podfile. No manual setup is needed. It depends on `firebase_core_tvos`
0.0.4, which ships one too, and takes firebase-ios-sdk `~> 12.15.0`, as in the
podspec.

Needs flutter-tvos 1.3.0 or later, the first release that links plugins through
SwiftPM, places them side by side (so `../firebase_core_tvos` and
`../FlutterFramework` resolve) and leaves them out of the Podfile.

## License

fluttertv, under a BSD-3-Clause license. See `LICENSE` for the full text.
9 changes: 5 additions & 4 deletions packages/cloud_firestore_tvos/example/pubspec_overrides.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Local development override for the example app. Forces firebase_core_tvos
# to the sibling package so the example resolves against the plugin's hosted
# `^0.0.1` constraint before that package is published. Gitignored; examples
# are not published. Remove once firebase_core_tvos 0.0.1 is on pub.dev.
# Resolves firebase_core_tvos from the sibling package in this monorepo, so the
# repo's CI (`flutter pub get`, `dart analyze`) resolves this example against
# the in-repo firebase_core_tvos 0.0.4 until that version is on pub.dev. Delete
# this file once firebase_core_tvos 0.0.4 is published. The package's
# .pubignore keeps it out of the published archive.
dependency_overrides:
firebase_core_tvos:
path: ../../firebase_core_tvos
6 changes: 4 additions & 2 deletions packages/cloud_firestore_tvos/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: cloud_firestore_tvos
description: >-
tvOS (Apple TV) implementation of the cloud_firestore Flutter plugin,
bringing Cloud Firestore to Apple TV apps via the flutter-tvos toolchain.
version: 0.0.1
version: 0.0.2
homepage: https://fluttertv.dev
repository: https://github.com/fluttertv/plugins/tree/main/packages/cloud_firestore_tvos
issue_tracker: https://github.com/fluttertv/plugins/issues
Expand All @@ -24,7 +24,9 @@ dependencies:
# against locally instead of failing over to upstream's iOS-only pod.
# Hosted constraint for pub.dev (path deps can't be published); local
# development resolves it via pubspec_overrides.yaml until it's published.
firebase_core_tvos: ^0.0.1
# ^0.0.4 (0.0.4 exactly): the first firebase_core_tvos with a
# tvos/Package.swift, which tvos/Package.swift here needs as a sibling.
firebase_core_tvos: ^0.0.4

dev_dependencies:
flutter_lints: ^4.0.0
Expand Down
11 changes: 6 additions & 5 deletions packages/cloud_firestore_tvos/pubspec_overrides.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Local development override. firebase_core_tvos is not yet on pub.dev, so
# resolve it from the sibling package in this monorepo for `flutter pub get`,
# `flutter test`, and `flutter analyze`. Gitignored and excluded from the
# published package — the pubspec.yaml hosted `firebase_core_tvos: ^0.0.1`
# constraint is what consumers get. Becomes a no-op once it is published.
# Resolves firebase_core_tvos from the sibling package in this monorepo, so the
# repo's CI (`flutter pub get`, `dart analyze`) resolves this package against
# the in-repo firebase_core_tvos 0.0.4 until that version is on pub.dev. Delete
# this file once firebase_core_tvos 0.0.4 is published. `dart pub publish`
# leaves it out of the archive, so consumers get the hosted constraint from
# pubspec.yaml.
dependency_overrides:
firebase_core_tvos:
path: ../firebase_core_tvos
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
@import FirebaseFirestore;
#if __has_include(<firebase_core_tvos/FLTFirebasePluginRegistry.h>)
#import <firebase_core_tvos/FLTFirebasePluginRegistry.h>
#elif __has_include(<firebase_core/FLTFirebasePluginRegistry.h>) // SwiftPM
#import <firebase_core/FLTFirebasePluginRegistry.h>
#else
#import "FLTFirebasePluginRegistry.h"
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
@import FirebaseFirestore;
#if __has_include(<firebase_core_tvos/FLTFirebasePluginRegistry.h>)
#import <firebase_core_tvos/FLTFirebasePluginRegistry.h>
#elif __has_include(<firebase_core/FLTFirebasePluginRegistry.h>) // SwiftPM
#import <firebase_core/FLTFirebasePluginRegistry.h>
#else
#import "FLTFirebasePluginRegistry.h"
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#if __has_include(<firebase_core_tvos/FLTFirebasePlugin.h>)
#import <firebase_core_tvos/FLTFirebasePlugin.h>
#elif __has_include(<firebase_core/FLTFirebasePlugin.h>) // SwiftPM
#import <firebase_core/FLTFirebasePlugin.h>
#else
#import "FLTFirebasePlugin.h"
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
@import FirebaseFirestore;
#if __has_include(<firebase_core_tvos/FLTFirebasePluginRegistry.h>)
#import <firebase_core_tvos/FLTFirebasePluginRegistry.h>
#elif __has_include(<firebase_core/FLTFirebasePluginRegistry.h>) // SwiftPM
#import <firebase_core/FLTFirebasePluginRegistry.h>
#else
#import "FLTFirebasePluginRegistry.h"
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
@import FirebaseFirestore;
#if __has_include(<firebase_core_tvos/FLTFirebasePluginRegistry.h>)
#import <firebase_core_tvos/FLTFirebasePluginRegistry.h>
#elif __has_include(<firebase_core/FLTFirebasePluginRegistry.h>) // SwiftPM
#import <firebase_core/FLTFirebasePluginRegistry.h>
#else
#import "FLTFirebasePluginRegistry.h"
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
@import FirebaseFirestore;
#if __has_include(<firebase_core_tvos/FLTFirebasePluginRegistry.h>)
#import <firebase_core_tvos/FLTFirebasePluginRegistry.h>
#elif __has_include(<firebase_core/FLTFirebasePluginRegistry.h>) // SwiftPM
#import <firebase_core/FLTFirebasePluginRegistry.h>
#else
#import "FLTFirebasePluginRegistry.h"
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#import <Foundation/Foundation.h>
#if __has_include(<firebase_core_tvos/FLTFirebasePlugin.h>)
#import <firebase_core_tvos/FLTFirebasePlugin.h>
#elif __has_include(<firebase_core/FLTFirebasePlugin.h>) // SwiftPM
#import <firebase_core/FLTFirebasePlugin.h>
#else
#import "FLTFirebasePlugin.h"
#endif
Expand Down
53 changes: 53 additions & 0 deletions packages/cloud_firestore_tvos/tvos/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// swift-tools-version: 5.9
// Lets the package be consumed via Swift Package Manager. The target reuses
// the same `Classes/` sources the CocoaPods podspec compiles, so both
// dependency managers stay in sync from a single source tree.
import PackageDescription

// Keep in step with `version:` in pubspec.yaml and `s.version` in the podspec.
let libraryVersion = "0.0.2"

let package = Package(
name: "cloud_firestore_tvos",
platforms: [
// Firebase 12.x requires tvOS 15.0, as in the podspec.
.tvOS("15.0"),
],
products: [
.library(name: "cloud-firestore-tvos", targets: ["cloud_firestore_tvos"]),
],
dependencies: [
// The podspecs' `~> 12.15.0`. Every tvOS FlutterFire port declares this
// same range, so an app resolves one firebase-ios-sdk for all of them.
.package(url: "https://github.com/firebase/firebase-ios-sdk", .upToNextMinor(from: "12.15.0")),
// FlutterFire's shared plugin registry. flutter-tvos places every SwiftPM
// plugin side by side, so the sibling path resolves like FlutterFramework.
// FirebaseCore comes in through it, from the same firebase-ios-sdk.
.package(name: "firebase_core_tvos", path: "../firebase_core_tvos"),
// Lets the target import Flutter. flutter-tvos generates a FlutterFramework
// package as a sibling of this package under the app's ephemeral SwiftPM
// packages, so `../FlutterFramework` resolves at build time.
.package(name: "FlutterFramework", path: "../FlutterFramework"),
],
targets: [
// All Objective-C, so one target (SwiftPM cannot mix languages in one).
.target(
name: "cloud_firestore_tvos",
dependencies: [
// The podspec's Firebase/Firestore subspec.
.product(name: "FirebaseFirestore", package: "firebase-ios-sdk"),
.product(name: "firebase-core-tvos", package: "firebase_core_tvos"),
.product(name: "FlutterFramework", package: "FlutterFramework"),
],
path: "Classes",
publicHeadersPath: "include/cloud_firestore/Public",
cSettings: [
.headerSearchPath("include/cloud_firestore/Private"),
.headerSearchPath("include/cloud_firestore/Public"),
// The podspec's GCC_PREPROCESSOR_DEFINITIONS.
.define("LIBRARY_VERSION", to: "\"\(libraryVersion)\""),
.define("LIBRARY_NAME", to: "\"flutter-fire-fst-tvos\""),
]
),
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
Pod::Spec.new do |s|
s.name = 'cloud_firestore_tvos'
s.version = '0.0.1'
s.version = '0.0.2'
s.summary = 'tvOS implementation of cloud_firestore.'
s.description = <<-DESC
tvOS implementation of cloud_firestore, the federated platform
Expand Down Expand Up @@ -39,7 +39,7 @@ package that ships native code targeting Apple tvOS.
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
'GCC_PREPROCESSOR_DEFINITIONS' =>
'$(inherited) LIBRARY_VERSION=\"0.0.1\" LIBRARY_NAME=\"flutter-fire-fst-tvos\"',
'$(inherited) LIBRARY_VERSION=\"0.0.2\" LIBRARY_NAME=\"flutter-fire-fst-tvos\"',
}

# The ported Classes/ call into FIRFirestore (Firebase/Firestore) and into
Expand Down
34 changes: 34 additions & 0 deletions packages/cloud_functions_tvos/.pubignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# A .pubignore replaces this directory's .gitignore for `dart pub publish`, so
# the .gitignore rules are repeated below.
#
# pubspec_overrides.yaml (here and in example/) points firebase_core_tvos at the
# sibling package until firebase_core_tvos 0.0.4 is on pub.dev. It is for the
# repo's CI only and must not ship.
pubspec_overrides.yaml

# Dart / Flutter
.dart_tool/
build/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub/

# CocoaPods
tvos/Pods/
tvos/Podfile.lock
tvos/.symlinks/
tvos/Flutter/Flutter.framework
tvos/Flutter/Flutter.podspec

# Xcode / SwiftPM (per-user, generated when tvos/Package.swift is opened)
**/.swiftpm/
**/xcuserdata/

# IDE
.idea/
.vscode/
*.iml

# macOS
.DS_Store
11 changes: 11 additions & 0 deletions packages/cloud_functions_tvos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 0.0.2

* Add Swift Package Manager support: ships `tvos/Package.swift` (one Swift
target, with `firebase_core_tvos` as the sibling package
`../firebase_core_tvos`). flutter-tvos links a plugin that ships
`tvos/Package.swift` through Swift Package Manager and leaves it out of the
Podfile.
* Requires `firebase_core_tvos: ^0.0.4`, the first version with a
`tvos/Package.swift`. firebase_core_tvos 0.0.4 is no longer in the Podfile, so
this package's podspec could not resolve its `firebase_core_tvos` dependency.

## 0.0.1

* Initial tvOS scaffolding generated by `flutter-tvos plugin port` from
Expand Down
16 changes: 14 additions & 2 deletions packages/cloud_functions_tvos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ automatically. Apps that already use `cloud_functions` and target tvOS add:
```yaml
dependencies:
cloud_functions: ^6.3.3
cloud_functions_tvos: ^0.0.1
cloud_functions_tvos: ^0.0.2
firebase_core: ^4.11.0
firebase_core_tvos: ^0.0.1 # tvOS core (this package depends on it)
firebase_core_tvos: ^0.0.4 # tvOS core (this package depends on it)
```

> **Version alignment matters.** This package's native code matches the
Expand All @@ -36,6 +36,18 @@ Full `cloud_functions` API is available on tvOS (callable functions +
streaming callables, `httpsCallable`, region/emulator selection), no feature
disables. Streaming requires tvOS 15+ (the pod floor).

## Swift Package Manager

This package ships a `tvos/Package.swift`. flutter-tvos links a plugin that
ships `tvos/Package.swift` through Swift Package Manager and leaves it out of
the Podfile. No manual setup is needed. It depends on `firebase_core_tvos`
0.0.4, which ships one too, and takes firebase-ios-sdk `~> 12.15.0`, as in the
podspec.

Needs flutter-tvos 1.3.0 or later, the first release that links plugins through
SwiftPM, places them side by side (so `../firebase_core_tvos` and
`../FlutterFramework` resolve) and leaves them out of the Podfile.

## License

fluttertv under a BSD-3-Clause license. See `LICENSE` for the full text.
9 changes: 5 additions & 4 deletions packages/cloud_functions_tvos/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ environment:

dependencies:
# firebase_core is pinned exact; its train picks the matching firebase_core_tvos
# (4.11.x -> pi 7.1.0 -> 0.0.2); floating it breaks the native Pigeon ABI.
cloud_functions: 6.3.3
# (4.14.x -> pi 8.1.1 -> 0.0.3 and later); floating it breaks the native
# Pigeon ABI. firebase_core_tvos 0.0.4 requires firebase_core ^4.13.0.
cloud_functions: 6.3.6
cloud_functions_tvos:
path: ../
firebase_core: 4.11.0
firebase_core_tvos: ^0.0.1
firebase_core: 4.14.0
firebase_core_tvos: ^0.0.4
flutter:
sdk: flutter

Expand Down
8 changes: 8 additions & 0 deletions packages/cloud_functions_tvos/example/pubspec_overrides.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Resolves firebase_core_tvos from the sibling package in this monorepo, so the
# repo's CI (`flutter pub get`, `dart analyze`) resolves this example against
# the in-repo firebase_core_tvos 0.0.4 until that version is on pub.dev. Delete
# this file once firebase_core_tvos 0.0.4 is published. The package's
# .pubignore keeps it out of the published archive.
dependency_overrides:
firebase_core_tvos:
path: ../../firebase_core_tvos
6 changes: 4 additions & 2 deletions packages/cloud_functions_tvos/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: cloud_functions_tvos
description: >-
tvOS (Apple TV) implementation of the cloud_functions Flutter plugin,
providing Firebase Cloud Functions (callable + streaming) on Apple TV.
version: 0.0.1
version: 0.0.2
homepage: https://fluttertv.dev
repository: https://github.com/fluttertv/plugins/tree/main/packages/cloud_functions_tvos
issue_tracker: https://github.com/fluttertv/plugins/issues
Expand All @@ -22,7 +22,9 @@ dependencies:
# package's native pod to the generated Podfile if it's reachable here,
# which the podspec's `s.dependency 'firebase_core_tvos'` then resolves
# instead of failing over to upstream's iOS-only firebase_core pod.
firebase_core_tvos: ^0.0.1
# ^0.0.4 (0.0.4 exactly): the first firebase_core_tvos with a
# tvos/Package.swift, which tvos/Package.swift here needs as a sibling.
firebase_core_tvos: ^0.0.4

dev_dependencies:
flutter_lints: ^4.0.0
Expand Down
Loading
Loading