xcode4

What does RELEASE_SAFELY mean and why does it not work in xcode4?

℡╲_俬逩灬. 提交于 2019-12-22 10:22:40
问题 what does RELEASE_SAFELY or RELEASE_CF_SAFELY mean? Ok, it's for releasing objects but why not use [obj release] ? Besides I tried to use it in xcode 4 but I am running into buid errors: Undefined symbols for architecture i386: "_RELEASE_SAFELY", referenced from: -[AdressBookModel search:] in AdressBookModel.o ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status Can I do just [obj release] instead? What would you consider? 回答1: RELEASE_SAFELY is not a function but

Warning dialog “The Service is Invalid” when building and running App in XCode 4

好久不见. 提交于 2019-12-22 09:55:12
问题 I'm being annoyed by a warning dialog XCode 4 shows everytime I want to run the App I'm developing... it says: "The Service is invalid. Please check your setup and try again. (0xE8000022)." See image attached: Sometimes the App will load on the iPhone 4, sometimes it won't. It's a huge waste of time! Please if anyone knows how to help it let me know. I though it was because I enabled iOS Device Discovery to Support Wirelessly Connected Devices. When I saw it was an useless feature I disabled

Is there a BDD solution that presently works well with iOS4 and Xcode4?

梦想的初衷 提交于 2019-12-22 09:07:23
问题 So I've been searching pretty hard for a solid BDD alternative for iOS4 and Xcode4, but everything seems to have either been abandoned a long time ago or sortof working but rather messily. The best solution I've found is called Cedar (main article with a link to a recently updated project tracker), though it has some issues with Xcode4 involving a messy workaround, as noted here. Does anyone know of a better solution? Thanks! EDIT: I decided on using OCUnit and mushing the BDD syntax into the

Why does GDB debugger constantly freeze Xcode 4?

有些话、适合烂在心里 提交于 2019-12-22 08:28:21
问题 This is a really weird bug... I'm working on an iPhone project using the camera feed and running it through an OpenGL shader to apply effects to it. However, every time I simply create a new GLfloat in the code, the debugger freezes when launched... I can't copy and paste the text because the whole of XCode freezes up, but I've cobbled it together from one of the log files: GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:56:02 UTC 2011) Copyright 2004 Free Software Foundation,

Preprocessor Macros ignored in XCode's project settings, but not target settings

别来无恙 提交于 2019-12-22 07:55:28
问题 When I add a Preprocessor Macro in XCode 4 to one of my targets, it is used and conditional compilation occurs as I expect it to. However, if I move that setting to the project level and out of one of my targets the preprocessor macro apparently is ignored and not used at all. I verified that the macro is defined at all if I put it in the project's build setting through logging that is only compiled in when that macro is enabled. How can that be? System: OS X Lion, XCode 4.1 build 4B110,

OCUnit and C++ in Xcode 4?

 ̄綄美尐妖づ 提交于 2019-12-22 07:25:15
问题 Is anybody using OCUnit (as in Xcode 4.2 Unit Testing) with C++ code successfully? After hours trying to understand what's going on I'm now pretty convinced there are some major flaws in using Xcode 4 and OCUnit to test C++ code from Objective-C++ files (.mm) The main application (Cocoa with some C++ business logic) compiles fine! The trivial .mm test class fails with weird compiler errors, varying between Use of undeclared identifier (C++ class name) Use of incomplete type C++ requires a

Centering Placeholder Text in Subclass of UITextField

谁说胖子不能爱 提交于 2019-12-22 07:08:10
问题 So first, I needed to set the placeholder text color, so I subclassed the UITextfield as shown in several stack overflow posts. This works fine. Here is an example post of this: How do I subclass UITextField and override drawPlaceholderInRect to change Placeholder color. But, when I try to use searchNameField.textAlignment = UITextAlignmentCenter; It is no longer centering the placeholder. The input text is still centered fine. So then, assuming that the centering is not working because of

How do I debug XPC Services in XCode 4?

血红的双手。 提交于 2019-12-22 06:59:55
问题 I added an XPC Service to my project and I would like to set breakpoints and inspect variable contents in the debug area in XCode. Breakpoints that I set in the service's code are not recognized (obviously, the debugger is attached to the main apps process. How and I attach the debugger (manually or automatically) to the XPC Service process after my main app launches it? Is there some way to run the service alone and send it messages without it being launched from the main app? 回答1: Debug ->

XCode not importing OS X crash log

爷,独闯天下 提交于 2019-12-22 06:49:19
问题 I have a crash log for my app sent to me by a tester. According to the documentation I should be able to drop this into the 'Device Logs' section of the Library in the Organizer (or use the 'Import' button at the bottom of the window). Unfortunately both does nothing. No error, no warning, no import. My .crash file was created by hand by copying the content of an email so maybe the formatting is incorrect, comparing it to other crash files it seems correct though. I have the build the crash

How do I use the ios 4.2 base sdk using Xcode 4.2?

北城以北 提交于 2019-12-22 06:45:00
问题 How do I use the ios 4.2 base sdk using Xcode 4.2? I own a iPhone 4s and an iTouch which has has ios 4.2 on it. After upgrading Xcode to 4.2 to work with my iPhone 4s, I can't use Xcode with my iTouch anymore. How do I setup Xcode to work my iTouch on 4.2 and my iPhone on ios5? Also I tried setting the base sdk by selecting other but there is nothing else in the list, all I get is a dialog window that I can manually type in. Do I need to add an option there? Thanks. 回答1: Xcode 4.2 comes with