Apple Sign-In

Allow your users to sign in with Apple


If your app offers some kind of authentication, you are required to also offer Sign In with Apple option. Otherwise, your app might get rejected.

SwiftSail offers Sign in with Apple out of the box and you don't have to do any setting up in order for it to work.

The logic itself is implemented in the data layer so the only thing you have to do to login the user is to call this method located in UserRepository.swift:

signInWithApple(credential: ASAuthorizationCredential) async -> Bool

Authentication is handled by Firebase. To switch Firebase for Supabase for example, you just have to replace the code which authenticates users. In the upcoming versions of SwiftSail Supabase will become an option you can choose from if you don't like Firebase.

One thing you can consider is to create a new datasource in the data layer specifically for Firebase and have some sort of abstraction above your authentication service so it's even easier to switch your auth provider in the future. This will also become a part of SwiftSail along with the Supabase implementation.

Sign In