asi intro to ios 6/2018 - arbormoon.com · about me • long time apple developer (21 wwdcs) •...
TRANSCRIPT
Intro to Development for iOS
Dave KoziolArbormoon Software, Inc.
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
Audience Background
• Prior coding experience?
• Current Students?
• IT Industry?
• Others?
Overview
• Languages
• Requirements
• Background
• Process
• Resources
• Q&A
Languages
• iOS Development Language
• Historically: Objective-C
• 2014: Apple introduced Swift
• Transition to Swift is ongoing
Languages: Swift
• Intended to be:
• modern
• object oriented
• safer
• support “functional programming”
• Currently version 4.1
• Still evolving
Languages: Swift Playgrounds (iPad)
• Animated interactive tool for learning Swift
• Free for iPad in the App Store
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
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
Background: Xcode Text Editing
Background: Xcode Storyboards
Background: Xcode Integrated Debugger
Background: Xcode Playgrounds
• Interactive tool to “play” with Swift, and see the results.
Background: Simulator
• Simulates all current devices
Background: iOS
• Heavily based on mac OS
• Applications are sandboxed
• True multitasking OS, but ability to use multitasking is limited.
Background: iOS Stack
Core OSCore Services
MediaCocoaTouchYour App
Background: iOS Stack Core OS
• BSD/POSIX
• Sockets
• File System
• Bonjour
• Keychain
• Threads
• Security
Core OSCore Services
MediaCocoaTouchYour App
Background: iOS Stack Core Services
• SQLite
• Core Location
• Address Book
• Collections
• Core Location
• Preferences
• Core Motion
Core OSCore Services
MediaCocoaTouchYour App
Background: iOS Stack Media
• Core Graphics
• Core Text
• OpenGL ES
• Core Animation
• AV Foundation
• Core Audio
• Video Playback
Core OSCore Services
MediaCocoaTouchYour App
Background: iOS Stack CocoaTouch
• UIKit
• MapKit
• GameKit
• Messages UI
• AddressBook UICore OS
Core ServicesMedia
CocoaTouchYour App
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
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.
UINavigationBar
UITableViewUITableViewCell
Process: More Views
• UIButton, UILabel, UITextField, UISlider, UISwitch, UISegmentedController, UIPickerView, UIActivityIndicatorView, UIImageView, UIPageControl, UIWebView, MKMapView, UISearchBar, UICollectionView, etc.
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()
Process: Debugging
• NSLog - Output to console, like printf
• Warning this can be expensive in release builds
• Visual Debugger
• Test on a real device
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.
Process: Getting Started
• Start with the best Template.
• Check “Use Core Data” for database support.
• Take the time to figure out Storyboards and AutoLayout.
Process: Deployment Target
• 81% of users are on iOS 11 and above according to Apple.
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
Resources: Other Tools
• CocoaPods - Library reuse tool
• AppCode - Replacement for Xcode from JetBrains
• Visual Studio for Mac - Unity, Xamarin
Resources: Cross-Platform
• Google’s Flutter - Dart
• Microsoft’s Xamarin - C#
• ReactNative - JavaScript
• Titanium SDK - JavaScript
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
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
Resources: Community
• Stack Overflow
• Web: http://stackoverflow.com
• iOS Developers HQ
• Web: https://ios-developers.io/
Q&A