Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MrMister111

macrumors 68040
Original poster
Jan 28, 2009
3,900
382
UK
Hi

Love to be able to program an app, got no experience, am a savvy computer user would say, but nothing on programming.

I've read (Apple boast suppose!), that "Swift" is the new way to programme for iPhone/iPad and easier.

So...is it easier?
is Swift a separate program, or part of Xcode, confused? I've just got Yosemite on my iMac, so do I just now download Xcode 6 to get swift etc?

Any tips? as i say I'm learning from absolute scratch. Any good tutorial programs/apps I should get? read about Lynda.com, are these good ways to learn?

thanks
 
  • Like
Reactions: zakirshikhli
Xcode is an IDE, essentially a program to write code in. Think of it like Pages or Microsoft Word. Swift is the actual code that you write in Xcode. It's not a program, it's a language, similar to the text that you write in Pages.
 
Xcode is an IDE, essentially a program to write code in. Think of it like Pages or Microsoft Word. Swift is the actual code that you write in Xcode. It's not a program, it's a language, similar to the text that you write in Pages.

Ah ok..I think, so Xcode is still the app to use, whats the latest version with Swift and Yosemite support then, is it available now?

Also is there anything else easier to write iPhone/iPad apps in, or do you have to use Xcode, if not what is the best, recommendations

thanks
 
Ah ok..I think, so Xcode is still the app to use, whats the latest version with Swift and Yosemite support then, is it available now?

Also is there anything else easier to write iPhone/iPad apps in, or do you have to use Xcode, if not what is the best, recommendations

thanks

Buy this book: http://www.amazon.co.uk/Objective-C...F8&qid=1413563139&sr=8-1&keywords=objective+c

Read it cover to cover and follow every exercise until you can do them unaided.

Then buy their follow up book on iOS programming and do the same.

There is no easy way to make apps unless you download templates close to what you want to do and mess about with them a bit. CodeCanyon is a good place to start as is code4app if you don't want to pay.

Xcode is pretty much the only way to do it properly. There are game makers (Unity etc) and app building sites but their fees are expensive and you're never really writing natively with the best results.
 
As an Amazon Associate, MacRumors earns a commission from qualifying purchases made through links in this post.
Buy this book: http://www.amazon.co.uk/Objective-C...F8&qid=1413563139&sr=8-1&keywords=objective+c

Read it cover to cover and follow every exercise until you can do them unaided.

Then buy their follow up book on iOS programming and do the same.

There is no easy way to make apps unless you download templates close to what you want to do and mess about with them a bit. CodeCanyon is a good place to start as is code4app if you don't want to pay.

Xcode is pretty much the only way to do it properly. There are game makers (Unity etc) and app building sites but their fees are expensive and you're never really writing natively with the best results.
I would second the recommendation to start with Objective-C first.

Personally, I can and do learn a lot about programming from books. But I personally learn much faster from actually watching someone code and explain everything on a video format, so I always suggest the Complete iOS 7 Course on stacksocial.com or the ios stuff on Lynda.com, both are fantastic especially for a beginner.

I started back in may and just recently I finished creating my own cloud sync service (literally all of it from scratch) without assistance for my own custom app. So just pick up the book or take the video course and have fun ;)

My main suggestions are:

1. Take a HUGE amount of notes. Include everything in your notes including the code you learn to use as examples for yourself in the future. I have well over 300 pages of notes from when I began and learning core data, JSON, core animation, multi threading, etc.

2. Don't be afraid to stop right in the middle of a course and do a side project. You will gain most of your experience just by screwing around making your own apps for fun.

3. Have fun! Don't do this just for money, do it as a hobby You'll have more fun that way.
 
As an Amazon Associate, MacRumors earns a commission from qualifying purchases made through links in this post.
Video courses I like as you're there on the Mac and can do it straight away.

Lynda.com looks decent anyone used it? Quite expensive but could also use other stuff I suppose. Can you download the videos for offline yet as remember years ago you couldn't.

You can download for offline viewing, but only with the top package, and its very expensive, for what I would want really, unfortunately as looks decent
 
Last edited:
Objective-C is quite a tough language to start with, don't you think?

I'd seriously consider starting with something like Python. Get the basics (the conventions, etc) learnt and then everything will be a lot easier. Python is very easy to learn.

Objective-C on the other hand is harder, IMO.
 
Objective-C is quite a tough language to start with, don't you think?

I'd seriously consider starting with something like Python. Get the basics (the conventions, etc) learnt and then everything will be a lot easier. Python is very easy to learn.

Objective-C on the other hand is harder, IMO.

Objective-C in my opinion really isn't THAT difficult to begin with. What helps Objective-C versus Python, Ruby, or another "Beginner" languages, is that you can start seeing results on a platform you want to program for right away. Changing a UILabel when you click a button allows you start seeing things happen and begin putting the pieces together for more complex programs. Sorting an Array and displaying it detail data in a TableViewController is amazing the first time you do it!

In python you can learn the basics of variables and structs, but seeing it happen on something you want to learn I feel is much more valuable for a motivated beginner.
 
In python you can learn the basics of variables and structs, but seeing it happen on something you want to learn I feel is much more valuable for a motivated beginner.

I wrote a simple module that uses Tkinter to display variables in popup windows with appropriate widgets for the variable type. IE, if you give it a two deep collection, it'll display the contents in a table. If you give it something deeper, it'll display it in a tree view. I wrote it to help me with debugging stuff, but I could throw it up on pip for others to download if that would help Python be a language where you can "see it happen" and help "motivate beginners".

IDK, personally, I think the REPL (interactive mode) in Python is enough of motivation for beginners. Write simple string slicing algorithms and it's pretty cool.
 
I'm sorry but I disagree with the people who advise learning another language first... the entire point of Swift is that it is easy to learn ( it is very similar to scripting languages but at the same time, it is strict enough so that you won't chase your own tail for hours / days because of a silly mistake / typo, etc. ).

There's really no point in wasting weeks / months getting used to the idiosyncrasies of Objective-C or some other language and then waste some more time getting used to Swift idiosyncrasies. It's Swift we're talking about here, not C, C++ or even Objective-C... one doesn't have to waste time getting used to programming / general programming concepts in some other language that is considered more "noob friendly" and only afterward try picking up Swift...

The only real downside of Swift at the moment is the lack of beginner-friendly tutorials and working examples. Don't get me wrong, if you put a relatively small effort into searching for tutorials and examples, chances are you'll find something to get you started... sure, you could find a bunch more on Objective-C ( no wonder... it was released 31 years ago ), but in the end, the goal is to learn Swift, isn't it?

Be assured that more Swift examples and tutorials will appear... it's just a matter of time ( the community is actively embracing Swift so I would expect things to ramp up soon enough ).

That being said, my advice is to forget about Objective-C and other languages for now and simply start reading the official Swift docs ( they are quite well written, there are quite a few examples that should help you get started + even some small tasks / "homework" that should help you deepen your knowledge ) and why not, even watch the video tutorials: https://developer.apple.com/swift/resources/
 
Last edited:
Phew... Would be better if didn't have you learn Solberg another language, as wouldn't have time for that. As you say I thought swift was to help people new to programming, making it easier?

Udemy is an online/iPhone course seller, which has done swift courses on. They are video courses also, done free,b others cheap in relative to say Lynda.com.

Is there no courses (UK) that are classroom based for older students?

Think as above I'd rather try swift straight away, and use video courses.

Do I also need to become an Apple developer to run programmes on an actual iPad or iPhone? Is this per year fee also? Our just leave it running on the Xcode simulator for now.

Thanks
 
Is it better to have it running on an actual iPad or iPhone or is the simulator sufficient for now?

The only advantages in running an app on the device is the "oh wow" factor of seeing your app actually run on the device.

Later, the advantage is to see the effect of how fast/slow code can be and how much memory is used for things.

Example: Most longs lists that are displayed on the device are only put into the UI when needed. In other words, if you scroll a list of 1000 names, you may only see 10 names at any given time and there may only be 20 names loaded into the UI (the ones off screen are reused)

Some graphics are calculated or drawn, example: a button that may be used with different sizes might be drawn as needed instead of creating and storing 10 different buttons just because you need 10 different sizes.

If you only work on the computer and never on the device, you might not notice the speed/memory hit that some methods have.

Basically, the sim is great for quite a while to understand how to code things, however, if you need the camera or other sensor, that could be a problem.

Back to original topic, Swift vs ObjC... Apple has committed to Swift, once it's stable, there should be no reason not to use it, unless your goal included employment.

In the business world, it's all about supply/demand, ObjC has a long following and a business might have a huge program already done in ObjC, new companies might start out with Swift.
 
Thanks. It's purely to learn, no business, maybe in future (long long time), get an app in store, for as you say "the wow factor if it!"

I'll stick with swift and with the simulator then.

Still looking at Lynda.com but really expensive although a lot of videos, I wouldn't use a lot of them, and so too me it's a waste. Would prefer a new tiered system...
 
Thanks. It's purely to learn, no business, maybe in future (long long time), get an app in store, for as you say "the wow factor if it!"

I'll stick with swift and with the simulator then.

Still looking at Lynda.com but really expensive although a lot of videos, I wouldn't use a lot of them, and so too me it's a waste. Would prefer a new tiered system...

I was under the impression that Lynda.com was $25/Month. You can record (might not be legal unless for personal use) but in 1 month you can take a ton of notes and make quite a bit of progress.

I don't know if Lynda.com has anything for Swift yet, I've seen their ObjC videos and they looked great.

You can find discount coupon codes, I think Lynda.com has one from TWIT.TV
 
Start with JavaScript.
It's super easy.

There is only one variable statement.
And you can use 'classes', though its meant to be different.

Anyways,
just learn a programming language that looks easy to you. Find some online tutorials, and find something that makes sense to you. Run with it.

Honestly though, I thought swift would be an easy language to learn too.
 
Start with JavaScript.
It's super easy.

There is only one variable statement.
And you can use 'classes', though its meant to be different.

In what way is it easy? Rather than crash as a good language should when it encounters invalid statements, it handles them in often unpredictable ways. It has no compile step, so all things would be caught at compile time in Obj-C, Swift, or Java are instead caught at runtime, hidden away in the console.

As for only having a single variable statement, Python ditches the word "var" entirely. That's not to say the language is better (although it is), but if that were the criteria you were going by, then Python would be better. Further, the "let" keyword in Swift is actually a great idea. Making constants is now super easy - there's no confusion about the ordering of keywords.

And having classes which behave differently from any other common language definitely isn't a good thing, as that means there will be an additional hurdle now when moving to any other language (honestly, JS classes still confuse the hell out of me, and I've read up on them several times.)
 
In what way is it easy? Rather than crash as a good language should when it encounters invalid statements, it handles them in often unpredictable ways. It has no compile step, so all things would be caught at compile time in Obj-C, Swift, or Java are instead caught at runtime, hidden away in the console.

As for only having a single variable statement, Python ditches the word "var" entirely. That's not to say the language is better (although it is), but if that were the criteria you were going by, then Python would be better. Further, the "let" keyword in Swift is actually a great idea. Making constants is now super easy - there's no confusion about the ordering of keywords.

And having classes which behave differently from any other common language definitely isn't a good thing, as that means there will be an additional hurdle now when moving to any other language (honestly, JS classes still confuse the hell out of me, and I've read up on them several times.)

Ah, calm down there sir. It's not necessarily the best language, but it's easier to learn because of its syntax.

JS classes are easy.

Code:
var object = {
   this.property1 = 2;
   this.method = function() {
       // function code here
   };
};

var myObject = object.method();

And anyways, the fact that there is no need to compile code is what makes it easy. The browser does that all for you. It's technically an interpreted language, but whatever. Plus, you can use things like JSFiddle to make quick and easy tests.

If you really want something fun and easy to play with, try LUA and use the Corona SDK. Then you can make games. It's not a strongly-typed language (meaning that it doesn't use ; and {} for statements).
 
Last edited by a moderator:
Damn, you're right.
Please explain what it is then.
See here:
http://en.wikipedia.org/wiki/Strong_and_weak_typing

You should also probably understand the Liskov substitution principle:
http://en.wikipedia.org/wiki/Liskov_substitution_principle


And I don't recommend learning JavaScript as a precursor to Swift, or Objective-C, or C++. JS's ideas of "class", "inherit", and so on are radically different from those of Swift, Obj-C, etc. JS has a prototype-based system; the others are class-based.
 
Last edited:
Just a refresher: don't waste time with other languages when your goal is to learn Swift. Swift isn't C, C++ or even Objective-C where it would be advised that you "get your hands wet" with some language that is considered more "noob friendly"... not to mention how relative the term "easy" is... some consider quantum physics to be easy... cause well, they're good at it ( or so they believe ).

Anyway, I actually wanted to comment on the Device vs Simulator dilemma.

KarlJay's approach is way too simplistic for my taste... If you have access to the device, then there's no reason you should avoid using it ( even if you don't have access to a physical device, you should really try getting your hands on one ). I'm not saying you should ALWAYS use the physical device ( no matter what ), but look at it logically... it's the stuff that people are expected to run your app on!!! Don't you want to know if the app ACTUALLY runs on the device? If it runs the way you expect it ( the way the simulator shows it would )? A simulator is hardly comparable to the physical device when you're running it on a computer that has NNN times better specifications than the actual device(s) ( even if you can limit the simulator by allocating less RAM or fewer cores, it is still VERY DIFFERENT hardware... meaning that there's still a decent chance that stuff won't run the same way on the actual device ).

You're taking unnecessary risks when you're relying heavily on the simulator... the simulator might easily "hide" some nasty problems ( performance bottlenecks or some specific bugs ) that will only become obvious when running the app on the actual device ( of course, depending on what you're working on... you might never run into such situations, but why take your chances? )... You risk ending up with an app that runs very smoothly, perfectly in the simulator but struggles on the actual device or even crashes... if you don't discover these issues early on, you risk wasting a bunch of time trying to fix it when there's already a bunch of code that depends on this broken feature and in extreme cases, you might even end up with something that simply can't work on current devices. You risk wasting hours / days / weeks / months of your life trying to fix something you thought was fine all along because "it worked fine in the simulator" !!!

Bottom line: you should try to achieve at least some balance... the simulator isn't Evil and although the results it shows are rarely 100% reliable, it doesn't mean you should avoid it completely... BUT, if you have a physical device ( smartphone / tablet that you expect the app to run on... your "target device" ), then try testing your app on it at least after every major feature / change you implement... you really don't want to test your app exclusively in the simulator and risk discovering that after many hours / days / weeks / months spent on developing something cool, IT DOES NOT WORK on the actual device ( or performs extremely poorly ).

Do yourself a favor and run your app on an actual device at least after every significant feature / change you implement... at least then.

PS: JavaScript is not really comparable to Swift. Sure, Swift has a scripting-language feel to it, but it's not a scripting-language! Swift is strongly-typed, static and imperative whereas Javascript is dynamic and duck-typed. That's quite a BIG difference.
 
Last edited:
Barna makes a good point, but if your concerned about the price of Lynda.com @ $25 / month, then the cost of the developer account might be a concern as well.

The point I should have made is that if you want to save some money, you can delay the paid developer account costs and use the sim until you have a good handle on the language.

Everyone "gets" programming at a different speed.

Buying the paid dev account doesn't need to happen at the start. If $25/month is steep then the $99/year might be steep as well. Learning the concepts of programming might take him 3 months, on the other hand it might take him 3 months to find out he hates programming.

Apple's happy to take your money, it's almost like a carnival where you try and get the dime on the plate or the ring on the peg.

Let's face it, this was a gold rush at the start, stories about instant wealth from a flashlight app... tons of people standing in line giving their money to Apple for a shot at the big time.

Yet how many of them stick around when they realize that programming is actual work and takes actual thinking?

IMO, someone can find out if they should do this without paying any money at all.

Learning doesn't have to cost much money, at least not in this case. I think spending $25 for one month at Lynda.com should give him some good insight into this.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.