Starting iPhone Development [duplicate] - ios

This question already has answers here:
What do I need to learn iPhone development offline? [closed]
(6 answers)
Closed 7 years ago.
I'm soon going to be starting some iPhone Development (3.0) building a simple app that communicates with a web service and uses push notification.
My Objective-C is pretty much non-existent but I've already got some good information from this question and also from Apple's development centre.
Basically if you've developed with the iPhone before what caveats/hints/pitfalls/tips/etc could you recommened in general?

Get "Cocoa Programming for Mac OS X by Aaron Hillegass" and go through the first half of the book. Get "Beginning iPhone Programming" after that and pay the $99 so you can run apps on your phone. There are a lot of design patterns in Objective C that are strange to begin with, but as you work more with them, they make sense.
One of the best things I found in the Hillegass book is his advice in the introduction: "assure yourself that you are not stupid and some things are hard".

I had great success getting started by diving into the Apple developer guides. I read the following:
Apple Objective-C guide, a good place to learn the basics
Apple Cocoa Fundamentals Guide
Apple iPhone Application Programming Guide
Spend time looking over the various examples, read the code, make changes, etc. Apple also has many good examples (outside the books) that you can learn a great deal from.

I agree, Cocoa Programming for Mac OS X by Aaron Hillegass is a great book to learn Cocoa, and it covers Obejctive-c nicely, but if you really want to KNOW the language, I would recommend:
Programming in Objective-C 2.0: http://www.amazon.com/Programming-Objective-C-2-0-Developers-Library/dp/0321566157
Both are fantastic books and nicely complement eachother.
Its very important to remember that other people are having a hard time learning Cocoa too. Reading Aaron's book is a fantastic way to start. Reading source code is also another great way. THere is some open source iPhone projects (for example: wordpress), and there a bunch for OS X. Read what other people are doing so you can get the flow of an application. I found that to be the hardest part about learning (especially the Cocoa part).

http://www.lynda.com/ is perfect for starting iOS, OSx development. The site takes you past the beginner status quickly.

Related

Want to build iOS app

What is the best application or programming languages to build an iOS application platform for chat application for beginner like me. Please anyone can tell me about it.
Apple put a lot of effort in its new `Swift' language.
On any Mac computer, you will find XCode on the app store.
iBook has a nice and clear electronic copy of the guide.
I've gotta admit I was a bit circumspect ("yet a new language ?") but it appears has they sell it, solid and sound.(It's compiled and based on llvm. It is open as well, perhaps MIT license?)
I think they basically came up with C# for iPhone (it may even spawn from `mono'?)
But, again, the license model for the source make it sound more promising.
I found the iBook guide for very comprehensive when it came to the very basic of the language and the libraries.
XCode comes with quite a few templates showcasing each major application type. (You can also check the other languages for yourself: Objective-C and javascript)
So the two complement nicely.
If you are starting from scratch, I see no reason not to start on this train.
Since it's straight from Apple, and if coming up with Android isn't yet part of your plan, it will also be your path of least resistance when it comes to technical difficulties.

New to developing iOS apps [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
As someone who has never developed an iOS app but hopes to soon and has never had a Mac (to date) the whole XCode and process for developing apps was a little lost on me.
To start: things like which languages are supported in development was one area I wasn't sure of:
I've seen C, C++ and Objective-C referenced as the languages used to write the apps. But I've also seen JavaScript` + HTML + CSS and .NET as options and a host of other compiled languages, with people arguing if you can or can't use them.
Another thing I wondered about was Xcode, does it support all the mentioned languages? Or is an IDE built for a specific language such as Cocoa ? If it is, then how would someone use JavaScript for example to write the app?
I'm sure this is a fairly simple answer to Apple users, but I had some struggle trying to relate from a non-Apple background.
Updated
Thanks for the great answers and insight, hopefully other this post will be helpful to others who don't have an Apple / iOS background
All three language alternatives that you mentioned are available to iOS application developers *.
Objective-C/C++ offers a way of making native apps for iOS, you produce machine code that runs on the devices. You use Xcode to develop in these languages.
You can build apps in JavaScript + HTML + CSS because iOS comes with a browser. Apple offers a mode that gives your apps a completely native look and feel, so they do look like first-class citizens.
You can build your apps in C# as well by using Mono Touch. This is different from .NET, although the language is the same, because your code is compiled into binary ahead of time. Although using Mono Touch eliminates the learning curve associated with the new language, you need to go through a fair bit of learning to adapt your knowledge of .NET to a different platform.
* Except Cocoa, which is not a language, but a collective name for Apple's frameworks for developing under OS X and iOS.
iOS' native language is Objective-C. While it's true you can use C++ to make apps (Cocos for example, is mostly written in C++) it isn't the 'native language'.
As for the other languages you mention, while it's possible to create apps using them they won't be 'native' normally relying upon another IDE/Library, phone gap or adobe air for example. Most of these also support cross platform development.
Where I work we also use HTML5 to create a 'faux native' interface/experience.
If you're new to iOS it's worth while checking out Apple documentation/sample code at:
https://developer.apple.com
There is a wealth of knowledge there that should set you on the right path. It ins't however, something I'd recommend if you don't have any experience with object orientated programming.
Coming from a C++ background myself, I didn't find it too difficult but have been working on iOS for about 3 years (on and off) and am only just starting to really become truly fluent in it's processes and conventions.
Hope this helps, let me know if you want to know anything specific.

iOS Game Development [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Experienced in web development. How to get started with iPhone Game Development?
- Question
I am an iOS developer working on business applications. I want to start development of games for iOS. My Question is from where to start and what are required tools for games development and which resource is most important. So far i think that openGL and core Animations are required tools.
Please guide
You should take a look at the Cocos2d framework. Here's a great tutorial:
http://www.raywenderlich.com/352/how-to-make-a-simple-iphone-game-with-cocos2d-tutorial
I'd recommend a game development framework. This article is a bit dated, but does reference toolkits that still exist and are good:
http://maniacdev.com/2009/08/the-open-source-iphone-game-engine-comparison/
If you're not prepared to learn a lot of math/programming, then shoot for using a commercial engine like Unreal, where most of the heavy lifting is done for you. Their tutorials are a good place to start.
You should also want to start playing with Blender and/or Google Sketch-up. They will give you a better feel for the things you'll need to know in order to use a pre-built engine....and both are free.
The Unreal game engine also has a free edition.

Next Step for iOS Development?

Ok... Before you strangle me for making this topic, I really did search through the archives.
I want to develop iOS apps. My background is in web development, so my comfort zone is PHP, SQL, HTML/CSS, and JavaScript.
I picked up "Objective C Programming: The Big Nerd Ranch Guide" and have been plowing through it. It's a great book and I really feel like I'm starting to get a cursory understanding of Objective C.
I want to move on to a book on coding in iOS, but here's the problem... Most of what's out there right now covers older versions of Xcode. There's been some major changes and a lot of what these books mention either has been moved or doesn't exist anymore.
The BNR iOS book comes out with a new edition in April, but I don't want to wait that long. Is there anything else that's well written and up-to-date that I could look at now? (Other than Apple's documentation?)
I was thinking about Sams Teach Yourself iOS 5 Application Development in 24 Hours, 3/e, but there aren't a lot of reviews on it.
It looks like the Stanford podcasts were last updated Fall 2011 and stuff's changed since then.
Suggestions?
Stay away from big name publishers and "teach yourself X stuff in Y time" formats, go with known writers/speakers involved the Objective-C programming scene like Aaron Hillegass http://www.bignerdranch.com/book/ios_programming_the_big_nerd_ranch_guide_nd_edition_ , Matt Drance http://pragprog.com/book/cdirec/ios-recipes , that is where you will find the good stuff.
I've always been a fan of the range of iOS books published by Apress, so I'd recommend checking out the following book if you're just getting started:
Beginning iOS 5 Development - Exploring the iOS SDK
http://www.apress.com/9781430236054
It seems to be getting positive reviews on Amazon: http://www.amazon.co.uk/Beginning-iPhone-Development-Exploring-iOS/dp/1430236051/.
A couple of books I am working through right now are:
Beginning iOS 5 Development: Exploring the iOS SDK - Apress - ISBN 9781430236054
The iOS 5 Developer's Cookbook: Core Concepts and Essential Recipes for iOS Programmers (3rd ed) - Addison Wesley - ISBN 978-0321832078
I read the 1st edition of the BNR iOS programming book and it set me up very well. I know there is a 2nd edition which uses Xcode 4, but I don't believe it includes the addition of ARC. Do you have the 2nd edition of the book?
Buying books in iOS development is tough, most are outdated in a few months. But honestly, I don't think much has changed since the BNR 2nd edition, with the exception of ARC, which is pretty simple to pick up, and there are some good online tutorials that will get you aquatinted with it.
Another book may help you, but I think from personal experience that you should just start working on an app, and ask questions once you get to them. I started working on an app for my school, and as I went I had questions, and I found most answers on Stack or by using Google.
If you buy a new book now, you may not really learn anything new or anything you need. I would suggest just start working on stuff if you feel comfortable enough, then in April grab the new edition if needed.
I can highly recommend iOS 5 Programming Pushing the Limits. It covers a lot of topics in much greater depth than a lot of the introductory books. This is a great second book. Read it after Beginning iOS Development mentioned above.

iOS sample projects to learn from

I am just starting iOS development. I read some tutorials, watched stuff on iTunes U and wrote some sample code myself. Now I want to take the next step. I want to learn about best practices for iOS development in XCode.
Are there any well written and well organized iOS projects that one could take a look at?
(As I see it, iOS is not exactly the place for open source enthusiasts, however.)
Thanks
Mike.
I agree with several of the other answers that state that looking at many, many projects for mini-examples of what you want to do in your own app is the way to go.
However, you asked for an example of an app demonstrating best practices.
You could do worse than to read Matt Gallagher's blog, Cocoa with Love from beginning to end. However, the app example you asked for is right here.
Not only will it show a variety of techniques, some novel design and best-practices, but also he points out where he feels that he might have done something better.
It's a great read.
I would suggest the following process: (it worked for me)
Think of an advanced app. that you eventually want to be proficient enough to create.
Make a top-down problem-solving tree containing the necessary skills required to build your final app.
Use this tree to divide your final app. into 'sub apps'. Start at the bottom of the tree, find a tutorial specifically for that skill, and make a "Hello World" app. that uses that skill.
Keep progressing upwards, creating 'sub apps' as you go.
When you are finally ready to make your final app. (it will take a while), you will have a good handle on how iOS development works. It will also be a great test of your knowledge via direct application!
Getting the hang of iOS development can be tricky; it really does require a top-down approach, and every online resource I've found takes a linear one. The only way that I think a linear approach to learning iOS development would be manageable, is to take it one small task at a time.
As for specific resources, I always google "[what I want to do] iPhone SDK" and browse the tutorials and forum posts that come up.
Here are some open source iOS apps. However, they aren't very well documented and are also very advanced.
TKAWebView - A subclass of UIWebView that handles authentication and downloading.
Welcome to your Mac - An iOS app. to VNC into a PC/Mac and do some cool stuff.
InAppSettingsKit - A settings screen creator for your apps.
Good luck!
The people behind the Parse platform have made two complete projects.
For each project there is the complete source code, a tutorial and the resulting app is also available from the AppStore.
Anywall: https://parse.com/anywall
Anypic: https://parse.com/anypic
They both rely heavily on the Parse platform as the data source, but you still get a feel for an iOS project.
Molecules is a great open-source app that uses 3D OpenGL to render complex models of molecules.
Just keep coding my friend. You'll learn over a period of time. The best way to get dirty in a mud fight is to jump into it... Weird analogy but you get the point.
Maybe someday, we all will learn from you then !
Like you said there many and many source codes are available internet, but most are incomplete.
I found some Open source codes of REAL application currently available through Apple app store are given here
Free iPhone App Source Codes of real apps
and also, you can find many answers here on stackoverflow question - Are there any Open-source iPhone applications around?
You can download free IOS sample projects from http://devcodemarket.com
I realize this is an old thread but I've also been looking for good objective-c code examples recently and I just realized that TextEdit's source code is available at the Mac Developer Library webpage.
Also, here are some popular objective-c libraries that have caught my attention:
CocoaPods
AFNetworking.
you can also go through UICatalog from Developers Library and download the sample code. just google it and you will find a project containing all basics of iphone.
I don't think there is any perfect project that can demonstrate all the qualities of great code. Developers have stylistic preferences and may make mistakes. That said, you should look at a lot of different projects and try to look at the conventions used.
I'd suggest starting on GitHub. Besides for seeing code, you'll see what libraries are out there, which may help further your projects later on. Here's the Objective-C page on GitHub.
(Also, I (GitHub link) think you're wrong about iOS devs not being in favor open source. Yes, there's money to be made, but you can't sell a CSV paring library on the App Store as is.)
Have a look at https://github.com/mozilla/firefox-ios
That is Firefox for iOS, written in Swift.
Cocoacontrols has a wide range of controls written using Objective-C & Swift.
I believe these days, this is one of the most famous website for iOS Developers.
But, before you jump onto this, you have to learn Objective-C & Swift very well, so that you will understand how to use the controls in your app which makes your app smooth.

Resources