1 Reply
      Latest reply on Sep 1, 2019 6:13 AM by Prrrpl
      Prrrpl Level 1 Level 1 (0 points)

        I'm working on a standalone AppleWatch App and was able to build and run in Simulator and on a 40mm AppleWatch 3 Device in Xcode 11.0 Beta 6. After the update from Xcode 11.0 Beta 6 to Beta 7 I got the following build errors:

         

        Build target AppNAME of project AppNAME with configuration Debug

        error: unable to resolve product type 'com.apple.product-type.application.watchapp2-container' for platform 'watchos' (in target 'AppNAME' from project 'AppNAME')

        error: unable to resolve product type 'com.apple.product-type.application.watchapp2-container' for platform 'watchsimulator' (in target 'AppNAME' from project 'AppNAME')error: unable to resolve product type 'com.apple.product-type.application.watchapp2-container' for platform 'watchsimulator' (in target 'AppNAME' from project 'AppNAME')

         

        I've tried changing the Project > Target > BuildSettings and set the Base SDK to watchOS (and iOS) like some older reports on similar issues suggested. Both optionsdid not work.

         

        I've done the same for the Supported platforms: both iOS and WatchOS yield the same errors.

         

        I've also deleted my Library/developer folder before updating to Xcode. This prompts a suggestion to download some files on startup (I assume simulator-related). Again, this does not resolve my issue.

         

        I've also tried deleting and re-Adding Simulators. What I found worrying is that I still need to add an iPhone Simulator; then select a Paired Watch in order to add a AppleWatch as a device. Re-adding the simulators did not fix my issue.

         

        Can someone tell me based on the information I provided how I could fix my issues? If you need any more information I'd be happy to report back.

         

        Thanks in advance,

        Emiel

        • Re: Xcode 11.0 Beta 7 Update: Build Error standalone AppleWatch App
          Prrrpl Level 1 Level 1 (0 points)

          * Update * Solved, I can build and run my standalone Apple Watch App again.

           

          I've cleared all simulators from the list click on 'Apple Watch Series # (In the top bar next to the Play and Stop Button, next to AppName > Device Simulator Name) and click 'Add additional Simulators'. Click the simulators you're using and hit '-'. I also deleted the iPhone Simulators on the left (right click, 'Delete'). Then add a new simulator by hitting the '+' in the bottom left corner.

           

          I then set the Target (Hit project name with Blue Icon at the top of the left section), then to the right side select the Targets. There should be 3 targets visible for an Apple Watch Standalone App: 'AppName' (set Build Settings > Supported Platforms set 'Base SDK' and 'Supported Platforms' to iOS. Then for the 'AppName App' and 'AppName Extension' both the 'Base SDK' and the 'Supported Platforms' should be set to 'watchOS'.

           

          Not sure whether it was my simulator references being outdated or that changing the Base SDK and Supported Platforms was the issue (maybe both) but I hope this helps anyone who ran into the same issue.