Natively Docs
Join our community 🔥
  • 👩‍🚀Getting Started
    • What is Natively?
    • Why Natively?
    • FAQ
    • Create Your First App
  • 🚀Natively Platform
    • 🚉Releases
    • 🖌️Appearance
      • 😼App Icon
      • 📱Loading Screen
      • 📱Error Screen
      • 🎨Style
    • 🎬Preview
    • ⭐Features
      • 🛳️Bottom Bar
      • 🚇Deeplinks
        • 🔥Firebase
        • 🔗Universal Links
        • 🌱Branch.io
      • 📍Geolocation
      • 🔔Notifications
        • 📲OneSignal Notifications
        • 🔥Firebase Notifications (Advanced)
      • 📒Contacts
      • 👩‍🎨Social Auth
        • 🍏Sign In with Apple
      • 💟HealthKit
      • 💰Purchases
      • 🤑Admob
      • 💳NFC
      • 📷Camera
      • 📂Photo Library
      • 🎤Microphone
      • 📈Analytics
        • 🕊️AppsFlyer
        • 😛Facebook
    • 🚚Publish
      • 🍏iOS App
      • 🤖Android App
    • ⚙️Settings
    • 🙈Subscription Plans
  • Guides
    • 🧋Integration (Native Features)
      • 🏅How to get started?
      • ℹ️Device
      • ℹ️Browser Info
      • 🛳️Bottom Bar
      • ✂️Clipboard
      • 🚦Push Notifications - OneSignal
      • 🚦Push Notifications - Firebase (Advanced)
      • 📍Geolocation
      • 📦App Storage
      • 🗝️Biometrics & Credentials
      • 📧Native SMS/Email
      • 📅Native Date Picker
      • 📸Native Camera
      • 🎙️Native Audio Recorder
      • 🈁Native Scanner (QR/Barcode)
      • 📔Contacts
      • 🍏Apple Sign In
      • ❤️HealthKit
      • 💸In-App Purchases
      • 🤑Admob
      • 💳NFC
      • 🥑Show Toast/Banner
      • ⏳Show/Hide Loading Screen
      • 🥑Haptic Feedback
      • 🖼️Share Media/Files
      • 📱Open an external App/URL
      • ✍️Request User's review
      • ↔️getInsets
      • 🎨Control Style & Colors
    • 🔍Troubleshooting
    • 🐈Setup RevenueCat App
    • 🚑Setup Admob App
    • 🚥Setup One Signal App
    • 🧑‍🤝‍🧑Setup website Universal Links (Deeplinks)
    • 🍕Testing & Submitting your app
    • 🔑Generate iOS Push Key (NEW)
    • 🔑Generate iOS Push Certificate (Legacy)
    • 🤝Affiliate program
    • 📕For Partners: Natively Brand Book.
Powered by GitBook
On this page
  • 🧋 Bubble.io Plugin
  • IMPORTANT for Bubble Plugin and JS SDK devs.
  • 🛠 JavaScript SDK

Was this helpful?

  1. Guides
  2. Integration (Native Features)

Apple Sign In

minimum version is v2.11.0

PreviousContactsNextHealthKit

Last updated 1 year ago

Was this helpful?

Sign In with Apple should be only displayed on iOS devices otherwise, it will not work (for Android or Web)

🧋 Bubble.io Plugin

Natively - Apple Sign In

Events:

  • Apple Sign In Success

  • Apple Sign In Failed

States:

  • Email

  • Given Name

  • Family Name

  • Error

  • Subject - unique identifier based on your app + user iCloud (it's unique)

  • Initial Sign In - mean that user signin/signup for the first time to your app

Actions:

  • Sign In with Apple

How to set up Sign In with Apple in Bubble?
  1. Add Natively - Apple Sign In element on the page.

  2. Add "Apple Sign In Success" event and the following actions

IMPORTANT for Bubble Plugin and JS SDK devs.

The Subject assigned to a user will persist consistently with each login, irrespective of their choice to conceal their email address or not. This value remains unchanged even when they switch to different iOS devices. This consistency is due to the fact that the Subject is intrinsically linked to the individual's iCloud account, ensuring a seamless user experience across different devices.

Apple allows users to hide their email addresses when logging into an app. If this option is selected, Apple generates a unique forwarding email address that relays any received emails to the user's actual email address, which will be disclosed to you. Note that this forwarding email address is only revealed during the user's initial login to your app. In subsequent logins, this information will not be accessible, leaving the email field vacant.

Alternatively, if a user decides to disclose their email address, it will be consistently available for you to utilize each time they log in.

During the testing phase, you might wish to reset your Apple ID for your application to mimic a first-time sign-up experience once more. To accomplish this, navigate to your iOS Settings and tap on your name displayed at the top. Proceed to 'Password & Security' followed by 'Apps Using Your Apple ID'. Find and select your application in the list. You can choose "Stop Using Apple ID" at this stage, effectively resetting the Apple ID association with that specific app. Consequently, all fields should be present during your next Apple sign-in, offering a fresh start as though it's an initial login attempt.

🛠 JavaScript SDK

NativelyAppleSignInService

const appleService = new NativelyAppleSignInService()
const apple_signin_callback = function(resp) {
        console.log(resp);
        if (resp.status) {
            console.log(resp.email);
            console.log(resp.subject); // unique identifier based on your app + user iCloud (it's unique)
            console.log(resp.givenname);
            console.log(resp.familyname);
            console.log(resp.initial); // mean that user signin/signup for the first time to your app
        } else {
            console.log(resp.message);
        }
};
appleService.signin(apple_signin_callback);

Create a "Sign In with Apple" button (you can use a simple image or HTML/CSS). Find some examples .

🧋
🍏
here
Bubble.io Plugin
JavaScript SDK