Skip to content

Commit

Permalink
Merge pull request #381 from privacyidea/improve-scan-time-on-ios
Browse files Browse the repository at this point in the history
improved scan time on ios
  • Loading branch information
frankmer authored Apr 18, 2024
2 parents f6f38f5 + ea8e04d commit f846e26
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 81 deletions.
1 change: 1 addition & 0 deletions ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-netknights.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-netknights_debug.xcconfig"
#include "Generated.xcconfig"
3 changes: 2 additions & 1 deletion ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-netknights.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-netknights_debug.xcconfig"
#include "Generated.xcconfig"
12 changes: 7 additions & 5 deletions ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=C:\src\flutter"
export "FLUTTER_APPLICATION_PATH=C:\Users\Frank Merkel\Documents\GitHub\pi-authenticator"
export "FLUTTER_ROOT=/Users/frankmerkel/src/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/frankmerkel/Documents/GitHub/pi-authenticator"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_TARGET=/Users/frankmerkel/Documents/GitHub/pi-authenticator/lib/mains/main_netknights.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=4.3.1"
export "FLUTTER_BUILD_NUMBER=403101"
export "FLUTTER_BUILD_NUMBER=403106"
export "DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==,RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC8yZTRiYTljNmZiNDk5Y2NkNGU4MTQyMDU0Mzc4M2NjNzI2N2FlNDA2Lw==,RkxVVFRFUl9BUFBfRkxBVk9SPW5ldGtuaWdodHM="
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
export "PACKAGE_CONFIG=/Users/frankmerkel/Documents/GitHub/pi-authenticator/.dart_tool/package_config.json"
export "FLAVOR=netknights"
126 changes: 64 additions & 62 deletions ios/Runner.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleName</key>
<string>$(BUNDLE_DISPLAY_NAME)</string>
<string>$(PRODUCT_NAME)</string>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
Expand Down
4 changes: 1 addition & 3 deletions ios/Runner/Runner.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<key>aps-environment</key>
<string>development</string>
<key>com.apple.security.application-groups</key>
<array>
<string>group.authenticator_home_widget_group</string>
</array>
<array/>
</dict>
</plist>
15 changes: 7 additions & 8 deletions lib/utils/image_converter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,13 @@ class ImageConverter {
order: imglib.ChannelOrder.bgra,
);
return ImageConverter(
image: imglib.copyCrop(
img,
x: cropLeft,
y: cropTop,
width: img.width - cropLeft - cropRight,
height: img.height - cropTop - cropBottom,
),
);
image: imglib.copyCrop(
img,
x: cropLeft,
y: cropTop,
width: img.width - cropLeft - cropRight,
height: img.height - cropTop - cropBottom,
));
}

factory ImageConverter._fromYUV420(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class _QRScannerWidgetState extends State<QRScannerWidget> {
final int rotation = backCamera.sensorOrientation;
final cameraController = CameraController(
backCamera,
ResolutionPreset.max,
!kIsWeb && Platform.isAndroid ? ResolutionPreset.max : ResolutionPreset.medium,
imageFormatGroup: !kIsWeb && Platform.isAndroid ? ImageFormatGroup.nv21 : ImageFormatGroup.bgra8888,
enableAudio: false,
);
Expand Down

0 comments on commit f846e26

Please sign in to comment.