Skip to content

Releases: frontegg/frontegg-ios-swift

v1.2.11

06 May 08:21
b910981
Compare
Choose a tag to compare

v1.2.11

  • Social login flow bug fixes

v1.2.10

10 Mar 17:37
6111a24
Compare
Choose a tag to compare

Web View Enhancement:

  • Modified the FronteggWebView's handling of safeAreaInsets. Previously applied universally through a class extension, safe area overrides now specifically target only FronteggWebView This adjustment ensures that zero padding for safe areas is confined to FronteggWebViews, preserving the intended layout for web views created by clients, including those utilized within Ionic/Capacitor applications. Changes implemented by @quesodev. #39

Authentication Update:

  • Introduced support for direct login via ASWebAuthentication, streamlining the authentication process.

v1.2.9

06 Feb 22:58
77ae8e0
Compare
Choose a tag to compare

We're pleased to announce the release of Frontegg Swift SDK version 1.2.9. This update introduces the loginWithPopup method, enhancing authentication with ASWebAuthenticationSession. Here are the key features:

New Features

  • loginWithPopup Method: Allows for seamless integration with ASWebAuthenticationSession, offering customizable login experiences. Key parameters include:
    • window: Specifies the presentation window (defaults to key window).
    • ephemeralSession: Indicates if the session should be ephemeral (true by default).
    • loginHint: Optional login hint (defaults to nil).
    • loginAction: Optional login action (defaults to nil).
    • completion: Completion handler for post-login actions.

For example usage, refer to our GitHub README.

This version streamlines authentication flows, making them more flexible and user-friendly.

v1.2.8

30 Jan 14:35
b7974f5
Compare
Choose a tag to compare

Add support for UIKit applications

  • Add Frontegg UIKit Wrapper

    • Add Frontegg to the AppDelegate file

        func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
            // Override point for customization after application launch.
      
            FronteggApp.shared.didFinishLaunchingWithOptions()
          
            return true
        }
    • Create AuthenticationController class that extends AbstractFronteggController from FronteggSwift

        //
        //  AuthenticationController.swift
        //
        
        import UIKit
        import FronteggSwift
        
        class AuthenticationController: AbstractFronteggController {
        
            override func navigateToAuthenticated(){
                // This function will be called when the user is authenticated
                // to navigate your application to the authenticated screen
                
                let mainStoryboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
                
                // TODO: Set Storyboard ID 'authenticatedScreen' for your authenticated screen
                let viewController = mainStoryboard.instantiateViewController(withIdentifier: "authenticatedScreen")
                self.view.window?.rootViewController = viewController
                self.view.window?.makeKeyAndVisible()
            }
        
        }
    • Create a new ViewController for AuthenticationController:

      1. Change viewController's class to AuthenticationController
      2. Set Storyboard ID to fronteggController
      3. Make sure that the view controller is the initial view controller
        AuthenticationController
    • Setup SceneDelegate for Frontegg universal links:

        func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
            if let url = URLContexts.first?.url,
                url.startAccessingSecurityScopedResource() {
                defer  {
                    url.stopAccessingSecurityScopedResource()
                }
                if url.absoluteString.hasPrefix( FronteggApp.shared.baseUrl ) {
                    if(FronteggApp.shared.auth.handleOpenUrl(url)){
                        // Display your own Authentication View Controller
                        // to handle after oauth callback
                        window?.rootViewController = AuthenticationController()
                        window?.makeKeyAndVisible()
                        return
                    }
                }
                
            }
        }
        func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
            if let url = userActivity.webpageURL {
                if(FronteggApp.shared.auth.handleOpenUrl(url)){
                    // Display your own Authentication View Controller
                    // to handle after oauth callback
                    window?.rootViewController = AuthenticationController()
                    window?.makeKeyAndVisible()
                    return
                }
            }
        }
    • Access authenticated user by FronteggApp.shared.auth

          
        //
        //  ExampleViewController.swift
        //
        
        import UIKit
        import SwiftUI
        import FronteggSwift
        import Combine
        
        
        class ExampleViewController: UIViewController {
        
            // Label to display logged in user's email
            @IBOutlet weak var label: UILabel!
            var showLoader: Boolean = true
            
            override func viewDidLoad() {
                super.viewDidLoad()
                // Do any additional setup after loading the view.
                
                // subscribe to isAuthenticated and navigate to login page
                // if the user is not authenticated
      
                let fronteggAuth = FronteggApp.shared.auth
                self.label.text = fronteggAuth.user?.email ?? "Unknown"
            }
             
            @IBAction func logoutButton (){
                FronteggApp.shared.auth.logout() { _ in
                    window?.rootViewController = AuthenticationController()
                    window?.makeKeyAndVisible()  
                }
            }
      
        }
        

v1.2.7

22 Jan 21:31
1330622
Compare
Choose a tag to compare

New Feature

  • Support for Social Login Consent Prompt

v1.2.6

10 Jan 20:38
8b0aba8
Compare
Choose a tag to compare

FR-14813 - fix hosted login direct url #31

v1.2.5

09 Jan 11:17
e3684ab
Compare
Choose a tag to compare

Removed webView.isInspectable = true for older xcode versions

v1.2.4

20 Dec 12:48
e3aa26f
Compare
Choose a tag to compare
  • Enhanced functionality to update the selected region during manual initialization in Ionic.

v1.2.3

20 Dec 11:24
da3a3c1
Compare
Choose a tag to compare

Made the region configuration initialization function public for use in Ionic frameworks.

v1.2.2

20 Dec 09:29
2c3c95a
Compare
Choose a tag to compare
  • Removed URL display from the error page.
  • Resolved issue where the loading screen remained stuck after authentication via ASWebAuthenticationSession.
  • Introduced an option to enable/disable the native bridge for social logins, SAML, and OIDC in embedded mode.
  • Added functionality for manual initialization.