A library to manage NVRAM Stuff in Swift

Overview

libNVRAMSwift

A Library to manage NVRAM Stuff, written in Swift. CLI Example utility has only been tested on jailbroken iOS

Library Usage

Declare a new instance of the NVRAM Struct, for example:

let nvram = NVRAM()

Getting value of existing NVRAM Variable

use the OFVariableValue to get the value of an existing NVRAM Variable. Example:

let nvram = NVRAM()
let nvramVariableName = "SystemAudioVolume"
// Returns the value of NVRAM variable "SystemAudioVolume"
let value = nvram.OFVariableValue(variableName: nvramVariableName)
print(value ?? "Unknown Value")

Creating / Setting variables of NVRAM Variables

for creating a new NVRAM variable or setting the value of an existing NVRAM Variable, use the createOrSetOFVariable function. Note that this function throws. Example:

let nvram = NVRAM()
// Creates a new NVRAM Variable by the name of "exampleVariable" with value "example value"
let variableName = "exampleVariable"
let variableValue = "example value"
do {
  try nvram.createOrSetOFVariable(variableName: variableName, variableValue: variableValue)
} catch {
  print(error.localizedDescription)
}

Deleting an NVRAM Variable

use the deleteOFVariable function to delete an NVRAM Variable. Example:

let nvram = NVRAM()
do {
  // Deletes NVRAM Variable by the name of "randomVariable"
  try nvram.deleteOFVariable(variableName: "randomVariable")
} catch {
  print(error.localizedDescription)
}

Checking for existance of NVRAM Variable

use the OFVariableExists function to return true or false based on whether or not an NVRAM Variable exists. Example:

let nvram = NVRAM()
// Returns true or false based on whether or not an NVRAM Variable by the name of "SystemAudioVolume" exists
let variableExists = nvram.OFVariableExists(variableName: "SystemAudioVolume")
print(variableExists)

Getting all NVRAM Variables and their values

Use getAllOFVariables, which returns a Dictionary of Variable names and values. Example:

let nvram = NVRAM() 
let allVariables = nvram.getAllOFVariables()
for (key, value) in allVariables {
  print("\(key): \(value ?? "Unknown Value")")
}
You might also like...
A stand-alone Swift wrapper around the SQLite 3 client library.
A stand-alone Swift wrapper around the SQLite 3 client library.

Perfect - SQLite Connector This project provides a Swift wrapper around the SQLite 3 library. This package builds with Swift Package Manager and is pa

A Swift library to fetch the schema from a SQLite3 database.
A Swift library to fetch the schema from a SQLite3 database.

SQLite3Schema A small library to fetch the schema of a SQLite database. Contains a SQLite3 helper module for Linux. TBD. Uses just the raw SQLite API.

Disk is a powerful and simple file management library built with Apple's iOS Data Storage Guidelines in mind
Disk is a powerful and simple file management library built with Apple's iOS Data Storage Guidelines in mind

Disk is a powerful and simple file management library built with Apple's iOS Data Storage Guidelines in mind

KeyPathKit is a library that provides the standard functions to manipulate data along with a call-syntax that relies on typed keypaths to make the call sites as short and clean as possible.

KeyPathKit Context Swift 4 has introduced a new type called KeyPath, with allows to access the properties of an object with a very nice syntax. For in

A library that provides the ability to import/export Realm files from a variety of data container formats.

Realm Converter Realm Converter is an open source software utility framework to make it easier to get data both in and out of Realm. It has been built

TypedDefaults is a utility library to type-safely use NSUserDefaults.

TypedDefaults TypedDefaults is a utility library to type-safely use NSUserDefaults. Motivation The talk Keep Calm and Type Erase On by Gwendolyn Westo

A Library for iOS developers to check newer version of app from the app store
A Library for iOS developers to check newer version of app from the app store

swift-app-update-checker A very simple solution check new version of your application is available on store or not. Example To run the example project

PJAlertView - This library is to make your own custom alert views to match your apps look and feel

PJAlertView - This library is to make your own custom alert views to match your apps look and feel

Releases(v1.0.2)
Owner
Serena
She / her. Writes code in Swift.
Serena
Elegant library to manage the interactions between view and model in Swift

An assistant to manage the interactions between view and model ModelAssistant is a mediator between the view and model. This framework is tailored to

Seyed Samad Gholamzadeh 28 Jan 29, 2022
Prephirences is a Swift library that provides useful protocols and convenience methods to manage application preferences, configurations and app-state. UserDefaults

Prephirences - Preϕrences Prephirences is a Swift library that provides useful protocols and convenience methods to manage application preferences, co

Eric Marchand 557 Nov 22, 2022
iForage helps foragers to track and manage foraging spots around them using CloudKit

iForage CloudKit Preface To expand on what I've created here: https://github.com/LynchConnor/iForage, I initially developed the app using Firebase. Th

Connor Lynch 3 Jul 14, 2022
🧡 SQLiteOrm-Swift is an ORM library for SQLite3 built with Swift 5

?? Easy to use SQLite ORM library written with Swift

Yevgeniy Zakharov 25 Oct 6, 2022
A stand-alone Swift wrapper around the mongo-c client library, enabling access to MongoDB servers.

This package is deprecated in favour of the official Mongo Swift Driver. We advise users to switch to that pack

PerfectlySoft Inc. 54 Jul 9, 2022
A stand-alone Swift wrapper around the MySQL client library, enabling access to MySQL servers.

Perfect - MySQL Connector This project provides a Swift wrapper around the MySQL client library, enabling access to MySQL database servers. This packa

PerfectlySoft Inc. 118 Jan 1, 2023
A stand-alone Swift wrapper around the libpq client library, enabling access to PostgreSQL servers.

Perfect - PostgreSQL Connector This project provides a Swift wrapper around the libpq client library, enabling access to PostgreSQL servers. This pack

PerfectlySoft Inc. 51 Nov 19, 2022
Swift library that makes easier to serialize the user's preferences (app's settings) with system User Defaults or Property List file on disk.

PersistentStorageSerializable PersistentStorageSerializable is a protocol for automatic serialization and deserialization of Swift class, struct or NS

Ivan Rublev 163 Jun 3, 2021
A PostgreSQL client library for Swift. Does not require libpq.

PostgresClientKit PostgresClientKit provides a friendly Swift API for operating against a PostgreSQL database. Features Doesn't require libpq. Postgre

codewins.com 107 Dec 1, 2022
Easiest local storage library in Swift

SundeedQLite SundeedQLite is the easiest offline database integration, built using Swift language Requirements iOS 12.0+ XCode 10.3+ Swift 5+ Installa

Nour Sandid 15 Sep 23, 2022