Course: Defensive Programming in iOS

$204.49 incl. vat


duration: 12 hours |

Language: English (US) |

access duration: 90 days |

In Onbeperkt Leren


In this iOStraining course you will learn the basics to secure the code that is needed to develop iOS applications.

You will learn more about the input applications, testing, error handling, exeptions, network interaction and how to protect data in iOS apps.

Among subjects that covered are Objective-C, Swift, UIWebView, TCP, CF functions, NSURLConnection, XCTestCase, MD5, SHA, RNCryptor libary and far more.


After completing this course you will be familiar with defensive programming for iOS applications.


We recommend basic knowledge of programming iOS applications.

Target audience

Software Developer


Defensive Programming in iOS

12 hours

Thinking Defensively about Functions, Methods, and Input

  • start the course
  • create code that handles file inputs to an iOS app
  • create code that handles url scheme inputs to an iOS app
  • validate user-provided input using Objective-C
  • use a real-time approach to validating user-provided input in Objective-C
  • use secure coding principles to guard against format string attacks
  • restrict free navigation around the Web based on user input in a UIWebView
  • use best practices to name functions and methods in Objective-C
  • use best practices to name accessor methods in Objective-C
  • use best practices to name delegate methods in Objective-C
  • reduce method complexity in iOS apps using Objective-C
  • overload a function to reduce code complexity in Swift
  • design functions that have a single and defined focus
  • identify and use different class naming standards in Objective-C
  • create and use constants in Objective-C
  • create and use constants in Swift
  • create and use resource files in an iOS app
  • easily store and retrieve data from the defaults database
  • recognize how using brackets can protect against potential bugs
  • design while loops that are not vulnerable to running forever
  • design for loops that are not vulnerable to running forever
  • identify and avoid bugs caused by altered loop variables
  • handle various types of inputs to an iOS app

Managing Network Interaction

  • start the course
  • create a TCP client connection from an iOS app
  • send and receive data over a TCP connection in an iOS app
  • determine when an iOS app can and cannot access the Internet
  • determine when an iOS app can and cannot reach a specific IP address
  • determine when an iOS app can and cannot access the Internet
  • install and configure the network link conditioner to be able to test iOS apps in different connection conditions
  • use CF functions to encode URLs
  • use CF functions to decode URLs
  • use NSURLConnection to make synchronous and asynchronous network calls
  • use NSURLConnection to make asynchronous network calls without using custom delegates
  • create and apply a configuration object to an NSURLSession instance
  • request a URL in a simple manner using NSURLSession and system delegates
  • request a URL in a flexible manner using NSURLSession and custom delegates
  • stop script execution in any HTML loaded into a WebView
  • disallow Internet traffic over cellular connections in an iOS app
  • capture and handle redirect responses from a server
  • use NSURLSession to reliably download and save files in an iOS app
  • use NSURLSession to handle users stopping and starting download operations
  • use NSURLSession to handle downloads that fail
  • use NSURLSession to upload files to a web server
  • use common techniques for managing network interaction

Errors, Exceptions, and Testing

  • start the course
  • use error information returned indirectly from methods
  • test for specific kinds of errors based on domains and codes
  • create and return error objects from custom methods
  • use alert views to inform end users of error information
  • use an underlying error object to find out more detail about an error that has occurred
  • create and throw/raise exceptions in iOS apps
  • catch and handle exceptions in iOS apps
  • use the @finally directive to guarantee code execution
  • convert a raised exception to an error when appropriate
  • capture and handle specific types of exceptions locally
  • create an XCTestCase Class using Xcode and Objective-C
  • create an XCTestCase Class using Xcode and Swift
  • create, execute, and check results of unit tests using Xcode and Objective-C
  • creating and executing unit tests in Swift
  • unit test private methods in custom classes
  • how to create tests that measure execution time of code
  • create and execute asynchronous tests
  • recognize how to initiate the creation of an automated test of an iOS app
  • access interface elements by navigating the element hierarchy
  • use accessibility labels to interact with iOS app elements when automation testing
  • select and tap interface elements in automation testing
  • define pass and fail benchmarks for automation testing
  • use the logElementTree method to understand an app's view hierarchy
  • import previously created automation scripts for reuse
  • create assertions using NSAssert
  • create assertions using the assert function
  • create assertions in Swift
  • work with creating and managing errors and exceptions

Protecting Data in iOS Apps

  • start the course
  • obscure sensitive data from plain sight in an iOS app interface
  • use alert view styles to collect sensitive user data
  • obscure sensitive data when using alert controllers
  • use Touch ID authentication in iOS apps on supported devices
  • recognize how to write text data to files while reducing the risk of data corruption
  • recognize how to write binary data to files while reducing the risk of data corruption
  • use built-in hardware encryption to store text files securely on disk
  • use built-in hardware encryption to store binary files securely on disk
  • register for notifications and delegate methods that indicate when protected files change status
  • create and access protected files while an iOS device is in the background
  • securely store sensitive data using the iOS keychain
  • search and retrieve sensitive data from the iOS keychain
  • update sensitive data stored in the iOS keychain
  • remove sensitive data stored in the iOS keychain
  • define when keychain items are accessible depending on the lock status of an iOS device
  • use the Randomization Services API to generate random numbers
  • create an MD5 hash using the Common Crypto library
  • create an SHA hash using the Common Crypto library
  • use the RNCryptor library to encrypt and decrypt data in an iOS app
  • use the Certificate, Key, and Trust functions to generate an asymmetric key pair
  • use the public key of an asymmetric key pair to encrypt data
  • use the private key of an asymmetric key pair to decrypt data
  • create and manage iOS keychain items

Course options

We offer several optional training products to enhance your learning experience. If you are planning to use our training course in preperation for an official exam then whe highly recommend using these optional training products to ensure an optimal learning experience. Sometimes there is only a practice exam or/and practice lab available.

Optional practice exam (trial exam)

To supplement this training course you may add a special practice exam. This practice exam comprises a number of trial exams which are very similar to the real exam, both in terms of form and content. This is the ultimate way to test whether you are ready for the exam. 

Optional practice lab

To supplement this training course you may add a special practice lab. You perform the tasks on real hardware and/or software applicable to your Lab. The labs are fully hosted in our cloud. The only thing you need to use our practice labs is a web browser. In the LiveLab environment you will find exercises which you can start immediatelyThe lab enviromentconsist of complete networks containing for example, clients, servers,etc. This is the ultimate way to gain extensive hands-on experience. 


Via ons opleidingsconcept bespaar je tot 80% op trainingen

Start met leren wanneer je wilt. Je bepaalt zelf het gewenste tempo

Spar met medecursisten en profileer je als autoriteit in je vakgebied.

Ontvang na succesvolle afronding van je cursus het officiële certificaat van deelname van

Krijg inzicht in uitgebreide voortgangsinformatie van jezelf of je medewerkers

Kennis opdoen met interactieve e-learning en uitgebreide praktijkopdrachten door gecertificeerde docenten


Once we have processed your order and payment, we will give you access to your courses. If you still have any questions about our ordering process, please refer to the button below.

read more about the order process

What is included?

Certificate of participation Yes
Monitor Progress Yes
Award Winning E-learning Yes
Mobile ready Yes
Sharing knowledge Unlimited access to our IT professionals community
Study advice Our consultants are here for you to advice about your study career and options
Study materials Certified teachers with in depth knowledge about the subject.
Service World's best service


Na bestelling van je training krijg je toegang tot ons innovatieve leerplatform. Hier vind je al je gekochte (of gevolgde) trainingen, kan je eventueel cursisten aanmaken en krijg je toegang tot uitgebreide voortgangsinformatie.

Life Long Learning

Follow multiple courses? Read more about our Life Long Learning concept

read more

Contact us

Need training advise? Contact us!