Nedim F's Dev Journey

Nedim F's Dev Journey

iOS Development How & Where to Start

iOS Development How & Where to Start

Featured on Hashnode

So you want to make iPhone and iPad apps, that's great. You have been using your phone for a good part of your life and you probably have some great ideas laying around.

Note: This article is not walkthrough tutorial for making your first iOS app. This article focuses the most, what to expect when you start and how & where to start.

To start with iOS development you will need few things:

  • working Mac computer
  • XCode

It's just a myth you need newest and greatest to start coding, any decent working macbook should be enough for learning iOS development, builds might take a while, but you can always use that time to reflect on your code, or even better get yourself some coffee.

Xcode

Def. The Xcode IDE is at the center of the Apple development experience. Tightly integrated with the Cocoa and Cocoa Touch frameworks, Xcode is an incredibly productive environment for building apps for Mac, iPhone, iPad, Apple Watch, and Apple TV.

So Xcode is IDE that iOS developers use on daily basis. It has everything you need built in. Do you need cool 3D view hierarchy of your view, or cool debugger to track really annoying crash, everything is already built in Xcode for you to utilise free of charge.

xcode

Programming language

There are two types of beginners in iOS. Once who are just starting coding and once who are already fluent in some other programming environments. But both of them have few things in common and they both need to start by learning one of two languages for iOS development.

Wait two? I thought there was only Swift?! Indeed there is Swift but there is also its predecessor which is Objective-C. If you are just starting the easiest way is to learn Swift which is a lot easier to wrap your mind around. Let's see why on an example of creating a function that calculates two numbers.

Swift

import Foundation

func addTwoNumbers(a: Int, b: Int) -> Int{
     return a+b 
}

print(addTwoNumbers(a: 3, b: 3))

Walkthrough:

  1. import Foundation

    Imports module named Foundation from iOS standard library

  2. func addTwoNumbers(a: Int, b: Int) -> Int{

    This is how we declare function in Swift. You have to use func keyword and then the name you want to call your function such as in our case addTwoNumbers. Our function has some arguments and we can state them as (a: Int, b: Int). Int represents the data type of our argument specific for this example. -> Int means that our function will return data type Int when called

  3. return a+b is just an addition operator
  4. print(addTwoNumbers(a: 3, b: 3)) prints out to console result of our function.

The result will be 6

Objective-C

#import <Foundation/Foundation.h>
int addTwoNumbers(int a, int b) 
{
    return a+b;
}
int main (int argc, const char * argv[])
{
   NSLog(@"%d",addTwoNumbers(1,2));
   return 0;
}

Try directly from your browser online compiler

Walkthrough:

  1. #import <Foundation/Foundation.h>

    Imports module named Foundation from iOS standard library.

  2. int addTwoNumbers(int a, int b)

    This is how we declare function in Objective-C. You have to use the type that you want to returnint (in our case) and then the name you want to call your function such as in our case addTwoNumbers. Our function has some arguments and we can state them as (int a, int b). int represents data type of our argument specific for this example.

  3. return a+b; is just an addition operator
  4. int main (int argc, const char * argv[]) {...} scope where our code will be executed.
  5. NSLog(@"%d",addTwoNumbers(1,2)); return 0; prints out to console result of our function.

The result will be 3

As you can see both of them are quite different syntax-wise. It's totally up to you what you want to use. Just have in mind that Apple has been investing time and money in Swift programming language for years now.

You may wonder why even bother learning Objective-C. When you start coding for iOS you will see that a lot of code in iOS SDK is written in Objective C, and really powerful third party libraries, such as SDWebImage or CocoaAsyncSocket are in whole written in Objective-C. Understanding code that goes to such libraries could really save your time in future.

Resources where you can learn Swift or Objective-C:

You will have more luck learning Objective C from books, so here is one I recommend

Building your app looks and feels

iOS isn't only about logic, it's also about design. Apple was kind enough to give us developers more than one way of creating views for our apps. You can use:

  • Storyboards
  • Programmatic layout
  • SwiftUI (newest and latest 🤩)

If you are a total beginner start with Storyboards, to get a feel of Auto Layout and how it works, what is trailing and leading and how to align elements to your liking. After you feel comfortable enough in Storyboards, then challenge yourself and write the same views using only code. At first, it will take forever, but later in your projects, it will feel more natural to type a view, then add it through Storyboard.

Note: Don't skip Storyboards, you'll have to learn how to get a visual representation of the app views as a real iOS developer.

I would suggest to read this cool article from SwiftLee Auto-Layout Programmatically

Roadmap

I like this roadmap. It is made for someone who is planning to have iOS as their new career.

image.png

Where to start?

I enjoyed taking this FREE Udacity iOS Nanodegree which contains a link for every available iOS course on Udacity. Go at your own pace.

  1. Swift for Beginners: The First Step in Building Apps
  2. Swift for Developers: Your Next Programming Language
  3. Learn Swift Programming Syntax
  4. iOS App Development with Swift
  5. UIKit Fundamentals: Learn the iOS User Interface Library
  6. iOS Networking with Swift: Web Services, APIs, and JSON
  7. iOS Persistence and Core Data
  8. How to Make an iOS App
  9. Grand Central Dispatch (GCD)
  10. AutoLayout: Using Constraint-Based Design
  11. Building iOS Interfaces: Designing for Mobile
  12. Mobile Design and Usability for iOS
  13. iOS Design Patterns: Common Problems, Common Solutions
  14. Data Structures & Algorithms in Swift
  15. Xcode Debugging
  16. Passwordless Login Solutions for iOS
  17. Firebase in a Weekend: iOS
  18. Continuous Integration and Deployment: Seamless Mobile Development
  19. Core ML: Machine Learning for iOS
  20. Learn ARKit using Swift
  21. Firebase Analytics: iOS
  22. iOS Interview Prep
  23. Server-Side Swift
  24. Objective-C for Swift Developers

To summarise:

  • Learn programming language

    as much as you can, go over the theory of it, and learn by doing examples, practice it to get a real feeling of how it works. You have to get comfortable seeing code and understanding what it does.

  • Learn how to solve problems

    after you are comfortable enough coding something new, and following tutorial to 'just to have that reassuring feeling' then you can start by solving problems. Programming is all about solving one problem after another, if you learn how to correctly approach a problem you can use that knowledge outside of iOS scope and branch out even more.

  • Learn how to approach bugs

    making errors is the most human thing you can do. Having that error fixed is where the fun comes in, you have to put yourself in 'computers shoes'. Computers think differently, and to understand how they do is crucial to solving a problem. Never hesitate to Google your problems, because there is a huge chance someone already had that same question as you did, days, months, even years ago.

About me

I'm Nedim, backend, and mobile app developer, who enjoys working on new stuff every day. Currently, I'm developing this cool app called Tweetly. You can find me on Twitter and be free to DM (@nedimcodes)!

#ios#app-development#beginners#howtos#resources
 
Share this