Module 'flutter_sms' not found

Viewed 235

Got Module 'flutter_sms' not found build error from Xcode

enter image description here

Trying to use Flutter Plugin for sending SMS and MMS on Android and iOS https://pub.dev/packages/flutter_sms

enter image description here

Got error trying to build for simulator

flutter: PlatformException(message_not_sent, Cannot send message on this device!, Cannot send SMS and MMS on a Simulator. Test on a real device., null)

enter image description here

Got same error when building example project for device

https://pub.dev/packages/flutter_sms/example

1 Answers

The problem probably is not with plugin, Xcode just can't read first import so try this:

  1. open a terminal and go to my_flutter_project/
  2. go to my_flutter_project/ios/, delete Podfile, Podfile.lock and Pods/
  3. go back to my_flutter_project/ and do: flutter clean
  4. fluter build ios

if this won't work check if iOS Deployment Target for the Runner project matches with your Pods targets

Related