-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #783 from breez/flutter-ios-dynamic-linking
Link bindings dynamically in iOS Flutter plugin
- Loading branch information
Showing
5 changed files
with
35 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. | ||
# Run `pod lib lint breez_sdk.podspec` to validate before publishing. | ||
tag_version = '0.2.15' | ||
framework = 'breez_sdkFFI.xcframework' | ||
lib_name = "breez-sdkFFI.#{tag_version}" | ||
url = "https://github.com/breez/breez-sdk-swift/releases/download/#{tag_version}/#{framework}.zip" | ||
frameworks_dir = 'bindings-swift' | ||
|
||
` | ||
if [ ! -d #{frameworks_dir}/#{framework} ]; then | ||
mkdir -p #{frameworks_dir} | ||
curl -L #{url} -o #{frameworks_dir}/#{lib_name}.zip | ||
cd #{frameworks_dir} | ||
unzip #{lib_name}.zip | ||
rm -rf __MACOSX | ||
rm #{lib_name}.zip | ||
fi | ||
` | ||
|
||
Pod::Spec.new do |s| | ||
s.name = 'breez_sdk' | ||
s.version = '0.2.15' | ||
s.version = "#{tag_version}" | ||
s.summary = 'BreezSDK flutter plugin.' | ||
s.description = <<-DESC | ||
BreezSDK flutter plugin. | ||
|
@@ -12,12 +27,12 @@ Pod::Spec.new do |s| | |
s.author = { 'Breez' => '[email protected]' } | ||
s.source = { :git => "https://github.com/breez/breez-sdk-flutter.git", :tag => "#{s.version}" } | ||
s.source_files = 'Classes/**/*' | ||
s.on_demand_resources = { 'BreezSDK' => 'bindings-swift/Sources/BreezSDK/BreezSDK.swift' } | ||
s.dependency 'Flutter' | ||
s.platform = :ios, '11.0' | ||
s.static_framework = true | ||
|
||
# Flutter.framework does not contain a i386 slice. | ||
s.pod_target_xcconfig = {'STRIP_STYLE' => 'non-global', 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } | ||
s.swift_version = '5.0' | ||
s.dependency "BreezSDK", "#{s.version}" | ||
s.vendored_frameworks = "#{frameworks_dir}/#{framework}" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters