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

Error building: product type 'com.apple.product-type.framework.static' #1

Closed
dhull opened this issue Aug 29, 2012 · 7 comments
Closed

Comments

@dhull
Copy link

dhull commented Aug 29, 2012

Sorry for my ignorance, but when I try to build BDApplicationHelpers under Xcode 4.4.1 I get the error:

Target specifies product type 'com.apple.product-type.framework.static', but there's no such product type for the 'iphoneos' platform
@toolmanGitHub
Copy link
Owner

Hi,

the sample app actually has a dependency on the BDApplicationHelpers framework target that is included in the project. In order to build the BDApplicationsHelpers framework, you need to use Karl Stenerud's great iOS-Universal-Framework script files.

https://github.com/kstenerud/iOS-Universal-Framework

download or git the project and run the scripts in the "Real Frameworks" folder.

Let me know how this works.

@dhull
Copy link
Author

dhull commented Aug 29, 2012

That got me past the error above. Then I got this (odd) error:

/Users/david/Development/BDApplicationHelpers/applicationHelpers/ViewController.m:649:9: error: return type 'void *' must match previous return type 'UIView *' when block literal has unspecified explicit return type
        return nil;
        ^
1 error generated.

I added a cast to (UIView *) and it went away:

            return (UIView *) nil;

Then I ran into a bunch of dependencies on $(SRCROOT)/../../Library/Developer/Xcode/DerivedData/applicationHelpers-bzlgxfckcftymiecgskefskxlpkx/Build/Products/Debug-iphoneos in applicationHelper's Copy Bundle Resources. I was able to find most of them elsewhere in the project, but not others. Found:

BDKeyPadViewController_iPad.xib
BDKeyPadViewController_iPhone.xib
buttonStateDown.png
buttonStateUp.png
doneButtonStateUp.png
focusIndicator.png
backSpace.png
backSpacePressed.png

Missing:

BDHelpViewController.nib
BDHelpViewController_iPad.nib
BDPickerViewController_iPad.nib
BDPickerViewController_iPhone.nib

@toolmanGitHub
Copy link
Owner

Thanks for helping out with the project. I had not compiled the project with xCode 4.4.1 yet. Yes the issue with the return nil is interesting. I will fix and push the change to repo.

In regards to the missing resources, the issue is the reference to the BDApplicationHelpers.embeddedframework in your project. Delete the reference that you currently have and find the embeded framework in your products folder. Drag and Drop it on back in the applictionHelpers sample project target.

Note, that I just downloaded the project, and I seem to be getting a DTrace error having to do with one of the files. I am still trying to track down the root cause for that.

@dhull
Copy link
Author

dhull commented Aug 29, 2012

In regards to the missing resources, the issue is the reference to the BDApplicationHelpers.embeddedframework in your project. Delete the reference that you currently have and find the embeded framework in your products folder. Drag and Drop it on back in the applictionHelpers sample project target.

I did this. I also removed the missing resources from the Copy Bundle Resources list, and this allowed the app to build.

I had to re-add the BDPickerViewController_iPad.xib and BDPickerViewController_iPhone.xib files to prevent the app from throwing an exception when I tapped the "Picker" button. The app still throws an exception if I tap the Help button, and the required BDHelpViewController xib file seems to be missing.

With the exception of the Help button, the app seems to be working correctly for me.

@toolmanGitHub
Copy link
Owner

I traced the overall issue back to XCode4.4 upgrade as well as the upgrade not playing nicely with the iOS-UniversalFramework scripts.

I've completely updated the project and pushed it to the repo. Instead of the sample app being dependent on the framework being in the build directory, I have placed a copy of the framework in the applicationHelpers sample app directory.

This will mean that everytime a change is made to the framework, users will have to paste the update framework back into the appropriate directory. If you are good with scripting Xcode it would be helpful for this automatically to get done.

Try downloading the repo again. It should work.

Thanks for the help.

@dhull
Copy link
Author

dhull commented Aug 30, 2012

Yes, it works. Thanks!

There is still one minor issue. When I compile I still get the following warning, which can be fixed by editing applicationHelper's Framework Search Paths:

ld: warning: directory not found for option '-F/Users/david/Development/BDApplicationHelpers/../../Library/Developer/Xcode/DerivedData/applicationHelpers-bzlgxfckcftymiecgskefskxlpkx/Build/Products/Debug-iphoneos'
ld: warning: directory not found for option '-F/Users/david/Development/BDApplicationHelpers/../../Library/Developer/Xcode/DerivedData/applicationHelpers-bzlgxfckcftymiecgskefskxlpkx/Build/Products/Debug-iphoneos/BDApplicationHelpers.embeddedframework'
ld: warning: directory not found for option '-F/Users/david/Development/BDApplicationHelpers/applicationHelpers/BDApplicationHelpers.embeddedframework'

I'm not clear as to whether it's still necessary to install the iOS-Universal-Framework to run the test app, but if it is I would recommend calling that out more explicitly in your README.mdown (it's only mentioned in the credits section).

I came to your project from your answer to http://stackoverflow.com/questions/8146253. I'm trying to understand how to implement a container view controller, and I think that looking at your code is going to help. Thanks again.

@dhull dhull closed this as completed Aug 30, 2012
@toolmanGitHub
Copy link
Owner

howdy. based on your feedback, I'm going to modify the project a little bit to remove that dependency. Truth be told, you could just add the BDApplicationHelper source files and the associated headers and link it that way. I wanted BDApplicationHelpers to be a framework to be used in other apps that I am working on. For a more simple intro to viewController containment, check out https://github.com/toolmanGitHub/stackedViewControllers

This issue was closed.
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

2 participants