Skip to content

Add-to-add host app won't build when flutter app has plugins - linker error Library not found #35901

@jmagman

Description

@jmagman

Add a flutter sub-app with plugins to an existing app messes up the host app's Xcode build settings, which causes various build issue. In a new add-to-app I tried to make, it manifested as linker errors because the framework search paths were incorrect.

Steps to Reproduce

The wonky build settings can be seen with the ios_add2app integration test, though it somehow is able to build successfully

$ cd dev/integration_tests/ios_add2app/flutterapp
$ flutter build ios
$ cd ..
$ xcodebuild -showBuildSettings -configuration Debug | grep -E "LIBRARY_SEARCH_PATHS|SYMROOT"
    LIBRARY_SEARCH_PATHS =  "/Projects/flutter/dev/integration_tests/build/ios/Debug-iphoneos/FlutterPluginRegistrant"
    LOCSYMROOT = 
    SYMROOT = /Projects/flutter/dev/integration_tests/build/ios

"flutter/dev/integration_tests/build/ios" doesn't exist.
SYMROOT should be /Projects/flutter/dev/integration_tests/ios_add2app/ and LIBRARY_SEARCH_PATHS should be /Projects/flutter/dev/integration_tests/ios_add2app/flutterapp/build/ios/Debug-iphoneos/FlutterPluginRegistrant

Metadata

Metadata

Assignees

Labels

a: existing-appsIntegration with existing apps via the add-to-app flowplatform-iosiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project managementtoolAffects 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