You are on page 1of 133

IOS

CRASH COURSE

The Ultimate Beginner’s Course to
Learning IOS Programming in Under 12
Hours

By Eprogramy
© Copyright 2015

All rights reserved. No portion of this book may be reproduced -mechanically,
electronically, or by any other means, including photocopying- without the permission of
the publisher.

Disclaimer

The information provided in this book is designed to provide helpful information on the
subjects discussed. The author’s books are only meant to provide the reader with the
basics knowledge of IOS Programming, without any warranties regarding whether the
student will, or will not, be able to incorporate and apply all the information provided.
Although the writer will make her best effort share his insights. This book, nor any of the
author’s books constitute a promise that the reader will learn IOS Programming within a
certain timeframe. The illustrations are guidance.
Table of Contents
Check Out the Complete Programming Series on Amazon

Introduction: Welcome to Your New Programming Language

Chapter 1: IOS Programming Language

What is iOS?

History of Xcode

Chapter 2: Installation of Xcode

Chapter 3: Xcode IDE Workspaces

Chapter 4: Xcode Features and Services

Text-Editing

Interactive graphical UI editing features

Compilers and Debuggers

Imitating the User Environment

Key Logging and Managing the Changes to Source Code

Ensuring Good Performance

Software Development Kits

Other services

Chapter 5: Swift Language Structure

Commenting

Chapter 6: IOS Operating System and Frameworks

Learning the Core OS—iOS Operating System

Learning the Core Services Provided by iOS

Learning the iOS’s Media Layer

Understanding the Touch-Interface of iOS Devices

Chapter 7: Creating Applications in Xcode

Create a New Project

Controlling the View

Editing the UI

Making the UI Interactive

Handling the Events and Managing the State

Swift Functions Overview

Creating Your Own Controls

Using Your Data Sources in Applications

Creating a New Model

CRUD Functions in Your Data Model

Managing the Interactions and Scene Animations

Chapter 8: Storyboards - UI design -

Creating a New Scene for Storyboard

Creating the Segoe Among Scenes

Chapter 9: iPhone Simulators

Creating the Simulators in Xcode

Starting the Simulator

Available Services and Options in Simulator

Chapter 10: Publishing the Applications

Getting Started

Your Account -Your Applications-

Application Tests

Submitting the Applications

Adding Your Details to Xcode IDE

How are Applications Configured and Found?

Other Services that Apple Developer License Provides

Chapter 11: Bonus Algorithms

Multiples of 3 and 5

Even Fibonacci Numbers

Largest Prime Factor

Chapter 12: Recommended Resources

Chapter 13: Final Words

Preview of JAVA CRASH COURSE - The Ultimate Beginner’s Course to Learning Java
Programming in Under 12 Hours

About the Author
Check Out the Complete
Programming Series on Amazon


Java: Crash Course - The Ultimate Beginner’s Course to Learning Java Programming in
Under 12 Hours


JavaScript: Crash Course - The Ultimate Beginner’s Course to Learning JavaScript
Programming in Under 12 Hours


C: Crash Course - The Ultimate Beginner’s Course to Learning C Programming in Under
12 Hours


SQL: Crash Course - The Ultimate Beginner’s Course to Learning SQL Programming in
Under 12 Hours

These are just some of our books. To check out the complete series Click Here!
Introduction
Welcome to Your New Programming Language

So, you’ve decided to learn IOS Programming? Well, congratulations and welcome to
your new Programming Language! You’re going to love it!

In Eprogramy we believe that the foundation of a good education is to provide the tools
able to open the doors of the future. It is indisputable that the world has entered an era in
which we all have everything at the fingertips. Social needs have changed. Thus, today
communication has changed. Communication opens doors, so it is our challenge to learn
how to communicate. In Eprogramy we want you to learn how to communicate with a
new language: The programming language. This language allows us to use our PC or
notebook to create.

Maybe the road is difficult and hard, but we will give the reader the tools to make learning
enjoyable and fruitful. We’ll show all aspects necessary to learn how to program. From the
ABC´s to the solution of the most common programming problems and much, much more.
Always with the help of numerous examples that will contribute to a better understanding

We know what we do and believe that you are fully capable of incorporating our
teachings.

The doors of the future are here. Let’s go step by step together.

Let´s get started!

Eprogramy Team
Chapter 1
IOS Programming Language

What is iOS?

iOS is an operating system designed by Apple for their devices. iOS runs on Apple
hardware and is developed specially for Apple hardware. From a user’s perspective it is a
collection of software applications and services that can make their lives easier and from a
programmer’s perspective (from where we will see it) it is a framework, a set of
programmable APIs, a collection of objects and services, a new subject of core graphics
and metal-ray rendering stuff that we can use to build our applications on.

iOS is not just an operating system, but is extensible and programmable in many ways. We
can build applications for a wide variety of categories. We can build applications for
graphics, audio rendering, video processing, network based applications and other stuff.
iOS has many built-in services that can make our applications very easy. For example:

1. Multitasking

2. Graphics engines

3. Siri

4. App Stores

Apple itself takes care of these products for the operating system and we only have to
program a few things to create our applications suitable and portable for these services.
For example, we can use voice-commands of Siri to create a new task to render the
graphics. Although these are separate tasks but we can use one to communicate with
another and that is what makes the operating system extensible.

iOS is a very complex operating system and provides us tools and APIs for almost
everything. Whether you want to create a network browser, a graphical render, a voice-
handler or a game. Apple has created an API for your application and has ported it in the
iOS library for you to use and make the application. iOS takes care of most of the things
that our applications would perform, for example the layout rendering, image rendering,
audio process and other stuff is automatically maintained by the system itself and we only
have to execute a single function in our application. Those functions are provided by the
API. Those APIs are written by Apple itself and allows us to create our heart-catching
applications for the users.

iOS uses the same SDK (Software development kit) that we are going to talk about:
Xcode.
Xcode allows us to create the applications for iOS also, we can target the phones to create
the applications based on their libraries and tools that we are having right now. In the
coming sections you will learn how simple and easy it is to create GUI applications for
iOS and other system using Xcode IDE by Apple.

History of Xcode

Every platform requires a software application to be installed so that applications can be
created in it and can be executed. That is exactly how third-party applications get into
action. The creator of an operating system provides tools and resources required by the
developers to create the software and applications for the operating system. These tools
along with the knowledge of the programmer are used to create the applications for the
framework.

Apple, creator of iOS operating system created many tools and frameworks for third-party
developers to create their applications. Xcode IDE is an Integrated Development
Environment that was initially released in 2003, and now it has reached version 7 of its
stable packages. Xcode is a full-featured programming tool for Apple developers which
they can use to develop, build and debug the applications. Xcode has the following
features:

1. Text-editor

2. The editor is used to write the applications in.

3. Syntax highlighting: The syntax highlighting is used to highlight the syntax of
the programming languages. It helps the programmers to understand their
programs.

4. Compilers: The IDE contains the compilers to compile the programs they have
written in executable applications.

5. Debuggers: If you want to test the application that you have written before
uploading and publishing the application to public stores, you can run it and
debug where it causes a trouble in execution.

6. Publishing tools: IDE also allows you to publish the application to online
stores.

Xcode makes everything really, really easy and fast for the developer to start and write
their own applications and program to port on the devices of users running iOS or other
Apple based operating systems such as Mac OS.

The IDE is totally free of cost and you can download the IDE from the App Store for free.
There is no fee for downloading and using the IDE. You can use it for as long as you want
and Apple also publishes the updates for their IDE so that users can get the latest version
of the IDE, the latest features and support to develop and build their applications. In the
coming sections you will be taught how to use Xcode and how to build applications for
iOS.

Xcode allows programmers to write software applications for iOS, Mac OS and watchOS
etc. If you want to write the applications for these frameworks, then Xcode is your choice!

Chapter 2
Installation of Xcode

Xcode is the IDE that provides you with the tools and other required stuff that you need to
get started building the applications for Apple platforms and products. You can get the
IDE for free and install it on your Mac devices for free. In order to install Xcode on to a
machine, you must have the following:

1. Apple-based system: Well specifically, you should have a Mac. You can get the
Xcode from App Store.

2. Internet connection: Xcode is downloaded and installed on your machine using
Internet. Note: Xcode package for installation is 3GB+ in size, network charges
may apply.

The download of these tools will put you on your way to becoming an iOS programmer on
Xcode IDE. An IDE (integrated development environment) is a packaged application
program used by programmers because it contains necessary tools in order to process and
execute code. An IDE contains a code editor, a compiler, a debugger, and a graphical user
interface (GUI). As already talked about these issues, we can now skip to the main part of
actually using the Xcode, IDE for Apple platforms.

In this guide, it would be recommended to use Xcode because it is the standard to be used
for iOS. There are many other ways and methods to write applications for iOS or Apple
products, but they are not standard to be used by Apple. We must always confront to the
standards that are created for each and every platform to get the programming method
very simple and fast. Other methods may cause a long-term hurdle in your way of
becoming an iOS programmer.

You can get Xcode online by going to this Apple link, they will then redirect you to the
Xcode application in your Apple Store itself, and otherwise you can always search for the
application in the store by name. https://developer.apple.com/Xcode/download/. The rest
of the processing is up to Mac OS itself, you will be notified once the package has been
installed on your device successfully.

Chose the method and versions of Xcode to download and your product will be
downloaded accordingly. Once you have entered the Apple Store continue and follow the
instructions on the wizard to install the Xcode IDE. It may try to check if you have
everything set up, like your platform and other stuff or not, and if not, it will direct you to
the installation of it. A license is also a good choice and requirement to upload your
content to their servers. You can learn how to get a license or what benefits does it have
for your once you have captured an Apple Developer license.

Once everything is set up and installed correctly, let’s interact with our IDE in order to
start coding, but first you need to understand the Xcode itself and understand what
different are and what services do they provide us with. First of all, launch the Xcode IDE.

You should now be on the home screen of the IDE that you are having, you can use
different functions and services in your IDE to build and work with your projects.

Instructions:

To create a new project, you should first of all open a new project from the Applications
gallery in your machine. Select, “Create a new Xcode project”.


Select the iOS section and chose the template that you want to use in your case of
programming an iOS application.

Let’s keep everything very simple and select a “Single-View application” to learn more
about the iOS applications, because starting programming the hard way is never a good
choice as you may find yourself confused in most of the hard and advanced topics of
programming.


Next you will be given a form that you can fill in to get started with your application. You
can edit that form to fill in the details for your applications. It requires, name, package
identifier, programming language to use, platforms to use and a few other settings. Once
that has been done it will create the package for you.

You have successfully completed the installation and beginning of iOS programming in
Xcode IDE by Apple!
Chapter 3
Xcode IDE Workspaces

Xcode comes shipped with a few workspaces for you, workspaces are the working areas
where different tools and features are provided so that you can make use of your screen in
a way that is suitable for you, and it is similar to having multiple screens with different
categorized tools and services available under each of them. IDE has:

1. Navigator area: This area is used to navigate between different files and folders on
your machine.

2. Editor area: This area is used to provide you with the tools to write the programs of
your application. You would write the source code for your application here.

3. Utility area: The area is used for other tools and services. For editing and managing
the objects, you would find all the properties and fields under Utility Area. In the
coming sections you will find the use of Utility area at its most.

All of these areas can be closed and then turned on again as needed by the programmer
himself. That is the benefit of having a workspace in the IDE.

You should also consider activating the developer mode in your machine because enabling
developer mode allows Xcode to perform actions without having to ask you for passwords
again and again. It is not necessary to activate developer mode, but not doing so would
leave you being prompted for passwords again and again.

You can always close and re-open your last projects in the IDE to continue working on
your previous projects. Remember, in Apple products the most important part is the code-
behind that you will write, the logic that you will develop for your application. In Apple
systems, the UI of the applications is maintained and managed using a technique called,
Storyboard. A storyboard is the implementation of how your application interacts and
responds to user queries. For example how it loads when user interacts and how it
navigates or changes the state that it has.

Another plus feature for Xcode is that it comes with a visual editor for the UI of the
applications. Which means that you can create the UI of your applications with drag-and-
drop services in the IDE and IDE will itself create the back-end framework and other stuff
for you. You won’t have to write the codes to generate the UI, you will design the UI
using your pointing-device and rest will be managed and taken care of using the back-end
services of the IDE itself. Storyboard is a feature that uses drag-and-drop services so you
only have to design everything, code-everything is done by IDE itself.

Chapter 4
Xcode Features and Services

In this section I will talk about the services and features that Xcode provides iOS
developers, or overall the Apple developers with. Like all other IDEs, Xcode also provides
the users with a very flexible and wide variety of tools that they can use. In the previous
sections we just skimmed through the topics, in this section we will talk about those
services in Xcode and how can we use them to make the process of programming better
and easy.

Text-Editing

In programming, the source code is simply the text being written in the editor, it does not
need any indentation, and neither does it need that syntax highlighting of the language
which programmers are interested in. Those features are just provided for the humans, in
the back-end it is just a plain-text that the compiler itself reads from the file system.

Xcode has features for syntax highlighting, since it is used with Swift and Objective-C
only. Therefore Xcode only includes syntax highlighting for Swift, Objective-C and a few
other standard-based languages and file structures such as JSON or XML etc. Xcode also
allows you to write the code in C and if you are writing the code it would determine what
language you are using and will change the environment settings as per requirement.
These provide the developers with a great ease because programmers are fond of viewing
their code from a structural point of view. That syntax highlighting and indentation
provides them with an overview of the structure. Most programmers, skim through the
code by looking at the indentation. Indentation and other settings are provided in Xcode,
they can be turned on and turned off if required! Xcode is very extensible and can be
maintained to make sure it suits our requirement.

Text-editing not just includes the services for syntax highlighting but also to determine
whether there are errors or not. As you type, IDE determines whether there are problems
in the program or not. This feature is more discussed in the “Debugging” section below.

Interactive graphical UI editing features

Xcode is a very powerful and intelligent IDE. It knows what you are doing and what you
wanted to do with your application. Storyboard, a concept of application designing, is a
result of intelligent graphical UI editor. In most editors and IDEs you have to write the
code for your UI in text, or source code, but in Xcode you do that using drag-and-drop
service. These services allow you to rapidly and efficiently design the application as it
should look on the devices.

It doesn’t only allow you to design the application’s interface. But also provides you with
features that allow you to see how your application will transition and what should happen
when it does. Moreover, it also allows you to perform other actions such as maintaining
the series of pages from where your application starts and ends up in. All that is
maintained using a drag-and-drop designer developed by Apple developers and it is ready
to serve you for your development purposes.

This service allows designers and developers to work together, because it keeps the work
of them isolated from one another. Designers design the interface, developers write the
back-end code for these designs and interfaces! IDE makes sure they are well integrated.

The graphical UI editor not just allows you to create the UI, but also allows you to work
with 3D models. Sprites, sprite sheets, 3D models for FBX files and much more. All of
these are provided right in the editor for you to start building your own games. These
services do not need any other third-party service or a tool and are provided right in your
package of IDE.

Compilers and Debuggers

Now we should consider talking about the core-feature that makes a text-editor software
that developers can use for their purpose. The compilers are the code features and services
in the IDE, they are the programs that convert your source code and application resources
into executable files. Those executable files can then be transferred to other machines for
further use and other requirements as possible.

A compiler is a program that compiles the source code written by programmer into
machine executable files. These files can be executed by user at will to do their work
using that application.

Xcode comes shipped with the compilers for Swift, Objective-C and C programming
languages. These are the languages that can be used to run the applications on Apple
platforms. Xcode runs these services to compile the programs in executable files all in the
background so you do not have to write anything or to execute any other program to
convert the application’s projects in apps for users.

Debuggers are services that are used to remove any errors, potential or harmful errors in
your programs. For example, if your application has a bad design or your application
terminates unexpectedly. Then debugger is your only ticket to fix those errors. Debugger
allows you to pause and continue the execution on demand. Which means that you get the
chance to stop the execution and sneak in the memory to determine what is present and
what is causing the trouble in your application that causes it to break. The process is
known as debugging.

To debug your applications, you can set a breakpoint in your source code. The breakpoint
would cause the application to stop at that instant, it would give you a chance to see what
state application has, what the variables are, what should be available and what is missing
in the application and so on. A few features that debuggers provide you with are:

1. Managing the CPU usage: If you think your application should not be using much
CPU, but is using, you can configure it in debugging and see where it is using
CPU.

2. Managing the RAM memory: Variables are stored right in the memory and more
variables means that your application requires more memory and thus more
handles must be created for the objects in the memory. Using more variables is not
a bad practice when you need them, but using variables where they are not required
is a very bad practice as it wastes the RAM memory and might cause your
application to be slow in performance.

3. Dissecting the RAM: Debugger also allows you to see what it being stored in the
memory and what should be stored.

4. See the stack trace: The stack trace provides you with information about the
functions being called. If there is any problem in your code and it terminates the
application, you can read the stack trace to see which function did raise an
exception and where.

5. Other resources: If your application uses other resources such as data from files or
resources from internet. Debugger will let you know where and when those
resources are being used in your application.

Using these tools you can fine-tune your application to make it better in performance. For
example, you can cut short the CPU or RAM usage to make it better in performance.
Cutting short the input/output from file system or network resources will also make your
application respond more fast because it will remove the waiting for the latency and other
factors that cause slow input/output execution.

Xcode provides you with these tools and services by default. So you only have to get
Xcode and these services are shipped with it, for free!

Imitating the User Environment

Just debugging or testing the application is not everything. You may create the application
by keeping your own point of view in mind, but users may have a different point of view
to use the application from. You may want to get a response for a simple input, but users
may add a complex and tough input, you also need to make sure that your application
works just perfectly in those cases. Application, in those cases, if not fine-tuned, may
cause unexpected loss, results or terminate.

There are many other examples of a bad UX. Bad UX causes you to lose your users more
often because you only think of your application from one POV. Users need the
application to work for the general public.

In those cases, you must run a series of tests against your application. These tests,
generally are known as, Unit tests. Unit tests, because you test each and every function or
object with a set of variable data, input, and see whether it provides accurate or correct
output or does it collapse and terminate. These services are provided to you by default in
Xcode so that you also test your application before submitting it to general public. This
would let you see whether your application is resilient to a general input or not.

These tests are input randomly to your application and the output of your application is
also shown in the same window. You can see whether the results are correct or whether
they are wrong or provide unexpected behavior. If they do not go as expected, you know
what to do. You can easily edit the source code and see where your application needs to be
fine-tuned.

In Xcode, on the Testing window you get to run the tests by creating Bots. These bot
manage the entire process for you, they test the procedures of application from installing,
rendering and executing. The tests are of wide variety and you can see them in the Tests
window in the IDE. The results are also shown whether the test passed or failed. If it
failed, you get to know what can be done to make it pass. So these tools and services are
very useful and helpful in case you want to make sure your application has a good UX in
all cases and all inputs. Along with the back-end code you will also be able to test the UI
code and how it is used by the users based on a random selection of input. These services
make it easier to ensure that application runs efficient and resilient in all cases.

Key Logging and Managing the Changes to Source Code

That is not all, Xcode also logs the keys that you press so that it can provide you with
suggestions for your code, to change the environment settings such as managing which
language structure does your application use. Also it is so that your changes can be stored
in the memory for Undo purposes.

Most application developers are fond of using source control features, where all of their
codes are logged and a service is provided to keep a track of those changes and also
provides them an option to go back to an initial stage for their code. These services are
very helpful in cases when you are a team of programmers working together on a project.
This means that you can see who made a change to the project, what lines were written by
whom and who pushed those changes to the actual project’s source code.

As already mentioned, source control services allow you to switch back to a version which
you think is suitable. Xcode allows you to switch back to a previous version when your
current version no longer works as expected.

Source control works as you start editing the program’s structure. Those changes are
initially saved to the memory, but are pushed to the file system as soon as you “Save”
changes or close IDE or that particular file in your IDE. This way, Xcode knows for how
long you were editing the source code and when you did save it on file, it also logs the
time for that. When you need to see those changes back, Xcode will provide you with a
source control window where you can see the changes along with the time that those
changes took place. So reverting any unwanted change is a very easy task using the UI
editors and source control windows.

Ensuring Good Performance

Although these services are not provided in IDEs, you have to ensure a good performance
yourself using your own common sense. Performance is the very core and important factor
in calculating the UX for your application. Users would always prefer the application with
better performance and speed. There is a common similarity between speed and
performance, they seem to sound the same. But they are not. Speed is just how fast your
application responds, but performance has many factors in it.

1. CPU time consumption: In low-level, CPU time is shared among different
applications to execute, that is the abstract definition of multi-tasking. CPU is very
vital component in a computer and your applications must use it wisely. OS also
makes sure that application does not throttle the CPU and keep the usage to itself.
Thus, make sure your application’s structure and architecture is designed as to
prevent using most of the CPU time.

2. RAM consumption: Every program before being executed needs to be present in
the RAM. Thus every byte needs to be stored in the memory and address needs to
be stored so that the resource can be captured later. These data segments in the
memory also need to be swapped for every new variable that is created and the
handle for that location needs to be stored. Every new variable, updating the string
values etc. need to be worked and cause a use of a lot of CPU cycles. That is why
using more variables is always prohibited because it takes most of the time moving
those variables around in the memory.

3. Input/output processes

Another major factor that causes bad performance is the input/output process for
resources. Such as:

1. File system resource capturing.

2. Network-based resources.

These along with other similar operations cause a great impact on performance because
network or hard disk latency comes in action. Once OS requests data from hard disk or
network, OS has to wait for that resource to be made available. It is then the duty of
network or hard disk to ensure fast response. Until that response is made available,
application has to wait!

Not just these but many other similar problems arise. Programmers have to ensure that
these problems are not causing a havoc in user environment. Users are more likely to
install, use, keep and share the applications with a good UX and UI design and
architecture.

All of the above mentioned factors need to be fine-tuned by your own intellect. Xcode
cannot fix them because fixing them might require removing some variables, eliminating
some resources or cutting short some calculations, which may kill the purpose of your
application. That is why Xcode leaves these to you, you have to make sure that application
is well formatted and designed to run efficiently. However, as a beginner you can get some
quick tips to fix these problems in your programs.

1. Make sure most of the processes that generate results can be used later. This will
help you to cut short CPU usage.

2. Allow CPU to sleep for more time, do not continue to execute one command after
the other. Let user interact and then start processing.

3. Use fewer variables. Less variables means less time being wasted in swapping the
variables in and out of the memory.

4. Try to ignore capturing and saving the data in and out of the file systems or from
network-based resource locations. The latency causes a great slowdown in
performance. These latency problems cannot be solved programmatically, but by
enhancing the hardware or by adding more hardware resources. That is why, it is
not a good choice to look forward to fix those problems. A good solution is to
avoid requesting resources from file or network.

5. Always design the application to use the resources which are required at that
instance. The resources that are not required need not to be stored in the RAM or to
be captured from the hardware itself.

6. Consider testing the applications in Simulators with different architecture and
operating system to see how your application will behave on most cases. Every
user will have either one device so testing the application in those environments
will help you to determine what should be done in order to make it better and so
on. As already discussed above, you can get help from Debugger tools and
determine where your application needs fixes. Unit testing and Bots will also help
you in tuning the application.

These tests and tuning will help you in making the application better, they can still have
some exceptions which cannot be fixed as you may expect them.

Software Development Kits

Before you actually compile the application you need to ensure that your IDE knows what
version of system does you need to compile your application against, what services does
that system provide and whether you are using the correct APIs or are they outdated etc.
All of these tools and information is embedded in a package known as, Software
development kit; abbreviate as SDK.

Each separate operating system must have a SDK installed for it, for you to target it
against for compilation process. iOS also has versions of SDKs for each of the operating
system. Each version comes with a separate SDK. Xcode manages those SDKs for you
and installs them for you.

It is also the responsible for Xcode to ensure that SDK is available before you compile and
build the application. The services that Xcode and the objects that Xcode would provide
you with are all present in the SDK package for that operating system. They are simply
compiled binaries that Xcode would understand and provide you with the interfaces that
you can use in your classes. The classes, interfaces, services and frameworks that you are
going to learn below are all available in the SDK kit that you can download and install.

Other services

Xcode is a full-featured IDE for Apple platforms and allows you to make your
applications, manage different sections, making the application perform better, debugging
the application to fix the bugs and problems in your application.

Apart from this, Apple Store will also let you collect the metrics from user’s data usage
and other resources and statistics for application’s usage. You can then use that data to fix
and fine-tune your application. Users can opt in to send the real-time usage and errors
statistics to Apple which you can then see how users use your application. This would
help you to make the features and services that are mostly used, better. It would also help
you to capture the resources that are used mostly at the start up when user starts the
application by tapping on the icon.

Chapter 5
Swift Language Structure

Before moving on to anything further, I will like to introduce you to Swift language and
how to write applications in Swift for iOS. The graphical rendering is just as simple as
drag-and-drop the main thing that is tough and needs some rough-time is the back-end
code. Using this sample code as an example, we will learn how Swift as a programming
language is structured through the following sample code:

print(“Hello World”)

Output:
Hello World

The programs in Swift are not required to have a main function in them. The program
starts in the global scope and executes what it has, then moves forward to the next
statement and so on. You can of course create functions in a Swift program, but they are
not required and also the entry point doesn’t need to be a main function, it starts in the
global scope from the first line and executes all the way down to the last line.

You may notice that there is a trend with a semicolon “;” after each statement in almost
every programming language. In Swift programs, you do not need to use a semi-colon to
end the statements. The compiler is smart enough to understand when a statement is
ending and when a new statement starts, so the semi-colon is not required like in older
languages such as C/C++ and their derivatives.

The code that you have seen in the above case is a simple function, print. The function
prints the value that is passed to it. There are many other similar functions provided in
Swift language for Input/output functions and procedures. Swift programming language is
derived from the concepts of Objective-C language, which was used majorly and widely
used as a programming language for Apple based products. Swift must confront to all
those structures and features that language had, and the structure must be similar so that
programmers can easily upgrade themselves from Objective-C to the new Swift
programming language.

The structure and everything is tightly held to Objective-C standards and that is exactly
why it is very easy to understand and learn how to write applications in Swift
programming language.

In this guide I will give you an overview of the language, to learn the in-depth knowledge
of Swift programming you should consider getting a guide for Swift programming
language.

Commenting

The final fundamental concept to understand in a programming language, although not
necessary, is commenting. It can greatly help you and other programmers around you if
you ever forget how the program works

This concept is used by programmers to take the chance to explain themselves in their
code, using English. When a compiler is processing the code, it will always ignore
comments as it isn’t actually real code. It is simply explanation to code that was written to
help people understand what was programmed. In order to write a comment, you must use
“//” or “/*” and “*/”.

// Following is a declaration of a constant string literal.
let stringL = “String”

That is not all, there are comments of other types also. For example the comment that I
have talked about above is simply a single-line comment. You should also want to use the
multi-line comments in your programs if you want to allow your programmers to add a
multi-line or a paragraph of informative text for other programmers. In that case you use
the comments that begin with “/*” and end with a “*/”. Everything inside them is ignored
as a comment. “/*…*/”.

/*
The following is the declaration and initialization of
a constant string literal with value, “String”.
*/
Let stringL = “String”

That was the comments in Swift language. Comments are widely used in every program,
every application and every framework to make the purpose of a statement widely clear
for others who read it later. In your application and Xcode itself you will see many
comments by Apple programmers for you to help you understand the purpose of that
comment or code.
Chapter 6
IOS Operating System and Frameworks

Before digging any deeper, you must know and understand the iOS operating system and
the frameworks that it provides developers with. In this section, you will be taught the
operating system details and the frameworks that it has for you to build the applications on
top of. iOS is Apple’s operating system, designed especially for their touch-screen
smartphones and tablets, known as iPhone or iPads. The operating system comes installed
with those devices, and you can use them for your own need. Developing the applications
for iOS would allow you to install and customize the applications and services on those
platforms and devices. The operating system was initially named, iPhone OS but was later
changed to iOS.

The iOS operating system is built on many layers, the layers work with each other to
provide you with the device framework and API sets. Those API sets are then used with
each other to provide you with services, and the entire framework, or the operating system
for your iPhone or iPad devices. Almost every application framework or system
framework is built in a same manner. Each component is designed on a base of a unit
feature, the features then communicate with each other to create a multi-tasking operating
system. iOS works in the same manner. From bottom-up or top-down, you will see that
there is a consistency found in the operating system and each level is abstracted from the
other level, and at the same time each level depends on another level of service. This great
layering provides us with a great efficiency and performance because each layer and
service only works when it needs to work and waits when it has to wait for a value or
input or event.

Apple’s iOS operating system can be distinguished in the following core layers.

1. Core operating system

2. Operating system’s native services and frameworks

3. Media elements

4. Touch-screen support for input

These layers can then be dissected and learn about separately. They are all abstracted from
one another yet they depend on each other. For example, the Core operating system will
not work or process any task until user initiates a request to do so, using the touch-screen.
Similarly, Touch screen will not render anything at all, unless operating system allows the
device to. But at the same time, operating system does not only rely on the touch-screen to
perform actions as it can at the same time download the emails from email servers, it can
stream the music from iTunes, it can also perform date time checkup for alarm managers
etc. Also, touch-screen doesn’t need operating system to allow it to capture the input, it
can do that on itself and so on. So you see that neither one of these layers depend on
another but also rely on each other, creating the iOS operating system for the smartphones.

Among the services described above, Core OS layer is the most low-level layer in the
operating system hierarchy and touch-screen support is the high-level layer. The
complexity and code required and understanding depend on the level of those layers. Core
OS would have more complex code, more services that need to be executed, multiple tasks
running in the background. Whereas for the touch-screen input, only a single thread
running for capturing the input from user can suffice. That is why it much easier to write
the applications for iOS just because you only have to take care of how everything is
drawn and iOS performs all the necessary coding itself. It gets the data from user, casts it a
pointer to some objects on the UI of your application, triggers a function in the application
and then leaves the input control back to the user! It happens all in a fraction of a second
that you hardly notice anything being handled by the CPU and you just feel as if it was the
screen performing everything for you.

Learning the Core OS—iOS Operating System

At the core of iOS operating system, there are many low-level services and frameworks
running and performing different tasks for your smartphone to function. Those services
and framework and installed by default by Apple and execute continuously. The services
include the core features and components that run the iOS device.

The core OS features and services are developed and built by Apple developers and you
do not have to test them, they are working perfectly already. These services are very low-
level programs that are executing all the times. These services provide users and
developers with APIs that they can be use for different purposes. Not just that, these Core
OS services are also responsible for the file system management, clock management,
network based services and protocols. OS is also responsible for managing and
maintaining the third-party and user code to be executed. OS also manages the underlying
code kernel and other services that manipulate and directly communicate with RAM and
CPU hardware components.

By learning those core OS features and what iOS provides you with you will be able to
understand how iOS perform different services, and how would your code be executed.
Although these frameworks and their understanding for how they work is not required at
all to be an iOS developer. But if you would learn those core features it would give you a
very broad idea and understanding how Apple’s iOS actually works.

The services and functions that iOS’s Core OS programs are responsible for include the
following (among the other services):

1. File manager services: OS must provide services for managing the files and other
services related to file system.

2. Managing which user is using the device currently: iOS uses an Apple ID to
authenticate the users. The Apple ID is used to ensure that only authenticated users
are performing the actions on the device and if someone tries to steal the device or
perform illegal actions on the device, owner can track the device or perform
actions that only owner can. OS also manages these things in the device.

3. Network based operations: OS also needs to operate on a network thread to
manage the protocols being used, it must create sockets (virtually) to manage the
transportation of the data from one device to another.

4. Native Apple services: Apple has designed its own frameworks, services and
special cases where only Apple hardware is supported. In those cases, OS must
confront to the standards and make sure that those services run on the Apple
device.

5. Implementing the security protocols: Apple devices are smartphones and should
therefore know when security fences need to be pulled! OS needs to ensure that the
device is protected from a number of malwares, virus, Trojans etc.

6. Managing the hardware components: All of the underground services that run in a
machine environment are abstracted from the developers. Developers do not have
access to those frameworks or APIs. But, understanding the architecture of your
device, whether a 32-bit or 64-bit architecture is being used, would help you
understanding how you should develop the application to get the best results and
performance efficiencies.

These services are all found in every iOS based device and Apple writes the codes for
these services to ensure best performance and efficiency to be made available for
developers and at the same time for the users. You are recommended to learn the
architecture of the OS before you continue programming the commercial suite of software
applications for your users.

Learning the Core Services Provided by iOS

If you move onwards from the core OS, you should study the next layer which iOS is
based on. The next layer is responsible for managing the core OS interrupts and how
higher layers communicate with the low-level layer. The Core OS layer is only targeted to
control how device communicates, how hardware communicates with the software
installed on the device.

The Core Services layer is responsible for managing the Apple services. If you have used
the Apple devices you will be familiar with the services that every Apple device has:

1. Apple Bluetooth: Apple has a different implementation of Bluetooth, designed
especially for Apple hardware and devices.

2. iCloud: Apple provides users with a cloud-based service. The service is present in
this layer and runs continuously in the background over the core OS programs for
better performance.

3. Security and encryption: Smartphones are more likely to get attacked by potential
users. To protect the data from such users, devices come shipped with algorithms
to protect the data from such users and to ensure only the owner is able to preview
the data. There are many algorithms designed for encryption and decryption. These
algorithms are standard based for different companies to use them in their own
applications to provide encryption. AES etc. are all examples of such algorithms.

4. Applications and services: Applications in Apple’s iOS platform are provided to
have purchase options, have services that are locked initially and need to be
opened later. Such features are all found in this layer so that potential users cannot
tinker with the required and important stuff in the application.

5. Not just these services, but iOS also controls how users select something from the
data sources available on the device. For example, iOS also provides services such
as Phonebook, SMS, contacts, emails and other similar data. Which user cannot
manipulate directly, but iOS provides them with APIs and objects which can be
used to work around with these frameworks and services present in the core OS.

All of the code required to work around with the location, files, text-data, network
resources and other similar data for iTunes is all available under this layer. This layer is
responsible for data integrity and consistency for all of these core services. Every service
that needs to be running on the device for a long time is installed and present in this layer.
The layer manages how those services are executed. For example, your device may be
expecting a call but doesn’t notify the user until the call is received. Similarly, the GPS
service is also frequently running and gets the location of the user. But it doesn’t prevent
user from performing their own actions on the device.

Such services that do not need an interface but yet are running on the platform are residing
in this layer and are executing continuously. Some of them are written in native C
programming language, some are written in Objective-C language. They are provided as
an API for Swift programmers for iOS. You should learn these layers and services to get
core services such as location details, telephony services, and data sharing permissions
and so on. You can make your application even better by implementing the native services
in your code. The native services are just a few code-blocks long and are very useful.

As an example, the service to share the data that user creates in your application, is very
much useful. As your application will allow them to share their content on their favorite
social applications like Facebook, Twitter, Google+ etc. without having to open another
application. So these services also count to a good UX.

Learning the iOS’s Media Layer

You are now moving forward to the high-level layers in the operating systems. The low-
level layers are responsible for programs only, the mathematical abstract representation of
the codes. Now, in the high-level layers, you do not perform the hard and difficult tasks
yourself, you only tell the device “what to do”. All of the graphics, audio, video and
similar multimedia tasks are performed in this third-layer, the Media layer of iOS
operating system.

As the name states, this layer is responsible for the media elements for your iOS device.
The media elements include images, videos, audio and other similar rendering purposes
and processes. iOS supports most the standard-based architectures for images and audio
rendering. The videos are also supported natively. High quality graphics are rendered
using OpenGL framework. OpenGL is a widely used framework for developing high
quality graphics in your machines. Apple can also determine the objects in 3D mode and
in 2D mode they can use OpenGL for rendering.

Apple devices come shipped with a special “Metal” rendering for gaming purposes. In
which, game developers are provided with an extremely powerful framework which
renders the objects as if they were real-life objects on the screen. Apple provides other
support tools for creating the 3D models using FBX or other file formats. Xcode supports
3D model editing and other refactoring solutions right in the IDE. You can read more
about 3D modeling tools in the IDE. The same Windows, the Editor and Utility areas are
used to edit and refactor the 3D models.

Apple OS also has the APIs designed especially for image processing, for storing and
capturing the images from the device. There are many formats that are followed for
images, Apple has APIs that render those images on screen without developers having to
write anything at all. Images are also used in animations, animations are simply images
being swapped with the next one causing a fluid rendering which looks like the image is
moving. Apple provides core APIs for animations also!

Not just for images and videos, Apple has APIs designed for audio also. OpenAL is one of
the mostly used standard for audio formats and audio output. The Apple hardware is
designed to provide rich quality audio output to the users using the device’s speakers.
Apple also has their own defined standards for the audio output, which are used along
with OpenAL technology to provide users with a rich quality output. All of these
frameworks and services are provided in detail on Apple’s online API and iOS framework
reference, you should consider consulting those resources for a better and in-depth
understanding of these frameworks and APIs.

Understanding the Touch-Interface of iOS Devices

You have almost understood how iOS devices are stacked from machine level to the
device’s screen. This is the final layer in the hierarchy. The touch-interface for your iOS
device is where your users would provide the input.

But allowing the users to provide you with an input is not all that touch-interface or the
Cocoa Touch does. These layers provide the users with the interface for your applications.
The interface has many graphics rendered and control-object with their layout and
dimensions. Everything is managed by the touch-interface itself. Putting it simply the
touch-interface is only the graphical representation for what is going on inside. If you are
sending the email, your screen will only display what is going on whereas the email will
be sending using the services provided in the second layer, in the low-level layers
interfaces.

Understanding all of these layers and their functionality will allow you to understand the
iOS to its core, and also to make your applications execute and function properly in every
device and resource. To be the best programmer for iOS, you must know what the best
ways to perform an action are. For example, sending an email requires your application to
communicate to an SMTP server using SMTP protocol. You can for sure define another
service that would communicate with SMTP server. But, if you become an expert in iOS
programming then you would know that such services and protocols are handled by the
device’s network service themselves. So you do not need to re-invent the wheel. You can
simply use those APIs and write the application on top of those native services and
frameworks.

Chapter 7
Creating Applications in Xcode

From this section onwards you will learn how to build applications for iOS, you will learn
how to build the UI and how to manage the state of that UI from code-behind using Swift
programming language. Since this guide is a general purpose guide, we will not provide
with just one scenario instead you will learn many ways to write the applications in iOS,
many views, many programming concepts and many other techniques and APIs that can
be used in iOS to create dynamically designed and well-formulated applications for your
users.

Create a New Project

First of all create a new project. Once you have created, Xcode will open a new workspace
for you. There will be many files and resources in those locations. Not to be confused,
IDE will manage most of them and will edit them for you, for example the files where you
will be editing the UI of the application and the Storyboard files will be edited by the IDE
itself you will not have to worry about writing anything in those files at all.

The main entry point for your application is AppDelegate.swift file. As name suggests, it
is a Swift programming language’s source code file which handles the state of your
application programmatically. Which means that this also defines the entry point, (the
main file which executes on the back of your application), plus it handles the events from
user to trigger other functions.

Not just that, since our application will handle the events, can also handle the events from
OS itself. For example if user wants to navigate back to the Home page then your
application will go back in hidden state, in those cases OS triggers events and allows
applications to perform actions, such as saving the data for state of application and so on.
These functions are also defined in this file.

func application(application: UIApplication, didFinishLaunchingWithOptions
launchOptions: [NSObject: AnyObject]?) -> Bool

// Application is about to resign as the active application in the device.
func applicationWillResignActive(application: UIApplication)

// Application entered background state.
func applicationDidEnterBackground(application: UIApplication)

// Application is about to enter foreground.
func applicationWillEnterForeground(application: UIApplication)

// Application is about to come back on screen, render the objects and UI
func applicationDidBecomeActive(application: UIApplication)

// When application is about to terminate. Save the state
func applicationWillTerminate(application: UIApplication)

These functions are to be handled and you will write your own code in these functions to
perform different actions. As their names suggest, they handle different events in your
application’s life cycle.

When application transitions from one state to another, it would call a specific function in
the app delegate to handle the change in state. These functions are executed to save the
state, data and to bring that data or state back when user navigates back to the same
application later. You will learn how to edit these functions and how to maintain the
current state of the application later in the guide.

Controlling the View

The applications are tightly held to a pattern for model, View-Controller pattern for
programming. This pattern allows programmers to write the code specific to a pattern in a
separate environment or file. For example, in our application the code is separated from
the View. So you do not handle the events in the View itself, as it would make it difficult
to debug any problem. For these reasons, the code is separated in a Controller file
separately. The controller file is responsible for handling the events and generating a
response for the View file.

The base class that handles everything and provides the set of functions for handling the
events is provided by UIViewController class. By inheriting from this class you get to
handle those events right in your own class for your application. Since those functions are
only going to have a basic and default action. You can leave them as they are if you do not
want to edit them, otherwise you can add your own logic to handle those functions in your
applications. Handling those functions lets you decide what happens when an event occurs
in your application’s life-cycle state.

Basically the default page for ViewController.swift file looks something like this,

import UIKit

class ViewController: UIViewController {

override func viewDidLoad() {
// This overrides the function and performs the function that you want it to
// Also it instructs the base class to do the same.
super.viewDidLoad()
}
}

The file is very basic and simple one because it doesn’t have any function right now. The
code mostly is handled by the IDE because Xcode is a drag-and-drop service IDE plus it
also manages these events and their functions and what to happen when an event happens
all in a UI based editor. You can handle the events in the editor, maintain the UI in the
editor using Storyboard and also change the theme in the editor. So you won’t have to use
the code-editor at all. But if you would like to edit the code yourself you can, Xcode won’t
prevent that, but it is good to leave the automatically-generated code alone so that IDE
knows where something is placed and how to edit it when you want something to be
edited.

Editing the UI

Editing the UI as I have already discussed is very much simple and you do not even have
to write anything. If you are newbie then this is a good news for you as you do not need to
write anything or to learn anything at all to build the UI, but if you come from other
platforms such as Java, then you should know that Xcode allows you to build the UI using
drag-and-drop services so the controls that you see can be built directly by dropping them
over the UI interface. These objects are dropped over a base canvas surface. The canvas is
then rendered with all of those objects on it. Thus, Xcode allows you to draw the stuff
right on top of that canvas where you only have to drag items and IDE itself compiles
everything and resources in binary for you!

IDE will provide you with many objects for UI that you can use to build the applications,
different types of controls are:

1. Text fields

2. Input fields

3. Images and Graphics

4. Tables

5. Grids

And many more. These controls and objects can be dragged and dropped on the canvas
and IDE will automatically write the back-end code for that UI. You will also be provided
many options and properties for that object, in the Utility area. The Utility area allows you
to edit different properties for that object, such as:

1. Dimensions: For example it allows you to edit the width and height of that object.

2. Text: For the fields where you would work with text data, it allows you to edit the
text that is shown on screen for user.

3. Edit the placeholders

4. Edit the paddings and margins for objects

5. Other object based details can also be edited right in that portion.

The IDE is full-featured and allows you to do “everything” right using your mouse only!
This feature makes it easier for the designers to use the IDE to design the applications and
then let the developers take care of the rest of the stuff for your application.

Making the UI Interactive

Next objective is to make the UI interactive, it cannot be interactive until or unless you
attach it to a source file which can be executed to perform multiple operations. UI is a
static page that is shown to the user, it can do nothing unless you attach it to a source file.
Attaching to a source file is also very much simple.

There is an Identity Inspector tool provided in the IDE. That tool can be used to take
control of how your view is maintained and managed in the application. The tool also
provides you with a property of “class”. Edit the “class” and write “ViewController” if it
isn’t written already, because we have already looked in that class. The class takes control
how the events in that View and so on. Using that class will let us maintain the objects and
the View itself. Once that has been set up, our UI is now connected to the source file. But
that is not the only connection that needs to be created, that connection is just to maintain
the UI and what functions should be executed when state changes, all of other objects also
need to be connected to your controller file.

For example, if you have a button in your Storyboard. You need to drag that button and
drop it in the source file. IDE will once again take control and write the code required by
your button to be handled in that controller file. Controllers are used to handle everything
that happens in the View so that the View has to just render everything, the events can be
handled in the back-end. This establishes the connection between that object and the
Controller file.

Now you will have the ability to control what happens if user interacts with your button (if
present). You can perform the same action for other objects and controls also. This allows
you to use the same functionality and handle the interactions of users with objects other
than just a button, for instance, text fields.

Tip: To learn more on editing the properties, try reading the documentation for the objects
themselves. The objects have a wide variety of properties which are out of scope of this
guide as they would take a lot of space to talk about them. You can read their
documentation and try to edit them in the functions that are created.

Handling the Events and Managing the State

You now have the understanding of what it takes to create an iOS application and what are
different pieces and sections of the IDE that you are currently using in your machine. Next
stage is to handle the state and events that OS will prompt the view with. These are to be
handled in the ViewController class that we are having right now.

The ViewController class inherits three most important functions for our application
which can be used to handle the state of our application, or the view itself. In this section
you will be generally taught how to edit and use the functions provided in that class. The
functions are provided for each of the event that your View must handle and to perform
actions upon, such as saving the state of the application or to save the data from user.

1. viewDidLoad: This function is intended for the code that should be executed when
your View has loaded. For example, once every object from your Storyboard has
been loaded in the memory and your application is what user is interacting with
now. You can write the code to render resources or to bring the same data back
which user had when he was using your application before it vanished from
memory.

2. viewWillAppear: This function is to be handled to trigger the Input/output
commands to get the data from previous session that user had with your
application. As the name suggests, the function is executed when user wants to
interact with your application but the application’s UI is not yet rendered on the
screen.

3. viewDidAppear :This function is executed in between, viewWillAppear and
viewDidLoad. It is meant to be handled for the cases that are very short, for
example like changing the text on one or two objects in your Storyboard page.

Handling these functions will allow you to make sure user feels as if his application was
always having him covered. In iOS apps are provided with memory space to store their
data on which can later be accessed by the application itself to make the processing
smoother. This method makes the applications smoother and much better in performance.

As a common example you can handle the viewDidAppear function to change the text on
one of our textFields and set the text to user’s name.

override func viewDidLoad() {
super.viewDidLoad()

// Write the name of user, for example to greet the user.
nameTextField.text = “Hello, \(username)”
}

This would greet the user as the user has just visited back the application from another
session. It is much easier way of ensuring that your application takes care of sessions and
how user interacts with the data and your application. The applications are designed to be
smoother and give enough time to handle everything in the back-end. The code above
would take a fraction of a second to execute and will render the text on screen for the user.

The ViewControllers are not just to handle the events, but are also used to get the data
from. The pattern that I have talked about is known as “Model-view-controller”;
abbreviated as MVC. MVC pattern allows us to use a Model for data, controller fills our
views with the data from models and renders them on screen. Makes sense?

1. Model: Model is simply the structure for the data. It defines how your structure
looks like. Controller uses a model to get the data from. It actually fills the model
from the file system and then uses that model and fills the views.

2. View: The view is the UI of the application that a user can interact with. Users can
for sure interact with the actions, application’s buttons, text fields and other
command-accepting objects that you can create yourself; in coming section you
will learn how to create your own custom objects.

3. Controllers: These are the most used objects in your library. Controllers are used
for building and rendering Views, controllers are used to fill the models and then
use that data from models to fill the objects in the Views. These all methods are
provided in the controllers and their base classes. The base classes are then used
once you inherit those base classes. UIViewController class holds those functions
that can be used in your own inherited controller class (the one that is already
talked about above) and then implement other functions to perform actions for an
MVC pattern.

Not just these views and controls are provided in these controllers, but also there are many
other controls that are beyond the scope of this guide. There are other services provided
for your views that you can make use of, these services are built-in core-iOS APIs for you
by Apple itself. Siri, Gesture services, internet services and many more of other similar
services are provided for your applications. If you want to use them in your application
you would need to inherit the core APIs in your view controller. Once again, it is the
controller that actually makes use of everything for you, not anything else. Model is just
the structure for the data and View is just the representation of that data and the state of
application in your app. Controller triggers the functions etc. for use in your application.

These services and a few others will be talked about in coming sections of this guide.
They are advanced level skills that require more in-depth knowledge of Swift language
also.

Swift Functions Overview

Before we move forward, you also need to learn how to create the functions Swift
language. The functions are statements that can be executed from anywhere in the
application by calling their identifier. Swift language also provides us with functions that
are built-in by default for our ease and we can define functions of our own choice. The
functions in Swift language are similar to what we have in Objective-C and now hold a
taste of other languages such as C++ or Java.

In Swift language you can define the functions using the keyword func. This tells compiler
that the incoming block is a function with the identifier, plus whether it has a return-type
associated or not.

func identifier (param: Type) -> return-type {
statement(s)
return statement
}

The above is the structure of the function that we can use in our programs. Similar
functions can be created and the parameters are of our choice again. For example, if we
want to get the name of the user currently logged in. Rather than re-writing the command
everywhere in our application we can easily create a single function for such actions and
then call the function from different locations and areas of our application.

var myName = “John Doe”

func getName () -> String {
return myName
}

Then you can use the same function everywhere to get the name of the user and the
program will have that String written there whenever the program executes.

iOS API also uses the same features in application programming. You define multiple
functions and then pass objects or get an object from the result. Image pickers, resource
capturers, response providers and other library tools all have the same features. They ask
for a value and provide you with a data that is the result of procedure. The IDE will make
sure everything on the back-end is being set up for your application so you only have to
care about the views and how they interact with the user. The back-end is maintained by
the IDE itself. That is the beauty of Xcode.

Creating Your Own Controls

We have so far talked about using the built-in controls; you can of course create your own
custom controls that you want to use in your applications. You would be taught the in-
depth of these UI controls and how can you create your own custom controls easily. These
controls will let you create your own custom UI designs and UI events that user can
manipulate. Creating custom controls is best approach to creating the UI for games and
full-screen applications.

In iOS APIs, a control is a class object that inherits directly from UIView. UIView holds
the details for the functions and properties that every native control has. The class can be
inherited directly by a class that needs to render a control on the UI of the application. If
we need to create another control for our application library we can create one by directly
inheriting the UIView class in our application. The class that we create can then hold
different properties as per requirement. The class also can have different functions,
features, events and other stuff that we require in that control and user would need in that
control. Once inherited, we have the base functions and properties, but we can always
create more right on top of that foundation of our UI class control.

The details about UIView can be found easily on Apple documentations, we will not talk
much about the details but we will definitely guide you through the basics of this class so
that once you are creating your own object you have the idea of how to and when to create
the object. The documentation about UIView already contains more than hundreds of
functions and properties that you will find easier to use while programming your
application for iOS.

To create a new control, you can use the IDE’s UI editors and tools provided there to make
sure all you have to do is provide the values and IDE does the rest of thing itself.

1. Create a new File (or press CMD + N)

2. Select iOS under the category.

3. Select Cocoa Touch Class

4. Enter the name for your class, it can be anything: Remember that you always
should use the name that should identify the control that you are creating for your
application.

5. As I have already told you, each and every control must inherit from UIView class
so select UIView under the “Subclass of”.

6. Proceed to create the control class.

If you need to edit anything else, feel free to edit the remaining stuff and then continue.
The required items are just talked above; you should consider taking care when creating
the class otherwise your class may not be able to get used as a UI control.

A very simple class (as a template) can be like the following code of Swift.

import UIKit

class YourControlName: UIView {
// Code that would describe what it holds and what it can do!
}

By inheriting the class you get the default and built-in features and functions of the
UIView class already. It is not your job to add more functions and services to that control.
For example if you are going to create a control that takes pictures or perform a network
based operating such as uploading the data to servers. You should create functions or
events that get triggered and perform those functions.

One more thing, the procedure to attach the custom control to the back-end file is also
same. You just drag and drop the controls to your code-behind and attach the objects to
those files to create a connection. Creating the connection is always a better choice to
perform functions and handle the events that the control would raise upon user interaction.

Until this point you have learnt how to create a simple UI and how to create functions in
Swift programming language that can be used to perform different actions based on the
language or the APIs and libraries that we are using in our applications.

Using Your Data Sources in Applications

Another major concept in programming is using the present or provided data in your
applications. In iOS development model, this part is also known as the Model. The model
is used to fill in the Views with the data that comes from multiple sources.

Like all other frameworks and libraries, a Model is simple a base class that provides a
template for the data. The data is then filled in to that template, which makes the Model.
The model can be filled using the Controller, on demand. Once model is filled, it is used
then by the Views to render the data. It is not required that only one object can be used at a
time. You can create an array of Model objects, on which Controller or View can loop to
render the results on the screen for your readers and users. However, Model doesn’t play
any role because it is just a static class (do not consider the class to be static, a static class
and the class that doesn’t do anything are totally different concepts; For more on this, read
static class and data templates in OOP) that provides us with members that we can fill in
to use later in the Views for our application’s UI.

Creating a New Model

First step would be to create a new Model class. The class totally depends on what you
want to make for it. A simple way to create a Model for our application is to create the
class and then use it for our Model purposes.

The procedure in this one is also the similar one as we did before. The only difference is
that this Model is a base class, instead of being a derived one. Only one step is to be
skipped, rest of the steps are similar. You are not going to use any base class for this.

1. Create a new file.

2. Select iOS as the category.

3. Select Cocoa Touch Class

4. Enter the name for your Model class. The name should identify the purpose of the
Model class. That is the first rule of every identifier in a program.

5. Continue with the rest of windows and create the class.

Since this class doesn’t have any base class you should have only the class created, and
there will not be any inheritance being used. (If you do not know what Inheritance in Swift
is, you should read a guide for Swift programming language).

As an example the class that you have created might look like this:

class NameOfClass {
/*
* Add the code here; you can define members, types and other objects in the Model
* The data should come in this class and you should consider making the class
* as to provide the details for the structure of data.
*
* You can also create the functions and test them for performance.
*/
}

You should now edit the class and make changes as required. The class doesn’t prevent
you from adding new members. But remember, since this Model is to be used as the
template only it will not perform any functions, so do not add any functions unless they
make sense. The most common type of functions that can be added in the Model classes is
CRUD type of functions. CRUD stands for:

1. Create

2. Read

3. Update

4. Delete

These are most used function types in any Model-oriented framework that you can use.
These functions are embedded in the Model classes and are called when the data needs to
be stored, captured, updated or deleted. These functions would need to communicate with
the file system or to the network resources based on how you want to use the objects and
their resources. Because of this, you should consider testing them for good performance.
Good performance will in turn provide good UX for the users and will provide your
application with a larger and much bigger and better audience.

To create a new Model, you can simply create a new File. Once created, you can define
the structure of your Model. Remember to always create the variables, and not constants.
By defining variables you will be able to change their values on run-time. If you define a
constant field in your Model, you cannot change the values of those fields on run-time,
you will be able to give them a value only once. That is why, variables are provided to
your, to use them in cases where you would need to change the values later on in the
application. For example, if you want to create a Model for a person and hold the
following details for him:

1. Name

2. Age

3. Message

These variables and constants can be created inside your Model class and you can make
use of these variables and their values in your application later when you need to. Just to
guide you through this process, a sample class to define the Model would look like this:

class Person {
// First of all the fields, variables (var).
var Name: String;
var Age: Int;
var Message: String;

// The rest of the logic for your Model object.
}

If you have a look at the code provided above you will see that there are a few comments,
and a few fields being created. The fields are variable fields along with their data-type. We
can ignore adding a field and Swift language will check the types for the variables itself.
But, we can also define their data-type initially also by adding a following colon and the
type name. For example,

var Name: String;

In this line of code, the “var” keyword is just to tell the compiler that the incoming
declaration is of a variable field, which can be changed later on also. “Next” is the
identifier for this field, it is the name that we will be using to call the field. The colon tells
compiler that incoming is the data-type that we want it to have, “String” is just the name
of the data type that can be used in Swift programming language for the types that hold
characters, such as names, addresses or email-addresses etc. You can then use the same
field in other functions and actions that you may want to perform.

Swift also allows you to create custom constructors for your objects. Which is, that you
can accept multiple parameters for the members to initialize them to a valid, initial, value.
The purpose is to make the programming as much concise as can and as handier for the
developers as much as they can. In Swift, the constructors are defined as init functions.
The term “init” stands for initialization. You can then pass the variables as parameters to
this function, which would create the instance using those parameters.

init(parameters[, parameter2…]) {
// The logic to test, use and verify the parameters here
}

Using this function you will be able to create the function which accepts the parameters
and then initializes the object with those variables. Swift doesn’t do anything in this case,
it is all up to you to define the logic for it. The logic is defined by you, implemented by
you and designed by you.

The initializer function allows you to:

1. Accept multiple parameters for your variables and fields in the Model.

2. Test their values before creating the instance.

3. Report any error if there are, based on the values provided as the parameter.

4. Return a nil if there was an error: To return a nil from your initializer, your
initializer must be defined as an Optional. In Swift language, an Optional initializer
is called failable initializer. The definition of a failable initializer is also same but
with an additional “?” after the keyword init.

init?(parameter[s]) {
// Code here…
}

This way you will be able to notify the user of any problems that may arise while creating
the instance of the object for them. The init function is the main entry point for almost all
objects and this gives you a heads-up time to determine whether user has provided a valid
input or whether the input is wrong and user needs to be notified of any problems that may
arise.

someFunction(self.Name)

For example, if you have a function named “someFunction” and you want to pass the
name to it to process, such as “To find the Person by Name”. You will pass it as
self.Name. The variable will be replaced by the value that object would hold at that time.
You can of course create other functions for the Model itself, as already talked about
CRUD functions. We can create them in Model itself, and have them called when we need
to perform CRUD functions in our application for the related data.

CRUD Functions in Your Data Model

As already discussed, CRUD functions are used to create, read, update and delete the data
present in our data sources. They are simply 4 (or max 5) functions that allow us to
perform different actions on our data structures and data sources based on the commands
that user provides us via interacting with the UI of our application.

You can create the CRUD functions in your Model using the same function declaration
and if you require any other parameters being passed. The parameters can be then used to
manipulate the data sources any further.

class Person {
// First of all the fields, variables (var).
var Name: String
var Age: Int
var Message: String

// The Initialization function
Init?(name: String, age: Int, message: String) {
self.Name = name
self.Age = age
self.Message = message

// Condition to try whether user needs to be added or not
if age < 18 || name.isEmpty || message.isEmpty {
return nil
}
}

// The CRUD functions
func create() {
// Write the code to save the data, either on File System or to upload to
// an online HTTP server. Depends on your need.
}

func read() {
// You can also get the data from resources, in this function add the code to
// Capture the data from online servers or from file system.
}

func read(name: String) {
// This is the 5th function that you were told about. This function differs because in
// this function we are passing a parameter to work on.
// The parameter can be used to find the users, or to do other filtering.
}

func update() {
// Update function can be used to update the records in our data source.
}

func delete() {
// As the name suggests this function should be used to delete the records.
}
}

The above class is declared now, and can perform the actions that we want it to. We only
need to implement the functions and services that we need in our classes. For example, the
functions do not have a body to execute. We need to add a body to those functions also to
allow it to actual function. The code still has nothing in it, because it was left to keep it
general for you. So that you can add the code that you want to add, so that you know
where which code can come and how CRUDs should be implemented in your application
to make it easier to handle the data source events and functions.

Managing the Interactions and Scene Animations

Once you have designed, created and built the application’s controllers, view and models.
You now need to implement the services and animations that would allow the user to
navigate from one scene to another. This is known as, “Implementing the navigation” in
your application. Users would use their native experience with iOS to navigate from one
scene to another, so you should consider implementing the native iOS experience in your
own applications to ensure that user knows how he can continue doing his work. The
scenes that you will create, views, would have the control-objects that would trigger the
animations for changing the scene, storing the data, navigating from one page to another.
All of these are actually written by Xcode itself, you just have to work around and perform
the drag-and-drop operations in the IDE to create the navigation system in your
application.

Navigation system is implemented using Segoe animations in your multiple scenes which
constitute your Storyboard of application. There are many types of Segoe and Scenes. All
of them are discussed in brief below in the Storyboards sections. You should consider
reading that section for more information about Storyboards, Segoe animations and
Scenes.

You can create your own Scenes; use the built-in scenes and so on. Xcode would ensure
that the code and application are built efficiently and you just have to perform the actions
using the drag-and-drop services provided.

Creating the scene takes a simple step.

1. Open Object library

2. Search for View Controllers

3. Select a View Controller, for instance, Table View.

4. Drag it over the canvas in your IDE for Storyboard.

5. Drop it to create a new scene!

That’s it. This would create a new scene in your application. You can now use the Utility
area to edit the properties and other settings for that scene and make sure it works as
expected in your application. All of these actions are also based on drag-and-drop. If you
want to create a custom View Controller, you can do so. As already taught in the View
section. The View is an object class that inherits the UIViewController class of iOS core
libraries. The object allows our application’s class to act as a View Controller, to have the
properties and functions that a View Controller needs to have. Doing so, we create our
own Views and their Controllers. Xcode will render those Views as you define them; you
can edit their preferences and properties in the Utility editor and area. You will find almost
every property, function, event and resource related to that View that you have just created
in the Utility area; that is why it is called Utility area. For more on this, please refer to the
Views section above where you were taught on creating the Views. You will find the
methods of creating new Views in your application.

Once the scene is created, next job is to add some animations and effects to change the
scenes from one to another, as to create a navigation. The animations are called, Segoe. A
Segoe is used to define how a scene takes over the focus and is rendered over the previous
one. You will again use the drag-and-drop services of Xcode IDE to create the animations
between your scenes.

To create a new Segoe in your scenes. Drag a control-object from one scene, (a control-
object is any object that can have control in it; such as buttons) and drop it over the next
scene which ever you want to use. The next scene will be connected to the control-object
and the control-object, once triggered, will trigger the Segoe to render the new scene on
the top of this previous scene. Xcode highlights the valid regions where a control-object
can be dropped in blue shade. You can drop the objects there and Xcode will itself
maintain the code for your Segoe and Scenes. Storyboard will then be used to provide an
overview of how your application transitions once your user starts to interact with
different controls provided.

For more on creating the Views please read the Views section above, and for more on
creating the scenes and understanding the Segoe, please read the Storyboards topic
following this section.
Chapter 8
Storyboards - UI design -

In your Xcode IDE a very common and most interesting feature and service for
application development is, “Storyboards”. Storyboards are nothing, but a convenient way
of designing and programming your application’s design and UI. Your applications are
actually the activities that users are interested in, your application starts with a UI and user
interacts with that UI using the controls that are provided. The application navigates to
another UI and user again interacts, in this way, the application and user both navigate
from many different stages and finally they come to an end with a result, and then user
selects to do something else and application, closes or goes back to the main page.
Depends!

In the entire above presented scenario, there are three things that you can select and then
talk about in details here:

1. A scene: A scene is simply the page that a user is currently interacting with. The
scene can have images, videos, text or other action controls such as buttons,
hyperlinks or other commands that can force the operating system to start another
application or service for the user.

2. Segoe: The “Segoe” are the animation that is played to navigate from one scene to
another. The Segoe defines how your application animates when other screen
needs to come online. For example, if you want the new scene to come on top of
the previous scene or if you want either one of them to float away or in, you can
define that in the Segoe and iOS will take care of the animation itself. The
animation will be played once that Segoe starts and will continue until the Scene is
loaded on the UI for the user to interact with.

3. Controls: The final most important parts of the Storyboard are the controls that
trigger the “Segoe” animation. As already talked, the Segoe animates how scene
changes. The “control” controls how a Segoe is executed and when is executed.

For example if you want to navigate the user to another scene of “Login” when user clicks
on the button “Continue”. You can edit the event handlers of that button, and enter the
details for your Segoe animation, what animation doesn’t matter. The only thing that
matters is, “When, What, Where”.

1. When: When does your Segoe needs to be triggered

2. What: What Segoe needs to be triggered, what scene must be changed etc.

3. Where: How does the Segoe actually start and where does your scene come in to
the action.

These details are controlled by those controls and they trigger the Segoe to start the UI
changes. In this section you will learn what Storyboards are, what Segoe is and how to
create them in your own applications.

Creating a New Scene for Storyboard

First step is to create a new Scene. A Segoe occurs between two scenes, it won’t occur for
a single scene unless you close your application just to start it once again. To create a new
Scene for your application’s Storyboard, you can follow the following rules:

1. Open the Object library in the Utility area.

2. Now select a view controller, there are many types of view controllers already
provided in that list. You can select any one from there depending on your need.
Table, Split or simple View Controllers are all made available just to make it easier
for you to pick a start for your application’s UI. Select one from there.

3. Drag the selected View Controller on to the main window and drop it in the
Storyboard.

4. Connect the scene to another scene in the available Storyboard using a Segoe. To
add a Segoe, read the next section.

5. Fine-tune and configure your scene for more details and services to be available.
You can look for the properties and other details that the scene has in the Utility
area and edit them as required.

Once these steps are performed, you will have a Scene for your application’s UI based on
what you needed to be present in that scene. A table, split view, simple view or other
views, they are all available in the Utility area when you search for a “controller” in the
Object library. The View controller can be implemented to create your own custom views
also. As already discussed, creating custom views is also as easy as creating additional
resources. Those UI views are then used in these Storyboards to create your application’s
UI and to make it easier to continue programming. Although the default and built-in views
are enough and they suffice the need, but if they do not, you can create your own View
Controllers by inheriting the required classes and interfaces. Which would then let you use
them in your lists of creating the UIs for your application.

Creating the scene in a Storyboard is just that easy!

Creating the Segoe Among Scenes

Once you have created the Scenes in your Storyboard, the next stage is to create the Segoe
for your scenes to transition and come on the top of others. There are multiple type of
animations that you can play to show one scene over the other.

1. Show the scene on the entire screen.

2. Show just a portion of that new scene.

3. Show it as a modal or an alert box.

4. Show the new scene as a popover in the current scene.

These are the types that are provided to you to work around I the Storyboards to change
how the scenes are shown to the users. Of course you need to show the application in any
way, for example the places where user may get an error, you would like to show him a
modal, instead of an entire new scene. From the above 4 (of all of the available Segoe)
you can choose any one to connect one scene to another. Once user interacts with any of
those control-objects available in the scene he will see another scene animating over the
current one using the pattern provided by the Segoe.

It does not end here, you can create your own custom Segoe also. Adding a custom Segoe
would allow you to have a full control over the animation, how scenes are loaded, when
they are stored, when they are rendered and so on and so forth. You can get details on this
topic from Apple documentations, where all of these are explained in a very broad detail.

To create a new Segoe in your scenes for your Storyboard, you will use the same drag-
and-drop services of Xcode IDE. Just drag and control-object, such as a button which can
execute a “tap” event, and drop it over the next scene. This would connect the object to
that new scene you created. The connection will now enable the Segoe so that when user
clicks on that control-object, Segoe will trigger and animate the scene on top of this scene.
You can then edit the Segoe details to change the animation that gets played once that
button is clicked by a user. The Segoe is shown as an arrow, in the IDE. You can also
change properties and other details for the Segoe in the editor Windows in Utility Area.

Xcode manages the code and the services that you use. Like all other software
frameworks, Apple also deprecates some features and services in their operating systems
as upcoming software get an enhanced and better service. Similarly, Xcode keeps a track
of those changes in the operating systems to make sure that your users always use the
latest features and services.

In doing so, Xcode keeps a track of the operating system being used and then looks for
any deprecated APIs or features. If there are, then it replaces them with new ones and if
there are not deprecated services or features then it continues to use them. All of these are
managed in the SDKs of those operating systems. If you go to Apple documentations for
Segoe you will find many of the Segoe types being deprecated and being replaced by a
new type. Those types are managed and maintained by Xcode itself.

From these you will see that Xcode is the IDE that provides developers with options to
perform everything using drag-and-drop services. You can build the UI using drag-and-
drop services by dragging and dropping a UI control such as button, text field etc. right on
the scene to build the UI. You can also use the same service to build the Storyboard for
your application’s UI. You can drag and drop the view controllers to create extra scenes,
you can drag one control to another scene to create a connection of Segoe in those scenes
and so on and so forth. All of these services and functions are based on drag-and-drop,
which most of other IDEs do not provide!

Chapter 9
iPhone Simulators

It is not just same as expecting to fix the problems just by looking in the Test Window. If
you have an Apple device, then it is fair to test your applications in those environments
that you have by installing the application and trying them out in real to see how do they
work and perform. If you do not have a device with that exact software requirements;
SDK version, operating system, hardware resources etc., then Xcode provides you with
emulators, which you can use to emulate the iOS environment in your own machine.
Xcode and Apple team calls them as, Simulators.

Simulators are best way to try out applications because they are simply virtual machines
running in your host device; Mac. It also prevents your devices from any unwanted code
being executed and if there are bugs in code that might harm the devices, Simulator will
let you see what harm it can do to the devices. But that is the worst scenario, you will use
a Simulator to try out the application yourself.

Simulators are very simple and easy to use. In this section you will learn how to use a
Simulator to try out your application as a user might try, you will be able to judge how and
when is your application not working as it is expected to work in most cases.

Creating the Simulators in Xcode

Sometimes Xcode provides a default Simulator for your environment based on the
maximum or latest SDK installed. That Simulator doesn’t need to be configured more and
provides the special tasks as you would create them manually. Although that default one is
provided, you can always create more Simulators for more devices to test the applications
on. This provides you with a feature and service in which if a user reports a bug from a
separate device, you can simulate that device in your own environment and test the
application in it to see what problem was caused, and by connecting the Simulator to the
debugger you will be able to find what the actual problem is. So, you should always
consider having a collection of Simulators to test your application on.

There are a few things that you need to consider before creating a new Simulator. A
Simulator has the following variables that you set up for your own needs:

1. Operating system version

2. Hardware resources

These variables are to be entered and selected by you. This is so, you can try out a
variation of different devices and test your application in a wide-variety of Apple
products. To create a new Simulator for Apple product, you can follow the following
steps, but since this guide is for iOS, guide would talk about (and discuss) the iOS only.

1. Go to Hardware

2. Select Devices

3. Now select Manage Devices under that category.

4. In the new Window that comes up in front of you, select Add (there won’t be any
Add, but a “+” sign at the bottom).

5. Enter the details for your new device Simulator.

Enter the details and then your device will be created. There is no limit to the devices that
you can have at a time in your Xcode environment. It depends on your audience and how
much you want to test your applications in your own machine rather than purchasing a
new device for that each environment.

Simulator Name: This is the name, using which, Xcode will identify it in the list.

Device Type: The type of the hardware that you want.

iOS version: The version of iOS operating system that you want to install on your
Simulator.

These details are required to create your Simulator. Once you have completed this step,
your Simulator is created and you can continue to using it.

Starting the Simulator

Starting the iOS Simulator is just as simple as running the application, Simulator would
start and you will have the application already installed in it. Another method of running
the Simulator is to manually start it. To manually start the Simulator, you can

1. Open Xcode IDE.

2. Open Developer Tool

3. Select Simulator.

This would now start the Simulator for you. You can now use the Simulator just as you
would use any other device and your application will also behave as if it were installed in
a real device. There are many kinds of Simulators:

1. iOS

2. watchOS

3. iPad

You can choose which type you want to select and create for your purposes. The Simulator
will act as an actual device; you can manage the settings, perform actions on it, install or
download software on it. The device is as real as an actual device purchased and being
used. The only difference is that the Simulator is free of cost. It can be created on demand
and then deleted when no longer needed. You can install any version of iOS on it and any
hardware profile can be used to test your applications.

Among a few things that you should consider before using the Simulator is that the device
is running on a Mac, not the actual hardware. Thus, the resources provided are also very
powerful, such as RAM or the hard disk drive provided in the Mac laptop systems.
Whereas on the actual devices those resources are very weak and less in amount as
compared to Mac products. Apple Xcode automatically decreases the efficiency of your
Simulators to ensure that you get the same feeling and efficient of performance as it would
be on the actual device, so that you can run the application in a similar manner as a client
would, the profile and other settings are also similar as what you may get in an actual
device.

Available Services and Options in Simulator

Since a Simulator is an abstract device running on your machine, it is not the actual device
that exists in real life. The services that a real device and the one that you imitate, hold, are
also different. Some are available and some are not.

Not just this, the action that you can use and the gestures that you can use are also
different. For example on your touch-screen iPhone you can drag your finger to initiate a
drag-event. Whereas on a Mac, you may be using a mouse as your pointing-device, so in
that case you will have to perform a drag by clicking the mouse and then moving it
around. Not just that, the pinch event and other events that require a finger for input, may
be available or may not be available depending on your hardware profiles.

While creating the device, ensure that your device is ready to accept the input from your
devices also. For this case you can go and read the documentations for Simulators and
how they work in cases of events and what sensors are made available in those Simulators.
The Simulators make your life very much easy, but since they are dependent on your
hardware and devices, they cannot perform at their 100% efficiency and thus cause a
bottleneck for your development processes. But that is not all, Xcode provides you with a
lot of services that can allow you to imitate the events. As already discussed, you can
imitate a drag event using your mouse. You can also imitate the pinch, zoom, tap and other
events right using your mouse. Xcode knows that you are not using your fingers or the
screen may not be touch. Thus, Xcode converts your mouse input to a touch input for the
Simulator to understand. Thus your input is converted in the back-ends and your
applications process.

The thing was to make it clear for you, that the Simulators are powerful tools if you have
all the necessary hardware support. If you do not have a required resource or the
environment available, Simulator would not provide you with those services. You can
always add new hardware and other equipment to your machine to try out new features in
your Simulators.
Chapter 10
Publishing the Applications

Another major topic that needs to be taught is the best ways to publish your application to
Apple servers so that it can reach out to millions of users looking forward to your services.
So now that you have the understanding of basics about applications written on iOS
platforms. It is time for you to learn how to upload and publish those applications for users
to download and install on their machines.

In this section you will be taught how to get started in Apple developer program and how
you should be able to upload the files to the servers for your audience to download and
install them.

Getting Started

The first step is to get a developer license from Apple. The license is your key to be
promoting yourself, your applications and your services on Apple platform with your
name and to get paid for those services. License is also your key to get the latest news and
services from Apple to test your applications on. The entire list of services and benefits for
Apple Developer programs is listed on Apple’s programs website.

You should now (after reading the program details) get enrolled as an Apple developer.
Apple developer is a license that you can get for $99/year basis. Getting a license will get
you the access to all of the benefits that Apple developers have, all for free! You can select
from Individual or Organization version of license. The services and fee for those licenses
vary and you can find details about services and benefits for each of those accounts. If you
are an organization you will get additional services and benefits such as collecting the
statistics for how users interact with your application and so on and so forth.

You can get enrolled in the program by following the forms submissions that are provided
by Apple at: https://developer.apple.com/programs/enroll/. The program is very concise
and easy to implement. You will be guided throughout the process and you will get the
license for your Apple developer program as soon you have filled out the details, Apple
will confirm the process so that you can continue publishing your applications.

Your Account -Your Applications-

Your account has access to all your applications, statistics, usage details, license
subscription details, account details and the billing addresses. You control how Apple or
users have access to those details. Always ensure Apple has the latest billing address,
users have the latest version of your application and all other similar details need to be
latest and legal.

Application Tests

Before submitting the application to stores, you must always consider testing the
applications for stability, performance and efficiency checks. Apple tools provide you with
tests and services that you can run on your application to test whether your application has
good UX guides being followed or not. Apple always has the option to reject your
application to be submitted and published on their store. Those tests that Apple runs on
applications are all made available to developers, so that they can run those tests and
determine whether their applications are ready to publish or whether applications need
some more time and fine-tuning.

These tests ensure that you don’t have to wait longer for your application to be live on
App Stores because you have also tested the application’s UX and UI guidelines. If the
tests tell you that your application is ready then you should upload the application package
and your application will be live as soon as possible. If tests fail, you should not upload
the package instead you should consider fixing those problems in your application.

Submitting the Applications

Final step is to submit the application to App Store. If you followed the previous step, and
tested your application against tools provided by Apple for testing the applications then
you should consider publishing the applications to App Stores. The applications will be
made available as soon as the Apple developers have tested and checked your application
for better guideline tests. You should find your application in the App store as soon as
possible.

There are some guidelines submitted by Apple already, you must consider giving them a
quick look also. Apple has provided you with the basic percentage of chances why your
application would be rejected once it is under review. You can find those details on,
https://developer.apple.com/app-store/review/rejections/.

Adding Your Details to Xcode IDE

Adding your details for Apple Developer ID to Xcode IDE is a very fast and intuitive way
of publishing your applications to App Store.

1. Click on Xcode and go to Preferences.

2. Select Accounts

3. Add a new Account

4. Enter the Apple ID that your Apple Developer License is associated with.

Then you will be able to add your applications to your App Store account. It is as easy as
that!

How are Applications Configured and Found?

Another major question that may arise in your mind would be how am I going to enter the
details for the application in Xcode? The details are the same details that you entered
while creating the application. The name, code name, author, organization etc. all of that
same data is used for publishing the applications to the servers. Those details are made
available to the user when he wants to download the applications. User gets to see the

1. Name (title of the application)

2. Description

3. Developer’s name

4. Application size

Using these details user knows that he is installing the application from the actual source
and from someone imitating the application’s ownership.

You must edit the project and edit the details such as image resources, names, description
and developer key. This would let Apple and users identify that application is being
provided by the owner himself. The Apple License provides you with tools to digitally
sign the applications so that systems know that it is you.

Other Services that Apple Developer License Provides

Writing, developing, building, compiling and publishing the applications is not all that
Apple Developer Program provides you with. There are many other services that you get
once you get enrolled in the program! In this section you will be shown a few of those
services, to learn more in-depth of those services you should consider reading the Apple
guidelines and resources for those frameworks.

1. Getting paid for your applications and services: Apple developers have created the
platform for you to write applications and get paid for those services. You get 70%
of the revenue generated by your applications!

2. Usage statistics: Apple allows users to opt-in to submit the usage details, which
you can use to fine-tune your applications for the users!

3. Analyzing the usage and crash reports

4. Pushing changes to the connected devices.

5. Using the services from iTunes: iTunes is a very great tool provided by Apple, you
can push your applications to iTunes for users to download and use them. iTunes
also synchronizes the data between multiple devices that a user may have.

All of these services collectively make your application programming process much better
and easier. Xcode, iOS SDKs and tools, online publishing services. All of these tools and
services are provided free of cost for developers, once they have captured the license. You
can consider reading the documentations and resources directly from Apple team to learn
more on these features and frameworks.

Chapter 11
Bonus Algorithms

Let’s take a look at a few low difficulty problems on ProjectEuler (http://projecteuler.net)
that we can solve and let’s go over how we can solve them using Swift programming
language. I will explain how we can approach each algorithm to help you start thinking in
a programmer’s mind and then you can try to solve it. It is recommended that you sign up
for this site and practice your new found Swift programming language skills on there.
These algorithms are designed and implemented in the core-programming environment
and language. They are used to get a better grip on the language and how to write some
basic structures, for example loop or iteration structures in the language. While
programming iOS applications you may stumble upon some of these mathematical
algorithms, which mostly you don’t have to write yourself. But if you have to, these
exercises will help you in getting most out of your mathematics tricks and skills!

So let us head off to the programming tasks and solve them by understanding their logic or
algorithm. Swift programming language is just a language; the algorithm has to be defined
by us.

Multiples of 3 and 5

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and
9.

The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.

Now let’s think about this. What exactly is this problem asking from us? This problem is
asking us to find all the multiples of 3 and 5 below 1000. Now mathematically, without
programming, let’s think about how we would approach that. Anything that is divisible by
3 or 5 that is within the sequence from 1 to 999 would be added to a list of numbers.

After finding all the numbers that are divisible by 3 or 5, we would then take a look at our
list of numbers and add all these numbers up together and then provide the sum to
ProjectEuler to see if we got the answer correct. This seems pretty easy enough but it
would take a long time to complete if we were to simply have a pen and paper handy. But
now, with our programming knowledge, we are able to figure out how to get the sum of all
the multiples of 3 and 5 below 1000.

In order to actually loop through from 1 to 1000, we should use a loop. It doesn’t matter
what type of loop we would use but we need to use a loop that affects a variable to
increment from 1 to 1000, not including 1000 because the question is asking us to find the
sum of all the multiples of 3 or 5 below 1000, not below or equal to.

Then, through each iteration of the loop, we must check if the variable being affected by
the loop is divisible by 3 or 5. There are multiple ways to do this, which can vary from
checking the remainder (using the % symbol) or dividing and checking whether or not it is
a whole number. This is pretty trivial to figure out on your own. The next thing we must
do if the number is divisible by 3 or 5, is to add it to a list. We can either add it to a list and
then loop through the list (or array) or add all the numbers together or we can create a
variable before the loop and simply add on to any number it finds is divisible by 3 or 5.
An efficient way to do it is by doing the latter.

The reason I pointed out the array way is to essentially let you know that there are
multiple ways to solve problems in programming but it is important to find out which way
is the most efficient way using your knowledge and a spice of logic. Now try
programming this using what you know in Swift programming language and the logic I
have provided and try to create a block of code that can do the functionality accordingly.

Let’s move on to the next problem on Project Euler.

We first check if our solution works with their example:

// Swift codes do not need some additional scopes
// The code starts executing from the global scope

// First we define two variables
var limit = 10;
var sum = 0;

// We run the loop for our logic.
for (var i = 3; i < limit; i++) {
if ((i % 3) == 0) {
sum += i;
} else if ((i % 5) == 0) {
sum += i;
}
}

// Finally we print the result of the loop on screen.
print(“The sum below ” + String(limit) + ” is: ” + String(sum));

We then get the output: The sum below 10 is 23

The output is correct, so we are going to input the number they ask to solve the problem
with the following code:


// We begin in a similar manner as we did before
// But we define the limit variable with a value of 1000 instead of 10.
var limit = 1000
var sum = 0
for (var i = 3; i < limit; i++) {
if ((i % 3) == 0) {
sum += i
} else if ((i % 5) == 0) {
sum += i
}
}

print(“The sum below ” + String(limit) + ” is: ” + String(sum));

This time the limit is 1000. The output is now:



The sum below 1000 is 233168.

Remember, Swift doesn’t complain about semicolons in the statements and also it doesn’t
cause an error if you add a semicolon to the statement. So for good programming practices
you must always consider adding a semicolon to remove any chances of ambiguity or
confusion later on.

Even Fibonacci Numbers

Each new term in the Fibonacci sequence is generated by adding the previous two terms.
By starting with 1 and 2, the first 10 terms will be:

1, 2, 3, 5, 8, 13, 21, 34, 55, 89…

By considering the terms in the Fibonacci sequence whose values do not exceed four
million, find the sum of the even-valued terms.

In this problem, we are told the pattern the Fibonacci sequence is generated by and then
we are told what we must solve. This problem asks us to find the sum of the even valued
term values in the Fibonacci sequence. Don’t get confused and assume they are talking
about the term indexes, but rather the term values.

There are technically two problems in this problem, one of which we have already
completed. You see, in the last problem, we were checking whether or not a number was
divisible by x or y in a range from 1 to 1000 and then adding it to an accumulation
variable. Well the same idea applies here, where while we generate the Fibonacci
sequence, we check whether or not the term value that was generated in the certain
iteration is even or odd. If the term is even, then we simply add it in to an accumulation
variable, if not, we do nothing about that iteration.

So truly, we’re only really solving the Fibonacci problem here. This is the great thing
about practicing algorithms, you start to gain a muscle memory over them so you get
better and better at doing them efficiently the more you practice.

So how exactly do you generate the Fibonacci sequence? Well we know that you start with
1 and 2. Then what happens is you add the two terms together to get the third. Then you
get the last 2 terms and add those together to get the fourth, and so on.

1, 2, 3, 5, 8, 13…

1 + 2 = 3
3 + 2 = 5
5 + 3 = 8
8 + 5 = 13

Now that we have a better understanding of how the Fibonacci sequence works, let’s see
how we can recreate that pattern in SWIFT PROGRAMMING LANGUAGE. First, we
must create a loop that has the amount of iterations identical to the term value that we
want to get. So if we want to get the 3rd term value, then we have 3 iterations, and if we
have 3 iterations, we’re going to end up getting the value of 3 because in the sequence, the
third term value is 3.

Although, before creating the loop, what we should do is declare two variables, one that is
initialized at one, and another which is initialized at two. Why? Because we should
simulate exactly how the Fibonacci sequence works by having these two variables
dynamically change as the iterations of the loop go on. Let’s go back to our loop and look
at how we would do this. First, let’s create a quick variable that is the sum of the two
variables we initialized before the loop. Next, let’s check if the second variable that we
declared as 2 is even, and if it is, then we add it to an accumulation variable. Next, we
assign our variable that was assigned one, to the second variable that was assigned two
and then assign our second variable that was assigned two, to the sum of the two numbers.

Now if you read that carefully, you would understand that we are simply cycling through
the Fibonacci sequence in this exact algorithm that I have just specified. Now you can try
it out!

Solution for first 10 terms by specifying limit of 89:

// In this program we perform the same actions. We define the variables and // execute the
loop for the logic of our program application.

var limit = 89; // declaring limit
var sum = 0; // declaring sum
var left = 1; // first term of fib seq
var right = 2; // second term of fib seq

while (true) { // loop continuously
var sumLR = left + right; // adding two prev terms
left = right; // swapping values
if (right > limit) { // if goes over limit, break
break;
} else if ((right % 2) == 0) { // if even, add to sum
print(String(right) + “, “);
sum += right;
}
right = sumLR; // swap values for next iteration
}

// Finally we print the values on the screen for the users.
print(“\nThe sum is: ” + String(sum)); // display sum

Solution for problem with limit changed to four million:

// In this case of program, we simply change the limit that we are going to // apply. Rest of
the program remains same.

var limit = 4000000; // declaring limit
var sum = 0; // declaring sum
var left = 1; // first term of fib seq
var right = 2; // second term of fib seq
while (true) { // loop continuously
var sumLR = left + right; // adding two prev terms
left = right; // swapping values
if (right > limit) { // if goes over limit, break
break;
} else if ((right % 2) == 0) { // if even, add to sum
print(String(right) + “, “);
sum += right;
}
right = sumLR; // swap values for next iteration
}

// This now prints the final sum of the loop.
print(“\nThe sum is: ” + String(sum)); // display sum


Let’s check out another Project Euler problem and try to solve it in Swift programming
language.

Largest Prime Factor

The prime factors of 13195 are 5, 7, 13 and 29.

What is the largest prime factor of the number 600851475143?

Now in order to do this problem efficiently and under a minute, we must carefully
consider how we want to approach solving this problem. Since it is asking us to find the
largest prime factor for a really high digit number, it can cause long processing time for
the program to figure it out if our algorithm isn’t properly configured. That is why we
must think about this carefully.

I know that if I take a number like 100 and wanted to figure out the largest prime factor I
would do it by doing the following:

100 / 2 = 50
50 / 2 = 25
25 / 2 = Remainder
25 / 3 = Remainder
25 / 4 = Remainder
25 / 5 = 5
5 / 2 = Remainder
5 / 3 = Remainder
5 / 4 = Remainder
5 / 5 = 1

Therefore, the largest prime factor of 100 is 5.

Once my answer has reached one, I know that I have reached my greatest prime factor.
This is an efficient way of doing the algorithm because it means that I am not constantly
processing the large number that we are to find the prime factor of, but rather are
deducting its size as a number as we divide it until we find the largest prime factor of that
number. This makes sense because all we are doing is simply slowing reducing the
number as we change its ratio through division until we reach a certain point where we
can’t divide by anything other than 1 or itself, which is what a prime number’s definition
is.

So, how would we approach this problem programmatically in Swift programming
language? Well, the first thing we must do is again, create a loop, but right before it, create
a boolean that declares the MaxPrimeFound variable as false. Once we have this complete,
we are able to process a loop from 1 to the number’s variable itself. While we are
processing, we try dividing the variable being affected in the loop’s process by a factor of
2 for example, and checking whether or not it is a whole number. If it is a whole number,
we continue on. If it is not a whole number, we increment the dividing factor until we
reach a point where it divides evenly. If the number that it divides evenly is in to itself,
then we know we have indeed found the largest prime factor of the large digit number. We
simply repeat this process until it divides into itself and becomes 1. Good luck!

Solution using their example:

// We have defined a few variables again and similarly the program uses the
// Loop to work around with the logic.
var number = 13195;
var factor = 2;
var largestPrimeFactor = 0;
while (true) {
if ((number % factor) == 0) {
number /= factor;
} else {
factor++;
if (factor == number) {
largestPrimeFactor = number;
break;
}
}
}
print(“The largest prime factor is: ” + String(largestPrimeFactor));
Output: The largest prime factor is 29.
This is correct in the circumstance of 13915. Let’s figure out the problem’s solution
though.
Solution for the problem:
// We have now increased the number’s value to a very long value.

var number = 600851475143;
var factor = 2;
var largestPrimeFactor = 0;

while (true) {
if ((number % factor) == 0) {
number /= factor;
} else {
factor++;
if (factor == number) {
largestPrimeFactor = number;
break;
}
}
}
print(“The largest prime factor is: ” + String(largestPrimeFactor));
Output: The largest prime factor is 6857.
Chapter 12
Recommended Resources

The guide that is intended to teach you the iOS is just the beginning of the large universe
of Apple products and the iOS operating system. Xcode is also a great tool and you should
consider learning Xcode before you can get started programming an application for your
users. If you already have a grip on Xcode IDE, programming the application would be a
lot easier, as compared to, programming an application if you do not have enough
understanding of Xcode itself.

There are many features, applications, services and programs that are made available to
you, all free of cost. Once you have completed the guide, you should consider the
following steps to get started as an Apple developer.

1. Register yourself for a new Apple Developer Account. You can get help from
Apple resources.

2. Learn the Swift programming language: Swift is a new programming language
designed, architected, developed and distributed by Apple itself as a substitute for
Objective-C language. You can surely look for a good Swift language guide, or you
can read the Apple documentations and resources for Swift programming
language.

3. Learn the best design and development practices. You can use Apple
documentations for best design methods and best development designs and
patterns.

4. You should also get yourself familiar with the iOS features, frameworks and
services that are available to your applications.

These services and references will help you get most out of the IDE, Apple’s App Store,
iOS framework and the Simulators. Swift programming language is used for programming
the applications, learning the language to its core will also help you to get your work done
efficiently and will help you to manage if there is some problem in the application. That is
why it is recommended that you learn these frameworks and the language.

Once you have entered yourself as an Apple Developer. You will get a lot of services and
features supporting your development process. You will get the details and tools of any
incoming platform or feature in Apple systems. This way you will get a chance to test and
develop your applications on those frameworks before they are released to the audience.
This way you will be shown highlighted on those frameworks because new users would be
looking forward to new applications and services for their devices and machines. If you
write the applications for those frameworks before anyone else, your chances are to come
on the top of others as soon as possible and Apple may also feature your application if you
provide a good service and have a good rating by users! So, always consider using best
UX techniques and best UI designed for the applications.
Chapter 13
Final Words

This is the start of your journey as an iOS programmer. You have barely scratched the
surface with this guide as learning the syntax and conventions of a language and the
operating system details that iOS provides you, is just the beginning. The most important
part of programming and building the applications is the logical aspect of it. Sure, you
may know how to loop through an array of variables like a list of shopping items but if
someone asks you to process an image using your knowledge of programming, and with
the help of an API and some thinking, you can figure out how you are able to invert colors
of an image, flip it, rotate it, scale it, etc.

The real programming comes in the logical portion of the mind. It’s similar to when
you’re learning any other language, like English for example. You may understand the
grammar rules and the conventions like adding periods to the end of sentences, but to be
able to write clean and logical thought-out and structured essays is where the true skill
lies. The same concept applies to programming where the person writing the code, must
know how to apply his knowledge of the rules in the considered language, like Swift, and
use it to his advantage to come up with neat programs.

The knowledge and understanding of programming is truly great because it’s the closest
thing to having a power. You can literally create something out of an empty notepad, from
scratch and have it function to do things you want it to do. Whether it be a bot to analyze
the stock market and come up with predictions or creating a game. That choice is yours.

In this guide, you have learned the fundamentals of Swift programming language and iOS
framework with Xcode. You haven’t learned all the possible methods that can be used in
the language, but that isn’t the point. The point of this guide was to set you on a journey to
discover objects and methods that you need in order to help you to create programs that
you desire. You have been given the optimum knowledge to understand reading an API
and be able to understand what it is saying and adding to your code.

Good luck as a new-born iOS developer!

Eprogramy


PD: One more thing. Here in Eprogramy we want to give you a gift. If you enjoy IOS as
much as we do, you’ll probably love Java too. So In the next section you will find a
preview our “JAVA CRASH COURSE - The Ultimate Beginner’s Course to Learning
Java Programming in Under 12 Hours

I know you’ll love it!

You can find it on Amazon, under our name, Eprogramy, or by following this link:


http://www.amazon.com/Java-Ultimate-Beginners-Learning-Programming-
ebook/dp/B00Y96U1D2

Preview of JAVA CRASH COURSE - The Ultimate Beginner’s Course to
Learning Java Programming in Under 12 Hours

Introduction
Welcome to Your New Programming Language

So, you’ve decided to learn Java Programming? Well, congratulations and welcome to
your new Programming Language! You’re going to love it!

In Eprogramy we believe that the foundation of a good education is to provide the tools
able to open the doors of the future. It is indisputable that the world has entered an era in
which we all have everything at the fingertips. Social needs have changed. Thus, today
communication has changed. Communication opens doors, so it is our challenge to learn
how to communicate. In Eprogramy we want you to learn how to communicate with a
new language: The programming language. This language allows us to use our PC or
notebook to create.

Maybe the road is difficult and hard, but we will give the reader the tools to make learning
enjoyable and fruitful. We’ll show all aspects necessary to learn how to program. From the
installation of software to the solution of the most common programming problems and
much, much more. Always with the help of numerous examples that will contribute to a
better understanding

We know what we do and believe that you are fully capable of incorporating our
teachings.

The doors of the future are here. Let’s go step by step together.

Let´s get started!

Eprogramy Team

Chapter 1
Java Programing Language

History of Java

Java is a programming language that was first publicly available in 1995, created by James
Gosling from Sun Microsystems (Sun) in 1991. Sun Microsystems was then inherited by
Oracle, and is the corporation in charge of the programming language’s faith. Java then
became open source available under the GNU General Public License (GPL).

The language gets much of its syntax from C and C++ but isn’t as powerful because it
requires less for the user to do (less customization but more simple). Something like
garbage collection, the process of reducing memory being used from the program, is
automated in Java.

It was originally designed for interactive television but surpassed the technology and
design of the digital cable television industry at the time. There were five principles that
were used in the creation of the Java programming language:

1. It must be “simple, object-oriented and familiar”

2. It must be “robust and secure”

3. It must be “architecture-neutral and portable”

4. It must execute with “high performance”

5. It must be “interpreted, threaded, and dynamic”

Another important design goal to note is portability, which is was a key factor in Java’s
sudden popularity. The portability in this context means that the code written in the Java
platform can be executed in any combination of hardware and operating system.

Unfortunately, Java has a reputation for being a slower programming language (requiring
more memory) than other languages like C++ but as time went, Java 1.1 was introduced
and program execution times were significantly improved.

Java was built exclusively as an object-oriented programming language, which doesn’t
mean much right now, but it will later in the guide. Object-Oriented programming allows
for efficient, organized and powerful code to be created and will be seen throughout this
guide.

What is Java?

Java is a programming language that has multi-platform capability, meaning that you can
program Java for any type of device, whether it is an Android phone, a Windows
computer or an Apple product. Due to the flexibility of Java, it has made it one of the most
popular programming languages used through the globe by many programmers. Java can
be used to create web applications, games, windows applications, database systems,
Android apps and much more.

Java is different from other programming languages because of its simplicity and powerful
nature. That combination makes the Java programming language great to use. Java is a
simple programming language because it doesn’t expect too much from the user in terms
of memory management or dealing with a vast and complex hive of intricate classes
extending from each other. Although this doesn’t make much sense right now, it will make
sense when reaching the point of learning inheritance in Java.

A Java program is run through a Java Virtual Machine (JVM) and is essentially a software
implementation of an Operating System which is used as a way to execute Java programs.
The compiler (process of converting code into readable instructions for the computer)
analyzes the Java code and converts it in to byte code, allowing the computer to
understand the instructions issued by the programmer and execute them accordingly.

When downloading and installing Java, the distribution of the platform comes in two
ways; the Java Runtime Environment (JRE) and the Java Development Kit (JDK). The
JRE is essentially the Java Virtual Machine (JVM) where the Java programs will run on.
JDK on the other hand is a fully featured Software Development kit for Java which
includes the JRE, compilers, tools, etc.

A casual user wanting to run Java programs on their machine would only need to install
JRE as it contains the JVM which allows Java programs to be executed as explained
before. On the other hand, a Java programmer must download JDK in order to actually
program Java programs.

Chapter 2
Installation of Java

In order to install Java on to a machine, you must download the following:

1. IDE for Java Developers

2. Java JDK

The download of these two tools will put you on your way to becoming a Java
programmer. An IDE (integrated development environment) is a packaged application
program used by programmers because it contains necessary tools in order to process and
execute code. An IDE contains a code editor, a compiler, a debugger, and a graphical user
interface (GUI). There are many different type of IDE’s but the most commonly used ones
are:

1. Netbeans

2. Eclipse

In this guide, it would be recommended to use Eclipse because of its simplistic nature. In
order to download Eclipse, please use the following link:

https://eclipse.org/downloads/

Once you have reached this link, you will have to find this:


Then, select either the Windows 32 Bit OS or Windows 64 depending on the type of OS /
processor you have.

Once the IDE has been installed, we’ll move on to downloading and installing the JDK
which will allow us to interact with a coding editor in order to execute and create Java
code.

To download the JDK, go to the following link:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Upon entering this link, find this figure:


Once you’ve installed the JDK, you are able to launch Eclipse accordingly.

The folder that was extracted from the Eclipse download will contain an eclipse.exe that
can be launched. Once this has been launched, you will be met with the following figure:


All this prompt is asking for is where to set up the output directory for where all the code
written by you is going to be saved. Once this has been selected accordingly, click “OK”
to continue.

You should now be on this screen (or something similar):

Instructions:

1. Click File

2. Click New → Java Project


3. Type in a project name in the “Project name:” field

4. Click “Finish”

5. Now right click “src” → New → Class


6. Fill in the name field to anything with *letters* and no special characters.
Example: “ThisIsAClass”

7. Click Finish

8. You will now be presented with a screen that says:

public class ThisIsAClass {

}

You have successfully completed the installation of Java!

About the Author


Eprogramy Academy was created by a group of professionals from various areas of IT
with a single purpose: To provide knowledge in the 3.0 era.

Education is changing as well as social needs. Today, in the era of information, education
should provide the tools to create and to solve problems in a 3.0 world.

At Eprogramy we understand this and work to give people appropriate responses in this
context. Keeping this objective in mind, we offer a wide variety of courses to teach the
basics of many programming languages. We believe that anyone can learn a programming
language and apply the lessons in order to solve problems. In our academy we provide the
essential tools to allow everyone to incorporate into the daily life a set of solutions
obtained through programming.

Possibilities and solutions are endless.

In short, at Eprogramy we are committed to help everybody to decodify the messages of
the future.

You might also like