Step 3: Configure in Xcode
Step 3: Configure in Xcode
- Open your project in Xcode:
- Launch Xcode and open the project or workspace for your app.
- Select your target:
- In the Project Navigator (the left-hand pane), select your app's target (usually your app name under the "Targets" section).
- Go to the 'Signing & Capabilities' tab:
- At the top of the Xcode window, click on the target settings and navigate to the "Signing & Capabilities" tab.
- Add the 'Sign in with Apple' capability:
- Click the "+" button in the top-left corner of the 'Capabilities' section.
- From the list of available capabilities, find and select "Sign in with Apple".
- Xcode will automatically configure the entitlement and add it to your project.
- Ensure 'Sign in with Apple' is enabled in the App ID:
- Xcode should synchronize the App ID on the Apple Developer portal with this capability. Ensure that the App ID used for your app includes "Sign in with Apple" by checking the developer portal.
- Enable 'iCloud Keychain' (Optional):
- If your app supports seamless sign-in across devices, enable iCloud Keychain to allow for credentials to be stored securely.
- Verify provisioning profiles:
- Xcode will automatically update the provisioning profile to include the new "Sign in with Apple" entitlement. Ensure that your app is signed with the correct profile.
- Build and Run:
- After adding the capability, build and run your app to ensure everything is set up correctly.
This step ensures that your app is correctly configured to use Apple’s authentication services.