Questions tagged [xcode4]

Xcode 4, released in June 2011, is Apple's integrated development environment (IDE) for Mac OS X and iOS. This tag should only be used for questions about this specific version of Xcode, and not for general Mac or iOS programming topics. Use [cocoa] for Mac programming questions, or [cocoa-touch] for iOS (formerly iPhone OS) programming questions.

Xcode 4 is the successor to Xcode 3, the main development tool for developing software under Mac OS X, targeting Mac OS and iOS. It was introduced to the developer community at Apple WWDC 2010, and the final release was published in March 2011. It was replaced by Xcode 5 in September 2013.

References

See for more information.

5408 questions
3
votes
3 answers

Can't create UIImageView from file

I have an image of a checkmark as a .png in the same directory as my project, called "checkbox.png". I want to create a UIImageView with that image as the background and set it as the accessory view of a set of UITableViewCells. I currently…
Tneuktippa
  • 1,645
  • 3
  • 15
  • 25
3
votes
1 answer

how to force installation of xcode

I tried to install XCode via AppStore but it fails with the following message: We could not complete your purchase Xcode is already installed on this computer. Choose Software Update from the Apple menu to check for available updates. This might be…
domi
  • 2,167
  • 1
  • 28
  • 45
3
votes
2 answers

XCode: What do I have to type into the Terminal, in order to change the copyright notice in code templates?

When I create an XCode project, there is a copyright notice commented out. I know that there is an special terminal command for editing this. Anyone knows it?
Thanks
  • 40,109
  • 71
  • 208
  • 322
3
votes
0 answers

why xcode prompts to save files for all projects

Is there a way to set XCode that it won't attempt to save files from a project is not being build/run? When you have several open projects, say project A, and project B. You change files in project A, then change files in project B. Then, build…
carlos_ms
  • 838
  • 9
  • 15
3
votes
2 answers

Xcode consistently fails to launch app on device: "Unknown packet reply: "timeout" to environment packet."

Since upgrading to Xcode 4.2 I've regularly encountered an error where attempting to debug an app fails with the message "Unknown packet reply: "timeout" to environment packet." Restarting the device does not consistently solve the problem (though…
Doches
  • 3,276
  • 2
  • 19
  • 26
3
votes
2 answers

Unable to lock screen orientation to portrait only in xcode 4?

In xcode 4 I am unable to lock the screen orientation to only portrait even though I have portrait selected only. How to I do this programmatically? - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { …
Omar
  • 2,155
  • 4
  • 24
  • 38
3
votes
5 answers

Git project is not recognized by xcode

I have a project that usually works with Xcode 4, however since upgrading to Lion and Xcode 4.1 it doesn't seem that I can commit my changes anymore. I have git setup in my project folder. I've tried to commit using terminal, but in xcode I only…
Enrico Susatyo
  • 19,372
  • 18
  • 95
  • 156
3
votes
3 answers

Using Xcode4 git integration with git-flow

Just wondering if anyone is using Xcode4's git integration to work with a project using git-flow? If so, did you have to do anything in particular to get it set up and working? Thanks
Kevin Whitaker
  • 12,435
  • 12
  • 51
  • 89
3
votes
2 answers

How do I link libraries in Xcode 4?

I'm a complete beginner to Apple's Xcode, but I have followed the Xcode documentation and the advice of a few related questions without success. I installed GMP to /usr/local/bin, wrote a short program using the library, and compiled with gcc main.c…
Vortico
  • 2,610
  • 2
  • 32
  • 49
3
votes
3 answers

How to change color of selected bar button?

I have a simple black navigation bar with following button When the button is pressed the button gets the same color as the the navigation bar with the same gradient. But I want it to look like this: So this has a simple black background color.…
DarkLeafyGreen
  • 69,338
  • 131
  • 383
  • 601
3
votes
3 answers

[ controllerWillChangeContent:]: message sent to deallocated instance

I am having a problem with my ipad app. I've got a view that is accessed in 2 ways, if i go in one way it works perfectly. If I go in through another though, it crashes when saving the context. I suspect it is something in the parent (orders by…
3
votes
2 answers

How do I use the Core Plot framework with Xcode 4?

How do I install the Core Plot framework into Xcode 4? This older tutorial has instructions on how to install it for Xcode 3, but I could not find any similar instructions for Xcode 4. What do I need to do in order to use this framework with the…
M Holod
  • 255
  • 4
  • 11
3
votes
4 answers

Show activity indicator during application launch

I am trying to add an activity indicator during startup. I did have a launch image, but I'd rather have just an indicator alone. I added the following to my app delegate, but the indicator doesn't appear. - (BOOL)application:(UIApplication…
Tanoro
  • 871
  • 2
  • 10
  • 30
3
votes
1 answer

how to get rid of "In class initializer for static data member ... is a C++0x extension" warning in Xcode 4

I can get rid of the warnings in the build log by adding -std=c++0x to "other c++ flags", but they still show up in the side pane. I'm guessing that the other flags are not being passed to clang or whatever is responsible for parsing code for the…
Tyler Daniel
  • 656
  • 6
  • 15
3
votes
0 answers

xcode 4 - cannot build because interface builder could not open file

I have an Xcode4 (4.1 on Lion) iOS project that has a XIB file and corresponding .h and .m files. Call it myViewController.xib. The file does nothing and I want to delete it. However, if I do delete it from within Xcode I cannot compile the project…
TJ Asher
  • 737
  • 9
  • 27