Skip to content

Commit 013e897

Browse files
committed
feat(example): update Facebook auth and add iOS entitlements
- Remove 'email' permission from Facebook login to simplify auth flow - Add Runner.entitlements file for iOS keychain access groups - Update iOS project configuration to support entitlements
1 parent 3dfdb76 commit 013e897

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

packages/supabase_flutter/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3737
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
3838
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
39+
791A11FE2E5F507C006859F5 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
3940
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
4041
89CEA82799D734CC486F5D5A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4142
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
@@ -68,7 +69,6 @@
6869
9F7A42A0F8397A30C48EF6B6 /* Pods-Runner.release.xcconfig */,
6970
FC8416E7A50F84EA287634DD /* Pods-Runner.profile.xcconfig */,
7071
);
71-
name = Pods;
7272
path = Pods;
7373
sourceTree = "<group>";
7474
};
@@ -113,6 +113,7 @@
113113
97C146F01CF9000F007C117D /* Runner */ = {
114114
isa = PBXGroup;
115115
children = (
116+
791A11FE2E5F507C006859F5 /* Runner.entitlements */,
116117
97C146FA1CF9000F007C117D /* Main.storyboard */,
117118
97C146FD1CF9000F007C117D /* Assets.xcassets */,
118119
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
@@ -358,6 +359,7 @@
358359
buildSettings = {
359360
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
360361
CLANG_ENABLE_MODULES = YES;
362+
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
361363
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
362364
ENABLE_BITCODE = NO;
363365
INFOPLIST_FILE = Runner/Info.plist;
@@ -486,6 +488,7 @@
486488
buildSettings = {
487489
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
488490
CLANG_ENABLE_MODULES = YES;
491+
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
489492
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
490493
ENABLE_BITCODE = NO;
491494
INFOPLIST_FILE = Runner/Info.plist;
@@ -508,6 +511,7 @@
508511
buildSettings = {
509512
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
510513
CLANG_ENABLE_MODULES = YES;
514+
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
511515
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
512516
ENABLE_BITCODE = NO;
513517
INFOPLIST_FILE = Runner/Info.plist;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>keychain-access-groups</key>
6+
<array/>
7+
</dict>
8+
</plist>

packages/supabase_flutter/example/lib/screens/auth_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class _AuthScreenState extends State<AuthScreen> {
143143

144144
try {
145145
final LoginResult result = await FacebookAuth.instance.login(
146-
permissions: ['email', 'public_profile'],
146+
permissions: ['public_profile'],
147147
);
148148

149149
if (result.status == LoginStatus.success) {

0 commit comments

Comments
 (0)