10

I have a Cocoa Touch Framework that I developed for using in both my iOS app and my WatchKit app on iOS 8. I have no problems with iOS 8, however when I move the project to iOS 9 and update the WatchKit app to run natively I get the following error:

ParkFinderKit was rejected as an implicit dependency for 'ParkFinderKit.framework' because it doesn't contain platform 'watchsimulator' in its SUPPORTED_PLATFORMS 'iphonesimulator, iphoneos'

I attempted to manually add watchossimulator and watchos to the list of supported platforms: Configured Supported Platforms

However this produces another error:

ParkFinderKit was rejected as an implicit dependency for 'ParkFinderKit.framework' because its SDK is platform 'com.apple.platform.iphonesimulator' and it needs to match platform 'com.apple.platform.watchsimulator'

Any ideas as to how to solve my issue?

g0ld2k
  • 519
  • 4
  • 17

1 Answers1

4

Okay, it looks like you cannot use a Cocoa Touch Framework inside of a WatchKit app. I was able to get around this by creating a new Watch Framework target and then assigning each file from the original framework to the new framework in the Target Membership options.

enter image description here

This accomplishes my goal of sharing code between iOS and WatchKit without having duplicate code.

g0ld2k
  • 519
  • 4
  • 17