Create Command Line Tool with XCode 9+ - objective-c

I am learning Objective-C and using this tutorial. It says I am supposed to create a Command Line Tool. However, the XCode version in the tutorial is rather old. Pressing CMD + N does not reveal a Command Line Tool option. How can I write Objective-C and compile and run it in XCode 9.2?

Have a look #Stophface
If you are on mac then it says you should press cmd+shift+N
try it

You have chosen the iOS category at the top, click on macOS and it should be there.

this question is several months old, but for other people here is an answer :
You need to download an additional element : "Command line tools for Xcode"
link : https://developer.apple.com/download/more/
You need to create a free account, just with your email.
There are several versions, check which version of Xcode you have. Once it's installed if you click on "new project" you will have access to "command line" options

Related

Xcode 5 dp crashes when typing any code

Initially I thought it was Apple's fault. My Xcode 5 dp crashes every time when I tried to type any code.
Launch Terminal
cd ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/
cd ~/Library/Developer/Xcode/Third-Party\ Plug-ins/
Rename/Delete your Plug-ins one by one until XCode 5 works.
In Xcode 5 go to Preferences > Source Control > Uncheck the Enable Source control
This problem has something to do with auto completion. I remembered I installed a plugin KSImageNamed. It will auto complete your image name when typing -[UIImage imageNamed:]. And most importantly, I saw its name in crash report.
Solution: Go to ~/Library/Application Support/Developer/Shared/Xcode and delete KSImageNamed.xcplugin.
Great Post. For my case, it is another type of xcode plugin name called "lin" which will do the similar thing. After the plugin is moved to trash, works fine.
Additionally you should also remove any plug-ins that are located at ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/
If all fails, you might have to uninstall Xcode
I had same problem. If you go to XCode -> Preferences -> Source Control and turn OFF Source Control everything works like a charm and there are no more crashes!!! :) Hope this help ;)
In my case the problem was in user defined code snippets, located at ~/Library/Developer/Xcode/UserData/CodeSnippets. Two different snippets had same Completion Shortcut.

does assistant editor in xcode 3.4.3 has an alternative?

First, I have xcode 3.4.3 installed on my hackintosh(10.6.5). When I started using xcode , I follow apple's steps from "Your First Mac App" tutorial. When I walked through creating actions for controls, it ask me to use the assistant editor to create connections between control and logic code, but I can't find anything called assistant editor is this because I am using xcode 3.4.3?
Could somebody please tell me some alternatives.
//edit: The assistant editor seems only present at xcode 4 and higher, so the tutorial you are using is newer than you current xcode version. Thanks #popeye for the hint.
The alternative is simply add the connections by yourself. You have to add the outlets in the interface-file (h-file) and the implemenations in the implementation-file (m-file).
There is a good tutorial video fromon how to achieve this:
Xcode 3 Recipes - Connecting an Outlet
Old Post:
The mentioned "assistant editor" is just a neat way to connect your outlets with your code. It connects the GUI with the code. For example if you have a button on your screen and you want to register a touch event on that than you can simply use the assistent editor to do that.
It is on the upper right corner of xcode. See the screenshot:
It shows you a split view with the code on one side and the Storyboard on the other. If you have that view open you can simply hold the control-key and drag a connection from the gui element to the code.
From the apple website: Assistant (): presents a separate editor pane with content logically related to that in the standard editor pane. Use the split controls in the Assistant pane to split the pane. Use View > Assistant Layout to set your preferred assistant pane and split configuration.
Apple iOS Developer Library - xCode Basics
I think you might be out of luck. I do not remember having an assistant editor in XCode 3, not like the version in XCode 4 anyway. Apple tends to keep it docs relevant to the newest release. The link provided by #palme is only relevant for XCode 4.
You might have be resigned to opening multiple windows to compare header and implementation files. In XCode 3, you will have to get used to mutiple windows at times, even seperate applciations (i.e. Interface Builder is completely seperate application from XCode 3).

New to Objective-C and can't find Foundation tool in Xcode package

I am using Xcode 4.3.2 and trying to follow along with the "Learn Objective-C on the Mac" book and it is stating to go to New Project --> Mac OS X and select Command Line Utility --> Then select Foundation Tool on the right hand side. I see Command Line Utility but I don't see Foundation tool so that I can follow along with the book Can someone assist me possibly as I am new to Mac OS X.
Click on the "Next" button when you start setting up your new project and you'll see this screen in Xcode 4:
It's one screen beyond where you choose what kind of app (iOS or MacOS, GUI or command line, etc.) you want to create.
Just proceed and select in drop down

IDE for Sencha Touch [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm new to Sencha touch 2. Is there any Sencha touch IDE(free one)? Basically what I want is when I write something like .. new Ext and just give space+cntrl so there should be list of all the methods and properties of it.
OR
is there any way through which I can add sencha touch javascript libraries in eclipse ? Like we do with Komodo Editor. In komodo Editor you just need to add the javascript library and it will automatically fetch all the functions,methods,and properties that resides in that library file.
Thanks in Advance :)
Before we start please download the following files:
sencha-touch-2.0.0-gpl.zip or sencha-touch-2.0.0-commercial.zip
SenchaSDKTools-2.0.0-beta3
Aptana Studio 3
Extract sencha-touch-2.0.0-(gpl.zip/commercial.zip) to a place of
your liking (Note it will stay there for a long time)
SenchaSDKTools-2.0.0-beta3 and/or install it
open up the terminal or command prompt
cd into the folder of Sencha Touch SDK
(sencha-touch-2.0.0-(gpl/commercial)
write: sencha generate app APP_NAME APP_PATH
hit enter (return)
extract/install Aptana studio
Open up Aptana studio
Click the help menu
Choose Install New Software
A window will open click Add
Name it Spket IDE then enter the url http://www.agpad.com/update
Press OK
Choose everything then click Next
Click next
Read the license ( like everyone does, NOT!), and then accept if
you want, then press next
Wait for the install to complete (Restart if required)
Go to Preferences
Navigate to Spket then JavaScript Profiles
Click Add
Type Sencha
Press Ok
Highlight Sencha
Click Add Library, Select ExtJs
Highlight ExtJs then click Add file
Choose touch.jsb3 from the folder you extracted the Sencha Touch
SDK 2.0.0 in
Select all items in the tree
Highlight Sencha then click default
Press ok
File > New > Other > General > Project
uncheck the box that says to use the default location
Browse to the project you created earlier
Type the name of the project (preferably exactly the same name as
it’s folder)
Press finish
expand the view folder and open the Main.js
type Ext. if the auto complete doesn’t pop up type crtl + space
I have created a detailed tutorial with pictures for this specific reason, Please let me know what do you think and how it worked out :)
I use Netbeans (http://netbeans.org) it's free, but doesn't have the methods you want to auto complete & use, the best for that I found to be Aptana studio (http:www.aptana.com) but that is paid.
For netbeans you can modify the IDE so it does auto complete based on the libraries in Sencha :-
a) Right click on the SenchaApp application and select Properties from the drop down menu
b) Under the Libraries menu, choose “Add Libraries” and from the window that opens click “Create…”
c) Name the Library “Sencha_Touch” and choose “Class Library” from the drop down.
d) Under the “Classpath” tab, click on “Add JAR/Folder” and select the “touch” folder previously downloaded.
e) Click “OK” and choose the newly created “Sencha_Touch” library.
To check if you’ve added code completion correctly, create an app.js file in the app folder. Type Ext followed by a “.” — If the steps above were followed correctly, the code completion should work.
Or move over at http://techtalktone.wordpress.com/2012/02/22/using-netbeans-ide-with-sencha-touch/
TextMate with bundles from Ed Spencer: http://edspencer.net/tag/textmate
Sublime Text 2, I think you can use same bundles as for TextMate, not sure!
JetBrainsWebStorm3 is used by many
Aptana (eclipse based), there is a plugin for Sencha, but not touch I think.
But I think you might enjoy Sencha Designer 2: http://www.sencha.com/blog/sencha-designer-2-beta-announcement/
As Nag said: make use of the API's.
Cheers.
Check out Pocket Dev
http://www.pocketdev.co/blog/sencha
It's pretty basic but works well
Try Sublime Text 2. It is the best i came across.
You can download it from this link by selecting your OS: http://www.sublimetext.com/2
Aptana Studio 3 is the best for Sencha 1.1 or Sencha 2.
Have you tried sencha architect???
http://www.sencha.com/products/architect
+1 on JetBrains WebStorm 3 .. it has built in helpers/popups that know the Sencha language. And the way it auto-formats for you (when pressing return or pasting in code) is very intuitive to JS and helpful for the user. Just my to pennies.

Xcode 4 "waiting for process 'Appname' to launch

I installed Xcode 4 and now cannot run one of my iPhone projects.
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all
Waiting for process 'AppName' to launch.
On the top status bar I see 'Attaching to AppName'.
The only weird thing about the project is it has a dependency on ZXingWidget for QR code scans.
Weirder that it works on a co-workers computer, but not mine.
Tried removing my build directory, no dice.
I can run other iPhone projects from source in Xcode 4 with no problem.
Has anyone else seen this?
I ran into the same issue. Go to Product -> Edit Scheme and select the Run scheme on the lefthand side. Go to the info tab, and next to launch there will be two options (neither of them selected): 'Automatically' and 'Wait for XXXX.app to Launch'. Select the Automatically one and it should clear up your issue.
I had actually built and used my projects using xcode 4 for a few days with no issues, and then this popped up randomly. Hope the this helps.
A tip I found at the Apple Developer Forums:
Go into your ProjectName.xcodeproj/
directory and delete anything named
with your userid. Re-open the
project in xcode and all that will get
recreated and it should work. At least
it did for me.
Another tip is to manually delete the build directory.
Yet another tip is to navigate to the Organizer (Shift ⇧ Command ⌘ 2 in xcode 4), select Projects, select you application in the left hand side and then the Delete...-button to the right of Derived Data.
And never forget the universally useful tip: restart your computer and try again.
Good luck!
Yes, you need to set it to automatic but doing that alone won't be enough. Like Chris says, you will need to exit your simulator manually and then run.
for me it was already set on automatic and still had this problem.
The problem solved after I changed the build configuration to Distribution in the product -> scheme
Quit Xcode. Find the App_Name.xcodeproj, "Show Package Contents" and remove the folder "xcuserdata".
This will clean the "cache" of breakpoints. Start Xcode, compile and done :)
You may be click the bottom of Product>scheme>edit scheme >Waitting for executable to be launched.And you should click the Automatically choose.