ive write a WEB APP with flutter for lunching sms app on ios with url launcher package its so simple.
in android it works and launchs android app curreclty and replaces the phone number in phone number box and message in message box.
**in IOS 17 it work good again **. BUT in an iphone 7 that contains ios 15.8.2 version when it launches the sms app it doesnt put sms message in side message box as it should be. (in image shown)
as you can see it puts sms body infront phone number instead of message box .
as i said it work ok on iphone 15 or 12 with ios 17.
my simple code is:
void sendSMS(
{required String phone,
required String password,
required String command}) async {
if (password.isNotEmpty) {
String message = '*$password*$command';
final Uri url = Uri(
scheme: 'sms',
path: phone,
queryParameters: <String, String>{
'body': message,
},
);
if (await canLaunchUrl(url)) {
await launchUrl(url);
} else {
Get.snackbar(
'error',
'error happend.',
snackPosition: SnackPosition.BOTTOM,
);
}
Get.back();
} else {
Get.snackbar(
'no password found',
'no password found.',
);
}
}
it seens like code doesnt have problem cause it works on ios 17 iphone 15 and android on web by chrome and safari .
url_luncher versions tested 6.2.6 and 6.0.0
tested on flutter version : 3.19
and flutter version :3.0.0
I would be grateful if you could help me solve this problem
even any other solution and way to lunching sms app on ios can help me
user24894105 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.