From 05e8c96cfe1f58b664154c2fd6465b8e55a2b830 Mon Sep 17 00:00:00 2001 From: Bjoern Hauffe Date: Fri, 10 Feb 2023 15:03:44 +0100 Subject: [PATCH 1/4] Fixes for ios build --- ios/Podfile | 11 ++++ ios/Runner/Info.plist | 130 +++++++++++++++++++++--------------------- lib/main.dart | 11 +++- 3 files changed, 84 insertions(+), 68 deletions(-) diff --git a/ios/Podfile b/ios/Podfile index 88359b2..8c9d13e 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -37,5 +37,16 @@ end post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) + + target.build_configurations.each do |config| + + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ + '$(inherited)', + ## dart: PermissionGroup.camera + 'PERMISSION_CAMERA=1', + ] + + end + # End of the permission_handler configuration end end diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index a837d1a..220399b 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -1,71 +1,71 @@ - - CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLSchemes - - ShareMedia - - - - - - NSPhotoLibraryUsageDescription - To upload photos, please allow permission to access your photo library. - - NSFaceIDUsageDescription - Why is my app authenticating using face id? - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Paperless Mobile - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - paperless_mobile - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - UIStatusBarHidden - - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents + + CADisableMinimumFrameDurationOnPhone + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Paperless Mobile + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + paperless_mobile + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleURLTypes + + + CFBundleTypeRole + Editor + CFBundleURLSchemes + + ShareMedia + + + + + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + NSFaceIDUsageDescription + To Login to Paperless with FaceID + NSPhotoLibraryUsageDescription + To upload Documents, please allow permission to access your photo library. + UIApplicationSupportsIndirectInputEvents + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + NSCameraUsageDescription + To scan Documents inside the APP diff --git a/lib/main.dart b/lib/main.dart index b07e838..301a4a3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -141,10 +141,15 @@ void main() async { //Update language header in interceptor on language change. appSettingsCubit.stream.listen((event) => languageHeaderInterceptor .preferredLocaleSubtag = event.preferredLocaleSubtag); + +try { + // Temporary Fix: Can be removed if the flutter engine implements the fix itself + // Activate the highest availabe refresh rate on the device + await FlutterDisplayMode.setHighRefreshRate(); + } catch(e) { + print("Can't set high refresh rate"); + } - // Temporary Fix: Can be removed if the flutter engine implements the fix itself - // Activate the highest availabe refresh rate on the device - await FlutterDisplayMode.setHighRefreshRate(); runApp( MultiProvider( From ba1387fdf5b6993a3549b7a8d0af03736e50f36d Mon Sep 17 00:00:00 2001 From: Bjoern Hauffe Date: Fri, 10 Feb 2023 20:47:33 +0100 Subject: [PATCH 2/4] change to platform guards --- lib/main.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 301a4a3..c9796ca 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -142,12 +142,11 @@ void main() async { appSettingsCubit.stream.listen((event) => languageHeaderInterceptor .preferredLocaleSubtag = event.preferredLocaleSubtag); -try { + +if (!Platform.isIOS) { // Temporary Fix: Can be removed if the flutter engine implements the fix itself // Activate the highest availabe refresh rate on the device await FlutterDisplayMode.setHighRefreshRate(); - } catch(e) { - print("Can't set high refresh rate"); } From 79e1d6e0dea05897e223fe5ab2a3e588e11db9c0 Mon Sep 17 00:00:00 2001 From: Anton Stubenbord <79228196+astubenbord@users.noreply.github.com> Date: Sat, 11 Feb 2023 12:49:11 +0100 Subject: [PATCH 3/4] Update platform guard to only include androids --- lib/main.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index c9796ca..14e4918 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -143,7 +143,7 @@ void main() async { .preferredLocaleSubtag = event.preferredLocaleSubtag); -if (!Platform.isIOS) { +if (Platform.isAndroid) { // Temporary Fix: Can be removed if the flutter engine implements the fix itself // Activate the highest availabe refresh rate on the device await FlutterDisplayMode.setHighRefreshRate(); From 46a151c9b69877662b81ab7cf1cf3ff51e96ce33 Mon Sep 17 00:00:00 2001 From: Anton Stubenbord <79228196+astubenbord@users.noreply.github.com> Date: Sat, 11 Feb 2023 13:10:33 +0100 Subject: [PATCH 4/4] Update permission reason descriptions --- ios/Runner/Info.plist | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 220399b..71585ac 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -39,9 +39,9 @@ LSRequiresIPhoneOS NSFaceIDUsageDescription - To Login to Paperless with FaceID + Allow this app to use FaceID to secure your login credentials. NSPhotoLibraryUsageDescription - To upload Documents, please allow permission to access your photo library. + Allow this app to access your photo library to upload images from this device. UIApplicationSupportsIndirectInputEvents UILaunchStoryboardName @@ -66,6 +66,6 @@ UIViewControllerBasedStatusBarAppearance NSCameraUsageDescription - To scan Documents inside the APP + Allow this app access to your camera to scan documents.