2022-01-16 11:19:01 -05:00
|
|
|
#
|
|
|
|
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
|
|
|
|
# Run `pod lib lint veilid.podspec` to validate before publishing.
|
|
|
|
#
|
|
|
|
Pod::Spec.new do |s|
|
|
|
|
s.name = 'veilid'
|
|
|
|
s.version = '0.0.1'
|
|
|
|
s.summary = 'Veilid Network'
|
|
|
|
s.description = <<-DESC
|
2022-01-30 21:28:27 -05:00
|
|
|
Veilid Network Plugin
|
2022-01-16 11:19:01 -05:00
|
|
|
DESC
|
2022-01-30 21:28:27 -05:00
|
|
|
s.homepage = 'http://veilid.com'
|
|
|
|
s.license = 'LGPL-2.0-or-later OR MPL-2.0 OR (MIT AND BSD-3-Clause)'
|
|
|
|
s.author = { 'John Smith' => 'jsmith@example.com' }
|
2022-01-16 11:19:01 -05:00
|
|
|
s.source = { :path => '.' }
|
|
|
|
s.source_files = 'Classes/**/*'
|
|
|
|
s.dependency 'Flutter'
|
|
|
|
s.platform = :ios, '9.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'
|
2022-01-30 21:28:27 -05:00
|
|
|
|
|
|
|
require 'json'
|
|
|
|
require 'pathname'
|
2022-12-01 20:38:57 -05:00
|
|
|
workspace_dir = File.dirname(JSON.parse(`cargo locate-project --workspace`)['root'])
|
|
|
|
cargo_target_dir = File.join(workspace_dir, 'target')
|
2022-01-30 21:28:27 -05:00
|
|
|
|
|
|
|
s.xcconfig = {
|
2022-12-01 20:38:57 -05:00
|
|
|
'OTHER_LDFLAGS' => "-Wl,-force_load,#{File.join(cargo_target_dir, 'lipo-ios', 'libveilid_flutter.a')}",
|
|
|
|
"LIBRARY_SEARCH_PATHS" => File.join(cargo_target_dir, 'lipo-ios')
|
2022-01-30 21:28:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
s.script_phase = {
|
|
|
|
:name => 'Cargo Build',
|
2022-12-01 20:38:57 -05:00
|
|
|
:script => File.join(workspace_dir, 'scripts', 'ios_build.sh') + ' veilid_flutter',
|
2022-06-10 17:07:10 -04:00
|
|
|
:execution_position => :before_compile
|
2022-12-01 20:38:57 -05:00
|
|
|
# :output_files => [ File.join(cargo_target_dir, 'lipo-ios', 'libveilid_flutter.a') ]
|
2022-01-30 21:28:27 -05:00
|
|
|
}
|
|
|
|
|
2022-01-16 11:19:01 -05:00
|
|
|
end
|