As mobile technology keeps evolving, it is important for developers to keep up with the changes and make necessary modifications in their code to ensure compatibility with the latest versions of operating systems and software. Likewise, both Apple and Android launch various configuration changes with each update. For example, Apple recently made some modifications in the Flutter app configuration for the Flutter app developers. Following the same, now, the Flutter app development requires the below-mentioned changes in their codebase for ensuring compatibility with the latest Apple updates.
Thus, in this article, we will discuss the changes required for iOS 16 and Xcode 14 compatibility.
Common Changes for both iOS and Android
- Change the Package Version: The first step is to change the package version in the “pubspec.yaml” file. This file contains the metadata and dependencies required for the Flutter project. It is important to keep this file updated to ensure compatibility with the latest versions of the dependencies.
- Add Dependency Overrides: To ensure compatibility with the latest version of Firebase Core Platform Interface, you need to add a dependency override in the “pubspec.yaml” file. Add the following code in the “dependency_overrides” section: dependency_overrides: firebase_core_platform_interface: 4.5.1
- Modify the Device ID Method: To get the Android device ID, we use the method “build.androidId ?? ”” in the function “getDeviceID()” which is defined in the file “lib/common_files/common_methods.dart”. However, this method has been deprecated in the latest version. Instead, use the following method to get the device ID: build.id
- Replace “onDissmissCallback”: In the “AwesomeDialog()” widget, replace the “onDissmissCallback” with “onDismissCallback”.
- Remove Unused Packages: Remove the following lines from the file “lib/generated_plugin_registrant.dart” as they are of no use:
- Use Fingerprint/Face Login Functionality: On the signup and login page, use all the available parameters to detect and use the Fingerprint/Face login functionality. The available parameters are iris, fingerprint, face, strong, weak.
- Authenticate Fingerprint Login: Use the following code to authenticate the Fingerprint login:
options: const AuthenticationOptions(
- Change Minimum Deployment Target: In the Runner –> General Settings, change the minimum deployment target to 11.0.
- Change Minimum Deployment Target of Pods:
In the file “ios\Podfile”, change the minimum deployment target of Pods
from platform :ios, ‘10.0’
to platform :ios, ‘11.0’.
- Compare the “android/app/build.gradle” file with the attached “build.gradle” file.
- Add Line in “gradle.properties”: Add the following line in the file “android/gradle.properties“:
- Modify “gradle-wrapper.properties”: In the file “android\gradle\wrapper\gradle-wrapper.properties“, change the distribution URL
After making the above changes, re-install the pods and run the app on the Simulator to ensure that the app is compatible with iOS 16 and Xcode 14. These changes are necessary to ensure that your app runs smoothly on the latest operating systems and software. By keeping up with the latest changes, you can provide a better user experience to your customers and stay ahead in the game.
In the End!
Knowband has accumulated over 10 years of valuable experience. In addition to our expertise in web development, we offer services for native and Flutter app development. If you have any questions or requirements related to Flutter app development, please don’t hesitate to reach out to us at email@example.com.