-
Notifications
You must be signed in to change notification settings - Fork 505
Conversation
Caboodle/Sms/Sms.netstandard.cs
Outdated
{ | ||
public static partial class Sms | ||
{ | ||
public static bool IsComposeSupported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we still need to decide if a bool and this naming is what we want to end up with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. We may want to have some support level thing: Unsupported, Supported, SupportedWithBackgroundSend or something along those lines. This is more a feature that works when there is a SIM card of some sort.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that probably each class should be small enough that a single Enum should represent what it needs...
So we could introduce "SmsBackground" for instance and that is a new API with a new Enum. I think that is almost better to be honest with you.
Caboodle/Sms/Sms.ios.cs
Outdated
Body = message.Body, | ||
Recipients = new[] { message.Recipient } | ||
}; | ||
messageController.Finished += (sender, e) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this get triggered no matter what? even if it is canceled? Is it better ot fire and forget?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be the case. The docs do say we have to explicitly hide the controller in this event and we are provided a result (success, canceled, failed)
{ | ||
} | ||
|
||
public SmsMessage(string body, string recipient) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be one with just the body? also what is a recipient? phone number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could have overloads for each combo, or we could just let the devs use the properties.
The recipient... each platform just takes a string, so we could leave it as is and hope for the best :)
Caboodle/Sms/Sms.shared.cs
Outdated
if (string.IsNullOrWhiteSpace(Body)) | ||
throw new ArgumentException("SMS body must not be empty.", nameof(Body)); | ||
|
||
if (string.IsNullOrWhiteSpace(Recipient)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it can be empty. I think that is fine.
|
||
namespace Caboodle.DeviceTests | ||
{ | ||
public class Utils | ||
{ | ||
public static bool IsiOSSimulator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be a method that we pass in the device platform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was more just for the tests, as the iOS sim was quite different
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahhh gotcha <3 I see it is devicetests cool.
My only feedback here is to allow empty recipients in general. Also... does it hurt if the message is blank? Maybe they just want to launch the sms app? |
|
I think this is done. |
Description of Change
Adding the SMS API as designed in #26.
Bugs Fixed
Provide links to issues here. Ensure that a GitHub issue was created for your feature or bug fix before sending PR.
API Changes
Adding the SMS API as designed in #26.
Behavioral Changes
Describe any non-bug related behavioral changes that may change how users app behaves when upgrading to this version of the codebase.
PR Checklist