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

Moved Sparrow header files from Public to Project in "Build Phases". #1032

Merged
merged 1 commit into from Jul 10, 2011
Merged

Moved Sparrow header files from Public to Project in "Build Phases". #1032

merged 1 commit into from Jul 10, 2011

Conversation

mnem
Copy link
Contributor

@mnem mnem commented Jul 8, 2011

This may be an XCode 4 problem - I don't have XCode 3 around to check if it fails on that too unfortunately.

When archiving a project (for submission or distribution), all the header files, including those of linked projects, seem need to be in the "Project" section of "Copy Headers" section in "Build Phases".

If they aren't, XCode 4 will complain that the app is not "a single–bundle application or contains multiple products" when you archive it and Share/Validate it.

You can check this by opening the current AppScaffold project, change the build target to "AppScaffold > iOS Device", then go to the Product -> Archive menu option. The archive that's produced won't look like an app, and when you validate or share it, you get the not "a single-bundle application" error.

I fixed it by selecting the Sparrow project, going to Sparrow target -> "Build Phases" and then moving all the Public headers into Project.

When archiving a project, all the header files, including those of
linked projects, seem need to be in the "Project" section of "Copy
Headers" section in "Build Phases".

If they aren't, XCode will complain that the app is not
"a single–bundle application or contains multiple products" when you
archive it and Share/Validate it.
@brianensorapps
Copy link
Contributor

I would like to see this change also, as long as it doesn't break Xcode 3 compatibility.

@PrimaryFeather
Copy link
Owner

Hm ... I moved the .h-files into "Public" so that Sparrow can be linked to when it is in a workspace, parallel to a game. (Not a sub-project of a game, which is the default.) This is recommended here:

http://blog.carbonfive.com/2011/04/04/using-open-source-static-libraries-in-xcode-4/

Then, of course, I ran into the same problem as you: I got the "single-bundle" error. In my case, however, it sufficed to change the build setting "skip install" of the Sparrow project to "yes" - and I think I also added this to Sparrow 1.2. Could you (or Brian?) please check if this is the case in your projects, and if that helps? If that does not work in your projects, it might really be best to move the .h-files into the "Project"-group, as this will be the way most users will work, anyway.

Thanks in advance!

@mnem
Copy link
Contributor Author

mnem commented Jul 10, 2011

Hi,

If I try to Archive the AppScaffold project from a clean version of master, I run into the problem with XCode complaining that it isn't a single-bundle application.

Just to check that I'm skipping the install correctly, this is what I do:

  1. Select the linked Sparrow.xcodeproj.
  2. Select the "Sparrow" target.
  3. Select "Build Settings"
  4. Make sure "All" settings are shown rather than basic
  5. Go to "Deployment" -> "Skip Install" and make sure it's "Yes". (it already was set to that)

Then I tried to Archive it and got that problem.

Just to make sure I also checked that Project->Sparrow->Deployment->Skip Install was set to yes, and for the UnitTests target, but it still seems to copy the headers.

One thing to mention is that I'm only able to test this on the beta version of XCode 4.2 at the moment. Could that be what's causing it to not skip the install correctly?

@PrimaryFeather
Copy link
Owner

Hm, that's really odd ... your description is correct, and on my system it works that way.
But since I've heard reports from several people that they had problems with this, I think I'll just merge your pull request. I don't think that many people are using Sparrow in the way that makes the "Public" setting necessary. (And in that case, they can still change it manually.)

PrimaryFeather pushed a commit that referenced this pull request Jul 10, 2011
…-to-project

Moved Sparrow header files from Public to Project in "Build Phases".
@PrimaryFeather PrimaryFeather merged commit 01030a3 into PrimaryFeather:master Jul 10, 2011
@mnem
Copy link
Contributor Author

mnem commented Jul 10, 2011

It is an odd one. I'll try it on a clean install of XCode 4.0 later just to make sure though (I have a clean partition set up just now in preparation for installing Lion when it's released later - hopefully this week!)

@mnem
Copy link
Contributor Author

mnem commented Jul 11, 2011

Just a quick update. After a clean install of XCode 4.0.2, I still get the original archive issue on the old master.

It works with the latest master though (which includes this patch).

XCode configuration is a kind of dark magic :)

@PrimaryFeather
Copy link
Owner

Thanks a lot for taking the time to make a clean install and trying it with that! I know that this stuff takes time ... ;-)
OK, that should settle it! Your patch stays in there! =)

Again, thanks a lot for your efforts!

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

Successfully merging this pull request may close these issues.

None yet

3 participants