Skip to content

Instantly share code, notes, and snippets.

View cedricbahirwe's full-sized avatar
📈
Small things in a Great way

Cédric Bahirwe cedricbahirwe

📈
Small things in a Great way
View GitHub Profile

Some issues supporting older versions of iOS (4, 5 years older)

Supporting older versions of iOS, such as those released 4 or 5 years ago, can present several challenges for developers and organizations. Here are some of the main issues associated with supporting older iOS versions:

  1. Compatibility: As iOS evolves, newer features, frameworks, and APIs are introduced. Supporting older versions requires developers to ensure compatibility with outdated APIs and frameworks, which can be time-consuming and may limit the ability to leverage new functionalities.

  2. Security vulnerabilities: Older iOS versions are more likely to have known security vulnerabilities that have been patched in subsequent updates. By supporting older versions, developers expose users to potential security risks, as they may miss out on critical security updates and bug fixes.

  3. Limited user base: Over time, the majority of users tend to update their devices to the latest iOS version. Supporting older versions may require signific

@cedricbahirwe
cedricbahirwe / LocationManager.swift
Created May 5, 2023 08:13
A simple class illustration the use of CoreLocation to get ask and access user's location in SwiftUI
import CoreLocation
{
private let locationManager = CLLocationManager()
@Published var authorisationStatus: CLAuthorizationStatus = .notDetermined
@Published private(set) var userLocation: UserLocation?
private let merchantProvider: MerchantProtocol
var permissionStatus: LocationStatus {
switch authorisationStatus {
@cedricbahirwe
cedricbahirwe / FileCache.swift
Created May 3, 2023 14:03
A Simple File Cache in Swift
import Foundation
import CryptoKit
enum FileCache {
// Write data to the cache file with the given URL
static func write(_ url: URL, data: Data) -> Void {
// Get the cache directory URL for the current user
if let fileManager = try? FileManager.default.url(for: .cachesDirectory, in: .userDomainMask, appropriateFor: nil, create: true) {
// Generate a unique file name for the cache file based on the URL hash
import UIKit
let json = """
[
{
"id": 1,
"name": "Watermarking photos with ImageMagick, Vapor 3 and Swift on macOS and Linux",
"type": "articles",
"photo": "https://mikemikina.com/assets/imagemagick-vapor-3/watermarked-photo.png",
"tags": ["Tutorial", "Vapor"]
let json = """
[
{
"id": 1,
"name": "Any vs. AnyObject in Swift",
"type": "articles"
},
{
"id": 2,
"name": "New Apple silicon",
@cedricbahirwe
cedricbahirwe / territories.swift
Last active November 15, 2022 18:39
Algorithm to extract the Ethnies/Tribus/Territoire of DRC from a literal String
import Foundation
//VOICI LA LISTE DES ETHNIES ET TRIBUS PAR TERRITOIRE DE LA RDC, UN ARTICLE RETROUVÉ AU MUSEE DE TERVUREN EN BELGIQUE (LES BANYAMULENGE, 𝑫𝑬𝑺 𝑹𝑾𝑨𝑵𝑫𝑨𝑰𝑺, N'Y FIGURENT PAS )*
//
//Recherchez aussi la vôtre...
//Ethnies/Tribus/Territoire*
//Patrice Emery Lumumba avait prédit : « l’histoire du Congo sera écrite par les congolais eux-mêmes ».
//Bravo à nos historiens et chefs coutumiers qui devraient vulgariser ce texte afin de sortir notre progéniture de l'ignorance.
//Le Chercheur !!!!
// Check output at: https://gist.github.com/cedricbahirwe/13cbeee55ff10dfc39f56940aa8b82ea
@cedricbahirwe
cedricbahirwe / drc_territories.json
Last active May 3, 2023 16:13
VOICI LA LISTE DES ETHNIES ET TRIBUS PAR TERRITOIRE DE LA RDC, UN ARTICLE RETROUVÉ AU MUSEE DE TERVUREN EN BELGIQUE
[
{
"key": 1,
"ethnie": "Abandiya",
"tribues": [
"Aketi",
"Bondo",
"Buta"
]
},
@cedricbahirwe
cedricbahirwe / PrereqsCourses.swift
Last active May 3, 2023 14:15
My Attempted Algorithmic Solution to Andela Interview Question
import Foundation
var prereqsCourses = [
("Software Design", "Algorithms"),
("Foundations of Computer Science", "Operating Systems"),
("Computer Networks", "Computer Architecture"),
("Computer Architecture", "Software Design"),
("Algorithms", "Foundations of Computer Science"),
("Data Structures", "Computer Networks")
]
@cedricbahirwe
cedricbahirwe / cross-view-lines.swift
Created September 14, 2022 14:46 — forked from bjhomer/cross-view-lines.swift
Creating cross-view lines in SwiftUI
//
// ContentView.swift
// SwiftUIPlayground
//
// Created by BJ Homer on 4/26/21.
//
import SwiftUI
@cedricbahirwe
cedricbahirwe / Canvas.swift
Created September 2, 2022 18:41
No words to explain this
//
// CanvasView.swift
// MyiOS15
//
// Created by Cédric Bahirwe on 14/06/2021.
//
import SwiftUI
let someSymbols = Array(repeating: Symbol("image1"), count: 80) + Array(repeating: Symbol("image2"), count: 50)