Skip to content

Commit

Permalink
feat: Enabled otpauth protocol support on iOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyost committed Jul 9, 2024
1 parent b0de12d commit ba3aded
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 2 deletions.
4 changes: 3 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="otpauth" />
<data
android:host="totp"
android:scheme="otpauth" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
Expand Down
12 changes: 11 additions & 1 deletion ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,22 @@
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>Firebase</string>
<string>app.openauthenticator.firebase</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.15794778256-2mngm8dj80j5o8nggvbodjfg4ud8fvo7</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>app.openauthenticator</string>
<key>CFBundleURLSchemes</key>
<array>
<string>otpauth</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
Expand Down
6 changes: 6 additions & 0 deletions macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,8 @@ PODS:
- abseil/meta/type_traits
- abseil/xcprivacy
- abseil/xcprivacy (1.20240116.2)
- app_links (1.0.0):
- FlutterMacOS
- AppCheckCore (10.19.2):
- GoogleUtilities/Environment (~> 7.13)
- GoogleUtilities/UserDefaults (~> 7.13)
Expand Down Expand Up @@ -1228,6 +1230,7 @@ PODS:
- FlutterMacOS

DEPENDENCIES:
- app_links (from `Flutter/ephemeral/.symlinks/plugins/app_links/macos`)
- cloud_firestore (from `Flutter/ephemeral/.symlinks/plugins/cloud_firestore/macos`)
- firebase_app_check (from `Flutter/ephemeral/.symlinks/plugins/firebase_app_check/macos`)
- firebase_auth (from `Flutter/ephemeral/.symlinks/plugins/firebase_auth/macos`)
Expand Down Expand Up @@ -1279,6 +1282,8 @@ SPEC REPOS:
- sqlite3

EXTERNAL SOURCES:
app_links:
:path: Flutter/ephemeral/.symlinks/plugins/app_links/macos
cloud_firestore:
:path: Flutter/ephemeral/.symlinks/plugins/cloud_firestore/macos
firebase_app_check:
Expand Down Expand Up @@ -1316,6 +1321,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
abseil: d121da9ef7e2ff4cab7666e76c5a3e0915ae08c3
app_links: 10e0a0ab602ffaf34d142cd4862f29d34b303b2a
AppCheckCore: 9feb4300caa596a36416cde10674dc5bec1e022e
BoringSSL-GRPC: 1e2348957acdbcad360b80a264a90799984b2ba6
cloud_firestore: 32e6b7c3f9674c8035d417d1d867e815353354f5
Expand Down
65 changes: 65 additions & 0 deletions macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
9A3F3D5C2C3AFDF20055D5CD /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A3F3D5B2C3AFDF20055D5CD /* StoreKit.framework */; };
9A4F5DA82C3B2589000EACC2 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9A4F5DA72C3B2589000EACC2 /* Localizable.strings */; };
9A8DC9DC2C3D519E00244393 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9A8DC9DB2C3D519E00244393 /* GoogleService-Info.plist */; };
C4D91113D382CB2AE9044A5F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DDB6FCFF2E4B80A7FCFF404 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -91,6 +92,7 @@
9A3F3D5B2C3AFDF20055D5CD /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
9A4F5DA62C3B2589000EACC2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
9A4F5DA92C3B259A000EACC2 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
9A8DC9DB2C3D519E00244393 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
A8EB9541C346B14F010B56B4 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
B3EB9328F64AB022013F3747 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -182,6 +184,7 @@
33FAB671232836740065AC1E /* Runner */ = {
isa = PBXGroup;
children = (
9A8DC9DB2C3D519E00244393 /* GoogleService-Info.plist */,
33CC10F02044A3C60003C045 /* AppDelegate.swift */,
33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
33E51913231747F40026EE4D /* DebugProfile.entitlements */,
Expand Down Expand Up @@ -248,6 +251,9 @@
33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */,
0F80AE5B8FAF959EB531959C /* [CP] Embed Pods Frameworks */,
F2DD5EE1E2C3DFB317D6BDEA /* [firebase_crashlytics] Crashlytics Upload Symbols */,
9A8DC9D92C3D4F4A00244393 /* ShellScript */,
9A8DC9DA2C3D4F5D00244393 /* ShellScript */,
);
buildRules = (
);
Expand Down Expand Up @@ -323,6 +329,7 @@
buildActionMask = 2147483647;
files = (
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
9A8DC9DC2C3D519E00244393 /* GoogleService-Info.plist in Resources */,
9A4F5DA82C3B2589000EACC2 /* Localizable.strings in Resources */,
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
);
Expand Down Expand Up @@ -408,6 +415,40 @@
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
};
9A8DC9D92C3D4F4A00244393 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/FirebaseCrashlytics/run\"\n";
};
9A8DC9DA2C3D4F5D00244393 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols\" -gsp \"${PROJECT_DIR}/Runner/GoogleService-Info.plist\" -p ios \"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}\"\n";
};
CF8A941B9EA49A06EC55DDD6 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -430,6 +471,29 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
F2DD5EE1E2C3DFB317D6BDEA /* [firebase_crashlytics] Crashlytics Upload Symbols */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}\"",
"\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/\"",
"\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"",
"\"$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)\"",
"\"$(PROJECT_DIR)/firebase_app_id_file.json\"",
);
name = "[firebase_crashlytics] Crashlytics Upload Symbols";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"$PODS_ROOT/FirebaseCrashlytics/upload-symbols\" --flutter-project \"$PROJECT_DIR/firebase_app_id_file.json\" \n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -723,6 +787,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = BJ5D268ZT2;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
Expand Down

0 comments on commit ba3aded

Please sign in to comment.