Tips for transitioning from Visual Basic to Xcode - vb.net

I've been programming in VB.net for a while now, and I finally got access to a mac to make ipod apps. What are some useful sites, videos, etc. that could help me get used to Objective C and the Xcode IDE? I've stumbled upon the samples on the apple dev site, but none of them really give good examples which I could learn the syntax of the language from.
Thanks for the help, Objective C is really a big change from VB.net!

Here are some helpful starter references from the Apple site, first for Objective-C itself, then for the Cocoa frameworks.
Learning Objective-C: A Primer
Cocoa Fundamentals Guide
There are also "getting started" videos available from http://developer.apple.com/iphone (you have to register as a developer to get access, but that's free)

You might want to take a look at MonoTouch if you like working with .Net. As far as I'm aware, it only works with C#, but it will let you use the .NET api to program for the iPhone. Might be worth looking into if you don't want to learn Objective C.

Related

General tutorial on OS X audio programming

I would like to do some fairly simple audio programming on OS X (using Lion and Xcode 4.3) -- synthesizing tones with given frequencies, mainly. Trouble is, Apple's documentation on the subject is way too high-level for my current knowledge of the subject. I've searched for weeks now for something that will get me started, to no avail.
Does anyone know of some Core Audio basic tutorial, or even some sample code, that will help me do fairly simple Core Audio tasks so that I can progress to understanding the Apple documentation?
I would suggest the book Learning Core Audio There is also sample code from the book at that site.
If you are looking to synthesize audio fairly easy, you are going to want to use a 3rd party library. Two possible solutions are FMOD and SuperCollider.
The pros and cons between the two are really that supercollider runs as a server that you can connect from app as a client and FMOD is compiled into an app and uses core audio to synthesize the sound. FMOD is clearly the choice if you are planning on distributing this app. SuperCollider also has it's own language that you'd have to learn the basics of to start tailoring your sounds synthesis. Here are some links:
FMOD:
FMOD Downloads (Comes with a bunch of sample code)
Super Collider:
SC Server Download
Sine Wave Generator Sample App
Great source of SC scripts and examples

What comes after learning objective-c for programming an ios device?

It appears the language is the same for either device ios or mac os on a mbp, but if I learn Objective-C in a tutorial, won't I also need to learn cocoa or cocoa touch to program effectively?
I'm not sure how to start on my path of learning to program an ios device. I know I need to learn objective-c and that appears to work on all apple products. Then do I move to cocoa touch for ipad and iphone? What comes after objective-c?
The type of project is akin to a web app but native objective-c app instead. Have ui, buttons, the app hits some back end location, returns data, I put it on that same ui. Only, as stated, use objective-c and whatever framework and library to do it (that's my dilemma. I dont know what to do next after objective-c).
thanks.
Cocoa and Objective-c go hand in hand. For getting started, I would suggest going over some old WWDC footage and following some of the examples there.
As far as Cocoa and Cocoa touch are concerned, they are very similar in many aspects, same name conventions, similar structure, etc. Learn one, and you can easily pick up the other.
#craig adds:
I would further this answer by also mentioning that Objective-C is a programming language, while Cocoa/Cocoa Touch are collections of frameworks that are provided by Apple, and used by developers to add functionality to their programs. (Which are written in Objective-C.) The Cocoa frameworks contain various UI components like buttons, table views, sliders, etc. in addition to various fundamental classes like NSString and other text- and graphics-based APIs
I started my learning by watching thenewboston's xcode tutorials:
you can begin with this one
Good luck :)
I prefer books for some strange reason and I found that the Apress series of IOS development is really good. The book goes through developing iPhone and iPad apps using all kinds of Cocoa libraries. There's a lot of good books out there on the subject; I would go find one that looks like it would suit your needs.

Objective-c and C reference help

hey guys im new to this site and new to the IOS development. i have prior programing experience mainly VB.net and some basic C, what i need is a really good quick access reference for everything obj-c.
any kind of help is greatly appreciated!
Thank You,
msquared86
What exactly do you want to learn about? If it's just the basics of how to use Objective-C and Cocoa, try Apple's Introduction to the Objective-C Programming Language.
For everything Objective-C? http://developer.apple.com contains gigabytes of documentation about Objective-C, the Cocoa frameworks, and the secondary Objective-C-based frameworks on Apple's operating systems.
If it is a reference you are after, everything you need is in the Xcode/SDK download. The developer documentation menu item under Help provides access. However, I personally don't think the search is very good. If you are on line, you can Google developer.apple.com for the same docs. For example the search term:
site:developer.apple.com ios nsstring
will take you to the class reference for NSString.
Up and Running: Objective-C is what I used to cut my teeth on. Great book to get you started. All those Beginning iPhone books are worthless for teaching you Objective-C. Get a real Objective-C book and then start reading those other books. For $5 you can purchase the iOS ebook. Best $5 I have ever spent.

migrating an application from carbon to cocoa

I am working on an application in which I need to migrate the whole code of it from carbon to cocoa.I have experience in programming of C,C++,python and Java during my college time and internship but have never touched objective C or have done any programming for Mac(Carbon and Cocoa) before this.
So Can you please suggest me some sources to start with, also how should I go about the whole migration ?
After researching on net I have found that most the people have suggested following books
Cocoa Programming for Mac® OS X, Third Edition by Aaron Hillegass
Programming in Objective C - Stephen Kochan
I have got both these books.
Should I read them first and then should start with the code change? (it will take some time to read both of these)
OR
after having a decent fimiliarity with Obj C and Cocoa, should I directly get started with code migration?
Also,
since I don't know carbon , what should I refer to learn carbon to have sufficient knowledge to migrate the carbon code to cocoa?
First, learn Carbon so you can read the program and understand how it's currently implemented.
Install the Legacy documentation set in Xcode to gain access to the Carbon guides. You'll want to read the Carbon Overview, then Getting Started with Carbon, then everything that Getting Started links to. You'll also need to learn Core Foundation, which some of the more modern parts of Carbon use; read Core Foundation Design Concepts and the Memory Management Programming Guide for Core Foundation.
Then, learn Cocoa.
I didn't learn by the Hillegass book, but a lot of people swear by it. My current favorite Cocoa book is “Cocoa and Objective-C: Up and Running” by Scott Stevenson. The way I learned Cocoa was using Apple's own docs. Start with The Objective-C Programming Language, the Cocoa Fundamentals Guide, and the Memory Management Programming Guide for Cocoa. Much of the last document will seem really familiar, but skip nothing. Read every one of those guides from beginning to end and all the way through.
Once you've learned Cocoa's general concepts, you can move on to more application-specific material. Start with the Application Architecture Overview and most of what that document links to. The Cocoa Guides list has the full list of guides.
Down the road, you'll also need to make the application compatible with 64-bit mode. If you still have any Carbon code by that point, you'll need to read the 64-bit Guide for Carbon Developers; either way, you'll also need the general 64-bit Transition Guide and the 64-bit Transition Guide for Cocoa.
I am working on this process myself right now, and it's a fairly complex undertaking for a full document-based application that uses a few frameworks. My Carbon app has dozens of menu items, the interface is built with Carbon Nibs and implemented using Carbon event hooks. The programming language is C++. Going back in history, the original Mac classic version was implemented in straight C, so there's a little bit of legacy from that era too. Resource-based PICS for example!
There are several approaches one can take, so it depends on your particular situation how to proceed. In my case I decided to start with a bare Cocoa document-based project and start building the document loading code, because the hooks for that are already in place in the empty project. This seems like a good place to start for me, because it gets me into the mode of working with Cocoa and thinking about the app in terms of smaller pieces.
You really have to take a methodical approach and look at what your app depends on in Carbon versus which parts of your app are independent - for instance your abstract classes. If your app is in C++ there may be some pitfalls with converting over to pure Objective-C. Operator overrides can be tricky to notice, for example.
You can mix C++ with Objective-C, as described in Apple's Carbon-Cocoa Integration Guide and around the web you can find plenty of C++ wrappers for Cocoa foundation objects like NSStrings. So if you already have C++ classes that wrap CFString, these can come in handy.
Generally-speaking, you can leave your data storage just as it is. If you use malloc() and calloc() to make a linked list of structs, there's no special reason to move over to an NSArray. You won't get better performance. The real change comes in the interfaces, the way you call and access that data from other objects. If you decide to mix C++ and Objective-C objects in the same app it helps to encapsulate as much as possible. That is, as much as possible make your abstract C++ classes only refer to their own data and that of other C++ objects. Eventually this will make it easier to transition them to Objective-C.
If you're transitioning from one event model to another or from Carbon port-based imaging to Cocoa's views-based imaging, it's probably best to start with a fresh Objective-C app and bring over your model classes first. Add some test functions to make sure they all work within the new language. If your app is anything like mine (old) then it probably needs to display some things larger, and to have more polish in the interface. This is a good time to rebuild those parts piece-by-piece.
There's definitely no great shortcut. The PDF linked above is the best document I've found on the topic.

How to get started with Cocoa application development?

I'm a Java guy who is familiar with Swing programming and recently just started out with iPhone programming. Boy the learning curve was steep and now I would like to start Cocoa development for desktop apps.
I've been reading on articles and considering buying few cocoa book to advance my learning, still I feel I don't fully get it yet. I started about 3 months back and pretty comfortable with XCode and Objective-C but developing cocoa for desktop apps looks like a different game from iPhone development.
My questions are:
Suitable book to pick up and learn from.
What blogs I should follow?
Any code example I should look at to learn from.
I've been looking at Adium src and considering buying Cocoa Programming 3rd but the book looks like bunch of stuff I already kinda know.
Suitable book to pick up and learn from.
Aaron Hillegass - Cocoa Programming for Mac OS X
What blogs I should follow?
Scott Stevenson
Wil Shipley
Cocoa is my girlfriend
Any code example I should look at to learn from.
Apple's Currency Converter tutorial
Apple's Currency Converter tutorial with cocoa bindings
EDIT: There is already a comprehensive list here on SO:
Good ways to Learn Cocoa?
Our CocoaHeads group has a really large list of resources:
http://cocoaheads.byu.edu/resources
If you're looking for books, check out: http://cocoaheads.byu.edu/resources/book
Or blogs: http://cocoaheads.byu.edu/resources/blog
Or tutorials: http://cocoaheads.byu.edu/resources/tutorial
Or sample code: http://cocoaheads.byu.edu/resources/sample-code
etc