Asynchronous iOS Testing in Swift with XCWaiter

Automation, iOSDev
Apple recently announced Swift 3.1 development snapshot  and XCode 8.3 for the developers. There are couple of handy classes added to the XCTest framework to enable Asynchronous Testing for iOS and macOS applications. In this post, we will see how we can perform asynchronous testing using XCWaiter. Swift 3.1-Dev Newly added classes are available in Xcode 8.3 which is currently available for the download if you have Apple Developer Account. You can get it from the Downloads section of the developer account. Xcode 8.3 needs macOS version 10.12 and above. You can download compressed XIP file which is around 4.52 GB.  If you already have previous version of the Xcode then remove it or you can keep it but you have to switch between Xcode DEVLOPER_DIR. Once downloaded you can extract the file to install…
Read More

Swift Dependency Management for iOS

iOSDev
Dependency/Package Manager Most modern languages come with an official solution for code distribution. In today's world of modern mobile development, it is essential to re-use the code already written by developers. Code reuse can be achieved by creating and distributing the packages from central repository. A package manager is a tool that simplifies the process of working with code from multiple sources. Typical Package Manager should have ability to do following things Centralised hosting of packages and source code with public server with access to developers or contributors Download the source code at the run time, so that we don't need to include it in the repository. Link the source code to our working repository by including source files. Allow packages to be versioned The examples of popular package managers are RubyGems for Ruby , Composer for…
Read More

Pros and Cons of using Xcode Server for iOS Continuous Integration

Automation, DevOps, iOSDev
Continuous Integration a.k.a. CI is an integral part of iOS development process which gives early feedback when something breaks during application development. In an agile application development, producing working app is not only writing good code but also setting up infrastructure to deliver it continuously. The process of Continuous Integration and automating the build can help to achieve continuous delivery.  There are various continuous integration tools available in the market which can be used in the iOS team. The CI server solution can be self hosted or cloud. You can get whole list of CI servers here with recommendations. In the iOS development we have few challenging options while selecting self hosted CI server Xcode Server Jenkins TeamCity If you are looking for cloud solutions then there are some promising services like…
Read More
Adding Homebrew Support to XCFit Framework

Adding Homebrew Support to XCFit Framework

Automation, BDD, iOSDev
Glad to announce that XCFit is available to download from Homebrew package manager. XCFit  a.k.a (XCUI, Cucumberish and Fitnesse Integrations Tests) is a full stack Xcode BDD framework for Swift iOS apps. XCFit creates automated Xcode templates which helps us to setup BDD style tests within Xcode. You can read more about XCFit on my previous post or articles published on DZone here . Homebrew Just in case, if you have not heard of Homebrew, it's package manager fro macOS. We can install almost everything using Homebrew including macOS free apps. Homebrew can be installed on any macOS using a command. [crayon-58a9854f04250603166988/] Now that, we are ready to use Homebrew. We can install package as core Homebrew or using HomeBrew caskroom like this [crayon-58a9854f0425e852038527/] e.g We can install 'Google Chrome" using following command. [crayon-58a9854f04266227196715/] Now , we will see how to…
Read More
Apple Swift Package Manager : A Deep Dive

Apple Swift Package Manager : A Deep Dive

Automation, DevOps, iOSDev
Apple has released it's own package manager called 'Swift Package Manager' to share and distribute Swift packages. It's good to know that Apple is working on replacement of the current loved and hated package managers in the iOS development world those are CocoaPods and Carthage. In this article, we will cover basics of package management & deep dive into package management in iOS especially Swift Package Manager. Current iOS Package Managers Most modern languages come with an official solution for code distribution e.g RubyGems for Ruby,  Composer for PHP , NPM for NodeJS. In the iOS development world, developers has to rely on third party dependency management tools like CocoaPods and Carthage. The package managers in iOS has a additional job of building the code on top of downloading. Package manager should able to download as…
Read More
XCFit 2.0 Released : Full Stack BDD in Xcode + Page Object + Swift Package Manager

XCFit 2.0 Released : Full Stack BDD in Xcode + Page Object + Swift Package Manager

Automation, iOSDev
XCFit 2.0 Glad to announce new version of XCFit with brand new features. You can find release notes on Github here. If you are new to XCFit then XCFit a.k.a (XCUI, Cucumberish and Fitnesse Integrations Tests) is a full stack Xcode BDD framework for Swift iOS and macOS apps. XCFit allows us to write API level, UI and Acceptance Tests with Swift in human readable language using tools like Cucumber and Fitnesse in Xcode. We can still use Apple's brand new UI Testing framework (XCUI) under the hood of Cucumberish. XCFit is fully automated solution for Cucumberish and Fitnesse. You can use 80(Fitnesse):20(Cucumberish) formula to automate Acceptance and UI Testing for better coverage and faster feedback. XCFit is available on RubyGem,  CocoaPods and Swift Package Manager. XCFit 2.0 has just released ! XCFit 2.0 New Features Improved Xcode Templates with support of Page…
Read More

Swift 3 : Basic concepts with Xcode 8

Automation, iOSDev
Swift3 at WWDC Apple has announced Swift3 on WWDC [2016] this year. It's amazing that Swift can be used on Linux and lots of third party companies working on server side swift. First couple of releases of Swift has gone though major changes in the Swift but Apple has promised that Swift 3 will be stale release and can be adopted by companies without any fear. Apple has also provided migrator for the Swift2 to Swift3 which makes migration easy.  In this tutorial, we will learn basics of Swift announced at the WWDC 'Getting Started with Swift" talk. I would strongly recommend watching this talk. Let's look at what's new in the swift with basic concepts. Please note this isn't tutorial to learn all Swift but to get brief overview…
Read More

Integrating Fitnesse iOS Acceptance Test with XCTest using Xcode8

Automation, iOSDev
Fitnesse for iOS Recently Fitnesse has entered in the world of iOS development. An OCSlimProject has enabled an ATDD and BDD practices in iOS development world. This project enabled us writing and blazing fast acceptance test with Fitnesse for iOS. Thanks to Paul Stringer and other contributors.  You can read more about what are the problems that Fitnesse can solve in article 'Acceptance Testing for iOS' by Paul Stringer. As of now Fitnesse acceptance for iOS running in the separate process and reports are generated by different mechanism which wasn't feel like Fitnesse is actually part of the development and CI workflow. The good news is latest release of the OCSlim project has integrated Fitnesse test reports along with XCTest framework which means we can execute Fitnesse tests along with Unit tests…
Read More

Building packages with Swift Package Manager and Docker without Xcode

Automation, iOSDev
Swift Package Manager Apple has recently open-sourced Swift and announced it's own package management tool called "Swift Package Manager". Swift has became cross platform and can be built on both macOS and Linux so Swift Package Manager can be Dependency Manager Build Tool Test Tool IBM is currently working hard to provide centralised repository for hosting those package and creating server side frameworks. The best place to learn about all the recent activity is 'swift.org'.  In this tutorial, we will create a Swift package on using Docker. Swift Package and Docker As Swift became server side, we can build it on the docker containers. In this short tutorial we will use IBM Swift3 Ubuntu Docker image to build a simple package. Let's create a directory called 'SwiftPM-Docker' and create a…
Read More

BDD with Xcode 8, Swift 3, Cucumberish and XCFit on macOS Sierra

Automation, BDD, iOSDev
macOS Sierra, Xcode 8 and Swift3 Apple has just released macOS Sierra public beta in the UK and we couldn't wait to see new features of macOS Sierra and Xcode 8. macOS Sierra brings Siri to MacBook Pro with lots of performance improvements but I was keen to try features of the Xcode8 and Swift3 with my recent pet-project XCFit: Full Stack BDD framework for iOS and macOS Apps. I am very impressed with enhancements in the 'xcodebuild'. In this post I will step by step guide to setup BDD for iOS10/macOS Sierra project using XCFit, Cucumberish, Xcode 8 and Swift3.   XCFit on Xcode8 and Swift3 XCFit is a full stack BDD framework for the iOS and macOS applications. You can read article on mobile DZone to know more about it.…
Read More