Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 5d8a3ef

Browse files
authored
[local_auth] Add native iOS implementation of platform interface [2] (#5207)
* Switch over app facing package to use default method channel implementation in platform interface. * Remove accidental deprecation * Export externally used types from local_auth_platform_interface.dart directly. * Add missing license header * Update imports of types from platform interface package. * Move changes from local_auth/federation_ios to local_auth/federation_ios_2 * Update dependency on platform interface package * Fix analysis issues
1 parent ceed798 commit 5d8a3ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1881
-173
lines changed

packages/local_auth/local_auth/example/ios/Podfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ flutter_ios_podfile_setup
2929

3030
target 'Runner' do
3131
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
32-
33-
target 'RunnerTests' do
34-
inherit! :search_paths
35-
36-
pod 'OCMock', '3.5'
37-
end
3832
end
3933

4034
post_install do |installer|

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

Lines changed: 1 addition & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,14 @@
99
/* Begin PBXBuildFile section */
1010
0CCCD07A2CE24E13C9C1EEA4 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D274A3F79473B1549B2BBD5 /* libPods-Runner.a */; };
1111
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
12-
3398D2E426164AD8005A052F /* FLTLocalAuthPluginTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3398D2E326164AD8005A052F /* FLTLocalAuthPluginTests.m */; };
1312
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1413
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
1514
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
1615
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1716
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1817
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
19-
B726772E092FC537C9618264 /* libPods-RunnerTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 719FE2C7EAF8D9A045E09C29 /* libPods-RunnerTests.a */; };
2018
/* End PBXBuildFile section */
2119

22-
/* Begin PBXContainerItemProxy section */
23-
3398D2D226163948005A052F /* PBXContainerItemProxy */ = {
24-
isa = PBXContainerItemProxy;
25-
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
26-
proxyType = 1;
27-
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
28-
remoteInfo = Runner;
29-
};
30-
/* End PBXContainerItemProxy section */
3120

3221
/* Begin PBXCopyFilesBuildPhase section */
3322
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
@@ -45,11 +34,8 @@
4534
/* Begin PBXFileReference section */
4635
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
4736
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
48-
3398D2CD26163948005A052F /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
49-
3398D2D126163948005A052F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5037
3398D2DC261649CD005A052F /* liblocal_auth.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = liblocal_auth.a; sourceTree = BUILT_PRODUCTS_DIR; };
5138
3398D2DF26164A03005A052F /* liblocal_auth.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = liblocal_auth.a; sourceTree = BUILT_PRODUCTS_DIR; };
52-
3398D2E326164AD8005A052F /* FLTLocalAuthPluginTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLTLocalAuthPluginTests.m; sourceTree = "<group>"; };
5339
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
5440
658CDD04B21E4EA92F8EF229 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
5541
719FE2C7EAF8D9A045E09C29 /* libPods-RunnerTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RunnerTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -71,14 +57,6 @@
7157
/* End PBXFileReference section */
7258

7359
/* Begin PBXFrameworksBuildPhase section */
74-
3398D2CA26163948005A052F /* Frameworks */ = {
75-
isa = PBXFrameworksBuildPhase;
76-
buildActionMask = 2147483647;
77-
files = (
78-
B726772E092FC537C9618264 /* libPods-RunnerTests.a in Frameworks */,
79-
);
80-
runOnlyForDeploymentPostprocessing = 0;
81-
};
8260
97C146EB1CF9000F007C117D /* Frameworks */ = {
8361
isa = PBXFrameworksBuildPhase;
8462
buildActionMask = 2147483647;
@@ -90,15 +68,6 @@
9068
/* End PBXFrameworksBuildPhase section */
9169

9270
/* Begin PBXGroup section */
93-
33BF11D226680B2E002967F3 /* RunnerTests */ = {
94-
isa = PBXGroup;
95-
children = (
96-
3398D2E326164AD8005A052F /* FLTLocalAuthPluginTests.m */,
97-
3398D2D126163948005A052F /* Info.plist */,
98-
);
99-
path = RunnerTests;
100-
sourceTree = "<group>";
101-
};
10271
9740EEB11CF90186004384FC /* Flutter */ = {
10372
isa = PBXGroup;
10473
children = (
@@ -113,7 +82,6 @@
11382
97C146E51CF9000F007C117D = {
11483
isa = PBXGroup;
11584
children = (
116-
33BF11D226680B2E002967F3 /* RunnerTests */,
11785
9740EEB11CF90186004384FC /* Flutter */,
11886
97C146F01CF9000F007C117D /* Runner */,
11987
97C146EF1CF9000F007C117D /* Products */,
@@ -126,7 +94,6 @@
12694
isa = PBXGroup;
12795
children = (
12896
97C146EE1CF9000F007C117D /* Runner.app */,
129-
3398D2CD26163948005A052F /* RunnerTests.xctest */,
13097
);
13198
name = Products;
13299
sourceTree = "<group>";
@@ -180,25 +147,6 @@
180147
/* End PBXGroup section */
181148

182149
/* Begin PBXNativeTarget section */
183-
3398D2CC26163948005A052F /* RunnerTests */ = {
184-
isa = PBXNativeTarget;
185-
buildConfigurationList = 3398D2D426163948005A052F /* Build configuration list for PBXNativeTarget "RunnerTests" */;
186-
buildPhases = (
187-
B5AF6C7A6759E6F38749E537 /* [CP] Check Pods Manifest.lock */,
188-
3398D2C926163948005A052F /* Sources */,
189-
3398D2CA26163948005A052F /* Frameworks */,
190-
3398D2CB26163948005A052F /* Resources */,
191-
);
192-
buildRules = (
193-
);
194-
dependencies = (
195-
3398D2D326163948005A052F /* PBXTargetDependency */,
196-
);
197-
name = RunnerTests;
198-
productName = RunnerTests;
199-
productReference = 3398D2CD26163948005A052F /* RunnerTests.xctest */;
200-
productType = "com.apple.product-type.bundle.unit-test";
201-
};
202150
97C146ED1CF9000F007C117D /* Runner */ = {
203151
isa = PBXNativeTarget;
204152
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
@@ -226,14 +174,9 @@
226174
97C146E61CF9000F007C117D /* Project object */ = {
227175
isa = PBXProject;
228176
attributes = {
229-
LastUpgradeCheck = 1100;
177+
LastUpgradeCheck = 1300;
230178
ORGANIZATIONNAME = "The Flutter Authors";
231179
TargetAttributes = {
232-
3398D2CC26163948005A052F = {
233-
CreatedOnToolsVersion = 12.4;
234-
ProvisioningStyle = Automatic;
235-
TestTargetID = 97C146ED1CF9000F007C117D;
236-
};
237180
97C146ED1CF9000F007C117D = {
238181
CreatedOnToolsVersion = 7.3.1;
239182
};
@@ -253,19 +196,11 @@
253196
projectRoot = "";
254197
targets = (
255198
97C146ED1CF9000F007C117D /* Runner */,
256-
3398D2CC26163948005A052F /* RunnerTests */,
257199
);
258200
};
259201
/* End PBXProject section */
260202

261203
/* Begin PBXResourcesBuildPhase section */
262-
3398D2CB26163948005A052F /* Resources */ = {
263-
isa = PBXResourcesBuildPhase;
264-
buildActionMask = 2147483647;
265-
files = (
266-
);
267-
runOnlyForDeploymentPostprocessing = 0;
268-
};
269204
97C146EC1CF9000F007C117D /* Resources */ = {
270205
isa = PBXResourcesBuildPhase;
271206
buildActionMask = 2147483647;
@@ -326,39 +261,9 @@
326261
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";
327262
showEnvVarsInLog = 0;
328263
};
329-
B5AF6C7A6759E6F38749E537 /* [CP] Check Pods Manifest.lock */ = {
330-
isa = PBXShellScriptBuildPhase;
331-
buildActionMask = 2147483647;
332-
files = (
333-
);
334-
inputFileListPaths = (
335-
);
336-
inputPaths = (
337-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
338-
"${PODS_ROOT}/Manifest.lock",
339-
);
340-
name = "[CP] Check Pods Manifest.lock";
341-
outputFileListPaths = (
342-
);
343-
outputPaths = (
344-
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
345-
);
346-
runOnlyForDeploymentPostprocessing = 0;
347-
shellPath = /bin/sh;
348-
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";
349-
showEnvVarsInLog = 0;
350-
};
351264
/* End PBXShellScriptBuildPhase section */
352265

353266
/* Begin PBXSourcesBuildPhase section */
354-
3398D2C926163948005A052F /* Sources */ = {
355-
isa = PBXSourcesBuildPhase;
356-
buildActionMask = 2147483647;
357-
files = (
358-
3398D2E426164AD8005A052F /* FLTLocalAuthPluginTests.m in Sources */,
359-
);
360-
runOnlyForDeploymentPostprocessing = 0;
361-
};
362267
97C146EA1CF9000F007C117D /* Sources */ = {
363268
isa = PBXSourcesBuildPhase;
364269
buildActionMask = 2147483647;
@@ -371,14 +276,6 @@
371276
};
372277
/* End PBXSourcesBuildPhase section */
373278

374-
/* Begin PBXTargetDependency section */
375-
3398D2D326163948005A052F /* PBXTargetDependency */ = {
376-
isa = PBXTargetDependency;
377-
target = 97C146ED1CF9000F007C117D /* Runner */;
378-
targetProxy = 3398D2D226163948005A052F /* PBXContainerItemProxy */;
379-
};
380-
/* End PBXTargetDependency section */
381-
382279
/* Begin PBXVariantGroup section */
383280
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
384281
isa = PBXVariantGroup;
@@ -399,53 +296,6 @@
399296
/* End PBXVariantGroup section */
400297

401298
/* Begin XCBuildConfiguration section */
402-
3398D2D526163948005A052F /* Debug */ = {
403-
isa = XCBuildConfiguration;
404-
baseConfigurationReference = 99302E79EC77497F2F274D12 /* Pods-RunnerTests.debug.xcconfig */;
405-
buildSettings = {
406-
BUNDLE_LOADER = "$(TEST_HOST)";
407-
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
408-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
409-
CLANG_ENABLE_OBJC_WEAK = YES;
410-
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
411-
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
412-
CODE_SIGN_STYLE = Automatic;
413-
GCC_C_LANGUAGE_STANDARD = gnu11;
414-
INFOPLIST_FILE = RunnerTests/Info.plist;
415-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
416-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
417-
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
418-
MTL_FAST_MATH = YES;
419-
PRODUCT_BUNDLE_IDENTIFIER = com.google.RunnerTests;
420-
PRODUCT_NAME = "$(TARGET_NAME)";
421-
TARGETED_DEVICE_FAMILY = "1,2";
422-
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/Runner";
423-
};
424-
name = Debug;
425-
};
426-
3398D2D626163948005A052F /* Release */ = {
427-
isa = XCBuildConfiguration;
428-
baseConfigurationReference = FEA527BB0A821430FEAA1566 /* Pods-RunnerTests.release.xcconfig */;
429-
buildSettings = {
430-
BUNDLE_LOADER = "$(TEST_HOST)";
431-
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
432-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
433-
CLANG_ENABLE_OBJC_WEAK = YES;
434-
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
435-
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
436-
CODE_SIGN_STYLE = Automatic;
437-
GCC_C_LANGUAGE_STANDARD = gnu11;
438-
INFOPLIST_FILE = RunnerTests/Info.plist;
439-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
440-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
441-
MTL_FAST_MATH = YES;
442-
PRODUCT_BUNDLE_IDENTIFIER = com.google.RunnerTests;
443-
PRODUCT_NAME = "$(TARGET_NAME)";
444-
TARGETED_DEVICE_FAMILY = "1,2";
445-
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/Runner";
446-
};
447-
name = Release;
448-
};
449299
97C147031CF9000F007C117D /* Debug */ = {
450300
isa = XCBuildConfiguration;
451301
buildSettings = {
@@ -597,15 +447,6 @@
597447
/* End XCBuildConfiguration section */
598448

599449
/* Begin XCConfigurationList section */
600-
3398D2D426163948005A052F /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
601-
isa = XCConfigurationList;
602-
buildConfigurations = (
603-
3398D2D526163948005A052F /* Debug */,
604-
3398D2D626163948005A052F /* Release */,
605-
);
606-
defaultConfigurationIsVisible = 0;
607-
defaultConfigurationName = Release;
608-
};
609450
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
610451
isa = XCConfigurationList;
611452
buildConfigurations = (

packages/local_auth/local_auth/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1100"
3+
LastUpgradeVersion = "1300"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

packages/local_auth/local_auth/pubspec.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@ flutter:
2020
package: io.flutter.plugins.localauth
2121
pluginClass: LocalAuthPlugin
2222
ios:
23-
pluginClass: FLTLocalAuthPlugin
23+
default_package: local_auth_ios
2424

2525
dependencies:
2626
flutter:
2727
sdk: flutter
2828
flutter_plugin_android_lifecycle: ^2.0.1
2929
intl: ^0.17.0
30+
# Temporary path dependencies to allow moving Android and iOS implementations.
31+
local_auth_ios:
32+
path: ../local_auth_ios
3033
local_auth_platform_interface: ^1.0.1
3134
platform: ^3.0.0
3235

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Below is a list of people and organizations that have contributed
2+
# to the Flutter project. Names should be added to the list like so:
3+
#
4+
# Name/Organization <email address>
5+
6+
Google Inc.
7+
The Chromium Authors
8+
German Saprykin <[email protected]>
9+
Benjamin Sauer <[email protected]>
10+
11+
Ali Bitek <[email protected]>
12+
Pol Batlló <[email protected]>
13+
Anatoly Pulyaevskiy
14+
Hayden Flinner <[email protected]>
15+
Stefano Rodriguez <[email protected]>
16+
Salvatore Giordano <[email protected]>
17+
Brian Armstrong <[email protected]>
18+
Paul DeMarco <[email protected]>
19+
Fabricio Nogueira <[email protected]>
20+
Simon Lightfoot <[email protected]>
21+
Ashton Thomas <[email protected]>
22+
Thomas Danner <[email protected]>
23+
Diego Velásquez <[email protected]>
24+
Hajime Nakamura <[email protected]>
25+
Tuyển Vũ Xuân <[email protected]>
26+
Miguel Ruivo <[email protected]>
27+
Sarthak Verma <[email protected]>
28+
Mike Diarmid <[email protected]>
29+
Invertase <[email protected]>
30+
Elliot Hesp <[email protected]>
31+
Vince Varga <[email protected]>
32+
Aawaz Gyawali <[email protected]>
33+
EUI Limited <[email protected]>
34+
Katarina Sheremet <[email protected]>
35+
Thomas Stockx <[email protected]>
36+
Sarbagya Dhaubanjar <[email protected]>
37+
Ozkan Eksi <[email protected]>
38+
Rishab Nayak <[email protected]>
39+
40+
Jonathan Younger <[email protected]>
41+
Jose Sanchez <[email protected]>
42+
Debkanchan Samadder <[email protected]>
43+
Audrius Karosevicius <[email protected]>
44+
Lukasz Piliszczuk <[email protected]>
45+
SoundReply Solutions GmbH <[email protected]>
46+
Rafal Wachol <[email protected]>
47+
Pau Picas <[email protected]>
48+
Christian Weder <[email protected]>
49+
Alexandru Tuca <[email protected]>
50+
Christian Weder <[email protected]>
51+
Rhodes Davis Jr. <[email protected]>
52+
Luigi Agosti <[email protected]>
53+
Quentin Le Guennec <[email protected]>
54+
Koushik Ravikumar <[email protected]>
55+
Nissim Dsilva <[email protected]>
56+
Giancarlo Rocha <[email protected]>
57+
Ryo Miyake <[email protected]>
58+
Théo Champion <[email protected]>
59+
Kazuki Yamaguchi <[email protected]>
60+
Eitan Schwartz <[email protected]>
61+
Chris Rutkowski <[email protected]>
62+
Juan Alvarez <[email protected]>
63+
Aleksandr Yurkovskiy <[email protected]>
64+
Anton Borries <[email protected]>
65+
66+
Rahul Raj <[email protected]>
67+
Bodhi Mulders <[email protected]>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 1.0.0
2+
3+
* Initial release from migration to federated architecture.

0 commit comments

Comments
 (0)