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

You can generate notifications locally from your app or remotely from a server that you manage. For local notifications, the app creates the notification content and specifies a condition, like a time or location, that triggers the delivery of the notification.

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

A dispatch group is a mechanism for monitoring a set of blocks. Your application can monitor the blocks in the group synchronously or asynchronously depending on your needs. By extension, a group can be useful for synchronizing for code that depends on the completion of other tasks.

Note…


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.

An ordered, random-access collection.

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?

You use arrays to organize your app’s data. Specifically, you use the Array type to hold elements of…


Network

Protocol oriented and clean way of internet connectivity control

The main idea of this example is the adapt the basic to swifts protocol-oriented strategy.

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

Parameter: status → is a type of Reachability. Connection enum

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

Types adopting the `URLRequestConvertible` protocol can be used to safely construct `URLRequest`s.

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