xcode4

Can't make Xcode 4 run a barely empty project using SDK 4.2 (runs fine in 4.3)

浪子不回头ぞ 提交于 2019-12-11 07:51:39
问题 I created a blank NavBar project and only touched a couple lines or so on one of the view controllers. I tested it fine in the 4.3 iPad and iPhone emulator but can't make it work for 4.2 at all. I get an error saying: The selected run destination is not valid for this action. This is what I have on my project settings: Usually in XCode 3 that was all I needed to change but I guess I'm missing some setting in XCode 4. What could this be? 回答1: @pokstad, you are right. I was looking at the wrong

Is it possible to have application test errors highlighted in the editor with Xcode 4?

落爺英雄遲暮 提交于 2019-12-11 07:44:38
问题 When I run logic tests with Xcode 4 and failures occur, the test failures are listed in the issue navigator and the lines of code where the failures occur are highlighted in the editor. For example, with this logic test: - (void)testExample { STFail(@"Unit tests are not implemented yet in TinyWordsLogicTests"); } The line with STFail is highlighted as an error in the editor, with the error message "Unit tests are not implemented yet in TinyWordsLogicTests" appearing to the right of the line

Is it possible to set navigationitem.title from a view's NIB?

﹥>﹥吖頭↗ 提交于 2019-12-11 07:42:41
问题 I am loading a new view from a NIB (initWithNibName) and then I am pushing it into navigation controller stack (pushViewController). In order to have a proper "Back" button each view should have a title. Unfortunately I didn't manage to find a way to set up View Title in the Interface Builder. It can be done in run time: - (void)viewDidLoad { [super viewDidLoad]; self.navigationItem.title = @"MyTitle"; } But I didn't manage to do it in design time in the NIB. Is there a way of doing it? Thank

Running old game build in latest Xcode 4 creates conflicts with C function in stdio.h

£可爱£侵袭症+ 提交于 2019-12-11 07:40:09
问题 I have a two year old game code which was completely written in cpp in xcode (not obj C). Now I have to run this game in latest version of Xcode 4. The game builds great with Xcode 3.2.5. But when i built the game with Xcode4, it shows following error. GCC 4.2 Error: Declaration of C function 'int printf(int, const char*, ...)' conflicts with in /Developer/Xcode4/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/stdio.h The red mark appear in line number 446

File attached to Email - I am trying to open myapp

半腔热情 提交于 2019-12-11 06:45:41
问题 I found several posts and reading between the lines I added 3 sections to my info.plist. When I run my app the email has an attached file with the "ntdb" suffix, but email doesnt seem to recognize the extension. I assuming that I must have entered something wrong in the plist but after trying every combination for the last 2 days I dont know what else to change. Can anyone tell me what I did wrong? The filename in the email is a date and ntdb like: "myfile 09-06-2011.ntdb" <key

XCode 4 C++ header file with relative path to another header

白昼怎懂夜的黑 提交于 2019-12-11 06:36:54
问题 I'm using a library with an include structure where the .h files are all in a single directory. These .h files contains a single line, a #include directive which points to the 'real' header file in specific source folder locations. The #include path in these files is relative. So, here's an example. The directory structure is: /project /sources <my .cpp files> <my .cpp files> ... /include /component foo1.h foo2.h /platformA/something/foo1.h /platformB/somethingelse/foo2.h /include/component

Build failure when trying to build SSCrypto framework for use with iOS

廉价感情. 提交于 2019-12-11 06:26:15
问题 Using Xcode 4, I'm attempting to build the SSCrypto framework for use with an iOS app. In Build Settings, when I change the base SDK to Latest iOS, I get this error: target specifies product type 'com.apple.product-type.framework', but there's no such product type for the 'iphoneos' platform My googling and searching has turned up empty, so I feel I'm missing something obvious... How do I get SSCrypto framework to work on iOS? 回答1: For iOS only static libraries can be used, not frameworks

Xcode 4 and iPad2 splash screen issue

北战南征 提交于 2019-12-11 06:22:32
问题 Thank you for reading this. I created a brand new project in Xcode 4 (Window based kind) and tried to get the splash screens working. If I click on the blue icon of my project (top of the project hierarchy) and then click on "Target/Project", I see that I can drag and drop two launch images to use them as splash screens. My portrait picture is a 768 x 1004 px png file and my landscape picture is a 1024 x 748 png file. When I drop the portrait picture, everything looks fine but when I do the

XCode 4 only displaying cout statements with endl

谁说我不能喝 提交于 2019-12-11 06:17:59
问题 I have a really weird issue with my cout statements. I've only tried this out with XCode 4. For instance, if I write, cout << "this works" << endl; cout << "this doesnt"; cout << memorySizeLimit << " blocks of memory available." << endl; I see all three output statements in my debugger console. However, if I change the order to, cout << memorySizeLimit << " blocks of memory available." << endl; cout << "this works" << endl; cout << "this doesn't"; I only see the first two couts. Even stranger

How do I make an NSPathControl look like other dropdown boxes?

末鹿安然 提交于 2019-12-11 05:53:31
问题 I'm wrestling with NSPathControl . Specifically, I have a dialog (generated by a NIB) which asks the user for a title and a path. The path is supposed to be a local path on the user's hard drive. So, in Xcode 4, I dragged in an NSPathControl . In the Attributes inspector, I set its style to "Pop Up". This pretty much works like I expect. If I click it, I get a menu with a few common paths or paths related to the current selection, and a "Choose..." option which opens up a dialog box and