Swiftpack.co - Tiqr/tiqr-app-core-ios as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Tiqr.
Tiqr/tiqr-app-core-ios v1.0.1
⭐️ 0
🕓 6 weeks ago
.package(url: "https://github.com/Tiqr/tiqr-app-core-ios.git", from: "v1.0.1")


Tiqr, the open source authentication solution for smartphones and Web Applications.


  • iOS 11.0 +
  • Swift 5 +


Swift Package Manager

The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

To integrate Tiqr click File -> Add Packages -> and enter the package URL:


Select Tiqr and press Add Package


Make the navigationController returned by Tiqr.shared.startWithOptions() your rootViewController:

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
    guard let windowScene = (scene as? UIWindowScene) else { return }

    window = UIWindow(windowScene: windowScene)
    window?.rootViewController = Tiqr.shared.startWithOptions(options: connectionOptions, theme: Theme())

Pass in your theme class based on TiqrThemeType to customize the appearance.

final class Theme: TiqrThemeType {
    let primaryColor: UIColor = UIColor(named: "PrimaryColor")!

    let headerFont: UIFont = .boldSystemFont(ofSize: 20)
    let bodyBoldFont: UIFont = .boldSystemFont(ofSize: 16)
    let bodyFont: UIFont = .systemFont(ofSize: 16)

    let buttonFont: UIFont = .systemFont(ofSize: 16)
    let buttonTintColor: UIColor = .black
    let buttonBackgroundColor: UIColor = UIColor(named: "PrimaryColor")!

    let aboutIcon: UIImage? = UIImage(named: "aboutIcon")
    let topBarIcon: UIImage? = UIImage(named: "topBarIcon")
    let bottomBarIcon: UIImage? = UIImage(named: "bottomBarIcon")

for push notification support add the following to your AppDelegate:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    let center = UNUserNotificationCenter.current()
    center.delegate = self
    center.requestAuthorization(options: [.alert, .sound]) { granted, error in
        if let error = error {
        } else if granted {
            DispatchQueue.main.async {

    return true

extension AppDelegate {
    func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
        Tiqr.shared.registerDeviceToken(token: deviceToken)
        print("Successfully registered for notifications")

    func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
        Tiqr.shared.startChallenge(challenge: url.absoluteString)
        return true

extension AppDelegate: UNUserNotificationCenterDelegate {
    func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
        let userInfo = response.notification.request.content.userInfo
        if let challenge = userInfo["challenge"] as? String {
            Tiqr.shared.startChallenge(challenge: challenge)


Stars: 0
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

26 weeks ago

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