36
Intro to Development for iOS Dave Koziol Arbormoon Software, Inc.

ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Intro to Development for iOS

Dave KoziolArbormoon Software, Inc.

Page 2: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

About Me

• Long time Apple Developer (21 WWDCs)

• Organizer Ann Arbor CocoaHeads

• President & iOS Developer at Arbormoon Software Inc.

• Multiple Top 5 apps in the iTunes App Store

Page 3: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Audience Background

• Prior coding experience?

• Current Students?

• IT Industry?

• Others?

Page 4: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Overview

• Languages

• Requirements

• Background

• Process

• Resources

• Q&A

Page 5: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Languages

• iOS Development Language

• Historically: Objective-C

• 2014: Apple introduced Swift

• Transition to Swift is ongoing

Page 6: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Languages: Swift

• Intended to be:

• modern

• object oriented

• safer

• support “functional programming”

• Currently version 4.1

• Still evolving

Page 7: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Languages: Swift Playgrounds (iPad)

• Animated interactive tool for learning Swift

• Free for iPad in the App Store

Page 8: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Requirements

• Mac that supports current macOS (10.13+)

• Apple iOS Developer Account

• Free, $99 per year, or $299 per year

• https://developer.apple.com/programs/

• Supported iOS Device (iOS 10 or iOS 11)

• Xcode 9.2 (5.3GB Download)

• Free in Mac App Store

Page 9: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Requirements: Supported Devices

• iPhone 5s, 6, 6 Plus, 6S, 6S Plus, SE, 7, 7 Plus, 8, 8 Plus, and X

• iPod Touch (6th Generation)

• iPad Air, Air 2, and 5th Generation

• iPad mini 2, 3 and 4

• All iPad Pros

Page 10: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Background: Xcode Text Editing

Page 11: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Background: Xcode Storyboards

Page 12: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Background: Xcode Integrated Debugger

Page 13: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Background: Xcode Playgrounds

• Interactive tool to “play” with Swift, and see the results.

Page 14: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Background: Simulator

• Simulates all current devices

Page 15: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Background: iOS

• Heavily based on mac OS

• Applications are sandboxed

• True multitasking OS, but ability to use multitasking is limited.

Page 16: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Background: iOS Stack

Core OSCore Services

MediaCocoaTouchYour App

Page 17: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Background: iOS Stack Core OS

• BSD/POSIX

• Sockets

• File System

• Bonjour

• Keychain

• Threads

• Security

Core OSCore Services

MediaCocoaTouchYour App

Page 18: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Background: iOS Stack Core Services

• SQLite

• Core Location

• Address Book

• Collections

• Core Location

• Preferences

• Core Motion

Core OSCore Services

MediaCocoaTouchYour App

Page 19: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Background: iOS Stack Media

• Core Graphics

• Core Text

• OpenGL ES

• Core Animation

• AV Foundation

• Core Audio

• Video Playback

Core OSCore Services

MediaCocoaTouchYour App

Page 20: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Background: iOS Stack CocoaTouch

• UIKit

• MapKit

• GameKit

• Messages UI

• AddressBook UICore OS

Core ServicesMedia

CocoaTouchYour App

Page 21: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Process: Typical

• Develop App in Xcode

• Developer tests on device(s) with developer builds

• Testers test on devices with TestFlight or Ad Hoc builds

• Distribute via App Store

Page 22: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Process: Views & Controllers

• GUI widgets are UIViews

• UIViewControllers drive the UIViews

• One controller for each “page” of your App.

• Might have UINavigationControllers or UITabBarControllers to switch views.

• Views can be defined in code or in storyboards.

Page 23: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

UINavigationBar

UITableViewUITableViewCell

Page 24: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Process: More Views

• UIButton, UILabel, UITextField, UISlider, UISwitch, UISegmentedController, UIPickerView, UIActivityIndicatorView, UIImageView, UIPageControl, UIWebView, MKMapView, UISearchBar, UICollectionView, etc.

Page 25: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Process: App Life Cycle

• Starts in main(int argc, char * argv)

• Typically calls UIApplicationMain(argc, argv, nil, nil)

• Info.plist defines storyboard & more for App

• App Delegate typically implements application(didFinishLaunchingWithOptions)

• View Controllers often override viewDidLoad() or viewWillAppear()

Page 26: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Process: Debugging

• NSLog - Output to console, like printf

• Warning this can be expensive in release builds

• Visual Debugger

• Test on a real device

Page 27: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Process: Device Testing

• Xcode can load debug builds onto a device

• Need a paid or University developer account for testing by others.

• Apps are “signed”

• Use TestFlight, Apple Configurator, HockeyKit or App Store to deploy to devices.

Page 28: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Process: Getting Started

• Start with the best Template.

• Check “Use Core Data” for database support.

• Take the time to figure out Storyboards and AutoLayout.

Page 29: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Process: Deployment Target

• 81% of users are on iOS 11 and above according to Apple.

Page 30: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Resources: Learning

• Developing iOS 11 Apps with Swift by Stanford

• iOS 10 SDK Development by Chris Adamson

• iOS Programming: The Big Nerd Ranch Guide (6th Edition) by Keur & Hillegass

Page 31: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Resources: Other Tools

• CocoaPods - Library reuse tool

• AppCode - Replacement for Xcode from JetBrains

• Visual Studio for Mac - Unity, Xamarin

Page 32: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Resources: Cross-Platform

• Google’s Flutter - Dart

• Microsoft’s Xamarin - C#

• ReactNative - JavaScript

• Titanium SDK - JavaScript

Page 33: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Resources: Followup Sessions

• Intro to Coding for Android – 6/19 8pm, Grand Circus

• Designing for Mobile – 6/20 2pm, 20 Witherell

• App Development - Native Vs. Cross-Platform – 6/20 6pm, Grand Circus

• Surviving and Thriving in Tech (When You’re Not a Techie) – 6/21 1pm, Aloft Detroit

Page 34: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Resources: Local Community

• Motor City CocoaHeads

• 3rd Thursday of every month, food 6:30, Talk 7pm

• https://www.meetup.com/MotorCityCocoaHeads/

• CocoaHeads Ann Arbor

• 2nd Thursday of every month, Pizza 6:30pm, Talk 7pm

• Web: http://meetup.com/A2-CocoaHeads

• Mobile Monday

• Groups in Ann Arbor and Detroit

• Web: http://mobilemondaymichigan.org

Page 35: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Resources: Community

• Stack Overflow

• Web: http://stackoverflow.com

• iOS Developers HQ

• Web: https://ios-developers.io/

Page 36: ASI Intro to iOS 6/2018 - arbormoon.com · About Me • Long time Apple Developer (21 WWDCs) • Organizer Ann Arbor CocoaHeads • President & iOS Developer at Arbormoon Software

Q&A