修改pods
This commit is contained in:
@@ -122,7 +122,6 @@ public class FirebaseDataEncoder {
|
||||
case millisecondsSince1970
|
||||
|
||||
/// Encode the `Date` as an ISO-8601-formatted string (in RFC 3339 format).
|
||||
@available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
|
||||
case iso8601
|
||||
|
||||
/// Encode the `Date` as a string formatted by the given formatter.
|
||||
@@ -287,7 +286,7 @@ public class FirebaseDataEncoder {
|
||||
/// - returns: A new `Data` value containing the encoded JSON data.
|
||||
/// - throws: `EncodingError.invalidValue` if a non-conforming floating-point value is encountered during encoding, and the encoding strategy is `.throw`.
|
||||
/// - throws: An error if any value throws an error during encoding.
|
||||
open func encode<T : Encodable>(_ value: T) throws -> Any {
|
||||
open func encode<T : Encodable>(_ value: T) throws -> sending Any {
|
||||
let encoder = __JSONEncoder(options: self.options)
|
||||
|
||||
guard let topLevel = try encoder.box_(value) else {
|
||||
@@ -823,11 +822,7 @@ extension __JSONEncoder {
|
||||
return NSNumber(value: 1000.0 * date.timeIntervalSince1970)
|
||||
|
||||
case .iso8601:
|
||||
if #available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) {
|
||||
return NSString(string: _iso8601Formatter.string(from: date))
|
||||
} else {
|
||||
fatalError("ISO8601DateFormatter is unavailable on this platform.")
|
||||
}
|
||||
|
||||
case .formatted(let formatter):
|
||||
return NSString(string: formatter.string(from: date))
|
||||
@@ -1080,7 +1075,6 @@ public class FirebaseDataDecoder {
|
||||
case millisecondsSince1970
|
||||
|
||||
/// Decode the `Date` as an ISO-8601-formatted string (in RFC 3339 format).
|
||||
@available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
|
||||
case iso8601
|
||||
|
||||
/// Decode the `Date` as a string parsed by the given formatter.
|
||||
@@ -1231,7 +1225,7 @@ public class FirebaseDataDecoder {
|
||||
/// Decodes a top-level value of the given type from the given JSON representation.
|
||||
///
|
||||
/// - parameter type: The type of the value to decode.
|
||||
/// - parameter data: The data to decode from.
|
||||
/// - parameter structure: The data to decode from.
|
||||
/// - returns: A value of the requested type.
|
||||
/// - throws: `DecodingError.dataCorrupted` if values requested from the payload are corrupted, or if the given data is not valid JSON.
|
||||
/// - throws: An error if any value throws an error during decoding.
|
||||
@@ -2443,16 +2437,12 @@ extension __JSONDecoder {
|
||||
return Date(timeIntervalSince1970: double / 1000.0)
|
||||
|
||||
case .iso8601:
|
||||
if #available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) {
|
||||
let string = try self.unbox(value, as: String.self)!
|
||||
guard let date = _iso8601Formatter.date(from: string) else {
|
||||
throw DecodingError.dataCorrupted(DecodingError.Context(codingPath: self.codingPath, debugDescription: "Expected date string to be ISO8601-formatted."))
|
||||
}
|
||||
|
||||
return date
|
||||
} else {
|
||||
fatalError("ISO8601DateFormatter is unavailable on this platform.")
|
||||
}
|
||||
|
||||
case .formatted(let formatter):
|
||||
let string = try self.unbox(value, as: String.self)!
|
||||
@@ -2621,8 +2611,7 @@ fileprivate struct _JSONKey : CodingKey {
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// NOTE: This value is implicitly lazy and _must_ be lazy. We're compiled against the latest SDK (w/ ISO8601DateFormatter), but linked against whichever Foundation the user has. ISO8601DateFormatter might not exist, so we better not hit this code path on an older OS.
|
||||
@available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
|
||||
fileprivate var _iso8601Formatter: ISO8601DateFormatter = {
|
||||
nonisolated(unsafe) fileprivate var _iso8601Formatter: ISO8601DateFormatter = {
|
||||
let formatter = ISO8601DateFormatter()
|
||||
formatter.formatOptions = .withInternetDateTime
|
||||
return formatter
|
||||
|
||||
11
Pods/FirebaseSharedSwift/README.md
generated
11
Pods/FirebaseSharedSwift/README.md
generated
@@ -86,7 +86,7 @@ For details on using Firebase from a Framework or a library, refer to [firebase_
|
||||
To develop Firebase software in this repository, ensure that you have at least
|
||||
the following software:
|
||||
|
||||
* Xcode 14.1 (or later)
|
||||
* Xcode 16.2 (or later)
|
||||
|
||||
CocoaPods is still the canonical way to develop, but much of the repo now supports
|
||||
development with Swift Package Manager.
|
||||
@@ -137,7 +137,7 @@ Alternatively, disable signing in each target:
|
||||
|
||||
### Adding a New Firebase Pod
|
||||
|
||||
Refer to [AddNewPod](AddNewPod.md) Markdown file for details.
|
||||
Refer to [AddNewPod](docs/AddNewPod.md) Markdown file for details.
|
||||
|
||||
### Managing Headers and Imports
|
||||
|
||||
@@ -153,7 +153,7 @@ GitHub Actions will verify that any code changes are done in a style-compliant
|
||||
way. Install `clang-format` and `mint`:
|
||||
|
||||
```console
|
||||
brew install clang-format@18
|
||||
brew install clang-format@20
|
||||
brew install mint
|
||||
```
|
||||
|
||||
@@ -235,6 +235,11 @@ at **Project Settings > Cloud Messaging > [Your Firebase App]**.
|
||||
The iOS Simulator cannot register for remote notifications and will not receive push notifications.
|
||||
To receive push notifications, follow the steps above and run the app on a physical device.
|
||||
|
||||
### Vertex AI for Firebase
|
||||
|
||||
See the [Vertex AI for Firebase README](FirebaseVertexAI#development) for
|
||||
instructions about building and testing the SDK.
|
||||
|
||||
## Building with Firebase on Apple platforms
|
||||
|
||||
Firebase provides official beta support for macOS, Catalyst, and tvOS. visionOS and watchOS
|
||||
|
||||
Reference in New Issue
Block a user