kstenerud / iOS-Universal-Framework

An XCode project template to build universal frameworks (arm7, arm7s, and simulator) for iOS / iPhone.
2.95k stars 473 forks source link

No Such Product Type #40

Open jayrparro opened 12 years ago

jayrparro commented 12 years ago

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.

kstenerud commented 12 years ago

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

rayflection commented 12 years ago

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

kstenerud commented 12 years ago

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:

For older Xcode:

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

rayflection commented 12 years ago

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 commented 12 years ago

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 < reply@reply.github.com

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

hollarab commented 11 years ago

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...

loretoparisi commented 11 years ago

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

jalakoo commented 11 years ago

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.

patricia-idair commented 10 years ago

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?

rawrmaan commented 10 years ago

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.

saru2020 commented 10 years ago

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

RamChandraReddy commented 10 years ago

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