xcode4

Changing XCode project name causes fatal error

牧云@^-^@ 提交于 2019-12-24 09:27:07
问题 I am trying to rename my XCode 4 project. I have tried several different ways, but nothing works. I always get the following error: fatal: source directory is empty, source=Desktop/Folder/OLD PROJECT NAME.xcodeproj, destination=Desktop/Folder/NEW PROJECT NAME.xcodeproj What's causing this error, and how can I resolve it? 回答1: I had a similar issue when I was trying to rename a project for the second time. The error was "fatal: bad source ...". The original project was called AppTemplate. The

Where are my targets in Xcode 4?

走远了吗. 提交于 2019-12-24 07:29:54
问题 In Xcode 3, I had a list of targets in the left column. They're not there anymore. There's a list in the Scheme pull-down, but I can't find them anywhere else. Have they changed name to "Schemes"? 回答1: Targets are still there. Click on the project (the very first object in the tree) in the project navigator and you'll get a view with project settings on the right and targets on the left. 回答2: Click the button as below images 回答3: Click on the top level item in the left hand project view - it

Xcode 4 interface-builder problems

旧时模样 提交于 2019-12-24 07:28:37
问题 I have several problems with the interface builder in Xcode 4. I am using Xcode 4.5 but the problems started even before I updated it. My first problem is that if I edit a field (e.g. a text field from not editable to editable) it sometimes disappears. Or other fields change their position. My second problem which is probably related to the first one is that the size inspector looks strange and when I switch do a different inspector the size inspector I'm used to appears for half a second

Xcode 4 NSLog Macro link in Xcode 3

妖精的绣舞 提交于 2019-12-24 06:19:30
问题 In Xcode < version 4, there was a macro to quickly write NSLog statements. I could type (I think, using my motor memory): log control+. And the code complete/macro would do: NSLog(|); | being the cursor. Is there anything similar to accomplish this in Xcode 4? Thanks Ross 回答1: I really miss this macro too. Thanks to Kendall's example, I was able to recreate it. Go to this folder or create one if doesn't exist: ~/Library/Developer/XCode/UserData/CodeSnippets Then create a file called NSLog

What is the equivalent of Project->Rename in Xcode 4

与世无争的帅哥 提交于 2019-12-24 04:52:05
问题 Xcode 3 had the easy to use Project-> Rename in case I wanted to change the name of my app being developed. I don't see the option in Xcode 4 anymore. Whats the best way to rename your app without any crashes? Thanks.. 回答1: ⌘+1, click the blue node with the project name, wait a second, click again (the name becomes editable). That's it. 回答2: This is answered here as well Renaming projects in Xcode 4 来源: https://stackoverflow.com/questions/6077876/what-is-the-equivalent-of-project-rename-in

OCUnit Tests giving errors in classes not being tested

元气小坏坏 提交于 2019-12-24 03:41:33
问题 I have written an OCUnit test, which ran fine in Xcode 3.2, and now I'm having problems with it in Xcode 4. It tests a single static function X in class A , which doesn't call any classes or functions (outside of library functions). The only other code that should need to be called is the static constructor, which initializes two static variables, but again, those are hardcode values (arrays) that don't call any other classes, or functions of class A . And yet, I had to include the .m, .mm,

Show method definition/description in Xcode 4

不羁的心 提交于 2019-12-24 03:22:29
问题 Is there a way to add a description to my methods in Xcode iOS project so I can see quick details when clicking on a desired method with OPTION + click like it can be done on Apple's API's methods (case bellow)? Thanks! 回答1: If I understand right than all of this tools are for generating documentation and not for adding method's description. Am I right? 来源: https://stackoverflow.com/questions/10530695/show-method-definition-description-in-xcode-4

Xcode4 - Is there a key binding for block comments?

两盒软妹~` 提交于 2019-12-24 01:44:39
问题 I'm new to Xcode4 and looking for a key binding that inserts block comments to methods and classes. For Example a written function: void test(int i) {}; I'd like to have an block comment to this: /** test * * @param int i * @return void */ void test(int i) {}; 回答1: command option / /// <#Description#> /// /// - Parameter i: <#i description#> func test(i: Int) {} 来源: https://stackoverflow.com/questions/5497063/xcode4-is-there-a-key-binding-for-block-comments

'User Templates' not showing up in 'New Project' window - Xcode 4

久未见 提交于 2019-12-24 01:16:52
问题 I recently downloaded two SDL packages from the SDL website and moved them to the appropriate folders. in :/Library/Application Support/Developer/Shared/Xcode/Project Templates, I made a folder called "Applications" and in it I moved 'SDL Application' and two other SDL folders. Also, in: /Library/Frameworks, I moved SDL.Framework. When I make a new project, I see in the left side bar a section for iOS and Mac OS X. But what I want is a 'User templates' section, but it isn't there. (I would

What is the proper way to configure googletest with Xcode 4?

不想你离开。 提交于 2019-12-24 00:47:16
问题 I am following the instructions located at https://github.com/google/googletest/blob/master/googletest/docs/XcodeGuide.md to set up googletest to work with Xcode. However, these instructions seem to be written for Xcode 3. Many things that this article mentions have changed in Xcode 4. What is the proper way to get google test to work with Xcode 4? 回答1: I suggest using the open source xcode-googletest in order to integrate also with Xcode Test Framework (XCTest) 回答2: Follow the instructions