I am working on Flutter package which depends on static ios framework as spec.dependency 'static-pod', '~> 1.0.0'
in podspec
When I'm using my package in project with use_modular_headers!
everything works fine. But when I'm trying to add cloud_firestore
package I'm getting this issue:
Error (Xcode): module map file '/Users/me/projects/flutter-project/ios/Pods/Headers/Private/openssl_grpc/BoringSSL-GRPC.modulemap' not found
If I try to add use_frameworks! :linkage => :static
I'm getting next error:
Lexical or Preprocessor Issue (Xcode): 'plugin-Swift.h' file not found
/Users/me/.pub-cache/hosted/pub.dev/plugin-1.4.7/ios/Classes/MyPlugin.m:1:8
In my ios/Classes directory next structure:
- MyPlugin.h
- MyPlugin.m
- SwiftMyPlugin.swift
And full plugin podspec file:
require 'yaml'
pubspec = YAML.load_file(File.join('..', 'pubspec.yaml'))
Pod::Spec.new do |spec|
spec.name = pubspec['name']
spec.version = pubspec['version']
spec.summary = 'My Flutter plugin.'
spec.description = pubspec['description']
spec.homepage = pubspec['homepage']
spec.license = { :type => 'MIT License', :file => '../LICENSE' }
spec.author = '[email protected]'
spec.source = { :path => '.' }
spec.source_files = 'Classes/**/*'
spec.public_header_files = 'Classes/**/*.h'
spec.platform = :ios, '14.0'
spec.dependency 'Flutter'
spec.dependency 'static-pod', '~> 1.0.0'
# Flutter.framework does not contain a i386 slice.
spec.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
spec.swift_version = '5.0'
end
use_modular_headers!
does not work with Firestore. Details in https://github.com/firebase/firebase-ios-sdk/issues/3816.Firestore, as well as all of recent Firebase product versions, should be integrated with
use_frameworks!
oruse_frameworks! :linkage => :static
.