Repository navigation
Problems with building a native watch app alongside my flutter app #43731
Copy link
Copy link
Closed
Labels
c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Activity
Fyi @stevemessick.
Actually, I think @pq is our Xcode expert.
This isn't an IDE problem. You can get the same results running from the command line:
$ flutter run --machine --track-widget-creation --device-id=4A79B62B-E060-4199-BCBB-D5FD7A65BEED --start-paused lib/main.dart [{"event":"daemon.connected","params":{"version":"0.5.3","pid":21585}}] [{"event":"app.start","params":{"appId":"e73eb179-2b60-48e2-9258-6bc479e20351","deviceId":"4A79B62B-E060-4199-BCBB-D5FD7A65BEED","directory":"/Users/messick/IdeaProjects/watchme","supportsRestart":true,"launchMode":"run"}}] Launching lib/main.dart on iPhone Xʀ in debug mode... [{"event":"app.progress","params":{"appId":"e73eb179-2b60-48e2-9258-6bc479e20351","id":"0","progressId":null,"message":"Running Xcode build..."}}] [{"event":"app.progress","params":{"appId":"e73eb179-2b60-48e2-9258-6bc479e20351","id":"0","progressId":null,"finished":true}}] Xcode build done. 1.2s Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED ** Xcode's output: ↳ error: unable to resolve product type 'com.apple.product-type.application.watchapp2' for platform 'iphonesimulator' (in target 'watchme') error: unable to resolve product type 'com.apple.product-type.application.watchapp2' for platform 'iphonesimulator' (in target 'watchme') error: unable to resolve product type 'com.apple.product-type.watchkit2-extension' for platform 'iphonesimulator' (in target 'watchme Extension') error: unable to resolve product type 'com.apple.product-type.watchkit2-extension' for platform 'iphonesimulator' (in target 'watchme Extension') warning: Capabilities for Runner may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the build settings editor. (in target 'Runner') note: Using new build systemnote: Planning buildnote: Constructing build description Could not build the application for the simulator. Error launching application on iPhone Xʀ. [{"event":"app.stop","params":{"appId":"e73eb179-2b60-48e2-9258-6bc479e20351"}}]- addedtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.t: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.
on Oct 29, 2019 - addedc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityand removedcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.
on Oct 29, 2019 I was able to reproduce this.
🤔- SUPPORTED_PLATFORMS= iphoneos for Profile and Relase should be set in the Runner target, not the Runner project.
-sdk iphoneosor-sdk iphonesimulatorare set on every flutter build command: Support multi-arch iOS binaries #17312. I believe this should already be handled by theSDKROOTbuild setting, but I would need to test this.
This was fixed by #51126. Closing!
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Aug 21, 2021
Metadata
Metadata
Assignees
Labels
c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Please read carefully before closing as a duplicate!
This is related to #20392
But not the same issue as #16092.
The problem is not that there is no support for extensions but that an app that has a native watch app alongside it cannot run.
I created a flutter app with an accompanying apple watch app. The watch app is not written in flutter and is added as an extra target in the Runner project.
When I run both the app and the apple watch app from xcode they work fine.
When I try to run the iOS app (not even the watch app) from Intellij I get following error:
error: unable to resolve product type 'com.apple.product-type.watchkit2-extension' for platform 'iphonesimulator'.
This seems to indicate that flutter with IntelliJ always tries to run to the iPhone only, it does not support running to an iPhone simulator with a watch simulator.
Steps to reproduce:
create flutter app
add apple watch target through xcode.