Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linking dual (iphoneos and watchos) frameworks with same product name

I recently had to duplicate my own frameworks to be able to link them from the native watchOS 2 extension, because the platform is different. So for every framework X I have an X-watchos counterpart. Everything works fine in the simulator and when building directly to my devices, and it wasn't until I tried to archive that I got this linking error:

Linking error

I ran lipo -i on the built watchOS framework and sure enough, its archs are arm7 and arm64 instead of armv7k.

When I looked further into the built directory I noticed this:

Derived data structure

Both versions are symlinks to the same file, and because the have the same product name, they're being overridden. I could make them have different names, but that would make importing them really cumbersome.

Note that this is not a problem for 3rd-party frameworks because Carthage is already building them in separate directories.

EDIT 08/22/2015: I've filed a radar with a sample project: http://www.openradar.me/22392501

EDIT 08/24/2015: This has been acknowledged in Xcode 7 Beta 6 release notes as a known issue:

known issue

EDIT 09/9/2015: Xcode 7.1 Beta release notes hint that this is fixed, but I haven't confirmed it yet.

like image 432
NachoSoto Avatar asked Aug 20 '15 16:08

NachoSoto


1 Answers

This is working for me in Xcode 7.1.

like image 187
Porter Hoskins Avatar answered Nov 17 '22 04:11

Porter Hoskins