Skip to content

Instantly share code, notes, and snippets.

View lanserxt's full-sized avatar
🖥️
Developing a dream

Anton Gubarenko lanserxt

🖥️
Developing a dream
View GitHub Profile
@lanserxt
lanserxt / AuthDataManager.swift
Created October 31, 2024 09:31
Secured Credentials Manager to load API keys, login credentials and other from local secured file
import Foundation
import CryptoKit
struct AuthDataManager {
//MARK: - Encrypt/Decrypt Logic
/// Generate a symmetric key from a password
/// - Parameter password: password to use
/// - Returns: key
@lanserxt
lanserxt / gist:50c54a459f0962dfaf6bf89c392875d5
Created November 13, 2024 12:19
Remove token from plist
# Define the relative path to the file containing the access token
TOKEN_FILE_PATH="${SRCROOT}/Config/access_token.txt"
# Check if the file exists
if [ -f "$TOKEN_FILE_PATH" ]; then
# Read the access token from the file
ACCESS_TOKEN=$(cat "$TOKEN_FILE_PATH")
else
echo "Access token file not found at $TOKEN_FILE_PATH"
exit 1
@lanserxt
lanserxt / DeinitIsolation.swift
Created March 16, 2025 07:10
UIKit deinit isolation implementation
import UIKit
class ParentViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let childVC = ChildViewController()
displayContentController(content: childVC)
}