Sign in

Tweeting tips and tricks about #swift #xcode #apple Twitter @batikansosun Weekly Swift Blogging
Google Images

As you know, Apple has introduced a biometric authentication system TouchID in iOS 7 and iPhone 5S.

The authentication system allows users to unlock the device, and make the purchases in the AppStore/iTunes/others.

In iOS 8, Apple has allowed developers to use the fingerprint sensor authentication mechanism in their applications for identified their users.

The authentication system named TouchID has been used with the iPhone home button till the iPhone X production. And then on the 12th of Sep, 2017, Apple introduced a new flagship phone and this is iPhone X.

With iPhone X the authentication system named FaceID has…


Make some work easier by higher-order functions.

Photo by Ben Kolde on Unsplash

I share programming guides that make programmer’s practices simple.

In this guide, I’m going to explain Swift’s higher-order functions with examples as much as I can.

Sometimes it’s hard to understand what you’re doing with these. So I will explain in general terms and then give a few examples.

In mathematics and computer science, a higher-order function is a function that does at least one of the following: takes one or more functions as arguments (i.e. procedural parameters), returns a function as its result. — Wikipedia

Another definition in swift terms (like a…


Availability checking in Swift

In some cases, we need the negative of any conditions. At this point, if I describe that case as a basic instance;

if #available(iOS 13, *) {} else {
someOldStuff()
}

In this specific case, we don’t want that. The positive case is unnecessary and impairs code readability.

Swift’s new feature: Unavailability Condition

if #unavailable(iOS 13, *) {
someOldStuff()
}

Take a look at the negative availability.

https://github.com/apple/swift-evolution/blob/main/proposals/0290-negative-availability.md


Easily clean up the unused images and resources in your Xcode project

Photo by Neal E. Johnson on Unsplash

Images that are not used in our projects can sometimes be annoying. One of the biggest results of this is that it increases the size of the application.

On the contrary, when we remove unused images or if they are left, the project is reduced and the application size decreases. It also prevents image clutter.

To solve this problem, I will share with you two methods below and explain one of them with examples.

LSUnusedResources did not consider it worthy to explain since this is no longer maintained.

I will focus on FengNiao and explain its details.

Cleaning Up Unused Images With FengNiao

FengNiao…


Photo by Karen Vardazaryan on Unsplash

In this iOS guide, I am going to explain collection types that are Arrays and Sets and I am going to reinforce them with short examples.

  1. Array
  2. Set

Arrays and Sets have several features in common. They both store a collection of values of the same type. The most important difference between them;

A Set is unordered, and each element can only appear once in a set. While an Array can contain duplicate elements, each value contained in a set is unique.

Array

The Ways of Initialization of arrays.


What are Swift Literals and how do they work?

Photo by Joshua Reddekopp on Unsplash

In this iOS guide, I am going to explain Swift literals, and I am going to reinforce the following topics by giving examples in order.

  • What are the Swift literals?
  • How do they work?
  • Standard literals
  • Literal initialization for custom types

What Are the Swift Literals?

Literals are digits of characters that describe constant values to be stored in properties. Literals are used to initialize or assign value to variables or constants.

How Do They Work?

In the Swift standard library, type aliases of primitive types are created. …


Google Images

Github introduced Github Action last year. I was very excited when I heard this news, it makes some differences for all processes. The main reason for my excitement is all CI/CD works on one platform.

Yay!
A long time I am waiting for now and we will experience that together.

Let’s begin the explain Github Actions.

GitHub Actions is an API for cause and effect on GitHub: orchestrate any workflow, based on any event, while GitHub manages the execution, provides rich feedback and secures every step along the way.

With GitHub Actions, workflows and steps are just code in a…


Photo by Nicole Wolf on Unsplash

I picked this photo to give you more inspiration as we worked at home on quarantine days.

Swift tuple is a container to keep multiple data values. Use tuples to combine values. A tuple can contain Int, String, Double, Float, or Struct.

When you create a tuple you can not add or remove items from a tuple because they are fixed in size. You can not change the data type of items in a tuple because they always have the same data types they were created with.

Tuple most commonly used in function for returning multiple values or defined a…


I recently asked myself, “How can I shorten the development time” since some projects have been delayed.

Imagine that you are developing a project and assume it consists of 50 screen classes. You repeatedly write down the codes, methods, and functions that should be for each screen class, which is quite annoying and time-consuming.

I want that when I create a screen class with any design architecture, all the sub-structures related to this screen class are created automatically.

For example; When I create the Movie List screen using the MVVM architecture, the service methods, view models, service models, views, protocols…


iOS 13 has come with many innovations. Some of them are quite surprising. We can say that Apple strives to protect user data and at the same time it succeeds with these innovations.

At WWDC 2019, Apple introduces a simple, fast, easy way to sign in to apps. And web pages are also included.

This named as Sign In with Apple help us to set up a user account in our application with name, verified email address(important point), and unique identifiers that allow the user to sign in to your app with their Apple ID.

Once a user sets up…

Batikan

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