diff --git a/packages/local_auth/local_auth_darwin/CHANGELOG.md b/packages/local_auth/local_auth_darwin/CHANGELOG.md index 7c816d348e89..1509f6dcea51 100644 --- a/packages/local_auth/local_auth_darwin/CHANGELOG.md +++ b/packages/local_auth/local_auth_darwin/CHANGELOG.md @@ -1,3 +1,4 @@ ## 1.2.0 * Renames the package previously published as [`local_auth_ios`](https://pub.dev/packages/local_auth_ios) +* Adds support for macOS diff --git a/packages/local_auth/local_auth_darwin/README.md b/packages/local_auth/local_auth_darwin/README.md index 46cea6593921..a7bfdd606842 100644 --- a/packages/local_auth/local_auth_darwin/README.md +++ b/packages/local_auth/local_auth_darwin/README.md @@ -1,6 +1,6 @@ # local_auth_darwin -The iOS implementation of [`local_auth`][1]. +The iOS and macOS implementation of [`local_auth`][1]. ## Usage diff --git a/packages/local_auth/local_auth_darwin/darwin/Classes/FLTLocalAuthPlugin.h b/packages/local_auth/local_auth_darwin/darwin/Classes/FLTLocalAuthPlugin.h index d023ba3ed140..4a2a969d484b 100644 --- a/packages/local_auth/local_auth_darwin/darwin/Classes/FLTLocalAuthPlugin.h +++ b/packages/local_auth/local_auth_darwin/darwin/Classes/FLTLocalAuthPlugin.h @@ -2,7 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#if TARGET_OS_OSX +#import +#else #import +#endif #import "messages.g.h" diff --git a/packages/local_auth/local_auth_darwin/darwin/Classes/FLTLocalAuthPlugin.m b/packages/local_auth/local_auth_darwin/darwin/Classes/FLTLocalAuthPlugin.m index 3ac8ebe29cc7..2fda6a042302 100644 --- a/packages/local_auth/local_auth_darwin/darwin/Classes/FLTLocalAuthPlugin.m +++ b/packages/local_auth/local_auth_darwin/darwin/Classes/FLTLocalAuthPlugin.m @@ -156,6 +156,28 @@ - (void)showAlertWithMessage:(NSString *)message dismissButtonTitle:(NSString *)dismissButtonTitle openSettingsButtonTitle:(NSString *)openSettingsButtonTitle completion:(FLAAuthCompletion)completion { +#if TARGET_OS_OSX + NSAlert *alert = [[NSAlert alloc] init]; + [alert setMessageText:@""]; + [alert setInformativeText:message]; + + if (openSettingsButtonTitle != nil) { + [alert addButtonWithTitle:openSettingsButtonTitle]; + [alert setShowsHelp:YES]; + [alert setHelpAnchor:@"OpenSettings"]; + } + [alert addButtonWithTitle:dismissButtonTitle]; + + NSModalResponse response = [alert runModal]; + + if (response == NSAlertFirstButtonReturn) { + NSURL *url = [NSURL URLWithString:@"x-apple.systempreferences:"]; + [[NSWorkspace sharedWorkspace] openURL:url]; + [self handleSucceeded:NO withCompletion:completion]; + } else { + [self handleSucceeded:NO withCompletion:completion]; + } +#else UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"" message:message @@ -185,6 +207,7 @@ - (void)showAlertWithMessage:(NSString *)message [[UIApplication sharedApplication].delegate.window.rootViewController presentViewController:alert animated:YES completion:nil]; +#endif } - (void)handleAuthReplyWithSuccess:(BOOL)success @@ -260,7 +283,12 @@ - (void)handleError:(NSError *)authError #pragma mark - AppDelegate -- (void)applicationDidBecomeActive:(UIApplication *)application { +#if TARGET_OS_OSX +- (void)applicationDidBecomeActive:(NSNotification *)notification +#else +- (void)applicationDidBecomeActive:(UIApplication *)application +#endif +{ if (self.lastCallState != nil) { [self authenticateWithOptions:_lastCallState.options strings:_lastCallState.strings diff --git a/packages/local_auth/local_auth_darwin/darwin/Classes/FLTLocalAuthPlugin_Test.h b/packages/local_auth/local_auth_darwin/darwin/Classes/FLTLocalAuthPlugin_Test.h index c35322033f99..73fdeaea1599 100644 --- a/packages/local_auth/local_auth_darwin/darwin/Classes/FLTLocalAuthPlugin_Test.h +++ b/packages/local_auth/local_auth_darwin/darwin/Classes/FLTLocalAuthPlugin_Test.h @@ -2,7 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#if TARGET_OS_OSX +#import +#else #import +#endif + #import /** diff --git a/packages/local_auth/local_auth_darwin/darwin/Classes/messages.g.h b/packages/local_auth/local_auth_darwin/darwin/Classes/messages.g.h index 712216c7599f..09343e202ecb 100644 --- a/packages/local_auth/local_auth_darwin/darwin/Classes/messages.g.h +++ b/packages/local_auth/local_auth_darwin/darwin/Classes/messages.g.h @@ -33,7 +33,7 @@ typedef NS_ENUM(NSUInteger, FLAAuthResult) { - (instancetype)initWithValue:(FLAAuthResult)value; @end -/// Pigeon equivalent of the subset of BiometricType used by iOS. +/// Pigeon equivalent of the subset of BiometricType used by iOS and macOS. typedef NS_ENUM(NSUInteger, FLAAuthBiometric) { FLAAuthBiometricFace = 0, FLAAuthBiometricFingerprint = 1, @@ -50,9 +50,10 @@ typedef NS_ENUM(NSUInteger, FLAAuthBiometric) { @class FLAAuthResultDetails; @class FLAAuthBiometricWrapper; -/// Pigeon version of IOSAuthMessages, plus the authorization reason. +/// Pigeon version of IOSAuthMessages and MacOSAuthMessages, plus the +/// authorization reason. /// -/// See auth_messages_ios.dart for details. +/// See auth_messages_ios.dart and auth_messages_macos.dart for details. @interface FLAAuthStrings : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; diff --git a/packages/local_auth/local_auth_darwin/darwin/Classes/messages.g.m b/packages/local_auth/local_auth_darwin/darwin/Classes/messages.g.m index 6f0ef07d4c9e..5527ee444385 100644 --- a/packages/local_auth/local_auth_darwin/darwin/Classes/messages.g.m +++ b/packages/local_auth/local_auth_darwin/darwin/Classes/messages.g.m @@ -41,7 +41,7 @@ - (instancetype)initWithValue:(FLAAuthResult)value { } @end -/// Pigeon equivalent of the subset of BiometricType used by iOS. +/// Pigeon equivalent of the subset of BiometricType used by iOS and macOS. @implementation FLAAuthBiometricBox - (instancetype)initWithValue:(FLAAuthBiometric)value { self = [super init]; diff --git a/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin.podspec b/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin.podspec index 38dd90cf1057..0b4120abc5f5 100644 --- a/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin.podspec +++ b/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin.podspec @@ -16,9 +16,10 @@ Downloaded by pub (not CocoaPods). s.documentation_url = 'https://pub.dev/packages/local_auth_darwin' s.source_files = 'Classes/**/*' s.public_header_files = 'Classes/**/*.h' - s.dependency 'Flutter' - s.platform = :ios, '12.0' + s.ios.dependency 'Flutter' + s.osx.dependency 'FlutterMacOS' + s.ios.deployment_target = '12.0' + s.osx.deployment_target = '10.15' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } s.resource_bundles = {'local_auth_darwin_privacy' => ['Resources/PrivacyInfo.xcprivacy']} end - diff --git a/packages/local_auth/local_auth_darwin/example/ios/Podfile b/packages/local_auth/local_auth_darwin/example/ios/Podfile index 196252cf8af7..cc1f866a9567 100644 --- a/packages/local_auth/local_auth_darwin/example/ios/Podfile +++ b/packages/local_auth/local_auth_darwin/example/ios/Podfile @@ -30,10 +30,10 @@ flutter_ios_podfile_setup target 'Runner' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do - inherit! :search_paths + inherit! :search_paths - pod 'OCMock','3.5' - end + pod 'OCMock','3.5' + end end post_install do |installer| diff --git a/packages/local_auth/local_auth_darwin/example/ios/Runner/Info.plist b/packages/local_auth/local_auth_darwin/example/ios/Runner/Info.plist index 2dc92f5dff1c..f227458ab47b 100644 --- a/packages/local_auth/local_auth_darwin/example/ios/Runner/Info.plist +++ b/packages/local_auth/local_auth_darwin/example/ios/Runner/Info.plist @@ -43,8 +43,8 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - NSFaceIDUsageDescription - App needs to authenticate using faces. + NSFaceIDUsageDescription + App needs to authenticate using faces. CADisableMinimumFrameDurationOnPhone UIApplicationSupportsIndirectInputEvents diff --git a/packages/local_auth/local_auth_darwin/example/lib/main.dart b/packages/local_auth/local_auth_darwin/example/lib/main.dart index 9cb85a6984ff..5928b8a50d10 100644 --- a/packages/local_auth/local_auth_darwin/example/lib/main.dart +++ b/packages/local_auth/local_auth_darwin/example/lib/main.dart @@ -84,7 +84,10 @@ class _MyAppState extends State { }); authenticated = await LocalAuthPlatform.instance.authenticate( localizedReason: 'Let OS determine authentication method', - authMessages: [const IOSAuthMessages()], + authMessages: [ + const IOSAuthMessages(), + const MacOSAuthMessages(), + ], options: const AuthenticationOptions( stickyAuth: true, ), @@ -118,7 +121,10 @@ class _MyAppState extends State { authenticated = await LocalAuthPlatform.instance.authenticate( localizedReason: 'Scan your fingerprint (or face or whatever) to authenticate', - authMessages: [const IOSAuthMessages()], + authMessages: [ + const IOSAuthMessages(), + const MacOSAuthMessages(), + ], options: const AuthenticationOptions( stickyAuth: true, biometricOnly: true, diff --git a/packages/local_auth/local_auth_darwin/example/macos/.gitignore b/packages/local_auth/local_auth_darwin/example/macos/.gitignore new file mode 100644 index 000000000000..746adbb6b9e1 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/packages/local_auth/local_auth_darwin/example/macos/Flutter/Flutter-Debug.xcconfig b/packages/local_auth/local_auth_darwin/example/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 000000000000..4b81f9b2d200 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/packages/local_auth/local_auth_darwin/example/macos/Flutter/Flutter-Release.xcconfig b/packages/local_auth/local_auth_darwin/example/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 000000000000..5caa9d1579e4 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/packages/local_auth/local_auth_darwin/example/macos/Podfile b/packages/local_auth/local_auth_darwin/example/macos/Podfile new file mode 100644 index 000000000000..f12f8ee6e02b --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Podfile @@ -0,0 +1,46 @@ +platform :osx, '10.15' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) + + target 'RunnerTests' do + inherit! :search_paths + + pod 'OCMock','3.5' + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner.xcodeproj/project.pbxproj b/packages/local_auth/local_auth_darwin/example/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000000..ccf9eb9e7f42 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,808 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 33286D5B2B7A741300246F3B /* FLTLocalAuthPluginTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 33286D5A2B7A741300246F3B /* FLTLocalAuthPluginTests.m */; }; + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + C8FD9D291A3B2C63FC0DAFA1 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0E45CE6F9A1ADD7D0E634A9 /* Pods_Runner.framework */; }; + E2BF46AC29288B9550C77D4B /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 966251DDB9E67A634E3C12AC /* Pods_RunnerTests.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC10EC2044A3C60003C045; + remoteInfo = Runner; + }; + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 20F81DA31EACC2F40778A89E /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 33286D5A2B7A741300246F3B /* FLTLocalAuthPluginTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FLTLocalAuthPluginTests.m; path = ../../darwin/Tests/FLTLocalAuthPluginTests.m; sourceTree = ""; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 3ABDF3152B3CB7FB8F36F2E2 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 6F1E1B446BA2F4E6416E1697 /* 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 = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 966251DDB9E67A634E3C12AC /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + A85E9ABF5F0EEC92D1DDB711 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + D090B0CE14EF62B1A1585F33 /* 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 = ""; }; + D0E45CE6F9A1ADD7D0E634A9 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DE19C400A1E4492D23098E71 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E2BF46AC29288B9550C77D4B /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C8FD9D291A3B2C63FC0DAFA1 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 33286D592B7A73FA00246F3B /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 33286D5A2B7A741300246F3B /* FLTLocalAuthPluginTests.m */, + ); + name = RunnerTests; + sourceTree = ""; + }; + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33286D592B7A73FA00246F3B /* RunnerTests */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + 453EFDE3A4C23803ABA4AF47 /* Pods */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* example.app */, + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + 453EFDE3A4C23803ABA4AF47 /* Pods */ = { + isa = PBXGroup; + children = ( + 3ABDF3152B3CB7FB8F36F2E2 /* Pods-Runner.debug.xcconfig */, + D090B0CE14EF62B1A1585F33 /* Pods-Runner.release.xcconfig */, + DE19C400A1E4492D23098E71 /* Pods-Runner.profile.xcconfig */, + 20F81DA31EACC2F40778A89E /* Pods-RunnerTests.debug.xcconfig */, + A85E9ABF5F0EEC92D1DDB711 /* Pods-RunnerTests.release.xcconfig */, + 6F1E1B446BA2F4E6416E1697 /* Pods-RunnerTests.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D0E45CE6F9A1ADD7D0E634A9 /* Pods_Runner.framework */, + 966251DDB9E67A634E3C12AC /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C80D4294CF70F00263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + B4CCA9C112C736FB6D6DE87A /* [CP] Check Pods Manifest.lock */, + 331C80D1294CF70F00263BE5 /* Sources */, + 331C80D2294CF70F00263BE5 /* Frameworks */, + 331C80D3294CF70F00263BE5 /* Resources */, + 8F5E66451DAB8F70261EE39E /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C80DA294CF71000263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + CEA8413F238AF58CE3D243C3 /* [CP] Check Pods Manifest.lock */, + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + FBE395BD4C5126E9ED84FDEA /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C80D4294CF70F00263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 33CC10EC2044A3C60003C045; + }; + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 331C80D4294CF70F00263BE5 /* RunnerTests */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C80D3294CF70F00263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; + 8F5E66451DAB8F70261EE39E /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + B4CCA9C112C736FB6D6DE87A /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + 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; + }; + CEA8413F238AF58CE3D243C3 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + 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; + }; + FBE395BD4C5126E9ED84FDEA /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C80D1294CF70F00263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33286D5B2B7A741300246F3B /* FLTLocalAuthPluginTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC10EC2044A3C60003C045 /* Runner */; + targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; + }; + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 331C80DB294CF71000263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 20F81DA31EACC2F40778A89E /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A85E9ABF5F0EEC92D1DDB711 /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6F1E1B446BA2F4E6416E1697 /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C80DB294CF71000263BE5 /* Debug */, + 331C80DC294CF71000263BE5 /* Release */, + 331C80DD294CF71000263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/local_auth/local_auth_darwin/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000000..18d981003d68 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/local_auth/local_auth_darwin/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000000..15368eccb25a --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/packages/local_auth/local_auth_darwin/example/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000000..21a3cc14c74e --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/local_auth/local_auth_darwin/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000000..18d981003d68 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/AppDelegate.swift b/packages/local_auth/local_auth_darwin/example/macos/Runner/AppDelegate.swift new file mode 100644 index 000000000000..5cec4c48f620 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000000..a2ec33f19f11 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 000000000000..82b6f9d9a33e Binary files /dev/null and b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 000000000000..13b35eba55c6 Binary files /dev/null and b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 000000000000..0a3f5fa40fb3 Binary files /dev/null and b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 000000000000..bdb57226d5f2 Binary files /dev/null and b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 000000000000..f083318e09ca Binary files /dev/null and b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 000000000000..326c0e72c9d8 Binary files /dev/null and b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 000000000000..2f1632cfddf3 Binary files /dev/null and b/packages/local_auth/local_auth_darwin/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Base.lproj/MainMenu.xib b/packages/local_auth/local_auth_darwin/example/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 000000000000..80e867a4e06b --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Configs/AppInfo.xcconfig b/packages/local_auth/local_auth_darwin/example/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 000000000000..bdb88cb7b7e3 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = example + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.example + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2024 dev.flutter.plugins. All rights reserved. diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Configs/Debug.xcconfig b/packages/local_auth/local_auth_darwin/example/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 000000000000..36b0fd9464f4 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Configs/Release.xcconfig b/packages/local_auth/local_auth_darwin/example/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 000000000000..dff4f49561c8 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Configs/Warnings.xcconfig b/packages/local_auth/local_auth_darwin/example/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 000000000000..42bcbf4780b1 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/DebugProfile.entitlements b/packages/local_auth/local_auth_darwin/example/macos/Runner/DebugProfile.entitlements new file mode 100644 index 000000000000..dddb8a30c851 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Info.plist b/packages/local_auth/local_auth_darwin/example/macos/Runner/Info.plist new file mode 100644 index 000000000000..024b6f329755 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSFaceIDUsageDescription + App needs to authenticate using faces. + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/MainFlutterWindow.swift b/packages/local_auth/local_auth_darwin/example/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 000000000000..f21908966e95 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,19 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/packages/local_auth/local_auth_darwin/example/macos/Runner/Release.entitlements b/packages/local_auth/local_auth_darwin/example/macos/Runner/Release.entitlements new file mode 100644 index 000000000000..852fa1a4728a --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/packages/local_auth/local_auth_darwin/example/macos/RunnerTests/Info.plist b/packages/local_auth/local_auth_darwin/example/macos/RunnerTests/Info.plist new file mode 100644 index 000000000000..64d65ca49577 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/example/macos/RunnerTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/packages/local_auth/local_auth_darwin/lib/local_auth_darwin.dart b/packages/local_auth/local_auth_darwin/lib/local_auth_darwin.dart index 4d0beabdefe3..def5fcf108d3 100644 --- a/packages/local_auth/local_auth_darwin/lib/local_auth_darwin.dart +++ b/packages/local_auth/local_auth_darwin/lib/local_auth_darwin.dart @@ -2,19 +2,24 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:io'; + import 'package:flutter/foundation.dart' show visibleForTesting; import 'package:flutter/services.dart'; import 'package:local_auth_platform_interface/local_auth_platform_interface.dart'; import 'src/messages.g.dart'; import 'types/auth_messages_ios.dart'; +import 'types/auth_messages_macos.dart'; +import 'types/constant_auth_messages.dart'; export 'package:local_auth_darwin/types/auth_messages_ios.dart'; +export 'package:local_auth_darwin/types/auth_messages_macos.dart'; export 'package:local_auth_platform_interface/types/auth_messages.dart'; export 'package:local_auth_platform_interface/types/auth_options.dart'; export 'package:local_auth_platform_interface/types/biometric_type.dart'; -/// The implementation of [LocalAuthPlatform] for iOS. +/// The implementation of [LocalAuthPlatform] for iOS and macOS. class LocalAuthDarwin extends LocalAuthPlatform { /// Creates a new plugin implementation instance. LocalAuthDarwin({ @@ -93,29 +98,43 @@ class LocalAuthDarwin extends LocalAuthPlatform { @override Future isDeviceSupported() async => _api.isDeviceSupported(); - /// Always returns false as this method is not supported on iOS. + /// Always returns false as this method is not supported on iOS and macOS. @override Future stopAuthentication() async => false; AuthStrings _pigeonStringsFromAuthMessages( String localizedReason, Iterable messagesList) { - IOSAuthMessages? messages; + IOSAuthMessages? iosMessages; + MacOSAuthMessages? macosMessages; + for (final AuthMessages entry in messagesList) { - if (entry is IOSAuthMessages) { - messages = entry; + if (Platform.isIOS) { + if (entry is IOSAuthMessages) { + iosMessages = entry; + break; + } + } else if (entry is MacOSAuthMessages) { + macosMessages = entry; break; } } + return AuthStrings( reason: localizedReason, - lockOut: messages?.lockOut ?? iOSLockOut, - goToSettingsButton: messages?.goToSettingsButton ?? goToSettings, - goToSettingsDescription: - messages?.goToSettingsDescription ?? iOSGoToSettingsDescription, + lockOut: iosMessages?.lockOut ?? macosMessages?.lockOut ?? lockOutMessage, + goToSettingsButton: iosMessages?.goToSettingsButton ?? + macosMessages?.goToSettingsButton ?? + goToSettingsMessage, + goToSettingsDescription: iosMessages?.goToSettingsDescription ?? + macosMessages?.goToSettingsDescription ?? + goToSettingsDescriptionMessage, // TODO(stuartmorgan): The default's name is confusing here for legacy // reasons; this should be fixed as part of some future breaking change. - cancelButton: messages?.cancelButton ?? iOSOkButton, - localizedFallbackTitle: messages?.localizedFallbackTitle, + cancelButton: iosMessages?.cancelButton ?? + macosMessages?.cancelButton ?? + okButtonMessage, + localizedFallbackTitle: iosMessages?.localizedFallbackTitle ?? + macosMessages?.localizedFallbackTitle, ); } } diff --git a/packages/local_auth/local_auth_darwin/lib/src/messages.g.dart b/packages/local_auth/local_auth_darwin/lib/src/messages.g.dart index a3d722da5ec9..5830ff37337e 100644 --- a/packages/local_auth/local_auth_darwin/lib/src/messages.g.dart +++ b/packages/local_auth/local_auth_darwin/lib/src/messages.g.dart @@ -36,15 +36,16 @@ enum AuthResult { errorPasscodeNotSet, } -/// Pigeon equivalent of the subset of BiometricType used by iOS. +/// Pigeon equivalent of the subset of BiometricType used by iOS and macOS. enum AuthBiometric { face, fingerprint, } -/// Pigeon version of IOSAuthMessages, plus the authorization reason. +/// Pigeon version of IOSAuthMessages and MacOSAuthMessages, plus the +/// authorization reason. /// -/// See auth_messages_ios.dart for details. +/// See auth_messages_ios.dart and auth_messages_macos.dart for details. class AuthStrings { AuthStrings({ required this.reason, diff --git a/packages/local_auth/local_auth_darwin/lib/types/auth_messages_ios.dart b/packages/local_auth/local_auth_darwin/lib/types/auth_messages_ios.dart index e5173fc4ab4f..121cb61b1c38 100644 --- a/packages/local_auth/local_auth_darwin/lib/types/auth_messages_ios.dart +++ b/packages/local_auth/local_auth_darwin/lib/types/auth_messages_ios.dart @@ -3,9 +3,10 @@ // found in the LICENSE file. import 'package:flutter/foundation.dart'; -import 'package:intl/intl.dart'; import 'package:local_auth_platform_interface/types/auth_messages.dart'; +import 'constant_auth_messages.dart'; + /// Class wrapping all authentication messages needed on iOS. /// Provides default values for all messages. @immutable @@ -43,11 +44,11 @@ class IOSAuthMessages extends AuthMessages { @override Map get args { return { - 'lockOut': lockOut ?? iOSLockOut, - 'goToSetting': goToSettingsButton ?? goToSettings, + 'lockOut': lockOut ?? lockOutMessage, + 'goToSetting': goToSettingsButton ?? goToSettingsMessage, 'goToSettingDescriptionIOS': - goToSettingsDescription ?? iOSGoToSettingsDescription, - 'okButton': cancelButton ?? iOSOkButton, + goToSettingsDescription ?? goToSettingsDescriptionMessage, + 'okButton': cancelButton ?? okButtonMessage, if (localizedFallbackTitle != null) 'localizedFallbackTitle': localizedFallbackTitle!, }; @@ -74,34 +75,3 @@ class IOSAuthMessages extends AuthMessages { localizedFallbackTitle, ); } - -// Default Strings for IOSAuthMessages plugin. Currently supports English. -// Intl.message must be string literals. - -/// Message shown on a button that the user can click to go to settings pages -/// from the current dialog. -String get goToSettings => Intl.message('Go to settings', - desc: 'Message shown on a button that the user can click to go to ' - 'settings pages from the current dialog. Maximum 30 characters.'); - -/// Message advising the user to re-enable biometrics on their device. -/// It shows in a dialog on iOS. -String get iOSLockOut => Intl.message( - 'Biometric authentication is disabled. Please lock and unlock your screen to ' - 'enable it.', - desc: 'Message advising the user to re-enable biometrics on their device.'); - -/// Message advising the user to go to the settings and configure Biometrics -/// for their device. -String get iOSGoToSettingsDescription => Intl.message( - 'Biometric authentication is not set up on your device. Please either enable ' - 'Touch ID or Face ID on your phone.', - desc: - 'Message advising the user to go to the settings and configure Biometrics ' - 'for their device.'); - -/// Message shown on a button that the user can click to leave the current -/// dialog. -String get iOSOkButton => Intl.message('OK', - desc: 'Message showed on a button that the user can click to leave the ' - 'current dialog. Maximum 30 characters.'); diff --git a/packages/local_auth/local_auth_darwin/lib/types/auth_messages_macos.dart b/packages/local_auth/local_auth_darwin/lib/types/auth_messages_macos.dart new file mode 100644 index 000000000000..02b846b41bba --- /dev/null +++ b/packages/local_auth/local_auth_darwin/lib/types/auth_messages_macos.dart @@ -0,0 +1,77 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/foundation.dart'; +import 'package:local_auth_platform_interface/types/auth_messages.dart'; + +import 'constant_auth_messages.dart'; + +/// Class wrapping all authentication messages needed on macOS. +/// Provides default values for all messages. +@immutable +class MacOSAuthMessages extends AuthMessages { + /// Constructs a new instance. + const MacOSAuthMessages({ + this.lockOut, + this.goToSettingsButton, + this.goToSettingsDescription, + this.cancelButton, + this.localizedFallbackTitle, + }); + + /// Message advising the user to re-enable biometrics on their device. + final String? lockOut; + + /// Message shown on a button that the user can click to go to settings pages + /// from the current dialog. + /// Maximum 30 characters. + final String? goToSettingsButton; + + /// Message advising the user to go to the settings and configure Biometrics + /// for their device. + final String? goToSettingsDescription; + + /// Message shown on a button that the user can click to leave the current + /// dialog. + /// Maximum 30 characters. + final String? cancelButton; + + /// The localized title for the fallback button in the dialog presented to + /// the user during authentication. + final String? localizedFallbackTitle; + + @override + Map get args { + return { + 'lockOut': lockOut ?? lockOutMessage, + 'goToSetting': goToSettingsButton ?? goToSettingsMessage, + 'goToSettingDescriptionMacOS': + goToSettingsDescription ?? goToSettingsDescriptionMessage, + 'okButton': cancelButton ?? okButtonMessage, + if (localizedFallbackTitle != null) + 'localizedFallbackTitle': localizedFallbackTitle!, + }; + } + + @override + bool operator ==(Object other) => + identical(this, other) || + other is MacOSAuthMessages && + runtimeType == other.runtimeType && + lockOut == other.lockOut && + goToSettingsButton == other.goToSettingsButton && + goToSettingsDescription == other.goToSettingsDescription && + cancelButton == other.cancelButton && + localizedFallbackTitle == other.localizedFallbackTitle; + + @override + int get hashCode => Object.hash( + super.hashCode, + lockOut, + goToSettingsButton, + goToSettingsDescription, + cancelButton, + localizedFallbackTitle, + ); +} diff --git a/packages/local_auth/local_auth_darwin/lib/types/constant_auth_messages.dart b/packages/local_auth/local_auth_darwin/lib/types/constant_auth_messages.dart new file mode 100644 index 000000000000..7782b53aa982 --- /dev/null +++ b/packages/local_auth/local_auth_darwin/lib/types/constant_auth_messages.dart @@ -0,0 +1,49 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:intl/intl.dart'; + +// Default Strings for IOSAuthMessages and MacOSAuthMessages plugin. +// Currently supports English. Intl.message must be string literals. + +/// Message shown on a button that the user can click to go to settings pages +/// from the current dialog. +String get goToSettingsMessage { + return Intl.message( + 'Go to settings', + desc: 'Message shown on a button that the user can click to go to ' + 'settings pages from the current dialog. Maximum 30 characters.', + ); +} + +/// Message advising the user to re-enable biometrics on their device. +/// It shows in a dialog on macOS. +String get lockOutMessage { + return Intl.message( + 'Biometric authentication is disabled. Please lock and unlock your screen ' + 'to enable it.', + desc: 'Message advising the user to re-enable biometrics on their device.', + ); +} + +/// Message advising the user to go to the settings and configure Biometrics +/// for their device. +String get goToSettingsDescriptionMessage { + return Intl.message( + 'Biometric authentication is not set up on your device. Please either ' + 'enable Touch ID or Face ID on your device.', + desc: 'Message advising the user to go to the settings and configure ' + 'Biometrics for their device.', + ); +} + +/// Message shown on a button that the user can click to leave the current +/// dialog. +String get okButtonMessage { + return Intl.message( + 'OK', + desc: 'Message showed on a button that the user can click to leave the ' + 'current dialog. Maximum 30 characters.', + ); +} diff --git a/packages/local_auth/local_auth_darwin/pigeons/messages.dart b/packages/local_auth/local_auth_darwin/pigeons/messages.dart index 080d4572d2e5..a3d7fe1ee6af 100644 --- a/packages/local_auth/local_auth_darwin/pigeons/messages.dart +++ b/packages/local_auth/local_auth_darwin/pigeons/messages.dart @@ -14,9 +14,10 @@ import 'package:pigeon/pigeon.dart'; copyrightHeader: 'pigeons/copyright.txt', )) -/// Pigeon version of IOSAuthMessages, plus the authorization reason. +/// Pigeon version of IOSAuthMessages and MacOSAuthMessages, plus the +/// authorization reason. /// -/// See auth_messages_ios.dart for details. +/// See auth_messages_ios.dart and auth_messages_macos.dart for details. class AuthStrings { /// Constructs a new instance. const AuthStrings({ @@ -82,7 +83,7 @@ class AuthResultDetails { final String? errorDetails; } -/// Pigeon equivalent of the subset of BiometricType used by iOS. +/// Pigeon equivalent of the subset of BiometricType used by iOS and macOS. enum AuthBiometric { face, fingerprint } // TODO(stuartmorgan): Enums need be wrapped in a data class because thay can't diff --git a/packages/local_auth/local_auth_darwin/pubspec.yaml b/packages/local_auth/local_auth_darwin/pubspec.yaml index 0e1a21045e42..710ab6b9244e 100644 --- a/packages/local_auth/local_auth_darwin/pubspec.yaml +++ b/packages/local_auth/local_auth_darwin/pubspec.yaml @@ -1,5 +1,5 @@ name: local_auth_darwin -description: iOS implementation of the local_auth plugin. +description: iOS and macOS implementation of the local_auth plugin. repository: https://github.com/flutter/packages/tree/main/packages/local_auth/local_auth_darwin issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+local_auth%22 version: 1.2.0 @@ -16,6 +16,10 @@ flutter: pluginClass: FLTLocalAuthPlugin dartPluginClass: LocalAuthDarwin sharedDarwinSource: true + macos: + pluginClass: FLTLocalAuthPlugin + dartPluginClass: LocalAuthDarwin + sharedDarwinSource: true dependencies: flutter: diff --git a/packages/local_auth/local_auth_darwin/test/local_auth_darwin_test.dart b/packages/local_auth/local_auth_darwin/test/local_auth_darwin_test.dart index 6075b50571f8..6df0a5a69fb3 100644 --- a/packages/local_auth/local_auth_darwin/test/local_auth_darwin_test.dart +++ b/packages/local_auth/local_auth_darwin/test/local_auth_darwin_test.dart @@ -6,6 +6,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:local_auth_darwin/local_auth_darwin.dart'; import 'package:local_auth_darwin/src/messages.g.dart'; +import 'package:local_auth_darwin/types/constant_auth_messages.dart'; import 'package:local_auth_platform_interface/local_auth_platform_interface.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; @@ -98,11 +99,11 @@ void main() { final AuthStrings strings = result.captured[0] as AuthStrings; expect(strings.reason, reason); // These should all be the default values from - // auth_messages_ios.dart - expect(strings.lockOut, iOSLockOut); - expect(strings.goToSettingsButton, goToSettings); - expect(strings.goToSettingsDescription, iOSGoToSettingsDescription); - expect(strings.cancelButton, iOSOkButton); + // constant_auth_messages.dart + expect(strings.lockOut, lockOutMessage); + expect(strings.goToSettingsButton, goToSettingsMessage); + expect(strings.goToSettingsDescription, goToSettingsDescriptionMessage); + expect(strings.cancelButton, okButtonMessage); expect(strings.localizedFallbackTitle, null); }); @@ -121,11 +122,11 @@ void main() { final AuthStrings strings = result.captured[0] as AuthStrings; expect(strings.reason, reason); // These should all be the default values from - // auth_messages_ios.dart - expect(strings.lockOut, iOSLockOut); - expect(strings.goToSettingsButton, goToSettings); - expect(strings.goToSettingsDescription, iOSGoToSettingsDescription); - expect(strings.cancelButton, iOSOkButton); + // constant_auth_messages.dart + expect(strings.lockOut, lockOutMessage); + expect(strings.goToSettingsButton, goToSettingsMessage); + expect(strings.goToSettingsDescription, goToSettingsDescriptionMessage); + expect(strings.cancelButton, okButtonMessage); expect(strings.localizedFallbackTitle, null); }); @@ -151,6 +152,13 @@ void main() { cancelButton: cancel, localizedFallbackTitle: localizedFallbackTitle, ), + const MacOSAuthMessages( + lockOut: lockOut, + goToSettingsButton: goToSettingsButton, + goToSettingsDescription: gotToSettingsDescription, + cancelButton: cancel, + localizedFallbackTitle: localizedFallbackTitle, + ), AnotherPlatformAuthMessages(), ]); @@ -183,6 +191,11 @@ void main() { localizedFallbackTitle: localizedFallbackTitle, cancelButton: cancel, ), + const MacOSAuthMessages( + lockOut: lockOut, + localizedFallbackTitle: localizedFallbackTitle, + cancelButton: cancel, + ), ]); final VerificationResult result = @@ -194,9 +207,9 @@ void main() { expect(strings.localizedFallbackTitle, localizedFallbackTitle); expect(strings.cancelButton, cancel); // These were not set, so should all be the default values from - // auth_messages_ios.dart - expect(strings.goToSettingsButton, goToSettings); - expect(strings.goToSettingsDescription, iOSGoToSettingsDescription); + // constant_auth_messages.dart + expect(strings.goToSettingsButton, goToSettingsMessage); + expect(strings.goToSettingsDescription, goToSettingsDescriptionMessage); }); });