Implementing Apple Sign-In to an iOS App

Introduction The Apple Sign-In feature is very helpful and offers users login functionality with one click. It could be highly beneficial from a business perspective to attract more potential customers by providing easy and secure access to application functionality. In this article, I will focus on how to implement Apple Sign-In. Before implementation, let鈥檚 set up the necessary options to be able to run the app without errors. Add Sign in with Apple Capability to the project 馃摑 Before testing on the simulator, you need to be signed in to an account with enabled two-factor authentication. ...

July 18, 2024 路 2 min 路 Dmytro Chumakov

Implementing gRPC Swift

Introduction I鈥檝e never had the chance to use this technology before. I鈥檝e always wondered how gRPC operates. In this article, I will explore what gRPC is, how to install and use it, and when to use gRPC. What is gRPC? gRPC is an open-source, high-performance framework that facilitates efficient communication in distributed systems. gRPC is an implementation of the RPC (Remote Procedure Call) protocol, which enables services to call functions on other machines as if they were local software methods. gRPC was developed by Google in 2015, and it includes several features that enhance the way remote procedure calls are made. For instance, its use of Protocol Buffers (Protobuf) supports strongly typed service contracts, data serialization, and code generation in a variety of programming languages. It also uses HTTP/2 as its transport protocol, which facilitates bi-directional streaming and reduces latency. ...

July 16, 2024 路 5 min 路 Dmytro Chumakov

Scanning NFC tags using CoreNFC in an iOS app

Introduction I never had a chance to work with NFC (Near Field Communication), but I have always been curious to find out how it works. In this article, I will focus on scanning NFC tags using CoreNFC with NFCNDEFReaderSession. Preparation Before we begin, let鈥檚 add the necessary objects: Near Field Communication Tag Reading capability to the project. Privacy - NFC Scan Usage Description key to Info.plist. Near Field Communication Tag Reader Session Formats to the entitlements file. First Step The first step before starting scanning is to check if the device supports NFC reading by using the NFCNDEFReaderSession.readingAvailable property. ...

July 12, 2024 路 2 min 路 Dmytro Chumakov

Scanning for peripheral devices using BLE in an iOS app

Introduction I had the chance to work on a project where communication via BLE was at the heart of the project. Before adding any code to application, I always asked myself about two scenarios: The first scenario is when the device acts as a central device while searching for and connecting to peripheral devices. The second scenario is when the device acts as a peripheral device by using CBCharacteristic and changes its value. In this article, I will focus on the first scenario and will show how to scan for peripheral devices. ...

July 10, 2024 路 3 min 路 Dmytro Chumakov

Battery Performance Testing for iOS App

Introduction Working with batteries on iOS devices for large applications has always been tricky. The amount of energy consumed by the screen, location services, network calls, processing, background tasks, etc., is significant. From a developer鈥檚 perspective, it seems complicated, but Xcode provides tools to address this problem. To find the issue, you need to open Xcode and go to the Debug Navigator. In the Debug Navigator, you will see the Energy Impact gauge. In the histogram, blue indicates good performance, while red indicates overhead. Based on this information, you can analyze the overhead and resolve potential issues by utilizing Instruments such as Network, Location, CPU Profile, etc. For each case, Xcode provides instruments that allow you to dive deeper and understand what is happening in detail. ...

July 7, 2024 路 1 min 路 Dmytro Chumakov