Xcode Application note

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

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

Your First App Store Submission

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

Start Developing ios Apps Today

ios App for Mobile Website! Documentation!

ios App Development for Everyone

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

Praktikum Entwicklung von Mediensystemen mit

Xcode Project Management Guide. (Legacy)

Mobile App Design and Development

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

Chapter 1. Xcode Projects

Mobile App: Synthes International Installation Guide

Creating a Custom Class in Xcode

White Label ios Application Installation and Customization Guide

ios How to Back Up from icloud

Making and Exporting a Backup

The End is Near. Options for File Management and Storage

App Distribution Guide

Introduction to Programming with Xojo

WatchDox Administrator's Guide. Application Version 3.7.5

Installing the Android SDK

Introduction: The Xcode templates are not available in Cordova or above, so we'll use the previous version, for this recipe.

Hypercosm. Studio.

Book 1 Diving Into ios 7

Geometer s Sketchpad. Discovering the incenter of a triangle

MA-WA1920: Enterprise iphone and ipad Programming

Objective C and iphone App

1 от :45

Google Drive lets you store and share all your stuff, including documents, videos, images and other files that are important to

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

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

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

CLC Bioinformatics Database

Creating an Apple ID on an iphone, ipad, or ipod touch with a Credit / Debit Card

A product of Byte Works, Inc. Credits Programming Mike Westerfield. Art Karen Bennett. Documentation Mike Westerfield

Gathering customer information from a mobile application James Adams, SAS Institute Inc.

ios App Development for Everyone

TUTORIAL 4 Building a Navigation Bar with Fireworks

The Coast to Coast AM Podcast for itunes 11


RESPONSEWARE FOR IOS USER GUIDE

FUGU - SFTP FOR MACS- REFERENCE GUIDE

ios Team Administration Guide (Legacy)

The Rush 24/7 Podcast for itunes 11

Dashcode User Guide. (Retired Document)

Send from your App Part 1

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

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

Export / Import using itunes File Sharing

Client Requirement. Master Data Management App. Case Study -

How To Use Titanium Studio

Editing and creating new pages and posts with the WordPress ios app

Novell Filr 1.0.x Mobile App Quick Start

What's it Called on my Mac?

PNY DUO-LINK On-The-Go Flash Drive for iphone and ipad. User Manual

How to find the MAC address of your computer

TakeMySelfie ios App Documentation

QUIT MACSCHOOL AND DRAG YOUR SERVER ICONS TO THE TRASH OR HIT THE DISCONNECT BUTTON BESIDE THE SERVER ICON IN THE TOP SIDEBAR

User s Manual For Chambers

TouchCopy is designed to help you get the most out of your ipod, ipod Touch, iphone or ipad.

ipad 2 Basic Setup Guide

Sophos Mobile Encryption Help. Product version: 1.0 Document date: April 2012

Once you have obtained a username and password you must open one of the compatible web browsers and go to the following address to begin:

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

Givit Frequently Asked Questions

In list view, the Finder window displays folder or volume contents as a list, which can be sorted by name, date, kind, or other criteria.

MERLIN. The Quick Start Guide to professional project management ProjectWizards GmbH, Melle, Germany. All rights reserved.

Save and Restore Backups using itunes File

Managing Existing Mobile Apps

Business Insight Report Authoring Getting Started Guide

NOTE: To use this function, you must utilize the Outlook Plug-In within Partner XE.

To export data formatted for Avery labels -

Assignment I Walkthrough

Welcome to Mastercam

How To Use Standard Pos On A Pc Or Macbook Powerbook (Powerbook 2)

Student Microsoft Office 365

Gauge Drawing Tool Slider Drawing Tool Toggle Button Drawing Tool One-Way List Drawing Tool... 8

CREATE A 3D MOVIE IN DIRECTOR

Transitioning from TurningPoint 5 to TurningPoint Cloud - NO LMS 1

KING ONLINE APPLICATIONS USING THE APPLE IPAD

ios 9 Accessibility Switch Control - The Missing User Guide Updated 09/15/15

Mobile Connect for USA Mobility Pagers for iphone

User Guide. DYMO Label TM v.8

Google Apps for Education at UTK

Oatley PS BYOD ipad Important Information 2016

Technology in the Classroom Kidblog kidblog.org

As you look at an imac you will notice that there are no buttons on the front of the machine as shown in figure 1.

Apple OS / ios Installation Guide Includes MAC OSx and ios based devices

Code::Blocks Student Manual

Using the SAS Enterprise Guide (Version 4.2)

Introduction to the use of the environment of Microsoft Visual Studio 2008

Microsoft Publisher 2010: Web Site Publication

Transcription:

1 Xcode Application note - how to export file from an ios application Feifei Li ECE480 Design Team 10

2 Table of Contents Introduction... 3 Get Started... 3 Familiar with Xcode... 6 Create user interface... 7 Export file... 12 References... 14

3 Introduction Frist of all, it is necessary to know how to create an ios application before get into more information about exporting files. You are going to create an ios application as follows, which is using Objective-C language. It is more suitable and convenient if you have a MAC system to do that. On your MAC, you can create ios apps that can run on ipad, iphone, and ipod touch, which depends on your choice. Before you can start developing apps, set up and make sure you have the right tools to achieve. The developing tool you are going to use is called Xcode. (From developer.apple.com) Xcode is Apple s integrated development environment (IDE). Xcode includes a source editor, a graphical user interface editor, and many other features. The ios SDK extends the Xcode toolset to include the tools, compilers, and frameworks you need specifically for ios development. You will need to download the latest version of Xcode from the App Store. The ios SDK is included with Xcode. Get Started After set up the tool, you can create a project using it. We will go through what an app is, the process of creating a simple user interface, and some idea about adding the custom behavior that transforms the interface into a working app. To create a new project 1. Open Xcode. The welcome window appears like:

2. In the welcome window, click create a new Xcode project (or choose File>New>Project). Xcode opens a new window and displays a dialog in which you can choose a template. 4

5 In this window, you can choose the template that Xcode already have and can generate for you to develop common styles of ios apps. Most of these templates have preconfigured interface and source code files for you to start working wit. For this time, because we are not focus on how to build a complex program, we are going to get into how to export file, so, we can create a really simple project template. A single view application template will be more properly for this purpose. 3. In the ios section at the left of the dialog, select Application. 4. In the main area pf the dialog, click Single View Application and then click Next. 5. In the dialog that appears, give your app a name and choose additional options for it. Notice: Product Name: which is Xcode uses the product name you entered to name your project and the app. Company Identifier: Your company identifier, if you have one. If you don t, use com.example. Class Prefix: XYZ

6 Xcode uses the class prefix name to name the classes it creates for you. Objective-C classes must be named uniquely within your code and across any frameworks or bundles you might be using. To keep class names unique, the convention is to use prefixes for all classes. Two-letter prefixes are reserved by Apple for use in framework classes, so use something that s three letters or longer. Device: Choose iphone for this project. 6. Click Next. 7. In the dialog that appears, choose a location for your project and click Create. Xcode opens your new project, which is the workspace window and look like: Familiar with Xcode Xcode includes everything you need to create an app. It not only organizes the files that go into creating an app, it provides editors for code and interface elements, allows you to build and run your app, and includes a powerful integrated debugger. It is really useful to familiar with the Xcode workspace before start to create the user interface. The workspace includes toolbar, navigator area, editor area and utility area. You can build and run the Single View Application template by use the ios Simulator when you want to check the program, which is pretty simple, just click the Run button on the right top corner of the workspace in toolbar section. The following picture shows the Xcode workspace window:

Toolbar 7 Navigator area Editor area Utility area Create user interface In the Single View Application project, it has all the things you will need and already include Main.storyboard, which is used for create user inter face. A storyboard is a visual representation of the app s user interface, showing screens of content and the transitions between them. You use storyboards to lay out the flow or story that drives your app. Design user interface 1. In the project navigator, select Main.storyboard. Xcode opens the storyboard in Interface Builder in the editor area. You will see there is one empty scene already shows in this area, because we chose the Single View Application template.

8 Next, we are going to add some objects on this screen. 2. Open the Object library, which appears at the bottom of the utility area. A list appears showing each object s name, description, and visual representation.

9 3. Find the Label object 4. Drag a Label object from the list to scene. 5. Drag the label to the center of the top scene until vertical guides appear. (The guides are visible only when you re dragging or resizing objects next to them, so they will disappear when you let go of the label.) 6. Double-click the text of the label to select it for editing. 7. Type in what you want to title this scene. 8. Then, find Text Field in the list, drag it to the scene, add name it. Do this for more two times. 9. Find Button in the list, drag it into the scene as well. This button will be a save button, when click it, it will export the file and saved. Add another button called view, which will show the data inputted in the text view. 10. Find Text View in the list, drag it to the scene, and name it. This will show where the file will be created and saved. The screen will be look like as follows:

10 Connections 1. On the left upper corner at toolbar, find the Assistant editor button, and click. 2. The editor area will show two areas shows the storyboard and ViewControlller.h, we can link the object with ViewController.h together, just by Control+Click+Drag. For the three text field and text view, the connection is Outlet, name them respectively in the dialog. For the two buttons, the connection is action, also name them respectively.

3. When type the data in the text fields, the keyboard should show up, so, a line of an action should be added in the ViewController.h as: - (IBAction)retractKeyboard: (id)sender; 4. Then, link the text fields with the keyboard, right click the text field, find Did End On Exit under Sent Events, then drag the plus button to the line of code you just added. 11

12 The ViewController.h should be look like this at this moment: Export file So far, we done the basic things and create a very simple application for us to test. Next step is to save the data that typed in and export them into a.csv file through writing some useful code in the ViewController.m, which is the implement file. After we connect the storyboard and ViewConroller.h, we need tell the application what it is going to response when the user sender a control message. 1. Open ViewController.m. 2. Under retract Keyboard action section, add the following line: [self resignfirstresponder]; 3. In the saveinfo section, we are going to use NSString to save the information we want into a string, and separated by comma. 4. Add another string, which represents the path to a document directory. 5. To show the document directory, add the line: _resultview.text = docpath; 6. Run the simulator. 7. In the result view, it shows where your file is actually stored when you test them in the simulator. This path can be changed. 8. Then common the above line out, we are continue the code. 9. Add a string to create a file: 10. Add few code to check whether there is a file, if not, it will create one:

13 11. Then create a file handle to access data associated with files: 12. Therefore, the saveinfo section should as follows: Then you can run the simulator to see what happens. When you click the save button after input some data, you should get a message saying info saved.

14 References Start Developing ios Apps Today. https://developer.apple.com/library/ios/referencelibrary/gettingstarted/roadmapios/in dex.html#//apple_ref/doc/uid/tp40011343-ch2-sw1 ios 5 Save Data to a CSV Text File video. https://www.youtube.com/watch?v=ngvzughxx44