0
私の "共有場所"機能では、ユーザーは現在の場所を共有するテキストをロング/ラット座標の形式で送信できます。私が実装したもので得られるエラーは、「コンテキストタイプ」の文字列「配列リテラルでは使用できません」です。実装する正しいコードは、どのように、あるいは何ですか?smsテキストでユーザーの経度と緯度の座標を送信する方法
ここに私のコードは、このコードが間違ってたくさんあります
@IBAction func shareLocation(sender: AnyObject) {
// Send user coordinates through text
if !MFMessageComposeViewController.canSendText() {
print("SMS services are not available")
var coordinate: CLLocationCoordinate2D
messageVC!.body = [coordinate.latitude, coordinate.longitude];
messageVC!.recipients = [LookoutCell.description()];
messageVC!.messageComposeDelegate = self;
self.presentViewController(messageVC!, animated: false, completion: nil)
}
}
うわー、私はこのくらいが間違っていた知りませんでした。さらに詳しい書式設定ガイドをチェックします。 – jonB22