Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I've just learnt objective c for the purpose of app building for iOS. In fact i started tinkering this week with my first attempt at an app, I was unaware about Swift and I am reading the text blog on the WWDC.
Going forward, should I be looking to build apps in Swift rather than Objective C now? And are the languages fairly similar?
I ask mainly because I've only just learnt the syntax for Objective-C and done little playing around with it, so dropping it all together isn't too much of a big deal for me. What's more important is that I use the right language. I got my first mac only a few months ago and I've not had much experience with Apple so I thought I'd go to place where people who are far more experienced all round could help point me in the right direction. I don't know if Swift means that it's likely Objective-C will be dropped entirely at some point.
This answer won't stand the test of time, but as of today:
Objective-C will be around and supported for a long time. (Apple has a massive amount of Objective-C source code that it's not going to port to Swift any time soon.)
Almost all iOS tutorials, examples, and books use Objective-C.
Almost all iOS-specific third-party source code you might want to use is implemented in Objective-C.
It's easier to use C and C++ libraries from Objective-C than from Swift.
There are many Objective-C experts you can get help from. There are very few Swift experts.
The Swift language and its standard library are currently not very well documented.
Stick with Objective-C for now. When you're comfortable with the iOS SDK and Swift is better documented, you can consider learning Swift.
UPDATE
It's been four months and my opinion on this hasn't changed. If you're looking for a more recent answer, this Hacker News thread was asked and answered today: Is Swift ready for production?
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
My company is currently planning on providing our services and UI components in the form of native SDK. What are pros and cons of building the SDK in Swift vs Objective-C?
Note: Our clients who will be integrating our SDK will be either using Swift or Objective-C.
I would highly encourage watching this talk by Jonathan Blocksom: http://realm.io/news/swift-objc-best-friends-forever/
It says:
"Swift and Objective-C work together fairly well, so there are many reasons why you would want to include both in a single project. There may be a handy Swift library that you want to use in Objective-C, or vice versa. If you have a big Obj-C codebase and you want to learn Swift, now would be a good time to do that as well. Swift was built for Objective-C compatibility and also works with C, but not with C++. Many types in Objective-C translate over to Swift fairly well: BOOL to Bool, NSInteger to Int, SEL to Selector, and so on."
In my limited experience, using Objective-C code from Swift is a more common use-case and fairly trivial. Using Swift code from Objective-C is certainly possible, but it has some gotchas: Specifically, check "Alamofire in Obj-C Case Study" in the video.
Alamofire is an HTTP networking library written in Swift, from the creator of AFNetworking: https://github.com/Alamofire/Alamofire
Also, I would encourage you to read the official document: https://itunes.apple.com/us/book/using-swift-cocoa-objective/id888894773?mt=11
I hope that helps.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I recently started looking at programming and have been quite interested in it. The only bad thing is that I don't know how code works, where I can write it, or what languages to take into consideration.
I want to learn how to make applications for the iOS operating system, and i heard Objective C is the language for that. Is Objective C something you would recommend to a beginner?
I just wish I could grasp the concept of programming a little better and get a better understanding because, as of right now, it seems extremely complicated.
As a beginning programmer, I would advise that you'd be better served learning how computers and programs work as a general concept, which will orient your thinking as to how programs are made.
I've heard lots of good things about the Haskell language in this regard, and I would recommend you start here: http://tryhaskell.org
Once you have a good concept of how programs work, and what kind of thinking and organisation is required, then you can move on to languages like C/Objective-C, which would be very frustrating to start on.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have no coding experience except for some basic VBA programming to help out my financial models (read: I have 0 coding experience or background). However, I would love to start developing for the iOS or OSX as a hobby and maybe take it further later on.
For the past day or two, I've been researching the best first lanaguge to learn. Should I go directly to C and then Objective C or should I learn something more high level like Ruby and Rubymotion? I'm open to all sorts of suggestions.
Thanks!
If you're looking to go straight into iOS, you might as well go directly into Objective C. Objective C is different enough from pretty much any other "common" language (Java, C#, VB, etc) that knowing another language won't really help you. You should, however, know the basic concepts that encapsulate all programming.
If you're looking at learning to code for iOS to do mobile apps, the following courses through iTunes could be of considerable help to you. They're from Stanford University, and are free.
https://itunes.apple.com/us/course/coding-together-developing/id593208016?l=en
https://itunes.apple.com/us/course/developing-ios-7-apps-for/id733644550
There are two things you will need to learn in order to develop iOS apps: how to program, in general, and how the iOS SDK (software development kit) works in particular.
Learning the iOS SDK is a “fixed cost” that doesn’t have anything to do with which programming language you choose. You’re going to have to know that (for example) if you want to display an alert to the user you’ll have to instantiate a UIAlertView object and set some properties on it. That is the case regardless of the programming language.
Since almost all of the existent example code for iOS is written in Objective-C, however, you’ll be best served learning that language to begin with. Objective-C is a fine candidate for your first language, so taken together the “learn to program” and “learn the SDK” tasks will be easiest if you start by learning Objective-C.
(For what it’s worth I’d recommend Aaron Hillegass’s iOS Programming: The Big Nerd Ranch Guide, but of course there are tons of free and paid ways to learn Objective-C and Cocoa.)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
OSX question, not iOS.
I've been searching for a framework to get easy access to the full (or at least the most important functions)of the V3 API Google Maps within a WebView.
From what I've read so far it should be technically possible.
https://developer.apple.com/library/archive/documentation/AppleApplications/Conceptual/SafariJSProgTopics/ObjCFromJavaScript.html
I found a nice little simple tutorial on V2 which works great.
http://www.josephcrawford.com/macdev-articles/google-maps-in-a-cocoa-application/
Now before I start re-inventing the wheel and coding everything from scratch (callbacks from map-pins etc.). Is there nothing open source or similar around?
I'm surprised I could not find much on that subject since having a MapView in Cocoa OSX sounds like something many people would find useful theses days.
Thanks for any pointer to an open source project, tutorial or what may be floating around which I could not find.
meanwhile I found this open source project which seems useful to learn how to do it:
https://github.com/nst/CocoaSlideShow
Found this pretty nice Wrapper which does 100% the same like the iOS MKMapKit:
https://github.com/Oomph/MacMapKit
Have you checked out Google Mapki? It documents unofficial Google Maps API features. There is an Cocoa Touch example on Kadir Pekel's blog here. Though it might be difficult to adopt the example to Cocoa since it makes use of MKMapView.
Try here programmable web i could not see what you want but there are at least two objective-c wrappers for other popular api's, not google maps tho, and so it might be a starting point.
I am not sure you need a framework to do this. Did you have a look at the link below?
http://code.google.com/intl/fr-FR/apis/maps/articles/tutorial-iphone.html
Then all you need is generate the HTML from your code and load it with UIWebView's loadRequest.
That's what i did in my iPhone project, worked like a charm.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I've done a bit of iPhone programming (even have 1 published app) but what I'm really interested in doing is learning to create applications for OS X.
I'm a 7 year .Net Developer so I have some understanding of how to make desktop applications, though I don't know much about memory management as .Net spoiled me.
I was hoping someone could point me in the direction of a good tutorial for Objective-C/Cocoa but SPECIFICALLY targeting networking protocols as the application I have in mind would need to have networking capabilities (it's a turn based game with included chat).
Everywhere I look for tutorials these days leads me to iPhone and Cocoa-Touch tutorials but I need desktop tutorials.
You're probably gonna have to tackle the two subjects separately. For general desktop app development, Aaron Hillegass' book Cocoa Programming for Mac OS X is the most often recommended. It also covers memory management, though if you've already gotten an iPhone application published, I presume you've already tackled the subject.
For networking, Apple provides Getting Started with Networking, Internet, and Web, which is a bit broad, but leads to Introduction to Stream Programming Guide for Cocoa, which in turn contains the chapter Setting Up Socket Streams.
Also keep in mind, OS X is a Unix platform, and Objective-C is a superset of C. This means you can eschew Cocoa entirely and use the BSD socket API directly using standard C syntax—meaning you can just Google "bsd socket tutorial" and you're off to the races.
The XCode installation comes with a ton of example code in the /Developer/Examples folder.
There are even more on the ADC site, such as GeekGameBoard.
Apple has a ton of them. Beginner tutorials are not going to have much to do with online games because they're for beginners.