diff --git a/CHANGELOG.md b/CHANGELOG.md
index 665a632..f20f910 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.0.3
+
+* Bug Fix for iOS Simulator Error
+
## 0.0.2
* Fixing Version
diff --git a/README.md b/README.md
index 27ecb5c..458239f 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,6 @@
# flutter_sms
-
-
-
+
## Description
diff --git a/ios/Classes/SwiftFlutterSmsPlugin.swift b/ios/Classes/SwiftFlutterSmsPlugin.swift
index 03948af..a1596a2 100644
--- a/ios/Classes/SwiftFlutterSmsPlugin.swift
+++ b/ios/Classes/SwiftFlutterSmsPlugin.swift
@@ -16,12 +16,16 @@ public class SwiftFlutterSmsPlugin: NSObject, FlutterPlugin, UINavigationControl
_arguments = call.arguments as! [String : Any];
switch call.method {
case "sendSMS":
+ #if targetEnvironment(simulator)
+ result(FlutterError(code: "message_not_sent", message: "Cannot send message on this device!", details: "Cannot send SMS and MMS on a Simulator. Test on a real device."))
+ #else
let controller = MFMessageComposeViewController()
controller.body = _arguments["message"] as? String
controller.recipients = _arguments["recipients"] as? [String]
controller.messageComposeDelegate = self
UIApplication.shared.keyWindow?.rootViewController?.present(controller, animated: true, completion: nil)
- result(message)
+ result(message)
+ #endif
default:
result(FlutterMethodNotImplemented)
break
diff --git a/pubspec.yaml b/pubspec.yaml
index c23f7f5..f60e8cc 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: flutter_sms
-description: A Flutter plugin for Sending SMS on Android and iOS.
-version: 0.0.2
+description: A Flutter plugin to Send SMS and MMS on iOS and Android. If iMessage is enabled it will send as iMessage on iOS. This plugin must be tested on a real device on iOS.
+version: 0.0.3
author: Rody Davis
homepage: https://github.com/AppleEducate/flutter_sms
environment:
@@ -11,6 +11,7 @@ dependencies:
flutter:
sdk: flutter
+# flutter packages pub publish
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec