-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Open
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-macBuilding on or for macOS specificallyBuilding on or for macOS specificallyteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
After flutter/engine#41011 started publishing artifacts I tried to make a macOS Share extension, but on launch the engine will not start:
Failed to find path for "flutter_assets"
embedder.cc (1601): 'FlutterEngineInitialize' returned 'kInvalidArguments'. The assets path in the Flutter project arguments was missing.
The App.framework bundle isn't found from the appex bundle. Suspect macOS needs similar logic to this:
if ([mainBundle.bundleURL.pathExtension isEqualToString:@"appex"]) {See also https://github.com/flutter/engine/pull/37421/files#diff-8646d867d6b502217ca15af1cfd042f7148929efb68e1f28d796351a80594832R38 which is changing this same spot.
Steps to reproduce
- Create Flutter project
$ flutter create test_create
$ cd test_create
$ flutter build macos --config-only
$ open macos/Runner.xcworkspace/
- Add a new Share target and Activate it.
- In
test_create/macos/FlutterShare/Info.plistchangeNSExtensionPrincipalClasstoFlutterViewController.
- In Xcode set a signing Team and set the Signing Certificate to Development for both the Runner and new FlutterShare targets. These app extensions fail with codesign errors if they are ad-hoc signed.
- In the FlutterShare target build settings add
-framework FlutterMacOSto Other Linker Flags
- Run the FlutterShare target in Safari
- In the top right corner of Safari under the Share menu choose FlutterShare
Results
In Xcode console:
2023-04-12 18:17:45.807583-0700 FlutterShare[28145:12591166] Failed to find path for "flutter_assets"
2023-04-12 18:17:45.808568-0700 FlutterShare[28145:12591166] Failed to find path for "flutter_assets"
embedder.cc (1601): 'FlutterEngineInitialize' returned 'kInvalidArguments'. The assets path in the Flutter project arguments was missing.
2023-04-12 18:17:45.808903-0700 FlutterShare[28145:12591166] Failed to initialize Flutter engine: error 2
and no UI launches.
hpoul
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-macBuilding on or for macOS specificallyBuilding on or for macOS specificallyteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team






