I'm trying to build a release version of my iPhone app in Xcode 4 and when it finishes and launches Organizer, there is no version number, it only says "unspecified". This is preventing me from using Xcode 4's Validate and Submit features.
Any ideas on how to fix this? My version number is set in my project settings, so not sure what's causing the problem.
Go to your info.plist file and create a new property "bundle versions string, short" and provide the same version number and it will show up in organizer.
Please see this question for additional detail.
The accepted answer doesn't fully solve the problem for all projects. There are several issues that all relate to each other and I will cover them all.
Xcode 4 Project Fails to compile a static library
Related question: Xcode 4 can't locate public header files from static library dependancy
Related question: “lexical or preprocessor issue file not found ” in Xcode 4
Errors might include; missing header files, "lexical or preprocessor issue"
Solutions:
Check the "user header paths" are correct
Set "Always search user paths" to YES
Create a group call "Indexing headers" in your project and drag the headers to this group, DO NOT add to any targets when prompted.
Xcode 4 project with static library dependancy fails to create a valid archive
Related question: https://stackoverflow.com/questions/5271496/xcode4-ios-4-3-no-packager-exists-for-the-type-of-archive
Errors might include;
Missing identifier and version. "No Packager exists for the type of archive"
Solutions:
For all dependancies set "Skip Install" build setting to "Yes"
Moving any "Public" headers in Build Phases to "Project"
Thanks but I needed 3 steps to entierly solve the problem with my project framework:
set the Target Build Settings/"Skip Installation" property to "YES" for every dependency project
clear the Target Build Settings "Installation Directory" property for every projects
for every projects, move every headers from section "Build Phases/Build Settings/Copy Headers" Public/Private to Project
This can also happen if your project references a misconfigured subproject for a shared library. Go through the Xcode projects for any shared libraries your project uses and make sure the target's "Skip Install" build setting is set to "Yes". Then rebuild the archive.
I had all these issues and more with an ad-hoc distribution build.
If you have static library dependencies and create a new build configuration for your Ad-hoc distributions, be sure that the library dependencies also have a matching build configuration. Otherwise, they default to using the Debug build configuration (or whatever configuration is first, I guess) and will be linked to your build.
For emphasis, in case it's not clear in other answers: set Skip Install to NO for your main project and have a valid Installation Directory set. Otherwise, they should be set to YES and empty respectively.
Also, I set a valid icon to remove the validation warning but I'm not sure whether this was required for a working package.
After updating Xcode from 4.0 to 4.1, I found that version information was missing and was blank on the specific 'Target'. And apparently now the version number was being displayed in the build field.
Just add your application version number to the version field for the 'Target' and it will implicitly update the info.plist file.
Archive the project and now you should be able to see the version number in the Archive.
And you should be good to go.
HTH.
My problem with no version or identifier on archive was simple in the end. I have one project with two targets. I have 2 schemes, each building a single target, or so I thought. My iPad scheme had the iPad and iPhone target listed in the build targets of the scheme setup. It was as simple as that, it was building both targets and not creating a valid archive.
I was having similar problem. First I was making universal app, but in the end client wanted separate prices for iPhone and for iPad app. So I created new target in xcodeproject.
When I wanted to archive iPad target I had version unspecified problem.
Here is solution.
In project set Skip Install to NO.
When you want to archive iPhone project set Skip Install to NO in iPhone target, and Skip Install to YES in iPad target.
When you want to archive iPad project set Skip Install to YES in iPhone target, and Skip Install to NO in iPad target and it should work.
Related
I have been trying to add omnigroup framework for editing rtf files into my local iPad application. But always I am getting the errors like OmniBase/OmniBase.h, OmniFoundation/OmniFoundation.h files are not found.
I tried with different combinations of settings in the build settings of project target. But did not work. I am using Xcode version 4.2.1,
Mac OS X : 10.7 and IOS 5 Lion OS.
There's actually a lot of Xcode configuration involved in using the Omni frameworks. I recently went through the learning process myself and wrote a lengthy tutorial. My tutorial is centered around using OUIEditableFrame but it should be a good starting point for whatever part of the framework you're looking to use.
In a nutshell:
Make sure you're including Omni's Configuration directory in your project.
Add the required frameworks by adding the appropriate .xcodeproj files from Omni to your project. Many frameworks are dependent on other so all dependencies will need to be added.
Add required libraries to the Link Binary with Libraries section of the Build Phases tab.
Add required libraries to the Target Dependencies section of the Build Phases tab.
Edit your Schema. Select Build and add the required libraries.
I have an Xcode app project with available configurations "Foo", "Bar", and "Baz". This project is dependent on a static library with configurations "Debug" and "Release".
Xcode4 is building products from the app project into a "Foo-iphoneos" directory, and products from the library project into a "Release-iphoneos" directory.
What is the best practice for having these two projects share the same build products directory?
You can add the following path to library search paths for any non-standard configuration:
"$(BUILT_PRODUCTS_DIR)/../Release-$(PLATFORM_NAME)"
This works for me with xcode 4.6. I'm not sure if there is a way to control which configuration will get built for the dependent sibling projects, but for my purposes Release was what I wanted.
One solution is that if your dependent projects have the same configuration names as the main project (i.e. Foo, Bar, Baz), then Xcode will match them up and build using the same configuration.
So, if you wanted a debug build instead of a release build, you could duplicate the Debug configuration and call it Foo. If you do not really need both, you could rename the configuration instead of duplicating it, but with example names like Foo, I am not sure what would make sense for your situation.
However, the title mentions Xcode 4. The technique described above is what I used to do in Xcode 3; I haven't figured out how to manage these configurations yet in Xcode 4. I'm trying to figure that out now.
Update: To manage configurations in Xcode 4, you can click on the name of your project or dependent project towards the top of the project navigator (where all your files/folders are listed on the left side). In the main window, select Info (the other tab is Build Settings). You will then see the Configuration section where you can add/delete/rename your configurations.
I have found that if your target and dependencies' configurations don't match then the dependencies will be built with the Release configuration.
I couldn't find a way to customize that.
i have upgraded my xcode to 4.0.1 in that i am tring to run my old project which built on xcode 3 but am getting following warning can any one tell me how to fix that
ld: warning: directory not found for option '-F/Developer/new xcode/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/System/Library/PrivateFrameworks'
You may need to update your linked frameworks.
Go into your project's build phases, and relink the frameworks...
EDIT
Also check the frameworks search path setting, in your project's build settings.
I have created a cocoa touch static library that contains functionality that I want to include in several apps. This library is linked to libxml and I have the header search path /usr/include/libxml2. The library builds correctly.
I include this library in another xcode project as a reference (by dragging the library xcodeproj file into my app xcode project. I also setup the target to have the library as a direct dependency, setup the header search path to include /usr/include/libxml2, and add libxml2.dylib in the frameworks.
The problem is, when I try to build the project is has a build error:
Libxml/tree.h: No such file or directory.
I initially had this problem trying to build the library and solved it by adding the header search path and framework into the project for libxml2.
Incidentally, i have another app that uses the library but does not use libxml, it builds and runs correctly.
So the problem seems to be using libxml in both the app and a linked library.
Anybody any ideas?
Yours hopefully,
Neil.
You probably need to add the include path /usr/include/libxml2 to both the target and the project.
To add it to the target, right click on the target and select Get Info.
To add it to the project, go to the Project menu > Edit Project Settings.
In both cases, make sure you've selected Configuration: "All Configurations".
I have created a static library in XCode called TestLib.
I then created a simple test project that will use this library. I dragged the TestLib xcode project into my test project (frameworks section - if it matters), and set TestLib as a direct dependency of the test project.
I am having trouble importing header files from the Library, I only have 1 in there (its a test project) called TestLibHeader.h, but no matter how I attempt to import them, I get compile errors stating that the header file cannot be found.
Where am I going wrong?
You need to tell your build target where to look for the header files for a given build configuration.
in XCode 3.x
Double click on your build target.
Click on the Build tab.
Search for the build setting Header Search Paths
Set Header Search Paths to include the path the header files in your library project.
See the instructions for setting up three20 as a dependency for a good example of these steps in action.