Target specifies product type "", but there is no such product type for "iphoneos" platform

Error: target specifies product type "", but there is no such product type for the "iphoneos" platform

It might not be that hard to fix. However, this is a new feature of Apple's iOS8 extension and my app should work on iOS7. I created an extension using XCode6 beta, but now I cannot run the app on a device with iOS7 on it.

I'll post an answer if I figure it out. It's probably good that you have a question on this site.

Thanks for any help.


source to share

1 answer

My guess is that after adding a new iOS8 feature, such as the new Share extension, the project cannot be compiled and run using the old XCode5. I tried to get XCode5 up and running because we will be out soon and XCode6 is still beta. Liberation using beta software is never a good idea.

I noticed that some of the code I wrote would also not compile in XCode5, and I got around it using ifdef blocks such as:

#define iOSVersion ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)

- (void)viewDidLoad {
#ifdef iOSVersion
  NSExtensionContext *myExtensionContext = self.extensionContext;
  NSArray *inputItems = myExtensionContext.inputItems;


But it's better to continue running the project on XCode6 for extensibility, as at the moment I'm not sure how to get rid of the error using XCode5.



All Articles