Swiftpack.co -  Pronto-am/MobileCMS-iOS-SDK as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Pronto-am/MobileCMS-iOS-SDK
The Swift iOS Pronto SDK
.package(url: "https://github.com/Pronto-am/MobileCMS-iOS-SDK.git", from: "v4.0.5")

Pronto iOS SDK


The official Pronto iOS SDK


Join our slack channel   |   Support us on Beerpay


Installation

Cococapods

Add the following to your Podfile:

pod 'ProntoSDK'

Available sub-specs:

  • ProntoSDK/Authentication
  • ProntoSDK/Notifications
  • ProntoSDK/Collections
  • ProntoSDK/AppUpdateCheck
  • ProntoSDK/Localization
  • ProntoSDK/RemoteConfig

And run:

pod install

Carthage

Add the following to your Cartfile:

github "Pronto-am/MobileCMS-iOS-SDK"

And run:

carthage update

SwiftPM

Add the following dependency to your Package.swift:

 .package(url: "https://github.com/Pronto-am/MobileCMS-iOS-SDK", .upToNextMajor(from: "2.0.0"))

Accio

Add the following dependency to your Package.swift:

 .package(url: "https://github.com/Pronto-am/MobileCMS-iOS-SDK", .upToNextMajor(from: "2.0.0"))

And run:

accio install

Development

Open ProntoSDK.xcodeproj end start development.

Implementation

Core

In AppDelegate.swift:

import ProntoSDK

func application(_ application: UIApplication,
                 didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

    let config = ProntoConfig()
    
    // Setup the API client credentials
    config.clientID = <#CLIENT_ID#>
    config.clientSecret = <#CLIENT_SECRET#>
    config.encryptionKey = <#ENCRYPTION_KEY#>    
    config.domain = "mypronto.site.com"
    config.firebaseDomain = "myprontoproject.firebaseio.com"
    
    // Activate each plugin your project uses
    config.plugins = [ .notifications, .authentication, .collections, .localization, .updateChecker ]
    
    // Disable logging for non-debug builds
    #if DEBUG
        config.logger = Logger() // Should conform to `Cobalt.Logger` protocol
    #endif
    
    ProntoSDK.configure(config)
    
    // Do the rest of the implementation
    
    return true

Notifications plugin

β†’ πŸ“― Read notifications documentation

Authentication plugin

β†’ πŸ” Read authentication documentation

Collections plugin

β†’ πŸ—‚ Read collections documentation

Update checker plugin

β†’ 🌟 Read update checker documentation

Localization

β†’ πŸ‡ͺπŸ‡Ί Read localization documentation

Remote config

β†’ βš™οΈ Read remote config documentation

RxSwift

Almost every asynchronous function ProntoSDK uses RxSwift internally:

import RxSwift
import RxCocoa

let single = ProntoCollection<Location>().list() // = Single<[Location]>
single.subscribe(onSuccess: { locations in 
    // ...
}, onError: { error in 
    print("Error fetching locations: \(error)")
}).disposed(by: disposeBag)

References

GitHub

link
Stars: 1
Last commit: 4 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

v4.0.5
33 weeks ago

Added public accessible access token of API client

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics