Skip to content

Commit

Permalink
Revert "[Firestore] Consolidate Firestore and FirestoreSwift (#11806)" (
Browse files Browse the repository at this point in the history
  • Loading branch information
ncooke3 authored Oct 13, 2023
1 parent 760d449 commit 0c8d143
Show file tree
Hide file tree
Showing 30 changed files with 136 additions and 264 deletions.
4 changes: 0 additions & 4 deletions FirebaseFirestore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
'Firestore/core/include/**/*.{cc,mm}',
'Firestore/core/src/**/*.{cc,mm}',
'FirebaseAuth/Interop/*.h',
'Firestore/Swift/Source/**/*.swift',
]

# Internal headers that aren't necessarily globally unique. Most C++ internal
Expand Down Expand Up @@ -90,8 +89,6 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,

s.dependency 'FirebaseAppCheckInterop', '~> 10.17'
s.dependency 'FirebaseCore', '~> 10.0'
s.dependency 'FirebaseCoreExtension', '~> 10.0'
s.dependency 'FirebaseSharedSwift', '~> 10.0'

abseil_version = '~> 1.20220623.0'
s.dependency 'abseil/algorithm', abseil_version
Expand All @@ -114,7 +111,6 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
s.library = 'c++'
s.pod_target_xcconfig = {
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14',
'CLANG_CXX_LIBRARY' => 'libc++',
'GCC_C_LANGUAGE_STANDARD' => 'c99',
'GCC_PREPROCESSOR_DEFINITIONS' =>
"FIRFirestore_VERSION=#{s.version} " +
Expand Down
7 changes: 5 additions & 2 deletions FirebaseFirestoreSwift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,

s.requires_arc = true
s.source_files = [
'FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift'
'Firestore/Swift/Source/**/*.swift',
]

s.dependency 'FirebaseFirestore', '~> 10.17'
s.dependency 'FirebaseCore', '~> 10.0'
s.dependency 'FirebaseCoreExtension', '~> 10.0'
s.dependency 'FirebaseFirestore', '~> 10.0'
s.dependency 'FirebaseSharedSwift', '~> 10.0'

end
30 changes: 0 additions & 30 deletions FirebaseFirestoreSwift/Sources/FirebaseFirestoreSwift.swift

This file was deleted.

6 changes: 0 additions & 6 deletions Firestore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Unreleased
- [feature] The `FirebaseFirestore` module now contains Firebase Firestore's
Swift-only APIs that were previously only available via the
`FirebaseFirestoreSwift` extension SDK. See the
`FirebaseFirestoreSwift` release note from this release for more details.

# 10.16.0
- [fixed] Fixed an issue where Firestore's binary SwiftPM distribution would
not link properly when building a target for testing. This issue affected
Expand Down
7 changes: 0 additions & 7 deletions Firestore/Swift/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# Unreleased
- [deprecated] All of the public API from `FirebaseFirestoreSwift` can now
be accessed through the `FirebaseFirestore` module. Therefore,
`FirebaseFirestoreSwift` has been deprecated, and will be removed in a
future release. See https://firebase.google.com/docs/ios/swift-migration for
migration instructions.

# 10.12.0
- [added] Added support animations on the `@FirestoreQuery` property wrapper.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore
import Foundation

#if compiler(>=5.5.2) && canImport(_Concurrency)
Expand Down
4 changes: 1 addition & 3 deletions Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore
import Foundation

#if compiler(>=5.5.2) && canImport(_Concurrency)
Expand Down
4 changes: 1 addition & 3 deletions Firestore/Swift/Source/Codable/CodablePassThroughTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

import Foundation
import FirebaseSharedSwift
#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

internal struct FirestorePassthroughTypes: StructureCodingPassthroughTypeResolver {
static func isPassthroughType<T>(_ t: T) -> Bool {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/

import Foundation
#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

public extension CollectionReference {
/// Encodes an instance of `Encodable` and adds a new document to this collection
Expand Down
4 changes: 1 addition & 3 deletions Firestore/Swift/Source/Codable/DocumentID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore
import FirebaseSharedSwift
@_implementationOnly import FirebaseCoreExtension

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

/** Mark DocumentReference to conform to Codable. */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/

import Foundation
#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

public extension DocumentReference {
/// Fetches and decodes the document referenced by this `DocumentReference`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/

import Foundation
#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

public extension DocumentReference {
/// Encodes an instance of `Encodable` and overwrites the encoded data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/

import Foundation
#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

public extension DocumentSnapshot {
/// Retrieves all fields in a document and converts them to an instance of
Expand Down
4 changes: 1 addition & 3 deletions Firestore/Swift/Source/Codable/EncoderDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore
import FirebaseSharedSwift
import Foundation

Expand Down
4 changes: 1 addition & 3 deletions Firestore/Swift/Source/Codable/ExplicitNull.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

/// Wraps an `Optional` field in a `Codable` object such that when the field
/// has a `nil` value it will encode to a null value in Firestore. Normally,
Expand Down
4 changes: 1 addition & 3 deletions Firestore/Swift/Source/Codable/FieldValue+Encodable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

/** Extends FieldValue to conform to Encodable. */
extension FieldValue: Encodable {
Expand Down
4 changes: 1 addition & 3 deletions Firestore/Swift/Source/Codable/GeoPoint+Codable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

/**
* A protocol describing the encodable properties of a GeoPoint.
Expand Down
4 changes: 1 addition & 3 deletions Firestore/Swift/Source/Codable/ServerTimestamp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

/// A type that can initialize itself from a Firestore Timestamp, which makes
/// it suitable for use with the `@ServerTimestamp` property wrapper.
Expand Down
4 changes: 1 addition & 3 deletions Firestore/Swift/Source/Codable/Timestamp+Codable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

/**
* A protocol describing the encodable properties of a Timestamp.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/

import Foundation
#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore
import FirebaseSharedSwift

public extension FirebaseDataDecoder.DateDecodingStrategy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore
import FirebaseSharedSwift
import Foundation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/

import Foundation
#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

public extension Transaction {
/// Encodes an instance of `Encodable` and overwrites the encoded data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/

import Foundation
#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

public extension WriteBatch {
/// Encodes an instance of `Encodable` and overwrites the encoded data
Expand Down
4 changes: 1 addition & 3 deletions Firestore/Swift/Source/PropertyWrapper/FirestoreQuery.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/

import SwiftUI
#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

/// The strategy to use when an error occurs during mapping Firestore documents
/// to the target type of `FirestoreQuery`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/

import SwiftUI
#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

@available(iOS 14.0, macOS 11.0, macCatalyst 14.0, tvOS 14.0, watchOS 7.0, *)
internal class FirestoreQueryObservable<T>: ObservableObject {
Expand Down
4 changes: 1 addition & 3 deletions Firestore/Swift/Source/PropertyWrapper/QueryPredicate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

#if SWIFT_PACKAGE
@_exported import FirebaseFirestoreInternal
#endif // SWIFT_PACKAGE
import FirebaseFirestore

/// Query predicates that can be used to filter results fetched by `FirestoreQuery`.
///
Expand Down
29 changes: 0 additions & 29 deletions Firestore/Swift/Source/SPMSwiftHeaderWorkaround.swift

This file was deleted.

Loading

0 comments on commit 0c8d143

Please sign in to comment.