autologin_darwin 1.0.1 autologin_darwin: ^1.0.1 copied to clipboard
The platform implementation of the autologin plugin for iOS and MacOS.
The iOS and MacOS implementation
of autologin
.
Usage #
This package is endorsed, which means you can simply use
autologin
normally. This package will be automatically included in your app
when you do, so you do not need to add it to your pubspec.yaml.
However, if you import this package to use any of its APIs directly, you should
add it to your pubspec.yaml
as usual.
Installation #
For storing credentials the
Shared Web Credentials are used. In order
to make this working you need to setup the Associated Domains
Entitlement.
The main documentation can be found on the
Apple Developer site. At least the
apple-app-site-association
file must be reachable at
https://<your-domain>/.well-known/apple-app-site-association
and must contain something like:
{
"webcredentials": {
"apps": [
"<your-team-id>.<your-bundle-id>"
]
}
}
Your team id can be found e.g. in ios/Runner.xcodeproj/project.pbxproj
look
for the key DEVELOPMENT_TEAM
, the bundle id is there too look for
PRODUCT_BUNDLE_IDENTIFIER
. Apple is caching that requests to the file above
with their CDN, but you can check the cached value here:
https://app-site-association.cdn-apple.com/a/v1/<your-domain>
If you have not setup your app check https://developer.apple.com/account/resources/identifiers/list
In order to use the zero touch login on iOS and MacOS you need to add the iCloud capability and configure iCloud Key-Value Storage in your Xcode project. Here is a step per step guide:
- Open your Xcode project.
- Select your project in the Project Navigator to open the project settings.
- Select your target under "Targets."
- Go to the "Signing & Capabilities" tab.
- Click the "+ Capability" button.
- Scroll down and select "iCloud."
- In the iCloud section, enable the "Key-Value storage" checkbox.