6

My project compiled fine but after upgrading to Xcode 11.4 it now fails to compile with this error for each of my frameworks: Building for watchOS, but the linked framework 'MyFramework.framework' is building for iOS. You may need to configure 'MyFramework.framework' to build for watchOS.

I have 3 frameworks. Each have a watch version target which is already configured to use watchOS as the base SDK.

Michael Ozeryansky
  • 7,204
  • 4
  • 49
  • 61

1 Answers1

1

I removed each framework and added them back, and it compiles fine now.

The project.pbxproj changes added:

        3B2AD3CA242D1EEA00C436C8 /* PBXContainerItemProxy */ = {
            isa = PBXContainerItemProxy;
            containerPortal = 4CAF2B4E1B32D6F400489ACE /* Project object */;
            proxyType = 1;
            remoteGlobalIDString = 3B1303E423CE4DA900405D89;
            remoteInfo = "MyFramework Watch";
        };

and

        3B2AD3CB242D1EEA00C436C8 /* PBXTargetDependency */ = {
            isa = PBXTargetDependency;
            target = 3B1303E423CE4DA900405D89 /* MyFramework Watch */;
            targetProxy = 3B2AD3CA242D1EEA00C436C8 /* PBXContainerItemProxy */;
        };

For each framework.

I also filed a bug report with Apple Feedback and they closed it saying I was able to fix it myself.

Michael Ozeryansky
  • 7,204
  • 4
  • 49
  • 61