Viewing: ios

Assertions supported in XCTest

Here you can find the list of Assertions supported by XCTest and it is essential to know all these assertion if you are practicing Test Driven Development in IOS. You can get this list from XCTestAssertions.h XCTFail(<#format...#>) - This unconditionally fails the test. XCTAssertNil(<#a1#>, <#format...#>) - Failure message when object is not nil. XCTAssertNotNil(<#a1#>, <#format...#>) […] Read More

iOS Swift – Firebase Demo

Firebase is a platform that allows web and mobile application to store data in cloud. In this article, we will see an example app written in Swift that uses Firebase for storing and retrieving data in real time. The source code for this demo is available under GitHub.This demo app consists of three fields for […] Read More

Swift – Beginners Tutorial

Swift is the latest programming language released by Apple for developing OS X and iOS apps. Best of C and Objective-C Adopts safe programming patterns and modern features Supports Playground, a tool for seeing the result immediately. Provides access to Cocoa libraries and can work in conjunction with Objective-C Combines Procedural and Object-Oriented programming. No […] Read More

Optional binding and Optional Chaining

Swift has a feature that lets users to assign optional value to a variable or a constant. Optional variable or constant can contain a value or a nil value. Let us take the following example which tries to find a given string in a array of string.The searchIndex would return value if the fruit exists […] Read More

How to display line numbers in Xcode

Listed below are the steps to display line number in Xcode editor window. This is quite useful when you are working in a ground and want to communicate the line number of statement to other members. Click Xcode menu option and select Preferences from the menu list In the Preferences window, click Text Editing tab. […] Read More

SplitViewController example in Swift

This is a beginners tutorial on SplitViewController using Interface builder with programming language as Swift. There are also some good articles available on SplitViewController, check them out as well - nhipster and whoisryannystrom. Create a new Single View Application. Choose Language option as Swift and provide a product name. Navigate to Main.Storyboard and select default […] Read More

Swift Interview Questions

Listed below are some of topics to be familiar before attending an iOS//Swift interviews. These are very trivial questions but in future this space will updated with more scenario based questionsWhat are the different app states?What is JSON?What do you mean by REST?Difference between class and struct?What are Optionals?Difference between Optional Chaining and Optional Binding?why do we […] Read More

Debugging Swift App in Xcode

Any beginner iOS developer should be aware of the NSLog statement. This is quite frequently used to debug Objective-C programs. In Swift you can use println or print statement instead of NSLog to write the debug information to the console log. This will write the following message in the console log.input number is 5But debugging a […] Read More

Remove Apple Mach-O Linker directory not found

Listed below are the steps to remove Apple Mach-O linker warning directory not found warning message. 1. Navigate to Project Navigator, select the Project then navigate to Build Settings. 2. Under Build Settings, scroll down to Search Paths and double click on Library Search Paths. 3. Select the missing folder paths and remove them using […] Read More

Integrating Stripe in Swift for iOS development

Stripe is payment gateway that can be integrated with any website and mobile apps. In this tutorial we will see a quick and simple integration of Stripe in Swift for iOS development using Stripe documentation for iOS.This hands on tutorial will help you to familiarise yourself in Validating and creating token using Stripe IOS SDK […] Read More

1 2 4