Photo by Jamie Street on Unsplash

Difference between Local and Push Notification

There are two types of notifications in iOS Framework. Remote notifications (commonly called push notifications) are sent from a server or remote. Local Notifications as we are going to talk about in this blog is handled by UserNotificationsFramework.Let’s look at the documentation

Let’s imagine we are making a treasure hunt mobile game.User …


Photo by Bundo Kim on Unsplash

What is SwiftLint?

SwiftLint is a tool to enforce Swift style and conventions. Keeping the codebase clean and compliant is a really difficult task, especially when working as a team. Every developer has their own rules and conventions when writing code. Because of that, we need tools to continuously maintain and fix codebase style and conventions based on GitHub’s Swift Style Guide.

In this tutorial, I will show the installation and usage of SwiftLint on Xcode.

1-Installation

You can either install SwiftLint to your iOS Project as Cocoapod framework or install your mac locally. It’s your choice.

Using Homebrew:

Simply open terminal and copy:


Photo by Jack Anstey on Unsplash

Grand Central Dispatch is one of those fundamental technologies all ios developers at least used one time of their lifetime. It’s basically scheduling and working tasks different queues and threads.

DispatchQueue.main.async { 
// Run async code on the main queue
}

We going to compare the common Foundation API’s DispatchSemaphore and DispatchGroup.

1. Dispatch


Today we are covering a simplified topic Array Operations. To start with, we should know what an array is.

Array

According to documentation, arrays identified by the sentence below.

What does it mean? Let’s look at the definition

An ordered

This means that according to a specific rule, the element or elements exist even randomly sequent.

Random Access

You can access any index of an element without moving sequentially, no matter how many items may be in the array.

Why the use of Arrays?


Network

Protocol oriented and clean way of internet connectivity control

Let’s implement our first pod Reachability

Reachability

Reachability.swift is a replacement for Apple’s Reachability sample, re-written in Swift with closures. Here.

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'ReachabilitySwift'

After implemented the pod run this code in terminal

pod install
  1. First of all, we create our first file Reachable.swift.This file contains a protocol named Reachable

2. Then…


The summarized, common, organized way of networking

Let’s implement our first pod Alamofire

Alamofire

Alamofire is an HTTP networking library written in Swift.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'Alamofire', '~> 5.2'

After implemented the pod run this code in terminal

pod install
  1. Then we create a new file named APIConfiguration.swift

This protocol inherits URLRequestConvertible

Basically building the foundation of Requests and manipulate the process by our selves. There are 3 variables in the protocol

APIConfiguration.swift

1.1…

Batuhan Gobekli

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