I'm trying to add a static library to my Flutter project, it doesn't matter whether it's a plugin or a script, as long as it can be referenced as a module in AppDelegate.swift.
- I have tried adding a static library in the plugin project. Specifying the source file in the .podspec file. but it not working. So.. What are the steps to add a static library to a flutter plugin project?
- Because the plugin project can only verify the result in the Example project. How should I confirm whether the static library of the plug-in project has been added successfully? Where to reference the header files of a static library?
Pod::Spec.new do |s|
s.name = 'hello'
s.version = '0.0.1'
s.summary = 'A new Flutter plugin project.'
s.description = <<-DESC
A new Flutter plugin project.
DESC
s.homepage = 'http://example.com'
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.vendored_libraries = 'Classes/**/*.a'
s.dependency 'Flutter'
s.platform = :ios, '11.0'
# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
s.swift_version = '5.0'
end