- Xcode 15.0 or higher
- Swift 5.7 or higher
Based on the package definition, RemocoKit supports the following minimum platform versions:
- iOS: 12.0 and higher
- tvOS: 12.0 and higher
- macOS: 10.15 (Catalina) and higher
To add the RemocoKit SDK to your project with Swift Package Manager:
- Select the Package Dependencies tab for your Project.
- Click the + button.
- In the "Search or Enter Package URL" field, enter:
https://github.com/axonista/apple.git - When the UI updates, click the Add Package button.
- After Xcode processes the repo, you will be prompted to "Choose Package Products". Ensure that RemocoKit is selected and added to your specific app target.
How to retrieve a collection from the Ediflo CMS using RemocoKit.
First, ensure you import the module in your file:
import RemocoKitUsing Closures:
// Configure environment
Remoco.environment.apiKey = "apiKey_here"
Remoco.environment.appIdentifier = "appIdentifier_here"
// Create parameters
let parameters = RemocoParameters().expand(2).build()
// Fetch Collection
Remoco.getCollection(identifier: "my_collection_name", parameters: parameters) { result in
switch result {
case .success(let collection):
// do something with collection
print(collection)
case .failure(let error):
// handle the error here
print(error)
}
}Using Async/Await:
// Configure environment
Remoco.environment.apiKey = "apiKey_here"
Remoco.environment.appIdentifier = "appIdentifier_here"
Task {
do {
let parameters = RemocoParameters().expand(2).build()
let collection = try await Remoco.getCollection(identifier: "my_collection_name", parameters: parameters)
// do something with collection
print(collection)
} catch {
// handle the error here
print(error)
}
}If you have questions, need help, or want to provide feedback, please use the Support Portal or contact your Account Manager.