ios Dev Fest Research Network Operations Center Thursday, February 7, 13

Similar documents
ios Development Tutorial Nikhil Yadav CSE 40816/60816: Pervasive Health 09/09/2011

View Controller Programming Guide for ios

INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011

Knappsack ios Build and Deployment Guide

This documentation is made available before final release and is subject to change without notice and comes with no warranty express or implied.

An Introduction to Modern Software Development Tools Creating A Simple GUI-Based Tool Appleʼs XCode Version 3.2.6

Praktikum Entwicklung von Mediensystemen mit

INTRODUCTION TO IOS CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 13 02/22/2011

Chapter 1. Introduction to ios Development. Objectives: Touch on the history of ios and the devices that support this operating system.

ios App for Mobile Website! Documentation!

1 от :45

Xcode Application note

MA-WA1920: Enterprise iphone and ipad Programming

ios Dev Crib Sheet In the Shadow of C

iphone Objective-C Exercises

Customize Mobile Apps with MicroStrategy SDK: Custom Security, Plugins, and Extensions

Creating a Custom Class in Xcode

Objective C and iphone App

Start Developing ios Apps Today

Assignment I Walkthrough

ios Team Administration Guide (Legacy)

Star Micronics Cloud Services ios SDK User's Manual

Xcode User Default Reference. (Legacy)

eggon SDK for ios 7 Integration Instructions

Tag Specification Document

Mobile App Design and Development

Beginner level: Modules 1 to 18. Advanced level: Quick review of modules 1 to 18, then following to module A Simple ios Application

RoR to RubyMotion Writing Your First ios App With RubyMotion. Michael Denomy BostonMotion User Group June 25, 2013

Praktikum Entwicklung von Mediensystemen mit ios

How To Develop An App For Ios (Windows)

How To Use Ios 5

White Label ios Application Installation and Customization Guide

Please note that this SDK will only work with Xcode or above. If you need an SDK for an older Xcode version please support.

Learning ios Programming

Microsoft Tag Scanning SDK for iphone & Android Apps

IOS App Development Training

Tutorial: ios OData Application Development with REST Services. Sybase Unwired Platform 2.2 SP04

Xcode Project Management Guide. (Legacy)

ios Application Development &

MEAP Edition Manning Early Access Program Hello! ios Development version 14

Cross-platform mobile development with Visual C

Copyright Notice. Mobile Testing Enterprise 7.3. September Copyright Keynote LLC. All rights reserved.

Your First App Store Submission

GO!Enterprise MDM Device Application User Guide Installation and Configuration for ios with TouchDown

App Distribution Guide

This is a training module for Maximo Asset Management V7.1. It demonstrates how to use the E-Audit function.

Android Developer Fundamental 1

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

GO!Enterprise MDM Device Application User Guide Installation and Configuration for Android with TouchDown

2. About iphone ios 5 Development Essentials. 5. Joining the Apple ios Developer Program

Building and Using Web Services With JDeveloper 11g

Generating an Apple Enterprise MDM Certificate

Building Mobile Applications Creating ios applications with jquery Mobile, PhoneGap, and Drupal 7

Data Tool Platform SQL Development Tools


TakeMySelfie ios App Documentation

SAS Visual Analytics 7.2 for SAS Cloud: Quick-Start Guide

CA Mobile Device Management. How to Create Custom-Signed CA MDM Client App

Icons: 1024x1024, 512x512, 180x180, 120x120, 114x114, 80x80, 60x60, 58x58, 57x57, 40x40, 29x29

Programming Cocoa with Ruby Create Compelling Mac Apps Using RubyCocoa

Initial Setup of Mozilla Thunderbird with IMAP for OS X Lion

Access Queries (Office 2003)

Everything is Terrible

Create an ios App using Adobe Flash Side by Side Training, And without using a Mac

Magento Quotation Module User and Installer Documentation Version 2.2

Customize Bluefin Payment Processing app to meet the needs of your business. Click here for detailed documentation on customizing your application

ADITION ios Ad SDK Integration Guide for App Developers

Telesystem Visual Voic ios/apple User Guide

SaaS Encryption Enablement for Customers, Domains and Users Quick Start Guide

CORE K-Nect Web Portal

GO!Enterprise MDM Device Application User Guide Installation and Configuration for Android

Fingerprint Identity User Manual for the Griaule Biometric Framework Rev 1.00

Personal Portfolios on Blackboard

Mobile Secure Cloud Edition Document Version: ios Application Signing

How do I use Push Notifications with ios?

Spambrella SaaS Encryption Enablement for Customers, Domains and Users Quick Start Guide

From Data Modeling to Data Dictionary Written Date : January 20, 2014

How To Use Rstickets!Pro On A Pc Or Macbook 2.5 (For Macbook)

Managing users. Account sources. Chapter 1

QAS Small Business for Salesforce CRM

TTUHSC Online Contract Accounts Receivable

ios App Programming Guide

Using Microsoft SQL Server A Brief Help Sheet for CMPT 354

Getting Started with the Aloha Community Template for Salesforce Identity

Creating Carbon Menus. (Legacy)

Im360 SDK ios v5.x and newer

Learn iphone and ipad game apps development using ios 6 SDK. Beginning. ios 6 Games. Development. Lucas Jordan. ClayWare Games tm

SHIPSTATION / MIVA MERCHANT SETUP GUIDE

Kony MobileFabric Messaging. Demo App QuickStart Guide. (Building a Sample Application

NSPersistentDocument Core Data Tutorial for Mac OS X v10.4. (Retired Document)

SharePoint AD Information Sync Installation Instruction

iphone ios 6 Development Essentials

alternative solutions, including: STRONG SECURITY for managing these security concerns. PLATFORM CHOICE LOW TOTAL COST OF OWNERSHIP

owncloud Configuration and Usage Guide

Transcription:

ios Dev Fest Research Network Operations Center

Outline http://goo.gl/02blw Getting Started With App Development Setup Developer Environment Setup Certificates and Provisioning Deploying App To Device Real World App Development Example An end to end real world prototype

Setup Dev Environment https://developer.apple.com/devcenter/ios/index.action Pre-req: You must have registered an Apple ID Send registered Apple ID to devsupport@gatech.edu requesting to join the ios University Program Install Xcode From either: DMG downloaded from ios dev portal App Store

Developer Certificate After you receive an invite to join the ios University Account, you will need to request a developer certificate. Log into the provisioning portal: https:// developer.apple.com/ios/manage/overview/ index.action Click the certificate tab Click request certificate

Developer Certificate

Developer Certificate

Developer Certificate

Developer Certificate

Developer Certificate

Provisioning Profile Shortly after your developer certificate is approved, that certificate will be added to a provisioning profile for you to download and use. You should receive an email about when that is available. Log into the provisioning portal: https:// developer.apple.com/ios/manage/overview/index.action Click the provisioning tab Download the Wildcard Team Provisioning Profile

Certificate and Profile Install Double Click the Certificate and it will get added to your keychain. Double Click the provisioning profile and it will get added to Xcode Organizer

Certificate and Profile Install

Certificate and Profile Install

Deploying App To Device Device UDID needs to be added to the provisioning profile. For new devices, you need to send the UDID to devsupport@gatech.edu and it will be added to the provisioning profile. You will then need to re-download the provisioning profile replacing the previous one. The device needs to allow development, you click the Use for development button in Xcode Organizer on the desired device ios 6.1requires ios 6.1 SDK found in Xcode 4.6

Deploying App To Device

Deploying App To Device Load the Hello World Project Change the target from the simulator to device Click Run If everything is configured then it will run

Real World App Example For an end to end example in ios 6 there are some basic topics that we will need to cover Objective C Overview Storyboard Overview Comments App Walkthrough

Overview of Objective C GITMAD 2012

File Formats Extension Source Type.h Header files. Header files contain class, type, function, and constant declarations..m Source files. This is the typical extension used for source files and can contain both Objective-C and C code..mm Source files. A source file with this extension can contain C++ code in addition to Objective-C and C code. This extension should be used only if you actually refer to C++ classes or features from your Objective-C code.

Classes Classes allow for the basic encapsulation for some data and operations on that data. The interface portion is usually included in the.h portion. The implementation is usually in the.m file.

Example Class Declaration

Strong and Weak Types Strong typed variables include the class name in the declaration. Weakly typed variables use "id" instead. Why use one or the other? Example: MyClass *myobject1; //Strong Typing id myobject2; //Weak typing

Methods and Messaging There are 2 types of methods in Obj-C: instance methods and class methods An instance method is a method whose execution is scoped to a particular instance of the class. In other words, before you call an instance method, you must first create an instance of the class. Class methods, by comparison, do not require you to create an instance, but more on that later.

Method Declarations The minus sign indicates that this is an instance method. The method s actual name (insertobject:atindex:) is a concatenation of all of the signature keywords, including colon characters. The colon characters declare the presence of a parameter. If a method has no parameters, you omit the colon after the first (and only) signature keyword. In this example, the method takes two parameters.

Calling a Method When you call a method you do so by messaging the object. Example: [myarray insertobject:anobject atindex:0]; Inside the brackets, the object receiving the message is on the left side and the message is on the right.

Nested Messages To avoid declaring numerous local variables to store temporary results, Objective-C lets you nest messages. Example: [[myappobject thearray] insertobject:[myappobject objecttoinsert] atindex:0]; The return value from each nested message is used as a parameter, or as the target, of another message. For example, you could replace any of the variables used in the previous example with messages to retrieve the values.

Accessor methods Accessor methods get and set the state of an object, and typically take the form -(type)propertyname and -(void)setpropertyname: (type). Using dot syntax, you could rewrite the previous example as: Example: [myappobject.thearray insertobject: [myappobject objecttoinsert] atindex: 0]; You can also use dot syntax for assignment. myappobject.thearray = anewarray; This is the same as [myappobject setthearray:anewarray];

Class Implementations Like the class declaration, the class implementation is identified by two compiler directives here, @implementation and @ end. These directives provide the scoping information the compiler needs to associate the enclosed methods with the corresponding class.

Declared Properties Declared properties are a convenience notation used to replace the declaration and, optionally, implementation of accessor methods. Example: @property BOOL flag; @property (copy) NSString *nameobject; //Copy the object during assignment @property (readonly) UIView *rootview //Declare only a getter method. you can use the @synthesize compiler directive to ask the compiler to generate the methods according to the specification in the declaration: Example: @synthesize flag, nameobject, rootview; Properties reduce the amount of redundant code you have to write.

Strings Same as C. Single Quotes for single characters and Double quotes for strings. They don't typically use C-style strings. They pass strings around NSString objects. NSStrings are object wrappers that do most everything for you, including: built-in memory management for storing arbitrary-length strings, support for Unicode, printf-style formatting utilities just to name a few

Example Strings NSString *mystring = @"My String\n"; NSString *anotherstring = [NSString stringwithformat:@"%d %@", 1, @"String"]; //Create an Obj-C string from a C string NSString *fromcstring = [NSString stringwithcstring:"a C string" encoding: NSASCIIStringEncoding];

Protocols Declares methods that can be implemented by any class. They define an interface that other objects are responsible for implementing. When you implement the methods of a protocol in a class, your class is said to conform to that protocol. Protocols are frequently used to specify the interface for delegate objects. In the case of many delegate protocols, adopting a protocol is simply a matter of implementing the methods defined by that protocol.

Protocol Example @interface MyClass : NSObject <UIApplicationDelegate, AnotherProtocol> { } @end //Declaration of the protocol @protocol MyProtocol - (void)myprotocolmethod; @end

ios Storyboards http://www.slideshare.net/chriswynn2/ios-storyboards

This Talk What, When, Why and How? Demo

What? New feature in Xcode and ios Visual way to specify views and transitions between them

When? Xcode 4.2 ios Deployment Target: ios 5.0+ * Not supported for devices not running ios 5.0

Why? Reduces amount of glue code Bird s Eye view of your app

Sample Storyboard Image Courtesy: Ray Wenderlich http://www.raywenderlich.com/5138/beginning-storyboards-in-ios-5-part-1

Advantages Single storyboard contains layout for ALL views/transitions (no separate nib files) Ctrl-drag to create a transition Flexible support for UITableViewCells Design directly in storyboard (no nib file)

How? New terminology Scene - view controller Segue - transition from one view to another Create a new project w/ Use Storyboard Create segues (ctrl-drag) in your Storyboard

How? (Optional) Add a behavior that occurs during (just before) a segue. Override method: -(void)prepareforsegue:(uistoryboardsegue *)segue sender: (id)sender { } if ([[segue identifier] isequaltostring:@ MySegue ]) { } SecondView *vc = [segue destinationviewcontroller]; /* set some data on the view controller */

How? (Optional #2) Programmatically invoke a segue: [self performseguewithidentifier:@ MySegue sender:self];

Demo

So what is UIStoryboard?

UIStoryboard is... Runtime representation of everything configured in Interface Builder

Can load any scene with: [UIStoryboard instantiateinitialviewcontroller]; [UIStoryboard instantiateviewcontrollerwithidentifier:@ myview ]; Can use multiple storyboards and load with: [UIStoryboard storyboardwithname:@ myboard bundle:mybundle];

Resources Tutorials: http://www.scott-sherwood.com/?p=219 http://www.raywenderlich.com/5138/beginning-storyboards-in-ios-5-part-1 WWDC 2011 Session Videos: Session 309 - Introducing Interface Builder Storyboarding

Comments App Walkthrough We will be creating a native version of a comments web app. For this we will use be using an adapted tutorial from http://www.scott-sherwood.com/ios-5- uistoryboards-a-practical-example/

Starting From Scratch Create a new Single View Application project in Xcode. Name it Comments and make sure you have Storyboard and ARC checked. The default Scene created when you create the project extends UIViewController and we want a UITableViewController for this application. The quickest way to do this is just to delete the default UIViewController class and scene, created a new UITableViewController class called GTTableViewController and pull on a new UITableView onto your Storyboard, creating a new scene, and set its class to GTTableViewController in the Identity Inspector.

Starting From Scratch To complete the scaffolding for this Xcode project create a Task class for representing your tasks. Create a constructor that can build an instance of the class from the dictionary returned from the web service. Also create a todictionary method to serialize the objected so that it can be posted to the web service.

Tying In The Storyboard From our previous setup we have a UITableViewController for displaying a list of tasks so an important feature will be for people to be able to add a task. So we will add a plus button to the initial scene in our storyboard so that we can support users in creating new tasks. To add this button we are going to embed the GTTableViewController in a UINavigationController by selecting the UITableViewController and going to the menu and selecting Editor->Embed In-> Navigation Controller. Then drag on a UIBarButtonItem on to the top right hand side of the navigation bar, in the attribute inspector change the identifier of the UIBarButtonItem to Add.