iOS-Universal-Framework icon indicating copy to clipboard operation
iOS-Universal-Framework copied to clipboard

No Such Product Type

Open jayrparro opened this issue 13 years ago • 12 comments

Here's my set-up: Xcode 4.2.1 Build 4d502 running in OS X Lion (10.7.2).

I've installed successfully the script for Fake framework & Real framework.


Leonardos-MacBook-Pro:Fake Framework leonardoparrojr$ sh install.sh 
iOS Fake Static Framework Installer
===================================

This will install the fake iOS static framework templates on your computer.

The templates will be installed in /Users/leonardoparrojr/Library/Developer/Xcode/Templates/Framework & Library

continue [y/N]: y


[ Installing templates into /Users/leonardoparrojr/Library/Developer/Xcode/Templates/Framework & Library ]

mkdir -p /Users/leonardoparrojr/Library/Developer/Xcode/Templates/Framework & Library
rm -rf /Users/leonardoparrojr/Library/Developer/Xcode/Templates/Framework & Library/Fake Static iOS Framework Unit Testing Bundle.xctemplate
cp -R Fake Static iOS Framework Unit Testing Bundle.xctemplate /Users/leonardoparrojr/Library/Developer/Xcode/Templates/Framework & Library/Fake Static iOS Framework Unit Testing Bundle.xctemplate
rm -rf /Users/leonardoparrojr/Library/Developer/Xcode/Templates/Framework & Library/Fake Static iOS Framework.xctemplate
cp -R Fake Static iOS Framework.xctemplate /Users/leonardoparrojr/Library/Developer/Xcode/Templates/Framework & Library/Fake Static iOS Framework.xctemplate


[ Installation complete. Please restart Xcode. ]

I've restart Xcode and open my project again.. Clean & rebuild my project but then, I still encounter this compiler error: "target specifies product type 'com.apple.product-type.framework', but there's no such product type for the 'iphonesimulator' platform"

Any idea? I've tried uninstall & re-install the iOS-Universal-Framework but still isn't working.

jayrparro avatar Jan 25 '12 16:01 jayrparro

Usually that means that your project references a real static framework. Try installing the real framework templates and see if the problem persists.

kstenerud avatar Mar 01 '12 16:03 kstenerud

Any progress on this? I am having the same error running Xcode 4.3.1 (4E1019) on Lion 10.7.3 I've manually added the product type and package type to the xcspec files, and also run with just the new UFW-iOSStaticFramework.xcspec file, done many uninstall_legacy and installs, but all result in the same error: target specifies product type 'com.apple.product-type.framework.static', but there's no such product type for the 'iphoneos' platform This is using a git download of the UFW package from this past Saturday (f13f651), new project, Real framework, build -> error whether I add source files to include in the framework or not. TIA, Mike

rayflection avatar Apr 10 '12 00:04 rayflection

I can't duplicate this issue on my machines. Basically, in order for Xcode to understand real static frameworks, it needs to have a copy of the xcspec file installed in the simulator and iphoneos directories.

For newer Xcode:

  • /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/UFW-iOSStaticFramework.xcspec
  • /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications/UFW-iOSStaticFramework.xcspec

For older Xcode:

  • /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/UFW-iOSStaticFramework.xcspec
  • /Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications/UFW-iOSStaticFramework.xcspec

Maybe try reinstalling Xcode? I can't do much from my end without a repro case...

kstenerud avatar Apr 10 '12 15:04 kstenerud

Karl, Thanks for the crystal-clear explanation. I traced down into my Xcode 4.3 app contents and the xcspec files were not there. Copying them there fixed it. It's possible I had installed Xcode4.3 into a non-standard location. Anyway, thanks again for your help, and for building this framework in the first place. Best, Mike

rayflection avatar Apr 10 '12 17:04 rayflection

Hi Karl, Quick question: If I have a plist file in my static library, what bundle do I use to access it from inside the code? I added a simple plist file to the Copy Bundle Resources build phase of the library target. But when I run (on iPhone simulator or iPhone device), I cannot find the resource in [NSBundle mainBundle], nor [NSBundle allBundles], nor [NSBundle allFrameworks]. Thanks! -Mike Yost

On Tue, Apr 10, 2012 at 11:30 AM, Karl Stenerud < [email protected]

wrote:

I can't duplicate this issue on my machines. Basically, in order for Xcode to understand real static frameworks, it needs to have a copy of the xcspec file installed in the simulator and iphoneos directories.

For newer Xcode:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/UFW-iOSStaticFramework.xcspec

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications/UFW-iOSStaticFramework.xcspec

For older Xcode:

/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/UFW-iOSStaticFramework.xcspec

/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications/UFW-iOSStaticFramework.xcspec

Maybe try reinstalling Xcode? I can't do much from my end without a repro case...


Reply to this email directly or view it on GitHub:

https://github.com/kstenerud/iOS-Universal-Framework/issues/40#issuecomment-5048601

rayflection avatar Apr 27 '12 14:04 rayflection

I'm seeing this issue with Xcode 4.5 on Lion. The above work around doesn't seem to work for me.

I'm just getting started with this tool, so I don't have much invested in it, but it seems like this would block anyone from getting started anymore...

hollarab avatar Nov 11 '12 18:11 hollarab

I found out the same issue on XCode 4.6

The spec file is correctly installed at

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/UFW-iOSStaticFramework.xcspec

but when building it comes out with the error

target specifies product type 'com.apple.product-type.framework.static', but there's no such product type for the 'iphoneos' platform

loretoparisi avatar Jan 29 '13 14:01 loretoparisi

I get this error every time I update XCode. Open up terminal and drop in the install.sh file within the "Real Framework" folder to reinstall the xctemplate files and restart Xcode. That works for me.

jalakoo avatar Mar 18 '13 18:03 jalakoo

I'm using Xcode 5.0. I just installed successfully the script for Fake framework & Real framework and received the same error. I checked for the xcspec files in both the Fake and Real framework folders and they are there. Nothing working for me. Still same error. Any ideas?

patricia-idair avatar Oct 21 '13 21:10 patricia-idair

Confirming jalakoo's solution--I updated to Xcode 5.0.2 from 5.0.1 and had to reinstall using install.sh to make the error go away.

rawrmaan avatar Nov 17 '13 16:11 rawrmaan

Confirming jalakoo's solution. Works Great. Thanks a lot man !!!

saru2020 avatar Jan 28 '14 19:01 saru2020

Hi All,

Since I do not have any idea on running that install.sh script, could some please let me know the step by step procedure to install that complex script. I am struct with that now, please help me to get out of this rid.

Thanks & Regards Ram

RamChandraReddy avatar May 10 '14 14:05 RamChandraReddy