1) Install Xcode extensions

a. nef extension

  • nef extension is useful for exporting snippets from your code selection to an image or clipboard right from Xcode.
  • The installation guide will be available on https://github.com/bow-swift/nef-plugin

b. Alignment for Xcode

  • Go the App Store and search for the search for the Alignment for Xcode extension.
  • The Xcode source editor extension will align your…

Swift Collections — Deque | OrderedSet | OrderedDictionary
  • Swift Collections, a new open-source package focused on extending the set of available Swift data structures.
  • The package currently provides the implementations of the most frequently requested data structures: Deque, OrderedSet, and OrderedDictionary.

1) Deque

  • Deques (pronounced “deck”), short for double-ended queues, are similar to Array, but support efficient insertions and removals…

It’s a beautiful spring morning for an AppleEvent — Spring Loaded

On Tuesday, April 20, Apple ended their first event of 2021 by streaming a virtual keynote called “Spring Loaded” held at its campus in Cupertino, California.

During the event, Apple unveiled a new podcast subscription service and a bunch of new hardware products including the much-awaited AirTags, the Bluetooth tracker.

Sorting on collection is very easy for single criteria. Swift already has a built-in function for that called sorted (Its in-place variant, called sort). But, sometimes we need to sort the collection by multiple properties or criteria.

To understand this, let’s create a simple struct for Student with the roll…

In Swift (or most of the programming language), the default method for sorting an array uses lexicographic order. That means string Foo12 does come before the string Foo2.

Example 1 (Lexical Sort):

Lexical Sorting

In most cases, we perform lexical sorting on our array. But there might be a scenario where we need to use natural…

Swift — OptionSet Type

In this article, we will learn what is OptionSet in Swift and how to create your own custom OptionSet.

What is OptionSet?

  • In Swift, OptionSet is a protocol to represent bitset types, where individual bits represent members of a set.
  • OptionSet is similar to enum, but they are designed to work as a…

Photo by Emile Guillemot on Unsplash

What is Swift Package Manager (aka SwiftPM or SPM)?

  • The SwiftPM is a tool for managing the distribution of Swift code just like CocoaPods and Carthage.
  • It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
  • The SwiftPM is included in Swift 3.0 and above enables us to manage Swift dependencies.
  • With…

Recently, I have updated my Xcode to the latest version (Version 12.2 (12B45b), and my project running fine for real devices. But when I try to run on iOS Simulator I am getting the following error.

building for iOS Simulator, but linking in object file built for iOS, file for…

Migrate your Swift project from CocoaPods to SPM
  • We’re using Cocoapods for several years, but Swift Package Manager (SPM) is new standard dependency manager which included in Swift 3.0 and above. If you are the one who wants to adopt SwiftPM in your swift project, this is how to do it right.
  • Before removing CocoaPods from your project…

While developing mobile apps that require internet connectivity, it's significant to handle poor network conditions. Because mobile app users will likely to have a much slower network than we use while developing.

As a developer, you didn’t want to throw away your invaluable time looking for a location with a…

Milan Panchal

iOS Team Lead — Mobile App Developer ǁ Swift ǁ Objective-C ǁ Lifelong Learner ǁ Blogger https://milanpanchal.github.io/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store