xcode4

Xcode 4 Core Data: How to use fetched property created in Data Model editor

这一生的挚爱 提交于 2019-12-03 03:13:43
问题 How do you implement a fetched property in Xcode 4? Here is an example of two entities, a book and a page: I followed the guidelines here to create a fetched property that references a value from the source entity using the variable $FETCH_SOURCE: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreData/Articles/cdRelationships.html Now, once I have this saved and I generate the source code I get this: // Book.h #import <Foundation/Foundation.h> #import <CoreData

How to highlight opened file in XCode 4 on the “Project Navigator” panel?

丶灬走出姿态 提交于 2019-12-03 02:55:04
问题 Since a project can have hundreds of files inside dozens of directories (filters) shown on the "Project Navigator" panel, sometimes it's getting difficult to seek the file which is currently opened in the Editor (for example, when I jump from file to file via "CMD + clicking", etc). Is there a way to automatically select currently opened file on the "Project Navigator" panel? I.e., automatically expand the directories (filters) and select the file there as I would have clicked on it? Maybe

Why does Xcode keep recompiling my untouched project?

左心房为你撑大大i 提交于 2019-12-03 02:54:13
I have an Xcode 4 workspace with several projects. Everything builds perfectly and works as expected, only Xcode recompiles files too often. If I hit the Build button, wait for the compilation to succeed and then hit the button again, shouldn’t that be essentialy a no-op, since no files have changed? Because my Xcode recompiles a big part of the project again. Even when I build and then immediately hit the Play button, I have to stare at the building process again. Is that neccessary, is it expected behaviour? Shot in the dark, but do you have external xcode projects linked? XCode may be

What is the way to quick-switch between tabs in Xcode 4

徘徊边缘 提交于 2019-12-03 02:52:21
问题 I have opened many tabs while working on project. (new feature in Xcode 4). But for switching from one tab to other tab, the only way I've found to do this is to use the mouse. Is there any way to switch between different tabs using keyboard shortcuts? 回答1: Shortcuts are: CMD + SHIFT + } - Select Next tab CMD + SHIFT + { - Select Previous tab 回答2: The default shortcuts are: ⌘ + SHIFT + { - Select Next Tab ⌘ + SHIFT + } - Select Previous Tab But I prefer going to XCode -> Preferences -> Key

Xcode 4 build succeeds, command line build fails?

烈酒焚心 提交于 2019-12-03 02:17:57
问题 I have a project in Xcode 4 (the latest non-beta version) that builds fine when built in Xcode itself. Specifically, the Ld command correctly uses the derived data directory (where build products, including a dependent static library, are placed). However, when I build the same project from the command line, the Ld command fails, as it is trying to use the /build folder within the project, which is not being populated. I've tried adjusting every build setting I know about, both in the parent

How to make Xcode4 stop at NSAssert failure?

穿精又带淫゛_ 提交于 2019-12-03 02:01:52
问题 Currently, my Xcode4 does not stop at NSAssert failure. How can I make it stop at NSAssert failure again? 回答1: Go to the XCode 4 breakpoint navigator. Click the + button and choose "Add Symbolic Breakpoint" Set Symbol: to "-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]" Click "Done" Now you will stop in the debugger as soon as NSAssert fires. In my testing, it goes to the nearest source code and doesn't just show you the assembly where you set the breakpoint.

Xcode 4.1 Archive Build in organizer doesn't show icon

江枫思渺然 提交于 2019-12-03 01:59:01
My application icon's work fine when displaying on iPad and iPhone, however after I build for archive, and create the archive, there is no icon shown. Any ideas? I've looked around at several forums and haven't found a resolution. I actually don't believe this has any effect on the actual distribution deployment, as the .ipa definitely has the icons bundled with it. I've loaded it directly into iTunes to verify that. See screenshots below, I already have "Icon File" (CFBundleIconFile) and "Icon Files" (CFBundleIconFiles) defined. Hate to answer my own question, though a light bulb just went

Is it possible to view the contents of files in the iOS Application sandbox while debugging?

爱⌒轻易说出口 提交于 2019-12-03 01:48:34
问题 I'd like to check the contents of an XML file at a specific point of execution while debugging in Xcode. Is it possible to view the contents of the file, either through the Organizer (I'm debugging using actual hardware devices, not the simulator), or by typing in some sort of command into the output/console? I am using Xcode 4. 回答1: Simply open the organiser and click the 'Download' button at the bottom, then right click on the xcappdata file and select Show Package Contents. 回答2: Updated

Xcode 4 unit testing linker error

蓝咒 提交于 2019-12-03 01:44:17
NOTE: "Use GHUnit" is not an acceptable answer to this question. I know most think GHUnit is better than the Xcode4 OCUnit, but that's not what I'm asking about. I'll evaluate that separately. I have an Xcode project that I created in Xcode4 from scratch, with the "Include unit tests" checkbox checked during creation. I have also included some libraries I developed in a previous project. They were added to the project via the "Add Files to x..." dialog and only added to the application target (not the testing target). They work fine when running the application, so I think they're set up

Auto-Incremented Object ID in Core Data?

孤人 提交于 2019-12-03 01:39:10
I am working with several NSManagedObject types with several relationships. How can I tell Core Data to automatically populate object IDs for me? I'm looking for something like an index key in SQL, so that no two instances of a given object are allowed to have the same ID. Edit: I'd like for all of my "Account" objects to have unique IDs on them. I was just adding one to the `countForFetchRequest, but I realized that when deleting the second to last object and then adding one, the last two objects now have the same IDs. How can I ensure that a given value has a unique value for all instances