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
34
votes
4 answers

Objective-C Block Property with Xcode code completion

Is it possible to define an Objective-C block property but still have full-code completion in Xcode 4? If I use a typedef to define the block: typedef void (^CompletionBlock)(MyObject *myObj); and then define the property: @property (nonatomic,…
Andrew
  • 7,630
  • 3
  • 42
  • 51
34
votes
5 answers

Iphone simulator screen rotation

How can I rotate the iPhone simulator to landscape? I have read many items of information, and none of them has helped me yet. I am using xcode 4, and am developing an iphone application. Thanks!
Trapshooter161
  • 430
  • 1
  • 5
  • 10
34
votes
2 answers

Using mac book built in camera with iOS simulator

I am new to iOS application development and I am using XCode4. I am trying to develop an application which uses the camera. For testing is there a way to integrate the built in camera of mac book to iOS simulator..? Thanks.
Bathiya Priyadarshana
  • 1,325
  • 6
  • 22
  • 35
34
votes
10 answers

iPhone/iPod Touch: application executable is missing a required architecture

I have an issue with xCode 4.2. I am getting this error when building: 2011-06-18 13:35:49.839 Validation[4110:607] *** Warning: Defaulting to the standard codesign tool warning: iPhone/iPod Touch: application executable is missing a required…
Doz
  • 7,009
  • 12
  • 61
  • 69
34
votes
8 answers

XIB File opens like an XML in XCode but opens correctly with Interface Builder

When I double-click my file StartWindow.xib in Xcode 4, it does not open into the integrated Interface Builder; it opens like a XML file. I can open all other xib files and they display as expected. I can open it with the old Interface Builder via…
mabstrei
  • 1,200
  • 3
  • 13
  • 28
34
votes
6 answers

Is there a way to "find mystery retains" ...?

Recently I was repairing someone's code. There was a big class that would not dealloc. You'd have to hit it with 5 or 6 releases to get it to dealloc. I carefully looked through the big class and eventually found the various things that needed to…
Fattie
  • 27,874
  • 70
  • 431
  • 719
34
votes
1 answer

Xcode 4 terms "Build for testing / Build for running / build for profiling / build for archiving"

What do the following actions in Xcode 4 do? Build for Testing Build for Running Build for Profiling Build for Archiving I'm not sure when to use each of these (or whether to use any of them at all).
harshit2811
  • 827
  • 1
  • 7
  • 21
34
votes
1 answer

Why are my targets in Products colored red?

Possible Duplicate: .app file appears in red (missing) in new projects with Xcode 4 With seemingly no provocation, the three .app entries in the Products folder of my hierachy are listed in red. Show In Finder is greyed out when I right click…
Luke
  • 9,512
  • 15
  • 82
  • 146
34
votes
3 answers

Xcode Debug Shortcuts

How can I go step by step in Xcode while debugging with a keyboard shortcut? I'd like to make step over and step into with the keyboard, I've looked for keysheets and such but didn't find keys for that particular actions.
33
votes
5 answers

Problems adding Projects to Workspace in Xcode 4

I have a couple of projects that I had started under Xcode 3.2.x some time ago. I switched to Xcode 4 a few days ago and want to make use of the Workspace feature as both projects. Basically, my plan is to extract some common features out of the two…
McKrassy
  • 961
  • 2
  • 10
  • 19
32
votes
5 answers

Xcode project how to detect target programmatically or how to use env vars

I want to do an Application test that parses some json, stores to core data, and reads out some objects. How can my code know if it's being run as part of a test or normal run? Just some way to know "are we in test target"? Because the app when it…
jpswain
  • 14,642
  • 8
  • 58
  • 63
32
votes
6 answers

How do you get implicit dependencies to work with workspaces in Xcode 4?

I want to manage projects in workspaces using Xcode 4 with Cocoa Touch Static Library projects which contain shared code that I could reference from other projects. According to WWDC 2010 videos and the Xcode 4 documentation there is a feature for…
Brennan
  • 11,546
  • 16
  • 64
  • 86
32
votes
1 answer

Where to set environment variables for app?

I'm working with source code that is frozen and cannot be changed; but its ENV aware and expects changes through the ENV. The source code is being used in an Xcode 4/iOS project. Xcode 3 allowed us to set environmental variables on the app in the…
jww
  • 97,681
  • 90
  • 411
  • 885
32
votes
6 answers

Changed project name in Xcode causing naming error

My old name consisted of a camel case type name similar to this MyApp I then changed it to Myapp 'notice the A is now non-caps' I changed this by clicking MyApp name in the navigator menu and changing it, up came a help box asking me to do system…
HurkNburkS
  • 5,492
  • 19
  • 100
  • 183
32
votes
3 answers

Removing splash-screen loading gif from Cordova app

I'm having a problem overriding Cordova's defaults when writing an app. I'm writing an iOS app using the Cordova (formerly PhoneGap) framework and Xcode. Cordova lets me add a splash screen for the project by just dragging and dropping it in under…
sam
  • 9,486
  • 36
  • 109
  • 160