Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Such Product Type #40

Open
jayrparro opened this issue Jan 25, 2012 · 12 comments
Open

No Such Product Type #40

jayrparro opened this issue Jan 25, 2012 · 12 comments

Comments

@jayrparro
Copy link

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
Copy link
Owner

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

@rayflection
Copy link

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
Copy link
Owner

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

@rayflection
Copy link

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
Copy link

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:

#40 (comment)

@hollarab
Copy link

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
Copy link

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
Copy link

jalakoo commented Mar 18, 2013

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
Copy link

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
Copy link

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
Copy link

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

@RamChandraReddy
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants