Start Here iOS 8 - Techotopia new features of the iOS 8 SDK and Xcode 6 are also covered including Swift playgrounds universal user interface design using size classes app extensions Interface Builder Live Views embedded frameworks CloudKit data storage and TouchID authentication The aim of this book therefore is to teach you the skills necessary to build your own apps for iOS 8 Assuming you are ready to download the iOS 8 SDK and Xcode have an Intel based Mac and ideas for some apps to develop you are ready to get started eBookFrenzy com Purchase the fully updated iOS 9 Swift 2 Xcode 7 edition of this book in eBook 12 99 or Print 39 99 format iOS 9 App Development Essentials Print and eBook ePub PDF Kindle edition contains 105 chapters For iOS 7 Developers If you have already read the iOS 7 edition of this book or have experience with the iOS 7 SDK then you might prefer to go directly to the new chapters in this iOS 8 edition of the book All chapters have been updated to reflect the changes and features introduced as part of iOS 8 and Xcode 6 Chapters included in this edition that were not contained in the previous edition or have been significantly rewritten for iOS 8 and Xcode 6 are as follows An Introduction to Swift Playgrounds Swift Data Types Constants and Variables Swift Operators and Expressions Swift Flow Control The Swift Switch Statement An Overview of Swift Functions and Closures The Basics of Object Oriented Programming in Swift An Introduction to Swift Inheritance Working with Array and Dictionary Collections in Swift Using Size Classes to Design Universal iOS User Interfaces An Introduction to CloudKit Data Storage on iOS 8 An iOS 8 CloudKit Example An iOS 8 CloudKit Subscription Example Implementing TouchID Authentication

Joining the Apple iOS 8 Developer Program - Techotopia mentioned membership includes access to the latest versions of the iOS SDK and Xcode development environment The benefits of membership however go far beyond those offered at the Registered Apple Developer level One of the key advantages of the developer program is that it permits the creation of certificates and provisioning profiles to test applications on physical devices Although Xcode includes device simulators which allow for a significant amount of testing to be performed there are certain areas of functionality such as location tracking TouchID authentication and device motion which can only fully be tested on a physical device Of particular significance is the fact that some aspects of iCloud access Reminders and In App Purchasing can only be tested when applications are running on physical devices Of further significance is the fact that iOS Developer Program members have unrestricted access to the full range of guides and tutorials relating to the latest iOS SDK and more importantly have access to technical support from Apple s iOS technical support engineers though the annual fee covers the submission of only two support incident reports By far the most important aspect of the iOS Developer Program is that membership is a mandatory requirement in order to publish an application for sale or download in the App Store Clearly developer program membership is going to be required at some point before your application reaches the App Store The only question remaining is when exactly to sign up When to Enroll in the iOS Developer Program Clearly there are many benefits to iOS Developer Program membership and eventually membership will be necessary to begin selling applications As to whether or not to pay the enrollment fee now or later will depend on individual circumstances If you are still in the early stages of learning to develop iOS applications or have yet to come up with a compelling idea for an application to develop then much of what you need is provided in the Registered Apple Developer package As your skill level increases and your ideas for applications to develop take shape you can after all always enroll in the developer program at a later date If on the other hand you are confident that you will reach the stage of having an application ready to publish or know that you will need to test the functionality of the application on a physical device as opposed to a simulator then it is worth joining the developer program sooner rather than later Enrolling in the iOS Developer Program If your goal is to develop iOS applications for your employer then it is first worth checking whether the company already has membership That being the case contact the program administrator in your company and ask them to send you an invitation from within the iOS Developer Program Member Center to join the team Once they have done so Apple will send you an email entitled You Have Been Invited to Join an Apple Developer Program containing a

Installing Xcode 6 and the iOS 8 SDK - Techotopia PowerPC based Mac then you will need to purchase a new system before you can begin your iOS app development project If you are unsure of the processor type inside your Mac you can find this information by clicking on the Apple menu in the top left hand corner of the screen and selecting the About This Mac option from the menu In the resulting dialog check the Processor line Figure 3 1 illustrates the results obtained on an Intel based system If the dialog on your Mac does not reflect the presence of an Intel based processor then your current system is sadly unsuitable as a platform for iOS app development In addition the iOS 8 SDK with Xcode 6 environment requires that the version of Mac OS X running on the system be version 10 9 4 or later If the About This Mac dialog does not indicate that Mac OS X 10 9 4 or later is running click on the Software Update button to download and install the appropriate operating system upgrades Figure 3 1 Installing Xcode 6 and the iOS 8 SDK The best way to obtain the latest versions of Xcode and the iOS SDK is to download them from the Apple Mac App Store Launch the App Store on your Mac OS X system enter Xcode into the search box and click on the Free button to initiate the installation The download is several Gigabytes in size and may take a number of hours to complete depending on the speed of your internet connection Starting Xcode Having successfully installed the SDK and Xcode the next step is to launch it so that we can create a sample iOS 8 application To start up Xcode open the Finder and search for Xcode Since you

A Guided Tour of Xcode 6 - Techotopia settings consisting of Capabilities Info Build Settings Build Phases and Build Rules As we progress through subsequent chapters of this book we will explore some of these other configuration options in greater detail To return to the project settings panel at any future point in time make sure the Project Navigator is selected in the left hand panel and select the top item the application name in the navigator list When a source file is selected from the list in the navigator panel the contents of that file will appear in the center panel where it may then be edited To open the file in a separate editing window simply double click on the file in the list Creating the iOS App User Interface Simply by the very nature of the environment in which they run iOS apps are typically visually oriented As such a key component of just about any app involves a user interface through which the user will interact with the application and in turn receive feedback Whilst it is possible to develop user interfaces by writing code to create and position items on the screen this is a complex and error prone process In recognition of this Apple provides a tool called Interface Builder which allows a user interface to be visually constructed by dragging and dropping components onto a canvas and setting properties to configure the appearance and behavior of those components Interface Builder was originally developed some time ago for creating Mac OS X applications but has now been updated to allow for the design of iOS app user interfaces As mentioned in the preceding section Xcode pre created a number of files for our project one of which has a storyboard filename extension This is an Interface Builder storyboard save file and the file we are interested in for our HelloWorld project is named Main storyboard To load this file into Interface Builder simply select the file name in the list in the left hand panel Interface Builder will subsequently appear in the center panel as shown in Figure 4 5 Figure 4 5 In the center panel a visual representation of the user interface of the application is displayed Initially this consists solely of the UIView object This UIView object was added to our design by Xcode when we selected the Single View Application option during the project creation phase We will construct the user interface for our HelloWorld app by dragging and dropping user interface objects onto this UIView object Designing a user interface consists primarily of dragging and dropping visual components onto the canvas and setting a range of properties and settings In order to access objects and property settings it is necessary to display the Xcode right hand panel if it is not already displayed This panel is referred to as the Utilities panel and can be displayed by selecting the right hand button in the right hand section of the Xcode toolbar Figure 4 6 The Utilities panel once displayed will appear as illustrated in Figure 4 7 Figure 4 7 Along the top edge of the panel is a row of buttons which change the settings displayed in the upper half of the panel By default the File Inspector is displayed Options are also provided to display quick help the Identity Inspector Attributes Inspector Size Inspector and Connections Inspector Before proceeding take some time to review each of these selections to gain some familiarity with the configuration options each provides Throughout the remainder of this book extensive use of these inspectors will be made The lower section of the panel may default to displaying the file template library Above this panel is another toolbar containing buttons to display other categories Options include frequently used code snippets to save on typing when writing code the Object Library and the Media Library For the purposes of this tutorial we need to display the Object Library so click on the appropriate toolbar button represented by the circle with a small square in the center This will display the UI components that can be used to construct our user interface Move the cursor to the line above the lower toolbar and click and drag to increase the amount of space available for the library if required The layout of the items in the library may also be switched from a single column of objects with descriptions to multiple columns without descriptions by clicking on the button located in the bottom left hand corner of the panel and to the left of the search box eBookFrenzy com Purchase the fully updated iOS 9 Swift 2 Xcode 7 edition of this book in eBook 12 99 or Print 39 99 format iOS 9 App Development Essentials Print and eBook ePub PDF Kindle edition contains 105 chapters Changing Component Properties With the property panel for the View selected in the main panel we will begin our design work by changing the background color of this view Start by making sure the View is selected and that the Attributes Inspector View Utilities Show Attributes Inspector is displayed in the Utilities panel Click on the white rectangle next to the Background label to invoke the Colors dialog Using the color selection tool choose a visually pleasing color and close the dialog You will now notice that the view window has changed from white to the new color selection Adding Objects to the User Interface The next step is to add a Label object to our view To achieve this either scroll down the list of objects in the Object Library panel to locate the Label object or as illustrated in Figure 4 8 enter Label into the search box beneath the panel Figure 4 8 Having located the Label object click on it and drag it to the center of the view so that the vertical and horizontal center guidelines appear Once it is in position release the mouse button to drop it at that location

Testing Apps on iOS 8 Devices with Xcode 6 - Techotopia can be generated from within the Xcode account preferences panel Begin by selecting the Apple ID for which the identities are to be generated before clicking on the View Details button located in the lower right hand corner of the window This will display a list of signing identities and any provisioning profiles associated with those identities If no valid signing identities are listed as is the case in Figure 5 3 the next step is to generate them Figure 5 3 Begin by clicking on the button and selecting the iOS Development option from the resulting menu Xcode will then contact the Apple Developer Member Center portal and request and download a developer signing identity Repeat these steps this time selecting iOS Distribution from the menu to create and download a distribution signing identity Once completed the two identities should now be listed as shown in Figure 5 4 Figure 5 4 Once created signing identities and account information can be migrated to other development computer systems by clicking on the button displaying a gear cog on the first account settings page and selecting the Export Accounts menu option On the destination system repeat these steps this time selecting the Import Accounts option It is worth noting that the certificates associated with the signing identities can also be viewed and created within the Apple Developer Member Center portal Within a browser navigate to the following URL and log in using your Apple ID credentials https developer apple com membercenter Within the member center click on the Certificates Identifiers and Profiles option and choose Certificates from the list of options under the iOS Apps category On the resulting page the certificates for both signing identifiers should be listed Clicking on a certificate will display details such as the expiration date as outlined in Figure 5 5 Figure 5 5 As can be seen in the left hand panel of Figure 5 5 the member center also provides options to manually create App IDs and Provisioning Profiles With Xcode 6 however these are typically created automatically Device Registration Having generated signing identities the next step is to register a device for testing purposes With the introduction of Xcode 6 device registration takes place automatically when an iPhone or iPad device is connected to the development system Simply run Xcode attach the device to the computer and wait for it to appear as an option on the run destinations menu Figure 5 6 for example shows two physical devices available for testing together with the standard iOS Simulator options Figure 5 6 Details of the devices connected to the system can be obtained via the Xcode Devices window Window Devices as shown in Figure 5 7 Figure 5 7 To exclude a connected device from the list of potential targets on the device scheme menu select the device from the Devices screen and use the settings menu in the bottom left hand corner of the window to deselect the Show in Run