SimpleMDM-Swift is a cross-platform (iOS, macOS, tvOS, watchOS) SDK to access the SimpleMDM API written in Swift.
Please Note: This library is not officially supported by SimpleMDM. It does not currently wrap the complete functionality of the SimpleMDM API. Use at your own risk.
Features
Read-only access to all exposed resources (Device, App, etc.) of the REST API
Supports the pagination API introduced August 15, 2018
// Just set this once in your applicationDidBecomeActive method
SimpleMDM.APIKey = "233b7a3058694652ae6f62acfcba8be7"
// Get the device with id 42
Device.get(id: 42) { result in
switch result {
case let .failure(error):
print("Could not get device: \(error)")
case let .success(device):
print(device.name)
}
}
// Get all device groups
DeviceGroup.getAll { result in
switch result {
case let .failure(error):
print("Could not get device groups: \(error)")
case let .success(deviceGroups):
print(deviceGroups.map { $0.name })
}
}
Installation
Swift Package Manager
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler and Xcode (starting at version 11).
Adding SimpleMDM-Swift as a dependency is as easy as adding it to the dependencies value of your Package.swift:
Or you can use Xcode’s menu in File > Swift Packages > Add Package Dependency.
CocoaPods
To integrate SimpleMDM-Swift into your Xcode project using CocoaPods, specify it in your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '12.0'
target '<Your Target Name>' do
pod 'SimpleMDM-Swift', '~> 0.10.0'
end
Then, run the following command:
$ pod install
Carthage
To integrate SimpleMDM-Swift into your Xcode project using Carthage, specify it in your Cartfile:
github "guillaumealgis/SimpleMDM-Swift" == 0.10.0
Run carthage update to build the framework and drag the built SimpleMDM-Swift.framework into your Xcode project and update your run scripts as appropriate. For additional support, please visit the Carthage documentation.
Apps using SimpleMDM-Swift
I’d love to hear what you have used SimpleMDM-Swift for, if you would like your app displayed here, please send a pull request!
License
SimpleMDM-Swift is released under the MIT license. See LICENSE.md for details.
SimpleMDM-Swift
SimpleMDM-Swift is a cross-platform (iOS, macOS, tvOS, watchOS) SDK to access the SimpleMDM API written in Swift.
Please Note: This library is not officially supported by SimpleMDM. It does not currently wrap the complete functionality of the SimpleMDM API. Use at your own risk.
Features
System requirements
Usage
📘 Full documentation is available here: https://guillaumealgis.github.io/SimpleMDM-Swift/
Installation
Swift Package Manager
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the
swift
compiler and Xcode (starting at version 11).Adding SimpleMDM-Swift as a dependency is as easy as adding it to the
dependencies
value of yourPackage.swift
:Or you can use Xcode’s menu in File > Swift Packages > Add Package Dependency.
CocoaPods
To integrate SimpleMDM-Swift into your Xcode project using CocoaPods, specify it in your
Podfile
:Then, run the following command:
Carthage
To integrate SimpleMDM-Swift into your Xcode project using Carthage, specify it in your Cartfile:
Run
carthage update
to build the framework and drag the built SimpleMDM-Swift.framework into your Xcode project and update your run scripts as appropriate. For additional support, please visit the Carthage documentation.Apps using SimpleMDM-Swift
I’d love to hear what you have used SimpleMDM-Swift for, if you would like your app displayed here, please send a pull request!
License
SimpleMDM-Swift is released under the MIT license. See LICENSE.md for details.
Related Projects
Contact
Guillaume Algis (@guillaumealgis)