How do I create an empty project in Xcode 6? - xcode6

Xcode 6.0 doesn’t have an option to create an empty project like in Xcode 5.1.
How do I create an empty project?

File -> New -> Project - > Single View Application
Fill the fields. Click accept.
Delete Main.storyboard
Delete YourProjectName.xcdatamodeld
Delete LaunchScreen.xib

Related

Xcode 10 Build Location -> Per-configuration Build Products Path

I'm just trying to implement react-native code push on my react-native application but I just can't find Build Location -> Per-configuration Build Products Path on Xcode 10.
Here's the guide I'm following: https://learn.microsoft.com/en-us/appcenter/distribution/codepush/react-native#multi-deployment-testing
Where did that change go to?
Xcode 11 has removed this setting moving to the new build settings found in the Workspace Settings.
For CodePush, you want to create another user-defined section named CONFIGURATION_BUILD_DIR, using the same per-configuration settings.
NOTE: I found that Xcode would crash anytime I set the section name to CONFIGURATION_BUILD_DIR after creating it (most likely due to the empty values). To avoid this issue, create the section without renaming, set the configuration specific build folders, and then change the name.
Best of luck!
Press Cmd+1 to open Project Navigator
Click on Project you need to edit
In the pane that opens click on target
Click on Build Settings tab
Select "All" in the filters
Select "Levels" in the filters
Search for "Build Location" in search.
Xcode 11, you can find this option at PODS_CONFIGURATION_BUILD_DIR

There is no .xib file when I create a new "Empty Application" in XCode

I am working through the Big Nerd Ranch Guide (2nd Ed) for iOS Programming using Xcode version 4.2.
For the very first project I'm asked to create a new project which is a "Window-based Application" the description for which reads "This template provides a starting point for any application. It provides just an application delegate and a window". The "Window-based Application" option was not available to me in XCode 4.2 but I did see the option to create a "New Empty Application" which has the same description ("This template provides a starting point for any application. It provides just an application delegate and a window")
When I create the project I'm supposed to have a MainWindow.xib file but that does not show up at all in my project? Help please
When you create the project, don't forget to uncheck the option "storyboard". Once you uncheck it, you can see the xib files.
I am using the same book, had the same problem but I figured how to fix it.
Create a new xib file by
right click Quiz folder -> New File -> iOS -> User Interface -> Window -> click Next
click the Window.xib file then find an Object and drag it under Objects -> select the third tab on the right -> change this class to AppDelegate
click File's Owner -> change this class to UIApplication -> click the 6th tab and connect delegate to Window
goto AppDelegate.h and put IBOutlet in front of UIWindow *window;
goto Window.xib again and connect window under Outlets to Window.
Also in plist file add a row
key - Main nib file base name
type - string
value - mainwindow
Hope this helps.
If you create a empty project and do want to use storyboading, then do:
create empty project
add new file (storyboard)
make sure to add a correct entry in your app-info.plist file. (Just create a simple project with storyboard and look-up the key there in the app-plist).
throw a view controller on the board, and off you go.
Like this you have a nice clean project, with the use of the storyboard feature.
Please read this in the official Forum to the Book. BNR posted a project that you can use as your default Project for all Chapters in this Book. They created a small Project that looks as if you created an empty project with the XCode version before iOS5 was released.
http://forums.bignerdranch.com/viewtopic.php?f=74&t=1817
regards
Thomas
You can also create a MainWindow.xib afterwards:
File > New > File >
There should be a Window.xib. If not, creat an empty .XIB file and drag a window (UIWindow) into your Objects pane. Copy the connections as they are displayed in the book.
Hope that helps.
PS.:I recommend to not use beta software to start with iOS

XCode 4 Autocomplete with C++ library?

I am using Cocos2D Box2D template for my project.
When I type , "b2**" the autocomplete doesnt show any Box2D classes. (pressing ESC also doesnt show any )
I have included Box2D.h and Cocos2d.h in "Prefix.pch" file.
Is there any feature like "rebuild index" in "Eclipse CDT" ?
Any tips?
You can force Xcode to rebuild index by deleting it's service folder (DerivedData for Xcode 4.x):
Close Xcode
Remove service folder
Open your project and Xcode will rebuild index again
In my case this always works and I can call b2... autosuggest.
The DerivedData folder can be found in ~/Library/Developer/Xcode/DerivedData
This may be an obvious suggestion, but have you tried to type out a class that you know exists with what you have included, and see if it recognizes it(With both colorization and/or quick help)? Also, do you have the necessary frameworks included, etc? As far as reloading goes, the only thing that you can do in XCode that I know of is clean(shift+cmd+k) and re-build. Are you getting any sort of warnings, errors, etc? Another potentially obvious issue, is XCode set to c++ as the language? Anyways hopefully you haven't already tried all of this and it helps you get somewhere.
Assuming you're using XCode 4, you can rebuild the index rather simply:
Open the Organizer (Command+Shift+2)
Click 'Projects' in the top section
Select the project you want to rebuild the index for in the left sidebar
Click 'Delete' next to 'Derived Data' in the center portion of the Organizer
This is easier than traversing through the directories and manually deleting a series of folders.
This page lists the steps another user went through to get code completion working for Xcode 4 and Box2D – the steps include deleting the derived data folder, but also changing user header search paths, making sure there were no spaces in the path to the project, and other things. Some of these steps may be random or unrelated, but apparently they fixed the problem for two people on that forum.
Combining all the above posts together, this is how I went about solving my issue:
1) Make sure that all files are in 1 folder. This may sound obvious, but I had my Box2D files not in the same folder as my other code. When creating a new project with XCode, it creates a folder with the name of your project, then another folder within that that has the name of the project again. Example: "{path of project}/TempProject/TempProject". I had my Box2D files in the first TempProject directory and not with the rest of my code that is created under the sub-directory of TempProject.
2) Open your project's settings by double clicking your project in XCode
3) Scroll down to "Search Paths"
4) Edit the "Header Search Paths" value to be: ${SOURCE_ROOT}/${PROJECT_NAME}/** (Note: If your Xcode does NOT create a subdirectory like mine does "TempProject/TempProject", then just use ${SOURCE_ROOT}/**)
5) Delete your project's Derived Data by doing 1 of the 2 following ways:
a) Open Organizer -> Select Projects -> Select your Project -> Select Delete next to Project's Derived Data
b) Open Finder -> Select Go from the toolbar -> type in "~/Library/Developer/XCode/DerivedData" -> Find and Delete desired project's folder
6) Restart Xcode
7) Clean and rebuild code
8) Code sense should now work!

Xcode 4 code loses syntax coloring when importing project from Xcode 3

I have just upgraded to the new Xcode 4 and the code is not colored has it should be.
I am trying to use a project that I created on Xcode 3.
For instance, the string 'NSString' is not colored in my custom code, but when I switch to Apple's code (NSString.h for ex.) everything is well colored.
How can I fix that?
Thanks a lot,
Martin
Open the Organizer (Window > Organizer) and select the Projects mode. Select your project in the left-hand view and then click the Delete… button for the project's Derived Data.
This will delete the code sense index for the project and force Xcode to rebuild the index, which should fix the problem.
I got it to work by prefixing all my project search paths with "$(SOURCE_ROOT)/" instead of just using a project relative path. Eg "Include" becomes "$(SOURCE_ROOT)/Include".
Do this and then force a rebuild of the index by deleting the projects derived data from the organizer.
After trying most, if not all, of the steps above, I have succeeded in restoring my colorful Xcode eye candy by finding and deleting (in Finder) all of the derived data created from my project (there were several folders for my project that were lingering even after deletion from the Window > Organizer menu).
My project's folders that needed deletion were located in ~Library/Developer/Xcode/DerivedData
Also try this, select all(command + A) from your Prefix.pch file -> cut it(command + X) -> Build(command + B)(don't worry for error) -> paste(whatever you copy from Prefic.pch file in that file only)(commmand + V) -> Build again (command + B).
Try Product -> Clean and then Product -> Build
Remove the files from your project (just remove, don't delete them!) and re-import them.
Its possible that the permissions on the folder where Xcode stores the code-sense cache is broken. If the cache cannot be correctly written or read when you launch Xcode, it will behave as you describe.
Try locating the folder (you can locate it in the organizer. Hit the arrow next to the path.) and reset its permissions in the Get Info dialog.
There is another cause for this issue, it had been happening to me with beta versions of Xcode, you need to check that the .m file is added to the target in order to make it add color to the classes and enable the autocompletion.
You can check it out in the Xcode inspector
Hope this helps,
best regards,
Jorge.

How do I delete a project in IntelliJ IDEA 9?

I've just created a new project but the structure is incorrect so I'd like to start again. It is it possible to delete a project from within IntelliJ or do I just have to close it and delete the relevant .iml/.idea files?
The proper way would be to close IDEA and delete the project directory or just create a new project in the different directory.
There was no context menu on the project for me. Instead, try this:
File > Close Project
In the project selection dialog, select your project
Press the delete key on your keyboard
It seems you can select file -> Open Project. and then by right clicking delete project