From b839dc72522831e087e6873e0cb9b9dc191d54f7 Mon Sep 17 00:00:00 2001 From: Md-Sifatullah617 Date: Mon, 23 Jun 2025 12:56:07 +0600 Subject: [PATCH 1/4] feat(ios): update deployment target to iOS 12.0 and add Bangla localization support --- feedback.code-workspace | 9 ++++++ .../ios/Flutter/AppFrameworkInfo.plist | 2 +- .../Flutter/ephemeral/flutter_lldb_helper.py | 32 +++++++++++++++++++ .../ios/Flutter/ephemeral/flutter_lldbinit | 5 +++ feedback/example/ios/Podfile | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 17 ++++++---- .../xcshareddata/xcschemes/Runner.xcscheme | 5 ++- feedback/example/ios/Runner/AppDelegate.swift | 2 +- feedback/example/ios/Runner/Info.plist | 2 ++ feedback/lib/feedback.dart | 2 +- feedback/lib/src/l18n/translation.dart | 20 ++++++++++++ feedback_gitlab/lib/feedback_gitlab.dart | 2 +- 12 files changed, 87 insertions(+), 13 deletions(-) create mode 100644 feedback.code-workspace create mode 100644 feedback/example/ios/Flutter/ephemeral/flutter_lldb_helper.py create mode 100644 feedback/example/ios/Flutter/ephemeral/flutter_lldbinit diff --git a/feedback.code-workspace b/feedback.code-workspace new file mode 100644 index 00000000..292c0f38 --- /dev/null +++ b/feedback.code-workspace @@ -0,0 +1,9 @@ +{ + "folders": [ + { + "name": "feedback", + "path": "." + } +], + "settings": {} +} diff --git a/feedback/example/ios/Flutter/AppFrameworkInfo.plist b/feedback/example/ios/Flutter/AppFrameworkInfo.plist index f2872cf4..8c6e5614 100644 --- a/feedback/example/ios/Flutter/AppFrameworkInfo.plist +++ b/feedback/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 12.0 diff --git a/feedback/example/ios/Flutter/ephemeral/flutter_lldb_helper.py b/feedback/example/ios/Flutter/ephemeral/flutter_lldb_helper.py new file mode 100644 index 00000000..a88caf99 --- /dev/null +++ b/feedback/example/ios/Flutter/ephemeral/flutter_lldb_helper.py @@ -0,0 +1,32 @@ +# +# Generated file, do not edit. +# + +import lldb + +def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict): + """Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages.""" + base = frame.register["x0"].GetValueAsAddress() + page_len = frame.register["x1"].GetValueAsUnsigned() + + # Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the + # first page to see if handled it correctly. This makes diagnosing + # misconfiguration (e.g. missing breakpoint) easier. + data = bytearray(page_len) + data[0:8] = b'IHELPED!' + + error = lldb.SBError() + frame.GetThread().GetProcess().WriteMemory(base, data, error) + if not error.Success(): + print(f'Failed to write into {base}[+{page_len}]', error) + return + +def __lldb_init_module(debugger: lldb.SBDebugger, _): + target = debugger.GetDummyTarget() + # Caveat: must use BreakpointCreateByRegEx here and not + # BreakpointCreateByName. For some reasons callback function does not + # get carried over from dummy target for the later. + bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$") + bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__)) + bp.SetAutoContinue(True) + print("-- LLDB integration loaded --") diff --git a/feedback/example/ios/Flutter/ephemeral/flutter_lldbinit b/feedback/example/ios/Flutter/ephemeral/flutter_lldbinit new file mode 100644 index 00000000..e3ba6fbe --- /dev/null +++ b/feedback/example/ios/Flutter/ephemeral/flutter_lldbinit @@ -0,0 +1,5 @@ +# +# Generated file, do not edit. +# + +command script import --relative-to-command-file flutter_lldb_helper.py diff --git a/feedback/example/ios/Podfile b/feedback/example/ios/Podfile index 1e8c3c90..279576f3 100644 --- a/feedback/example/ios/Podfile +++ b/feedback/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '9.0' +# platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/feedback/example/ios/Runner.xcodeproj/project.pbxproj b/feedback/example/ios/Runner.xcodeproj/project.pbxproj index 74406c5c..071f1101 100644 --- a/feedback/example/ios/Runner.xcodeproj/project.pbxproj +++ b/feedback/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -164,7 +164,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -214,14 +214,14 @@ inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", "${BUILT_PRODUCTS_DIR}/flutter_email_sender/flutter_email_sender.framework", - "${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework", + "${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework", "${BUILT_PRODUCTS_DIR}/share_plus/share_plus.framework", "${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_email_sender.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_ios.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/share_plus.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework", ); @@ -232,10 +232,12 @@ }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -246,6 +248,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -355,7 +358,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -440,7 +443,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -489,7 +492,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/feedback/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/feedback/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 3db53b6e..fc5ae031 100644 --- a/feedback/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/feedback/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ @@ -45,11 +46,13 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" + enableGPUValidationMode = "1" allowLocationSimulation = "YES"> diff --git a/feedback/example/ios/Runner/AppDelegate.swift b/feedback/example/ios/Runner/AppDelegate.swift index 70693e4a..b6363034 100644 --- a/feedback/example/ios/Runner/AppDelegate.swift +++ b/feedback/example/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import UIKit import Flutter -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/feedback/example/ios/Runner/Info.plist b/feedback/example/ios/Runner/Info.plist index 1579fb30..4f68a2ce 100644 --- a/feedback/example/ios/Runner/Info.plist +++ b/feedback/example/ios/Runner/Info.plist @@ -43,5 +43,7 @@ CADisableMinimumFrameDurationOnPhone + UIApplicationSupportsIndirectInputEvents + diff --git a/feedback/lib/feedback.dart b/feedback/lib/feedback.dart index 121146be..2a347bfd 100644 --- a/feedback/lib/feedback.dart +++ b/feedback/lib/feedback.dart @@ -1,6 +1,6 @@ // A Flutter package for getting better feedback. // It allows the user to give interactive feedback directly in the app. -library feedback; +library; export 'src/better_feedback.dart'; export 'src/feedback_controller.dart'; diff --git a/feedback/lib/src/l18n/translation.dart b/feedback/lib/src/l18n/translation.dart index 2d62e03b..9bfa8269 100644 --- a/feedback/lib/src/l18n/translation.dart +++ b/feedback/lib/src/l18n/translation.dart @@ -2,6 +2,7 @@ import 'package:feedback/src/debug.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; + import '../better_feedback.dart'; /// This class must be extended by all custom translations. @@ -336,6 +337,24 @@ class EsFeedbackLocalizations extends FeedbackLocalizations { String get navigate => 'Navegar'; } +/// Default bangla localization +class BnFeedbackLocalizations extends FeedbackLocalizations { + /// Creates a [BnFeedbackLocalizations] + const BnFeedbackLocalizations(); + + @override + String get submitButtonText => 'জমা দিন'; + + @override + String get feedbackDescriptionText => 'সমস্যার বিস্তারিত লিখুন'; + + @override + String get draw => 'আঁকুন'; + + @override + String get navigate => 'নেভিগেট'; +} + // coverage:ignore-end /// This is a localization delegate, which includes all of the localizations @@ -368,6 +387,7 @@ class GlobalFeedbackLocalizationsDelegate const Locale('bg'): const BgFeedbackLocalizations(), const Locale('es'): const EsFeedbackLocalizations(), const Locale('fa'): const FaFeedbackLocalizations(), + const Locale('bn'): const BnFeedbackLocalizations(), }; /// The default locale to use. Note that this locale should ALWAYS be diff --git a/feedback_gitlab/lib/feedback_gitlab.dart b/feedback_gitlab/lib/feedback_gitlab.dart index e1a024bb..348e6e14 100644 --- a/feedback_gitlab/lib/feedback_gitlab.dart +++ b/feedback_gitlab/lib/feedback_gitlab.dart @@ -1,4 +1,4 @@ -library feedback_gitlab; +library; export 'package:feedback/feedback.dart'; export 'src/feedback_gitlab.dart'; From 85b99306c47625be6a40182b8d9db8eaa265a886 Mon Sep 17 00:00:00 2001 From: Md-Sifatullah617 Date: Mon, 23 Jun 2025 17:09:18 +0600 Subject: [PATCH 2/4] chore: remove feedback workspace configuration file --- feedback.code-workspace | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 feedback.code-workspace diff --git a/feedback.code-workspace b/feedback.code-workspace deleted file mode 100644 index 292c0f38..00000000 --- a/feedback.code-workspace +++ /dev/null @@ -1,9 +0,0 @@ -{ - "folders": [ - { - "name": "feedback", - "path": "." - } -], - "settings": {} -} From 00958c237d62a801582c65c9748aab1a206c722a Mon Sep 17 00:00:00 2001 From: Md-Sifatullah617 Date: Mon, 23 Jun 2025 17:28:57 +0600 Subject: [PATCH 3/4] Revert "Merge pull request #1 from Md-Sifatullah617:add-bangla-localization" This reverts commit c1a06de139408b24820e77864130ed73a854c607, reversing changes made to a9a6a63b189fbc7b74f83d4cd494eac808696252. --- .../ios/Flutter/AppFrameworkInfo.plist | 2 +- .../Flutter/ephemeral/flutter_lldb_helper.py | 32 ------------------- .../ios/Flutter/ephemeral/flutter_lldbinit | 5 --- feedback/example/ios/Podfile | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 17 ++++------ .../xcshareddata/xcschemes/Runner.xcscheme | 5 +-- feedback/example/ios/Runner/AppDelegate.swift | 2 +- feedback/example/ios/Runner/Info.plist | 2 -- feedback/lib/feedback.dart | 2 +- feedback/lib/src/l18n/translation.dart | 20 ------------ feedback_gitlab/lib/feedback_gitlab.dart | 2 +- 11 files changed, 13 insertions(+), 78 deletions(-) delete mode 100644 feedback/example/ios/Flutter/ephemeral/flutter_lldb_helper.py delete mode 100644 feedback/example/ios/Flutter/ephemeral/flutter_lldbinit diff --git a/feedback/example/ios/Flutter/AppFrameworkInfo.plist b/feedback/example/ios/Flutter/AppFrameworkInfo.plist index 8c6e5614..f2872cf4 100644 --- a/feedback/example/ios/Flutter/AppFrameworkInfo.plist +++ b/feedback/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 12.0 + 9.0 diff --git a/feedback/example/ios/Flutter/ephemeral/flutter_lldb_helper.py b/feedback/example/ios/Flutter/ephemeral/flutter_lldb_helper.py deleted file mode 100644 index a88caf99..00000000 --- a/feedback/example/ios/Flutter/ephemeral/flutter_lldb_helper.py +++ /dev/null @@ -1,32 +0,0 @@ -# -# Generated file, do not edit. -# - -import lldb - -def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict): - """Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages.""" - base = frame.register["x0"].GetValueAsAddress() - page_len = frame.register["x1"].GetValueAsUnsigned() - - # Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the - # first page to see if handled it correctly. This makes diagnosing - # misconfiguration (e.g. missing breakpoint) easier. - data = bytearray(page_len) - data[0:8] = b'IHELPED!' - - error = lldb.SBError() - frame.GetThread().GetProcess().WriteMemory(base, data, error) - if not error.Success(): - print(f'Failed to write into {base}[+{page_len}]', error) - return - -def __lldb_init_module(debugger: lldb.SBDebugger, _): - target = debugger.GetDummyTarget() - # Caveat: must use BreakpointCreateByRegEx here and not - # BreakpointCreateByName. For some reasons callback function does not - # get carried over from dummy target for the later. - bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$") - bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__)) - bp.SetAutoContinue(True) - print("-- LLDB integration loaded --") diff --git a/feedback/example/ios/Flutter/ephemeral/flutter_lldbinit b/feedback/example/ios/Flutter/ephemeral/flutter_lldbinit deleted file mode 100644 index e3ba6fbe..00000000 --- a/feedback/example/ios/Flutter/ephemeral/flutter_lldbinit +++ /dev/null @@ -1,5 +0,0 @@ -# -# Generated file, do not edit. -# - -command script import --relative-to-command-file flutter_lldb_helper.py diff --git a/feedback/example/ios/Podfile b/feedback/example/ios/Podfile index 279576f3..1e8c3c90 100644 --- a/feedback/example/ios/Podfile +++ b/feedback/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '12.0' +# platform :ios, '9.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/feedback/example/ios/Runner.xcodeproj/project.pbxproj b/feedback/example/ios/Runner.xcodeproj/project.pbxproj index 071f1101..74406c5c 100644 --- a/feedback/example/ios/Runner.xcodeproj/project.pbxproj +++ b/feedback/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ @@ -164,7 +164,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1510; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -214,14 +214,14 @@ inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", "${BUILT_PRODUCTS_DIR}/flutter_email_sender/flutter_email_sender.framework", - "${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework", + "${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework", "${BUILT_PRODUCTS_DIR}/share_plus/share_plus.framework", "${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_email_sender.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_ios.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/share_plus.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework", ); @@ -232,12 +232,10 @@ }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -248,7 +246,6 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -358,7 +355,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -443,7 +440,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -492,7 +489,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/feedback/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/feedback/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index fc5ae031..3db53b6e 100644 --- a/feedback/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/feedback/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ @@ -46,13 +45,11 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" - enableGPUValidationMode = "1" allowLocationSimulation = "YES"> diff --git a/feedback/example/ios/Runner/AppDelegate.swift b/feedback/example/ios/Runner/AppDelegate.swift index b6363034..70693e4a 100644 --- a/feedback/example/ios/Runner/AppDelegate.swift +++ b/feedback/example/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import UIKit import Flutter -@main +@UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/feedback/example/ios/Runner/Info.plist b/feedback/example/ios/Runner/Info.plist index 4f68a2ce..1579fb30 100644 --- a/feedback/example/ios/Runner/Info.plist +++ b/feedback/example/ios/Runner/Info.plist @@ -43,7 +43,5 @@ CADisableMinimumFrameDurationOnPhone - UIApplicationSupportsIndirectInputEvents - diff --git a/feedback/lib/feedback.dart b/feedback/lib/feedback.dart index 2a347bfd..121146be 100644 --- a/feedback/lib/feedback.dart +++ b/feedback/lib/feedback.dart @@ -1,6 +1,6 @@ // A Flutter package for getting better feedback. // It allows the user to give interactive feedback directly in the app. -library; +library feedback; export 'src/better_feedback.dart'; export 'src/feedback_controller.dart'; diff --git a/feedback/lib/src/l18n/translation.dart b/feedback/lib/src/l18n/translation.dart index 9bfa8269..2d62e03b 100644 --- a/feedback/lib/src/l18n/translation.dart +++ b/feedback/lib/src/l18n/translation.dart @@ -2,7 +2,6 @@ import 'package:feedback/src/debug.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; - import '../better_feedback.dart'; /// This class must be extended by all custom translations. @@ -337,24 +336,6 @@ class EsFeedbackLocalizations extends FeedbackLocalizations { String get navigate => 'Navegar'; } -/// Default bangla localization -class BnFeedbackLocalizations extends FeedbackLocalizations { - /// Creates a [BnFeedbackLocalizations] - const BnFeedbackLocalizations(); - - @override - String get submitButtonText => 'জমা দিন'; - - @override - String get feedbackDescriptionText => 'সমস্যার বিস্তারিত লিখুন'; - - @override - String get draw => 'আঁকুন'; - - @override - String get navigate => 'নেভিগেট'; -} - // coverage:ignore-end /// This is a localization delegate, which includes all of the localizations @@ -387,7 +368,6 @@ class GlobalFeedbackLocalizationsDelegate const Locale('bg'): const BgFeedbackLocalizations(), const Locale('es'): const EsFeedbackLocalizations(), const Locale('fa'): const FaFeedbackLocalizations(), - const Locale('bn'): const BnFeedbackLocalizations(), }; /// The default locale to use. Note that this locale should ALWAYS be diff --git a/feedback_gitlab/lib/feedback_gitlab.dart b/feedback_gitlab/lib/feedback_gitlab.dart index 348e6e14..e1a024bb 100644 --- a/feedback_gitlab/lib/feedback_gitlab.dart +++ b/feedback_gitlab/lib/feedback_gitlab.dart @@ -1,4 +1,4 @@ -library; +library feedback_gitlab; export 'package:feedback/feedback.dart'; export 'src/feedback_gitlab.dart'; From b58ff12da26f3670ce67d8acacc7faf722c55774 Mon Sep 17 00:00:00 2001 From: Md-Sifatullah617 Date: Mon, 23 Jun 2025 17:29:19 +0600 Subject: [PATCH 4/4] Reapply "Merge pull request #1 from Md-Sifatullah617:add-bangla-localization" This reverts commit 00958c237d62a801582c65c9748aab1a206c722a. --- .../ios/Flutter/AppFrameworkInfo.plist | 2 +- .../Flutter/ephemeral/flutter_lldb_helper.py | 32 +++++++++++++++++++ .../ios/Flutter/ephemeral/flutter_lldbinit | 5 +++ feedback/example/ios/Podfile | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 17 ++++++---- .../xcshareddata/xcschemes/Runner.xcscheme | 5 ++- feedback/example/ios/Runner/AppDelegate.swift | 2 +- feedback/example/ios/Runner/Info.plist | 2 ++ feedback/lib/feedback.dart | 2 +- feedback/lib/src/l18n/translation.dart | 20 ++++++++++++ feedback_gitlab/lib/feedback_gitlab.dart | 2 +- 11 files changed, 78 insertions(+), 13 deletions(-) create mode 100644 feedback/example/ios/Flutter/ephemeral/flutter_lldb_helper.py create mode 100644 feedback/example/ios/Flutter/ephemeral/flutter_lldbinit diff --git a/feedback/example/ios/Flutter/AppFrameworkInfo.plist b/feedback/example/ios/Flutter/AppFrameworkInfo.plist index f2872cf4..8c6e5614 100644 --- a/feedback/example/ios/Flutter/AppFrameworkInfo.plist +++ b/feedback/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 12.0 diff --git a/feedback/example/ios/Flutter/ephemeral/flutter_lldb_helper.py b/feedback/example/ios/Flutter/ephemeral/flutter_lldb_helper.py new file mode 100644 index 00000000..a88caf99 --- /dev/null +++ b/feedback/example/ios/Flutter/ephemeral/flutter_lldb_helper.py @@ -0,0 +1,32 @@ +# +# Generated file, do not edit. +# + +import lldb + +def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict): + """Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages.""" + base = frame.register["x0"].GetValueAsAddress() + page_len = frame.register["x1"].GetValueAsUnsigned() + + # Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the + # first page to see if handled it correctly. This makes diagnosing + # misconfiguration (e.g. missing breakpoint) easier. + data = bytearray(page_len) + data[0:8] = b'IHELPED!' + + error = lldb.SBError() + frame.GetThread().GetProcess().WriteMemory(base, data, error) + if not error.Success(): + print(f'Failed to write into {base}[+{page_len}]', error) + return + +def __lldb_init_module(debugger: lldb.SBDebugger, _): + target = debugger.GetDummyTarget() + # Caveat: must use BreakpointCreateByRegEx here and not + # BreakpointCreateByName. For some reasons callback function does not + # get carried over from dummy target for the later. + bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$") + bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__)) + bp.SetAutoContinue(True) + print("-- LLDB integration loaded --") diff --git a/feedback/example/ios/Flutter/ephemeral/flutter_lldbinit b/feedback/example/ios/Flutter/ephemeral/flutter_lldbinit new file mode 100644 index 00000000..e3ba6fbe --- /dev/null +++ b/feedback/example/ios/Flutter/ephemeral/flutter_lldbinit @@ -0,0 +1,5 @@ +# +# Generated file, do not edit. +# + +command script import --relative-to-command-file flutter_lldb_helper.py diff --git a/feedback/example/ios/Podfile b/feedback/example/ios/Podfile index 1e8c3c90..279576f3 100644 --- a/feedback/example/ios/Podfile +++ b/feedback/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '9.0' +# platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/feedback/example/ios/Runner.xcodeproj/project.pbxproj b/feedback/example/ios/Runner.xcodeproj/project.pbxproj index 74406c5c..071f1101 100644 --- a/feedback/example/ios/Runner.xcodeproj/project.pbxproj +++ b/feedback/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -164,7 +164,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -214,14 +214,14 @@ inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", "${BUILT_PRODUCTS_DIR}/flutter_email_sender/flutter_email_sender.framework", - "${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework", + "${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework", "${BUILT_PRODUCTS_DIR}/share_plus/share_plus.framework", "${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_email_sender.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_ios.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/share_plus.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework", ); @@ -232,10 +232,12 @@ }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -246,6 +248,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -355,7 +358,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -440,7 +443,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -489,7 +492,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/feedback/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/feedback/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 3db53b6e..fc5ae031 100644 --- a/feedback/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/feedback/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ @@ -45,11 +46,13 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" + enableGPUValidationMode = "1" allowLocationSimulation = "YES"> diff --git a/feedback/example/ios/Runner/AppDelegate.swift b/feedback/example/ios/Runner/AppDelegate.swift index 70693e4a..b6363034 100644 --- a/feedback/example/ios/Runner/AppDelegate.swift +++ b/feedback/example/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import UIKit import Flutter -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/feedback/example/ios/Runner/Info.plist b/feedback/example/ios/Runner/Info.plist index 1579fb30..4f68a2ce 100644 --- a/feedback/example/ios/Runner/Info.plist +++ b/feedback/example/ios/Runner/Info.plist @@ -43,5 +43,7 @@ CADisableMinimumFrameDurationOnPhone + UIApplicationSupportsIndirectInputEvents + diff --git a/feedback/lib/feedback.dart b/feedback/lib/feedback.dart index 121146be..2a347bfd 100644 --- a/feedback/lib/feedback.dart +++ b/feedback/lib/feedback.dart @@ -1,6 +1,6 @@ // A Flutter package for getting better feedback. // It allows the user to give interactive feedback directly in the app. -library feedback; +library; export 'src/better_feedback.dart'; export 'src/feedback_controller.dart'; diff --git a/feedback/lib/src/l18n/translation.dart b/feedback/lib/src/l18n/translation.dart index 2d62e03b..9bfa8269 100644 --- a/feedback/lib/src/l18n/translation.dart +++ b/feedback/lib/src/l18n/translation.dart @@ -2,6 +2,7 @@ import 'package:feedback/src/debug.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; + import '../better_feedback.dart'; /// This class must be extended by all custom translations. @@ -336,6 +337,24 @@ class EsFeedbackLocalizations extends FeedbackLocalizations { String get navigate => 'Navegar'; } +/// Default bangla localization +class BnFeedbackLocalizations extends FeedbackLocalizations { + /// Creates a [BnFeedbackLocalizations] + const BnFeedbackLocalizations(); + + @override + String get submitButtonText => 'জমা দিন'; + + @override + String get feedbackDescriptionText => 'সমস্যার বিস্তারিত লিখুন'; + + @override + String get draw => 'আঁকুন'; + + @override + String get navigate => 'নেভিগেট'; +} + // coverage:ignore-end /// This is a localization delegate, which includes all of the localizations @@ -368,6 +387,7 @@ class GlobalFeedbackLocalizationsDelegate const Locale('bg'): const BgFeedbackLocalizations(), const Locale('es'): const EsFeedbackLocalizations(), const Locale('fa'): const FaFeedbackLocalizations(), + const Locale('bn'): const BnFeedbackLocalizations(), }; /// The default locale to use. Note that this locale should ALWAYS be diff --git a/feedback_gitlab/lib/feedback_gitlab.dart b/feedback_gitlab/lib/feedback_gitlab.dart index e1a024bb..348e6e14 100644 --- a/feedback_gitlab/lib/feedback_gitlab.dart +++ b/feedback_gitlab/lib/feedback_gitlab.dart @@ -1,4 +1,4 @@ -library feedback_gitlab; +library; export 'package:feedback/feedback.dart'; export 'src/feedback_gitlab.dart';