Skip to content

FusionAuth/fusionauth-quickstart-swift-ios-native

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quickstart: Swift and SwiftUI for iOS with FusionAuth

This project contains an iOS application built with Swift and SwiftUI that works with a locally-running instance of FusionAuth, the authentication and authorization platform.

Setup

Prerequisites

You will need the following things properly installed on your computer.

  • Xcode: The official IDE for iOS development. Install it from the Mac App Store.
  • Optional: An Apple Developer Account: Necessary for running your app on a device and publishing your app. You can still develop and test the app in a simulator without an account.
  • Docker: The quickest way to stand up FusionAuth. Ensure you also have docker compose installed.
  • (Alternatively, you can Install FusionAuth Manually).

FusionAuth Installation via Docker

The root of this project directory (next to this README) are two files: a Docker compose file and an environment variables configuration file. Assuming you have Docker installed on your machine, you can stand up FusionAuth up on your machine with:

docker compose up -d

The FusionAuth configuration files also make use of a unique feature of FusionAuth, called Kickstart: when FusionAuth comes up for the first time, it will look at the Kickstart file and mimic API calls to configure FusionAuth for use when it is first run.

NOTE: If you ever want to reset the FusionAuth system, delete the volumes created by Docker Compose by executing docker compose down -v.

FusionAuth will be initially configured with these settings:

  • Your client Id is: e9fdb985-9173-4e01-9d73-ac2d60d1dc8e
  • Your client secret is: super-secret-secret-that-should-be-regenerated-for-production
  • Your example username is richard@example.com and your password is password.
  • Your admin username is admin@example.com and your password is password.
  • Your fusionAuthBaseUrl is http://localhost:9011/

You can log into the FusionAuth admin UI and look around if you want, but with Docker/Kickstart you don't need to.

Running the iOS App

  • Open the ChangeBank.xcodeproj file in this project's complete-application folder in Xcode.

  • Open the ChangeBank.plist file in the complete-application folder in a text editor.

    • Change the issuer and clientId values to match that of your FusionAuth instance. If you used the default Docker and Kickstart, you don't need to change anything.
  • Build and run the app following XCode guidelines. The app will open in the iOS simulator, or your connected iOS device. You can usually press the "play" button in the top left of XCode or press command-r to build and run the app with the default settings.

Further Information

Visit https://fusionauth.io/docs/quickstarts/quickstart-ios-swift-native for a step-by-step guide on how to build this iOS app from scratch, including more details about the tenant and application settings.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •