Skip to content

Instantly share code, notes, and snippets.

@phmagic
phmagic / ApiKey.swift
Created February 18, 2024 15:27
Using iCloud for storing keys and then pushing into keychain of device.
import CloudKit
import Foundation
import Locksmith
/**
API Key used by this app is fetched from CloudKit. This class manages fetching and saving it into Keychain
*/
class ApiKey {
private static let RECORD_NAME = <# RECORD_NAME_IN_CLOUDKIT #>
private static let KEY = <# KEY_NAME_IN_CLOUDKIT #>
@phmagic
phmagic / homebridge
Created January 9, 2017 04:29 — forked from johannrichard/homebridge
Systemd Service for homebridge (http://github.com/nfarina/homebridge)
# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*