Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
e7389cc
[ci] migrate to Apple Silicon
fkorotkov May 10, 2022
c71b646
Fix RunnerTest config for google_maps_flutter
stuartmorgan-g May 11, 2022
eea37d5
changelog
stuartmorgan-g May 11, 2022
49e16fc
Move some tasks back to Intel
stuartmorgan-g May 11, 2022
e31c427
Log unexpeted FlutterErrors in tests instead of throwing
stuartmorgan-g May 11, 2022
7f6506c
Add temp debug NSLog statements
stuartmorgan-g May 11, 2022
225df85
Remove failed logging, add some details
stuartmorgan-g May 12, 2022
91ea52d
Don't assert for overfullfillment
fkorotkov May 12, 2022
d65a77f
Fullfill only when initialized
fkorotkov May 12, 2022
1ddf2a7
Move linting back to ARM
stuartmorgan-g May 13, 2022
001e214
Log event for debugging
fkorotkov May 13, 2022
5ceab37
Remove NSLog
stuartmorgan-g May 13, 2022
d68340a
Remove duplicate details from error
stuartmorgan-g May 13, 2022
6b47358
video_player changelog
stuartmorgan-g May 13, 2022
9caf835
iPhone 12
fkorotkov May 15, 2022
b490760
Reverted iPhone version
fkorotkov May 15, 2022
7fffeb9
Try Xcode 13.4 and macOS 12.4
fkorotkov May 16, 2022
4e0b259
Revert "Try Xcode 13.4 and macOS 12.4"
fkorotkov May 16, 2022
9713866
Revert "Revert "Try Xcode 13.4 and macOS 12.4""
fkorotkov May 16, 2022
60eb2f5
Try experimental config
fkorotkov May 17, 2022
d9d7875
Revert "Try experimental config"
fkorotkov May 18, 2022
a3771c4
Use only one simulator
fkorotkov May 18, 2022
71e2cb5
Set timeout to not waste resources in case of a hanging
fkorotkov May 18, 2022
d44df7c
[tools] Fix `publish` flag calculation (#5694)
stuartmorgan-g May 14, 2022
8ee7bd8
[camera]handle iOS camera access permission (#5215)
hellohuanlin May 14, 2022
2ccc39e
[image_picker] Fix 'messages.g.h' file not found (#5635)
co-kevin May 16, 2022
29241ad
[ci] Manually roll Flutter master (#5765)
stuartmorgan-g May 16, 2022
1fd508f
Roll Flutter from 036cae36697a to bf7a32628eef (49 revisions) (#5768)
engine-flutter-autoroll May 17, 2022
33934de
Roll Flutter from bf7a32628eef to bb9bbc601345 (1 revision) (#5769)
engine-flutter-autoroll May 17, 2022
63a6039
Roll Flutter from bb9bbc601345 to fd312f1ccff9 (1 revision) (#5770)
engine-flutter-autoroll May 17, 2022
c1c1332
Roll Flutter from fd312f1ccff9 to c248854d176b (1 revision) (#5771)
engine-flutter-autoroll May 17, 2022
f586229
[in_app_purchase] fixed a memory leak error (#5358)
yimao009 May 17, 2022
2656002
[local_auth] Windows support. (#4806)
azchohfi May 17, 2022
9cdd4b5
[google_sign_in_platform_interface] Add availability to mock models (…
Hwan-seok May 17, 2022
74042c0
Update cirrus secret. (#5774)
godofredoc May 17, 2022
18283a7
Add more Android plugin owners (#5624)
stuartmorgan-g May 17, 2022
66e56f0
[video_player]: Bump exoplayer from 2.17.0 to 2.17.1 in /packages/vid…
dependabot[bot] May 17, 2022
9da2a72
[tools] Validate example READMEs (#5775)
stuartmorgan-g May 18, 2022
c62a7ed
[webview_flutter] Initial v4.0 platform interface implementation (#5…
mvanbeusekom May 18, 2022
bd40099
[camera] Request access permission for audio (#5766)
hellohuanlin May 18, 2022
2e81edb
Roll Flutter from c248854d176b to 1994027986cf (1 revision) (#5777)
engine-flutter-autoroll May 18, 2022
f3d955a
[ci/tools] Add iOS/macOS analysis to catch deprecated code (#5778)
stuartmorgan-g May 18, 2022
72c1752
Add more CODEOWNERS (#5779)
stuartmorgan-g May 18, 2022
bf35c1b
[tools] Add `update-release-info` (#5643)
stuartmorgan-g May 18, 2022
dfa3e84
[local_auth] Adds federated Windows support (#5776)
azchohfi May 19, 2022
b0c19f0
[google_sign_in] Upgrade to GoogleSignIn 6.2, support arm64 simulator…
jmagman May 19, 2022
9d1311d
Roll Flutter from 1994027986cf to a4a8e73bce15 (31 revisions) (#5782)
engine-flutter-autoroll May 19, 2022
afc26ec
[ci] Updates iOS deprecation check to iOS 13 (#5786)
stuartmorgan-g May 19, 2022
216b216
[various] Set minimum Flutter versions to 2.8 (#5792)
stuartmorgan-g May 19, 2022
87cd4e7
[google_maps_flutter_web] Remove custom analysis file. (#5791)
ditman May 20, 2022
82cbfc8
[path_provider] Fix integration tests on macOS (#5773)
stuartmorgan-g May 20, 2022
0fcac82
iPhone 12
fkorotkov May 15, 2022
fc971fb
Use only one simulator
fkorotkov May 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[local_auth] Adds federated Windows support (#5776)
  • Loading branch information
azchohfi authored and fkorotkov committed May 20, 2022
commit dfa3e846bc844fd0ebbe8bcbdea6e42dec1a9728
4 changes: 4 additions & 0 deletions packages/local_auth/local_auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.0

* Adds Windows support.

## 2.0.2

* Fixes library_private_types_in_public_api, sort_child_properties_last and use_key_in_widget_constructors
Expand Down
8 changes: 5 additions & 3 deletions packages/local_auth/local_auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ the user.
On supported devices, this includes authentication with biometrics such as
fingerprint or facial recognition.

| | Android | iOS |
|-------------|-----------|------|
| **Support** | SDK 16+\* | 9.0+ |
| | Android | iOS | Windows |
|-------------|-----------|------|-------------|
| **Support** | SDK 16+\* | 9.0+ | Windows 10+ |

## Usage

Expand Down Expand Up @@ -90,6 +90,8 @@ final bool didAuthenticate = await auth.authenticate(
options: const AuthenticationOptions(biometricOnly: true));
```

*Note*: `biometricOnly` is not supported on Windows since the Windows implementation's underlying API (Windows Hello) doesn't support selecting the authentication method.

#### Dialogs

The plugin provides default dialogs for the following cases:
Expand Down
95 changes: 95 additions & 0 deletions packages/local_auth/local_auth/example/windows/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
cmake_minimum_required(VERSION 3.14)
project(example LANGUAGES CXX)

set(BINARY_NAME "example")

cmake_policy(SET CMP0063 NEW)

set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")

# Configure build options.
get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(IS_MULTICONFIG)
set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
CACHE STRING "" FORCE)
else()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "Debug" CACHE
STRING "Flutter build mode" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Profile" "Release")
endif()
endif()

set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")

# Use Unicode for all projects.
add_definitions(-DUNICODE -D_UNICODE)

# Compilation settings that should be applied to most targets.
function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_17)
target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
target_compile_options(${TARGET} PRIVATE /EHsc)
target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
target_compile_definitions(${TARGET} PRIVATE "$<$<CONFIG:Debug>:_DEBUG>")
endfunction()

set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")

# Flutter library and tool build rules.
add_subdirectory(${FLUTTER_MANAGED_DIR})

# Application build
add_subdirectory("runner")

# Generated plugin build rules, which manage building the plugins and adding
# them to the application.
include(flutter/generated_plugins.cmake)


# === Installation ===
# Support files are copied into place next to the executable, so that it can
# run in place. This is done instead of making a separate bundle (as on Linux)
# so that building and running from within Visual Studio will work.
set(BUILD_BUNDLE_DIR "$<TARGET_FILE_DIR:${BINARY_NAME}>")
# Make the "install" step default, as it's required to run.
set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
endif()

set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")

install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
COMPONENT Runtime)

install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
COMPONENT Runtime)

install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)

if(PLUGIN_BUNDLED_LIBRARIES)
install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
endif()

# Fully re-copy the assets directory on each build to avoid having stale files
# from a previous install.
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
install(CODE "
file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
" COMPONENT Runtime)
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)

# Install the AOT library on non-Debug builds only.
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
CONFIGURATIONS Profile;Release
COMPONENT Runtime)
103 changes: 103 additions & 0 deletions packages/local_auth/local_auth/example/windows/flutter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
cmake_minimum_required(VERSION 3.14)

set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")

# Configuration provided via flutter tool.
include(${EPHEMERAL_DIR}/generated_config.cmake)

# TODO: Move the rest of this into files in ephemeral. See
# https://github.com/flutter/flutter/issues/57146.
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")

# === Flutter Library ===
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")

# Published to parent scope for install step.
set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE)

list(APPEND FLUTTER_LIBRARY_HEADERS
"flutter_export.h"
"flutter_windows.h"
"flutter_messenger.h"
"flutter_plugin_registrar.h"
"flutter_texture_registrar.h"
)
list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
add_library(flutter INTERFACE)
target_include_directories(flutter INTERFACE
"${EPHEMERAL_DIR}"
)
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
add_dependencies(flutter flutter_assemble)

# === Wrapper ===
list(APPEND CPP_WRAPPER_SOURCES_CORE
"core_implementations.cc"
"standard_codec.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
"plugin_registrar.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
list(APPEND CPP_WRAPPER_SOURCES_APP
"flutter_engine.cc"
"flutter_view_controller.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")

# Wrapper sources needed for a plugin.
add_library(flutter_wrapper_plugin STATIC
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_PLUGIN}
)
apply_standard_settings(flutter_wrapper_plugin)
set_target_properties(flutter_wrapper_plugin PROPERTIES
POSITION_INDEPENDENT_CODE ON)
set_target_properties(flutter_wrapper_plugin PROPERTIES
CXX_VISIBILITY_PRESET hidden)
target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
target_include_directories(flutter_wrapper_plugin PUBLIC
"${WRAPPER_ROOT}/include"
)
add_dependencies(flutter_wrapper_plugin flutter_assemble)

# Wrapper sources needed for the runner.
add_library(flutter_wrapper_app STATIC
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_APP}
)
apply_standard_settings(flutter_wrapper_app)
target_link_libraries(flutter_wrapper_app PUBLIC flutter)
target_include_directories(flutter_wrapper_app PUBLIC
"${WRAPPER_ROOT}/include"
)
add_dependencies(flutter_wrapper_app flutter_assemble)

# === Flutter tool backend ===
# _phony_ is a non-existent file to force this command to run every time,
# since currently there's no way to get a full input/output list from the
# flutter tool.
set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_")
set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
add_custom_command(
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
${CPP_WRAPPER_SOURCES_APP}
${PHONY_OUTPUT}
COMMAND ${CMAKE_COMMAND} -E env
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
windows-x64 $<CONFIG>
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS
"${FLUTTER_LIBRARY}"
${FLUTTER_LIBRARY_HEADERS}
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_PLUGIN}
${CPP_WRAPPER_SOURCES_APP}
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Generated file, do not edit.
#

list(APPEND FLUTTER_PLUGIN_LIST
local_auth_windows
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
)

set(PLUGIN_BUNDLED_LIBRARIES)

foreach(plugin ${FLUTTER_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin)

foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.14)
project(runner LANGUAGES CXX)

add_executable(${BINARY_NAME} WIN32
"flutter_window.cpp"
"main.cpp"
"utils.cpp"
"win32_window.cpp"
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
"Runner.rc"
"runner.exe.manifest"
)
apply_standard_settings(${BINARY_NAME})
target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
add_dependencies(${BINARY_NAME} flutter_assemble)
121 changes: 121 additions & 0 deletions packages/local_auth/local_auth/example/windows/runner/Runner.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
// Microsoft Visual C++ generated resource script.
//
#pragma code_page(65001)
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// English (United States) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE
BEGIN
"resource.h\0"
END

2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END

3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END

#endif // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_APP_ICON ICON "resources\\app_icon.ico"


/////////////////////////////////////////////////////////////////////////////
//
// Version
//

#ifdef FLUTTER_BUILD_NUMBER
#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER
#else
#define VERSION_AS_NUMBER 1,0,0
#endif

#ifdef FLUTTER_BUILD_NAME
#define VERSION_AS_STRING #FLUTTER_BUILD_NAME
#else
#define VERSION_AS_STRING "1.0.0"
#endif

VS_VERSION_INFO VERSIONINFO
FILEVERSION VERSION_AS_NUMBER
PRODUCTVERSION VERSION_AS_NUMBER
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "io.flutter.plugins" "\0"
VALUE "FileDescription", "example" "\0"
VALUE "FileVersion", VERSION_AS_STRING "\0"
VALUE "InternalName", "example" "\0"
VALUE "LegalCopyright", "Copyright (C) 2022 io.flutter.plugins. All rights reserved." "\0"
VALUE "OriginalFilename", "example.exe" "\0"
VALUE "ProductName", "example" "\0"
VALUE "ProductVersion", VERSION_AS_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END

#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//


/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
Loading