flutter_user_identity 0.2.0 copy "flutter_user_identity: ^0.2.0" to clipboard
flutter_user_identity: ^0.2.0 copied to clipboard

Fetch unique user identity from Android and iOS.

flutter_user_identity #

This Flutter package provides an async function apps running on both iOS and Android. It returns an iCloud user identity on iOS and an email on Android.

Installation #

IOS #

  1. Add the following to your Info.Plis file:
<key>CK_CONTAINER_IDENTIFIER</key>
<string>iCloud.${bundle_id}</string>
  1. Add this to ios/Runner/Runner.entitlements (or create and include this file to to project if it doesn't exist):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>aps-environment</key>
    <string>development</string>
    <key>com.apple.developer.icloud-container-identifiers</key>
    <array>
      <string>iCloud.${bundle_id}</string>
    </array>
    <key>com.apple.developer.icloud-services</key>
    <array>
      <string>CloudKit</string>
      <string>CloudDocuments</string>
    </array>
    <key>com.apple.developer.ubiquity-container-identifiers</key>
    <array>
      <string>iCloud.${bundle_id}</string>
    </array>
    <key>com.apple.developer.ubiquity-kvstore-identifier</key>
    <string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
  </dict>
</plist>
  1. Change ${bundle_id} to your actual bundle id

Usage #

final userId = await FlutterUserIdentity().getUserIdentity();
0
likes
125
points
21
downloads

Publisher

unverified uploader

Weekly Downloads

Fetch unique user identity from Android and iOS.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_user_identity

Packages that implement flutter_user_identity