I’m using the lexactivator Dart library in a Flutter app, and I’m getting an error due to the format of the lexactivator.podspec file.
As written, the podspec is:
Pod::Spec.new do |s|
s.name = 'lexactivator'
s.version = '3.0.0'
s.summary = 'LexActivator API wrapper for Dart (licensing library)'
s.description = <<-DESC
LexActivator API wrapper for Dart (licensing library)
DESC
s.homepage = 'https://cryptlex.com'
s.license = { :file => '../LICENSE' }
s.author = { 'Cryptlex' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'FlutterMacOS'
s.library '../'
s.platform = :osx, '10.11'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
s.swift_version = '5.0'
end
The error is:
Failed to load ‘lexactivator’ podspec:
[!] Invalid lexactivator.podspec file: undefined method `library’ for #<Pod::Specification name=“lexactivator”>
I’ve tried changing:
s.library ‘…/’
to this:
s.library = ‘…/’
…and get a different error:
ld: library not found for -l…/
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
I’m not sure what the appropriate value is for library, but as it comes from pub.dev, it appears to be invalid. I also tried removing that line altogether as well but get errors that way too.
This is a Flutter 3.3.1 app with Dart 2.18.0 on MacOS. Any help is appreciated.