Skip to content

Flutter build error after adding WatchOS target in Xcode Project #92294

@kattaliraees

Description

@kattaliraees

After adding watch Extention in ios/Runner.xcworkspace flutter run fails with below build error

Steps to reproduce

  1. flutter create watch_test
  2. cd watch_test & flutter run - App successfully launches in iOS simulator
  3. Now open ios/Runner.xcworkspace and add new target as watch app extension for iOS app
  4. flutter run will give error

Error log

note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
error: unable to resolve product type 'com.apple.product-type.watchkit2-extension' for platform 'iphonesimulator' (in target 'watch WatchKit
Extension' from project 'Runner')
error: unable to resolve product type 'com.apple.product-type.watchkit2-extension' for platform 'iphonesimulator' (in target 'watch WatchKit
Extension' from project 'Runner')
error: unable to resolve product type 'com.apple.product-type.application.watchapp2' for platform 'iphonesimulator' (in target 'watch' from project
'Runner')
error: unable to resolve product type 'com.apple.product-type.application.watchapp2' for platform 'iphonesimulator' (in target 'watch' from project
'Runner')
warning: duplicate output file '' on task: RegisterExecutionPolicyException /Users/raeeskattali/Downloads/w_test2/build/ios/Debug-iphonesimulator (in
target 'watch' from project 'Runner

Other details

  • Tried on both stable & master branch
  • WatchOS targets Supported Platforms is watchOS & Build Active Arch only YES
  • Trying from M1 Macbook

Screen Shot 2021-10-21 at 4 53 27 PM

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listfound in release: 2.5Found to occur in 2.5found in release: 2.6Found to occur in 2.6has 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

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions