Category: Xcode

  • Errors were encountered while preparing your device

    One of the common error that occurs in Xcode is “Error were encounted while preparing your device for development. Please check the Devices and Simulators Window.” I have noticed this error after Mac OS update or Xcode app update Trying the following Restart your device, Close Xcode and try re-running the Xcode project. Sometimes after…

  • iPhone is not available error message in Xcode

    If you are receiving an error “iPhone is not available” when connecting Xcode with iPhone then check iOS version on your iPhone. Make sure it is compatible with the Xcode version. The conflict in versions can be found under the Xcode – Window – Devices and Simulators. In my case the following error was mentioned.…

  • Tab Bar Controller with WebView

    In this article, we will see step by step instruction on working of Tab Bar Controller, UIWebView and Activity Indicator by loading couple of web pages using UIWebView in two different Tabs. Tab Bar Controller Tab Bar Controller is used for organising list of View Controllers by having separate tabs for each View Controller. Check…

  • CoreData tutorial in Swift 5 using NSFetchedResultsController

    Let us see an example TaskManager app using CoreData written in Swift Programming language. This app provides the following functionality Allow users to enter new task Update existing task delete task You can download source code for this project from Github. If you are familiar with user interface then move on to the Core Data…

  • Storyboard, Scene and Segue

    Storyboard in iOS is helps you to design the user interface of your App. A storyboard can contain one or more Scenes (View Controllers) and the connection or relationship between two scenes are known as Segue. This is how a typical storyboard with Scenes and Segue look. The above example storyboard contains two scenes, first…

  • Get your current address in Swift (Swift 5)

    In this Swift tutorial, we will see the steps required for using CoreLocation framework and retrieve the latitude and longitude of the location. Then use the CLGeocoder to reverse geocode the latitude and longitude details. This is a very basic tutorial that retrieves the location details on tap of a button and displays the information…

  • Swift – WebView demo

    Updated for Swift 5In this short tutorial, we will see an example in Swift programming language using UIWebView. The WebView will load a webpage and provide option to refresh, stop, go back and go forward. This tutorial should give a brief overview on how to declare IBAction, IBOutlets and use Objective-C classes (NSURL and NSURLRequest)…

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