Skip to content

feat(fusionauth-swift-sdk): blog, documentation and quickstart #3354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cb47e4f
refactor(quickstart): rename mobile quickstarts
Aaron-Ritter Oct 5, 2024
a760858
refactor(quickstart): clarification in Android SDK description
Aaron-Ritter Oct 5, 2024
5f7572b
feat(fusionauth-ios-sdk): draft
Aaron-Ritter Oct 5, 2024
4b20e48
Merge remote-tracking branch 'origin/main' into feat/fusionauth-ios-sdk
Aaron-Ritter Oct 5, 2024
03bf35a
Merge remote-tracking branch 'refs/remotes/origin/main' into feat/fus…
Aaron-Ritter Oct 26, 2024
29244e8
feat(fusionauth-swift-sdk): draft
Aaron-Ritter Oct 26, 2024
d5c87d6
feat(fusionauth-swift-sdk): draft
Aaron-Ritter Oct 26, 2024
be25a50
feat(fusionauth-swift-sdk): draft
Aaron-Ritter Oct 26, 2024
ac0eba4
feat(fusionauth-swift-sdk): update draft
Aaron-Ritter Oct 26, 2024
ab53654
feat(fusionauth-swift-sdk): update draft
Aaron-Ritter Oct 26, 2024
55a790b
feat(fusionauth-swift-sdk): revert ide project file update
Aaron-Ritter Oct 26, 2024
997e592
feat(fusionauth-swift-sdk): revert ide project file update
Aaron-Ritter Oct 26, 2024
9709396
feat(fusionauth-swift-sdk): revert ide project file update
Aaron-Ritter Oct 26, 2024
f594d70
feat(fusionauth-swift-sdk): update quickstart draft
Aaron-Ritter Oct 26, 2024
6bba439
feat(fusionauth-swift-sdk): update quickstart draft
Aaron-Ritter Oct 26, 2024
486d594
feat(fusionauth-swift-sdk): update quickstart draft
Aaron-Ritter Oct 26, 2024
ccdf595
feat(fusionauth-swift-sdk): update quickstart draft
Aaron-Ritter Oct 26, 2024
546ce27
feat(fusionauth-swift-sdk): add TODOs to quickstart
Aaron-Ritter Oct 26, 2024
c6c86e4
feat(fusionauth-swift-sdk): update quickstart
ColinFrick Nov 7, 2024
5e3f34b
Merge branch 'FusionAuth:main' into feat/fusionauth-swift-sdk
ColinFrick Nov 7, 2024
e0e6c9b
Merge remote-tracking branch 'origin/main' into feat/fusionauth-swift…
Aaron-Ritter Feb 27, 2025
8e17614
refactor(fusionauth-swift-sdk): update github repository references
Aaron-Ritter Feb 27, 2025
ba25470
refactor(fusionauth-swift-sdk): update github repository references t…
Aaron-Ritter Feb 27, 2025
aeff23f
refactor(fusionauth-swift-sdk): update exampleapps with old and new q…
Aaron-Ritter Feb 27, 2025
c5f233f
refactor(fusionauth-swift-sdk): replace <strong> tags with backtick
Aaron-Ritter Feb 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions astro/src/content/blog/swift-sdk-beta.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
publish_date: 2024-10-26
title: Our Beta Swift SDK for iOS
description: Swift SDK for iOS makes integrating with FusionAuth easier
authors: Colin Frick, Aaron Ritter
excerpt_separator: "{/* more */}"
image: /img/blogs/ios-sdk-beta/our-beta-ios-sdk.png
categories: Product
tags: sdks, ios, swift
---
import RemoteContent from 'src/components/RemoteContent.astro';

After releasing the [Android SDK Beta](/blog/android-sdk-beta) FusionAuth's new Swift SDK for iOS Beta is streamlines mobile development for iOS, offering equally powerful backend capabilities and seamless integration with your preferred frameworks.

{/* more */}

Recently, the team released a software development kit (SDK) Beta for [Swift](/docs/sdks/swift-sdk) targeting iOS which eliminates boilerplate code, leading to cleaner and more efficient applications.

## The Swift SDK for iOS

The FusionAuth Swift SDK for iOS aims to provide a simple and trustworthy interface to authenticate mobile users with FusionAuth.

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-swift-sdk/main/README.md"
tags="forDocSiteOverview" />

### Difference to AppAuth

For OAuth 2.0 authentication, the Authentication Manager uses [AppAuth](https://appauth.io/) to handle the authentication flow. AppAuth is an open-source library that provides a simple interface for authenticating users with OAuth 2.0. It's available for [Android](https://github.com/openid/AppAuth-Android) and [iOS](https://github.com/openid/AppAuth-iOS).

Using AppAuth directly might seem a good idea because it grants more control over the implementation, but there are compelling reasons to use the FusionAuth Swift SDK for iOS instead.

1. **Simplified Authentication Flow**: The SDK simplifies the process of authenticating users with FusionAuth by providing a simple interface.

2. **Standardized Usage**: The SDK introduces standardized usage with the introduction of the Authorization Manager.

3. **Security**: The SDK handles best practice defaults in the Authorization Configuration.

4. **Time-Saving**: The SDK handles all dependencies and best practice defaults for you.

5. **Maintainability**: The SDK gives us the flexibility to add additional functionality without having to feature creep the AppAuth library, or implement features early until they get added to AppAuth.

### Getting Started

To simplify the experience, our primary goal was to introduce a minimum effort from the start. With a single import and a simple as possible configuration, which handles all dependencies and best practice defaults for you through the [Authorization Configuration](https://github.com/FusionAuth/fusionauth-swift-sdk/blob/main/Documentation/Reference/structs/AuthorizationConfiguration.md).

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-swift-sdk/main/README.md"
tags="forDocSiteGettingStarted" />

### Usage

Our secondary goal with the SDK was the standardization of the usage with, for example, the introduction of the [Authorization Manager](https://github.com/FusionAuth/fusionauth-swift-sdk/blob/main/Documentation/Reference/classes/AuthorizationManager.md).

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-swift-sdk/main/README.md"
tags="forDocSiteUsage" />

### Security

With the simplified start in the [Authorization Configuration](https://github.com/FusionAuth/fusionauth-swift-sdk/blob/main/Documentation/Reference/structs/AuthorizationConfiguration.md) and standardized usage in the [Authorization Manager](https://github.com/FusionAuth/fusionauth-swift-sdk/blob/main/Documentation/Reference/classes/AuthorizationManager.md) we now took care of best practice defaults. as well as handling token storage, refresh, and retrieval in the [Token Manager](https://github.com/FusionAuth/fusionauth-swift-sdk/blob/main/Documentation/Reference/classes/TokenManager.md).

What we didn't want to change is the AppAuth authentication flow through a browser redirect. When using a browser redirect to the SSO URL, the only application that sees or holds sensitive user credentials is FusionAuth. Your application code never has access to these, which decreases the attack surface area.

In addition, FusionAuth has built-in security features such as:

* the ability to lock user accounts
* password rules
* webhook notifications when a user has failed to login
* breached password notification (with a paid license)
* rate limiting of sensitive security-related actions (with an Enterprise license)
* and more

[FusionAuth takes security seriously](/platform/security); it's our full-time job. By redirecting to FusionAuth, you don't have to worry about any other part of your application getting access to sensitive information or credentials.

### Look and Feel

Do you typically want your login pages to look like your Mobile App? Doesn't a browser redirect make that difficult?

No, FusionAuth allows complete control over the look and feel of the hosted login pages. Learn more about this functionality, which we call [themes](/docs/customize/look-and-feel/), including an [example using Tailwind CSS](/docs/customize/look-and-feel/tailwind).

Being able to make the look and feel the same as your mobile app if your users use the same SSO page design for other use cases, e.g., your online store or portal. It will create more trust because the experience (including design, SSO URL, and authentication process) will be the same on mobile as anywhere else.

### Example

We've built an App for [ChangeBank](https://www.youtube.com/watch?v=CXDxNCzUspM), a global leader in converting dollars into coins.

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-swift-sdk/main/README.md"
tags="forDocSiteExampleApp" />

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-swift-sdk/main/README.md"
tags="forDocSiteQuickstart" />

## In Conclusion

With the introduction of the FusionAuth Swift SDK for iOS Beta, we're eager to finalize the development into a final release and are looking forward to doing this with your feedback.

Especially as the SDK is set to standardize and secure your authorization processes in your mobile application development. We're interested to see if it helps your development, whether you're getting started or looking for a way to standardize and secure your authorization processes in your iOS App.

## More details on the SDK and collaboration

We created detailed documentation of the SDK and made it available in the [GitHub repository](https://github.com/FusionAuth/fusionauth-swift-sdk/) of the SDK.

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-swift-sdk/main/README.md"
tags="forDocSiteDocumentation" />

In there, you will find as well how you can [contribute](https://github.com/FusionAuth/fusionauth-swift-sdk/blob/main/CONTRIBUTING.md) further in the development of the FusionAuth Swift SDK for iOS.
2 changes: 1 addition & 1 deletion astro/src/content/docs/sdks/android-sdk.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: FusionAuth Android SDK
description: The FusionAuth Android SDK allows you to add different OAuth2 and OpenID Connect functionalities to your Android application. It's a highly standardized and simplified starting point for developers to easily integrate FusionAuth in their own custom mobile apps by taking care of all the dependencies.
description: The FusionAuth Android SDK allows you to add different OAuth2 and OpenID Connect functionalities to your Android application. It's a highly standardized and simplified starting point for developers to easily integrate FusionAuth in their own custom Android mobile apps by taking care of all the dependencies.
navcategory: developer
section: sdks
disableTOC: true
Expand Down
42 changes: 42 additions & 0 deletions astro/src/content/docs/sdks/swift-sdk.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: FusionAuth Swift SDK for iOS
description: The FusionAuth Swift SDK for iOS allows you to add different OAuth2 and OpenID Connect functionalities to your iOS application. It's a highly standardized and simplified starting point for developers to easily integrate FusionAuth in their own custom iOS mobile apps by taking care of all the dependencies.
navcategory: developer
section: sdks
disableTOC: true
---
import RemoteContent from 'src/components/RemoteContent.astro';

## Overview

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-swift-sdk/main/README.md"
tags="forDocSiteOverview" />

## Getting Started

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-swift-sdk/main/README.md"
tags="forDocSiteGettingStarted" />

## Usage

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-swift-sdk/main/README.md"
tags="forDocSiteUsage" />

## Example App

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-swift-sdk/main/README.md"
tags="forDocSiteExampleApp" />

## Quickstart

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-swift-sdk/main/README.md"
tags="forDocSiteQuickstart" />

## Documentation

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-swift-sdk/main/README.md"
tags="forDocSiteDocumentation" />

## Source Code

The source code is available here: https://github.com/FusionAuth/fusionauth-swift-sdk/
6 changes: 6 additions & 0 deletions astro/src/content/json/exampleapps.json
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,12 @@
"description": "Swift iOS quickstart tutorial showing how to integrate FusionAuth with a Swift iOS mobile application",
"language": "swift"
},
{
"url": "https://github.com/FusionAuth/fusionauth-quickstart-swift-ios-native-appauth",
"name": "Swift iOS AppAuth quickstart",
"description": "Swift iOS quickstart tutorial showing how to integrate FusionAuth with a Swift iOS mobile application with AppAuth",
"language": "swift"
},
{
"url": "https://github.com/FusionAuth/fusionauth-example-salesforce-oidc",
"name": "Salesforce",
Expand Down
Loading