I am trying to use the syntax in the WatchKit extension. I started with a new project (objective-c) and installed the latest version of Parse (1.7.5) through CocoaPods. Here is my Subfile.
# Uncomment this line to define a global platform for your project platform :ios, '8.3' target 'WatchBumpTesting' do pod 'Parse', '~> 1.7.5' end target 'WatchBumpTesting WatchKit App' do end target 'WatchBumpTesting WatchKit Extension' do end
I started by discussing the tutorial on my website. It describes how to enable local data exchange, key sharing, and application groups. Here I started to run into problems ...
I turned on the data exchange in my iOS application without any problems. I imported <Parse/Parse.h> into my AppDelegate.h file and was able to complete the setup using the following code.
// Enable data sharing in main app. [Parse enableDataSharingWithApplicationGroupIdentifier:@"group.com.parse.parseuidemo"]; // Setup Parse [Parse setApplicationId:@"<ParseAppId>" clientKey:@"<ClientKey>"];
Next, I turned on data sharing in WatchKit Extension. I opened my interface InterfaceController.h and tried to import Parse, but with no luck, the library was not found. "Okay - that makes sense, I suppose I should add it to my subfile" ... so I did! I tried several updated subfiles.
V1
# Uncomment this line to define a global platform for your project platform :ios, '8.3' target 'WatchBumpTesting' do pod 'Parse', '~> 1.7.5' end target 'WatchBumpTesting WatchKit App' do end target 'WatchBumpTesting WatchKit Extension' do pod 'Parse', '~> 1.7.5' end
V2
# Uncomment this line to define a global platform for your project platform :ios, '8.3' def shared_pods pod 'Parse', '~> 1.7.5' end target 'WatchBumpTesting' do shared_pods end target 'WatchBumpTesting WatchKit App' do end target 'WatchBumpTesting WatchKit Extension' do shared_pods end
V3
# Uncomment this line to define a global platform for your project platform :ios, '8.3' link_with 'WatchBumpTesting', 'WatchBumpTesting WatchKit Extension' target 'WatchBumpTesting' do pod 'Parse', '~> 1.7.5' end target 'WatchBumpTesting WatchKit App' do end target 'WatchBumpTesting WatchKit Extension' do end
All three gave different results, none of which was desirable. V3 will not install the module. He stated that [!] Targets with different platforms .
V1 and V2 led to warning and error. A warning...
Pods-WatchBumpTesting WatchKit Extension was rejected as an implicit dependency for 'libPods-WatchBumpTesting WatchKit Extension.a' because it doesn't contain platform 'watchsimulator' in its SUPPORTED_PLATFORMS 'iphonesimulator, iphoneos'
The error changed depending on whether I imported the library into the extension or not. The good thing that came from all this was that my WatchCit Extension InterfaceController.h file can now see <Parse/Parse.h> However, when I imported it, it complained that PFPurchase.h could not find the StoreKit library .

I tried to import the library into the WatchKit Extension targets “Associated Structures and Libraries”, but could not find it - I assume this is because it is iOS 9 and not WatchKit. Importing it to the target of the iOS application did not fix the problem.
The second error I received was that I left the Podfile as it is (V1 and / or V2), but did not import <Parse/Parse.h> or <Parse.h> into my InterfaceController.h This time I got...
ld: library not found for -lPods-WatchBumpTesting WatchKit Extension-Bolts clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am completely and completely lost. I have exhausted all the possibilities! Any thoughts would be greatly appreciated. I am using the latest version of Xcode 7 Beta as well as CocoaPods 0.37.2