Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[1.20] iOS 3rd party FFI framework missing #62853

Closed
@vaind

Description

@vaind

Intro

I maintain a dart lib/flutter plugin making use of FFI (pub.dev/packages/objectbox) and have tried to test it with the current flutter beta channel. Turns out the flutter build ios build stopped including native "ObjectBox.framework" in the built test/example application. I've noticed the ios/Podfile is quite different now - were there any changes with regard to plugins/FFI, especially how the native libs are included? I'd prefer to address them before the next flutter release to prevent lib "downtime" if this isn't a flutter tool issue but an expected behaviour.

Steps to Reproduce

  1. Checkout https://github.com/vaind/obx-flutter-ios-build
  2. Execute the following commands:
    flutter pub get
    flutter build ios --no-codesign --verbose
    ls -alh build/ios/iphoneos/Runner.app/Frameworks/
    
  3. ObjectBox.framework is missing

Expected results:
When built with a current stable flutter, the Frameworks directory includes ObjectBox.framework

$ flutter --version
Flutter 1.17.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8af6b2f038 (5 weeks ago) • 2020-06-30 12:53:55 -0700
Engine • revision ee76268252
Tools • Dart 2.8.4
...
$ ls -alh build/ios/iphoneos/Runner.app/Frameworks/
...
drwxr-xr-x   4 objectbox  staff   128B Aug  4 13:39 ObjectBox.framework
...

Actual results:
With the beta channel, it doesn't.

Flutter 1.20.0-7.4.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 916c3ac648 (3 days ago) • 2020-08-01 09:01:12 -0700
Engine • revision d6ee1499c2
Tools • Dart 2.9.0 (build 2.9.0-21.10.beta)
total 286960
drwxr-xr-x  12 objectbox  staff   384B Aug  4 14:33 .
drwxr-xr-x  27 objectbox  staff   864B Aug  4 14:33 ..
drwxr-xr-x   5 objectbox  staff   160B Aug  4 14:33 App.framework
drwxr-xr-x   6 objectbox  staff   192B Aug  4 14:33 Flutter.framework
-rw-r--r--   1 objectbox  staff    91M Aug  4 14:33 libswiftCore.dylib
-rw-r--r--   1 objectbox  staff   440K Aug  4 14:33 libswiftCoreFoundation.dylib
-rw-r--r--   1 objectbox  staff   1.9M Aug  4 14:33 libswiftCoreGraphics.dylib
-rw-r--r--   1 objectbox  staff   1.0M Aug  4 14:33 libswiftDarwin.dylib
-rw-r--r--   1 objectbox  staff   3.9M Aug  4 14:33 libswiftDispatch.dylib
-rw-r--r--   1 objectbox  staff    41M Aug  4 14:33 libswiftFoundation.dylib
-rw-r--r--   1 objectbox  staff   664K Aug  4 14:33 libswiftObjectiveC.dylib
drwxr-xr-x   4 objectbox  staff   128B Aug  4 14:33 path_provider.framework

Details

I've noticed the difference in the "--verbose" run between stable and beta:

Stable Flutter 1.17.5

[   +1 ms] CocoaPods' output:
           ↳
[        ]       Preparing
           
               Analyzing dependencies
           
               Inspecting targets to integrate
                 Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
           
               Finding Podfile changes
                 - Flutter
                 - objectbox
                 - path_provider
                 - path_provider_linux
                 - path_provider_macos
           
               Fetching external sources
               -> Fetching podspec for `Flutter` from `Flutter`
               -> Fetching podspec for `objectbox` from `.symlinks/plugins/objectbox/ios`
               -> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
               -> Fetching podspec for `path_provider_linux` from `.symlinks/plugins/path_provider_linux/ios`
               -> Fetching podspec for `path_provider_macos` from `.symlinks/plugins/path_provider_macos/ios`
           
               Resolving dependencies of `Podfile`
                 CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only
perfomed in
                 repo update
           
               Comparing resolved specification to the sandbox manifest
                 - Flutter
                 - objectbox
                 - path_provider
                 - path_provider_linux
                 - path_provider_macos
           
               Downloading dependencies
           
               -> Using Flutter (1.0.0)
           
               -> Using objectbox (0.0.1)
           
               -> Using path_provider (0.0.1)
           
               -> Using path_provider_linux (0.0.1)
           
               -> Using path_provider_macos (0.0.1)
                 - Running pre install hooks

Beta Flutter 1.20.0-7.4.pre

[   +2 ms] CocoaPods' output:
           ↳
[   +2 ms]       Preparing
           
               Analyzing dependencies
           
               Inspecting targets to integrate
                 Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
           
               Fetching external sources
               -> Fetching podspec for `Flutter` from `Flutter`
               -> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
           
               Resolving dependencies of `Podfile`
                 CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only
perfomed in
                 repo update
           
               Comparing resolved specification to the sandbox manifest
                 A Flutter
                 A path_provider
           
               Downloading dependencies
           
               -> Installing Flutter (1.0.0)
           
               -> Installing path_provider (0.0.1)
                 - Running pre install hooks

Any ideas?

Metadata

Metadata

Assignees

Labels

a: buildBuilding flutter applications with the toolc: regressionIt was better in the past than it is nowdependency: dartDart team may need to help usfound in release: 1.20Found to occur in 1.20has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions