Category: ios

  • 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 questions What are the different app states? What is JSON? What do you mean by REST? Difference between class and struct? What are Optionals? Difference between…

  • 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. [code language=”swift”]var primeFlag:Bool = true println("input number is \(number)") if ((number == 2) ||…

  • Test Driven Development in Swift

    Here is a beginner tutorial on TDD in Swift by writing a program that checks for a prime number. Let us start by creating a new project, selecting template as Single View Application. Though we won’t be adding anything to the storyboard as we will focus only on the business logic. After creating the project,…

  • Enum in Swift

    Enum group of related values to a single data type. Swift enum has lot of new features compared to its predecessor Objective-C. Let us see this with an example enum type for all Months in a year. enum Months { case January, February, March, April, May, June, July, August, September, October, November, December }  …

  • Tuples in Swift

    Tuples in Swift allows user to assign group of values to a variable, constant and even return parameter of a function. In the below example, a employee constant is assigned Int and String values. And to access these parameters, we need to use .0 and .1 let employee = (103, “Deepak”) employee.0 employee.1 Now let…

  • 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…

  • 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…

  • Quotes app – Simple page based application in Swift

    This is a very basic tutorial on how to create a simple page based app in Swift. We are going to use Page Based Application project template for displaying quotes in different pages.   Create Page-Based Application in Swift Click Xcode File menu, navigate to New and select Project from sub menu list. Select Page-Based…