Xcode 11.4: Building for watchOS, but the linked framework 'MyFramework.framework' is building for iOS
Asked Answered
L

1

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.

Lulita answered 26/3, 2020 at 16:41 Comment(0)
L
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.

Lulita answered 26/3, 2020 at 17:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.