I want Xcode to ignore some targets for now, both when building and when looking for issues as I edit. How do I tell it to do that?
You can edit the active scheme, select its Build action from the left-hand list, then uncheck the checkboxes corresponding to each action you don't want that target to be built for.
Related
I am working on ARC environment and I successfully disable Facebook API through -fno-objc-arc. I also want to disable this for my own class, and I did same method as with Facebook API classes, but I couldn't disable ARC. If anyone know please help me on that.
To get rid of this error you need to disable ARC, to disable ARC from your project do the following steps.
Select your project file.
You should be in the “Build settings” tab. Select the “levels” option (default is “Combined”)
There’s a search field to the right of “Combined”. Enter “Automatic”
Second group should be “Apple LLVM Compiler 3.0 – Language”. Second line under that controls ARC.
Click that line, then in the middle column (where it says “yes”), click and choose “no”.
Now the error should gone.
Just to make sure you are doing this in the right place:
In the project navigator, click on the top item, the project name
In the pane that appears with project and targets, select the correct target where the non-arc file is included
Go to Build Phases, open Compile Sources
Select the file that needs to be non-arc, double click it, and enter -fno-objc-arc
Build.
So double check you did this, especially selecting the right target.
I have two targets set up for my app (a lite version and a pro version) and I want to integrate some subtle differences in the code for each of them (e.g. the pro version will not show any iAd banners).
I have been looking around and I see the easiest way to do this is through the use of preprocessor macros. The issue I'm facing is how to set them up in Xcode 4. I want to set up a macro called 'PRO_VERSION' in one target & 'LITE_VERSION' in the other.
Below is an example of how I intend to use them:
#ifdef PRO_VERSION
// Hide ad banners
#else
// Show ad banners
#endif
The build setting you need to change is called 'Preprocessor Macros' and it can be found in the 'Build Settings' tab of the Project Settings pane (use the search box to find it). Select each target in turn in the left-hand side of the Project Settings pane then modify the Preprocessor Macros setting.
The setting is specified as a space-separated list of preprocessor macros in the form 'foo' or 'foo=bar'.
I'm not on my mac at the moment, so I can't give full step-by-step directions, but I believe this should be accurate, if not as detailed as I would otherwise be. Create a new build target. Go to the configuration screen for this new target. There should be a tab along the lines of compilation options. In this tab there should be a row for other compiler flags. In there, put -DPRO_VERSION.
Is there any way to specify multiple Make Targets to be built by the build process, and if so, then it is possible to control the order or define dependence of the Make Targets in a managed C++ project?
If you want to do this in eclipse and at the command line, I'd edit the makefile to add a targets depending on the items. Make will figure out the order if needed.
If it's ok to have this work just in the Eclipse project then add a custom make target
In the "Make Target" view, click "Create a Make Target", uncheck "Same as Target Name".
List your multiple dependencies all in the "make target" edit box.
I'm currently trying to create version 1.1 of a project I created in XCode 4, but after archiving the files do not appear in the Project Navigator. My initial thought was that I had to clone my repository (git) and thus create a new version in which I could see the
files, but the clone is also missing the files.
I can access the files from the top bar, but that's not really a desirable solution when
working with a big project. The case is the same for another project that I have archived
so I suspect it is supposed to be a feature of XCode 4.
What am I missing here?
(I'm just combining your "nevermind, I found it" comments into an answer, to maintain the SO style, so this question doesn't pop up as needing an answer.)
Check that you're not filtering file names (left column, bottom.)
Also make sure you haven't pressed one of the "show only files with..." toggle buttons (same location, near the search entry.)
Note that these buttons are toggles
Yes. I had to hit the X button with the icon that was blue at the bottom. This corrected my issue for XCODE Version 6.1. Thanks.
I'm trying to create a universal iPhone/iPad app using this method: http://www.enscand.com/roller/enscand/entry/ready_for_ipad which is also described all over the web. My problem is that the "Upgrade current target for iPad" line is grayed out and doesn't appear at all when I right click the target.
I'm working on an app that I inherited from someone, and have tried this with an app that I wrote entirely myself (no problems on that one). And yes, I'm sure that I'm selecting the target.
Just wondering if anyone has any insight into what checks are being run that would cause this option to be unavailable.
It took me a while to realize that you have to have a target selected before the menu item will become enabled.
I figured out that you have to select the target from the window on the left "Group & Files" for that "Upgrade Current target for ipad" to show.
I found the solution. After upgrading first target just rename Resources~iPad group in Groups&Files (e.g. to ResourcesFirstTarget~iPad). After that you can upgrade your other targets with "Upgrade Current Target For iPad".
I had this problem because I was trying to do it with the xib file selected, not the item under the the 'Targets' folder.
I just found that my project was set to "iPhone" for Distribution, but it was still set to "iPhone/iPad" for Debug. After switching to "iPhone" for Debug also, the option to convert to a Universal app became available.
Im not sure if this is an actual solution but I solved this problem by selecting the target, going to "Project" and setting the Active Build Configuration to "Release". Update Current Target for IPad then became enabled.
I deleted the "Resources-iPad" group and voila - the "Update Current Target for iPad" became enabled.
I was having the same problem, what I did to solve it was the normal thing:
- select target in Groups and Files
- (i.e change it from 'iPhone/iPad' to 'iPhone').
and it was grayed out...
- so I've cleaned the project (Build/Clean All targets)
It solved my problem, so I advise you to after make some changes that supposing would made it work, to clean the project afterwards!
Hope it can help someone.
I've found the same problem but can upgrade if I right click the target rather than using the menu item.
Further more I've just realised that the menu item does become ungrayed out if you select the target in Groups & Files not in the drop down at the top.
I don't know if this post is still active.
In project info, take a look at "Architecture", if there's more than one entry, the "Upgrade target for ipad" is greyed.
Set you app to target iPhone in both the Project->Edit Project Settings: All Configurations
and in the side menu, where you right click the target ->Get Info same type of menu.
To be able to click the "Upgrade to Ipad(...)" you have to click and select the target. Then it will work.
I solved this problem by right clicking on the target -> get info -> build, and changing the targeted device family from iphone/ipad to iphone.