Fatal error: unexpectedly found nil while unwrapping an Optional value

fatal error: unexpectedly found nil while unwrapping an Optional value This error is caused by unconditionally unwrapping an optional  which had nil. Optional is a type in swift which can either contain a value or no value nil. When a optional variable or constant which contains nil is forced unwrapped… Read more »

Add Custom Font in iOS Application Xcode 9

      No Comments on Add Custom Font in iOS Application Xcode 9

Adding custom font of your choice or of your business theme, in your iOS app is quite important. Custom fonts can enrich your app and transform it from just and app to an awesome app. Adding custom font in iOS application is a step by step process. In this article… Read more »

Swift: Split a String into an array

      No Comments on Swift: Split a String into an array

In Objective-c we used componentsSeparatedByString NSString *stringToSplit=@”str0,str1,str2,str3,str4,str5″; NSArray *arrayFromString = [str componentsSeparatedByString:@”,”]; In swift we can split a string into array simply by calling split() method var stringToSplit = “str0,str1,str2,str3,str4,str5” let arrayFromString = stringToSplit.split(separator: “,”) Less code.. 🙂

How to Disable ARC for files in a project? Xcode

      No Comments on How to Disable ARC for files in a project? Xcode

ARC can be disabled for a single or group of files in a project. Adding -fno-objc-arc  compiler flag for the selected files in Target->Build Phases -> Compile Sources disables ARC for those files. You can do it in simple two steps Go to Target – > Build Phases-> Compile Sources Select… Read more »

xcrun: error: active developer path does not exist

      No Comments on xcrun: error: active developer path does not exist

If while using git or brew commands you get  “xcrun: error: active developer path (“/Applications/Xcode.app/Contents/Developer”) does not exist” it means that xcode command line tool is not being found. Happens usually after updating Xcode or removing it. usually one of the two commands given below resolves it sudo xcode-select –… Read more »

Perform Wireless Debugging in Xcode 9 with iOS 11

      No Comments on Perform Wireless Debugging in Xcode 9 with iOS 11

Xcode 9 make you free with wireless debugging.No more tied to cable. In order to connect your device for wireless debugging you need to perform following steps Open Devices and Simulators window Connect your device normally with lightening cable Select the device which you want to connect from Devices tab… Read more »

Transport security has blocked a cleartext HTTP

      No Comments on Transport security has blocked a cleartext HTTP

App Transport Security ATS encourages developers to use HTTPS over HTTP and thus any HTTP request is blocked. You can still workaround this security feature during development. But remember its strictly a workaround and should not be carried over to production as it will leave you app vulnerable Workaround for… Read more »