Przeglądaj źródła

simplify cocoapods

cherylEnkidu 1 rok temu
rodzic
commit
299de31714

+ 3 - 1
FirebaseCombineSwift.podspec

@@ -59,6 +59,7 @@ for internal testing only. It should not be published.
 
   s.pod_target_xcconfig = {
     'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"',
+    'SWIFT_OBJC_INTEROP_MODE' => 'objcxx',
   }
 
   s.test_spec 'unit' do |unit_tests|
@@ -81,7 +82,8 @@ for internal testing only. It should not be published.
     unit_tests.exclude_files = 'FirebaseCombineSwift/Tests/Unit/**/*Template.swift'
     unit_tests.requires_app_host = true
     unit_tests.pod_target_xcconfig = {
-      'SWIFT_OBJC_BRIDGING_HEADER' => '$(PODS_TARGET_SRCROOT)/FirebaseCombineSwift/Tests/Unit/FirebaseCombine-unit-Bridging-Header.h'
+      'SWIFT_OBJC_BRIDGING_HEADER' => '$(PODS_TARGET_SRCROOT)/FirebaseCombineSwift/Tests/Unit/FirebaseCombine-unit-Bridging-Header.h',
+      'SWIFT_OBJC_INTEROP_MODE' => 'objcxx',
     }
     unit_tests.dependency 'OCMock'
     unit_tests.dependency 'FirebaseAuthTestingSupport'

+ 0 - 1
FirebaseFirestore.podspec

@@ -44,7 +44,6 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
   s.dependency 'FirebaseCore', '11.5'
   s.dependency 'FirebaseCoreExtension', '11.5'
   s.dependency 'FirebaseFirestoreInternal', '11.5.0'
-  s.dependency 'FirebaseFirestoreCpp', '11.5.0'
   s.dependency 'FirebaseSharedSwift', '~> 11.0'
 
 end

+ 0 - 65
FirebaseFirestoreCpp.podspec

@@ -1,65 +0,0 @@
-Pod::Spec.new do |s|
-  s.name             = 'FirebaseFirestoreCpp'
-  s.version          = '11.5.0'
-  s.summary          = 'Google Cloud Firestore'
-
-  s.description      = <<-DESC
-Google Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development.
-                       DESC
-
-  s.homepage         = 'https://developers.google.com/'
-  s.license          = { :type => 'Apache-2.0', :file => 'Firestore/LICENSE' }
-  s.authors          = 'Google, Inc.'
-
-  s.source           = {
-    :git => 'https://github.com/firebase/firebase-ios-sdk.git',
-    :tag => 'CocoaPods-' + s.version.to_s
-  }
-
-  s.ios.deployment_target = '13.0'
-  s.osx.deployment_target = '10.15'
-  s.tvos.deployment_target = '13.0'
-
-  s.swift_version = '5.9'
-
-  s.cocoapods_version = '>= 1.12.0'
-  s.prefix_header_file = false
-
-  s.public_header_files = 'Firestore/core/swift/include/*.h'
-
-  s.source_files = [
-    'Firestore/core/swift/**/*.{cc,h}'
-  ]
-
-  abseil_version = '~> 1.20240116.1'
-  s.dependency 'abseil/algorithm', abseil_version
-  s.dependency 'abseil/base', abseil_version
-  s.dependency 'abseil/container/flat_hash_map', abseil_version
-  s.dependency 'abseil/memory', abseil_version
-  s.dependency 'abseil/meta', abseil_version
-  s.dependency 'abseil/strings/strings', abseil_version
-  s.dependency 'abseil/time', abseil_version
-  s.dependency 'abseil/types', abseil_version
-
-  s.ios.frameworks = 'SystemConfiguration', 'UIKit'
-  s.osx.frameworks = 'SystemConfiguration'
-  s.tvos.frameworks = 'SystemConfiguration', 'UIKit'
-
-  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} " +
-      # The nanopb pod sets these defs, so we must too. (We *do* require 16bit
-      # (or larger) fields, so we'd have to set at least PB_FIELD_16BIT
-      # anyways.)
-      'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1',
-    'HEADER_SEARCH_PATHS' =>
-      '"${PODS_TARGET_SRCROOT}" ' +
-      '"${PODS_TARGET_SRCROOT}/Firestore/core/swift" '
-  }
-
-  s.compiler_flags = '$(inherited) -Wreorder -Werror=reorder -Wno-comma'
-end

+ 5 - 1
FirebaseFirestoreInternal.podspec

@@ -28,7 +28,10 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
   # Header files that constitute the interface to this module. Only Objective-C
   # headers belong here, since FirebaseFirestore is primarily an Objective-C
   # framework.
-  s.public_header_files = 'Firestore/Source/Public/FirebaseFirestore/*.h'
+  s.public_header_files = [
+    'Firestore/Source/Public/FirebaseFirestore/*.h',
+    'Firestore/core/swift/include/*.h'
+  ]
 
   # source_files contains most of the header and source files for the project.
   # This includes files named in `public_header_files`.
@@ -52,6 +55,7 @@ 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/core/swift/**/*.{cc,h}',
   ]
 
   # Internal headers that aren't necessarily globally unique. Most C++ internal

+ 3 - 1
Firestore/Swift/Source/SwiftAPI/SwiftCppAPI.swift

@@ -14,7 +14,9 @@
  * limitations under the License.
  */
 
-import FirebaseFirestoreCpp
+#if SWIFT_PACKAGE
+  @_exported import FirebaseFirestoreCpp
+#endif // SWIFT_PACKAGE
 
 public class SwiftCppWrapper {
   public init(_ value: String) {