I´m creating a app that needs to send SMS to different recievers when a button is tapped. The reciever will be selected from a dropdown that the user selects from. I have no experience with sending SMS from an app. I would like to be able to use WIFI and not be depending on SIM-cards to send messages. Does anyone have some tips regarding how I should go about to solve this?
Post
Replies
Boosts
Views
Activity
First off: I´m not sure if this is the right forum for this question. If it´s not, i apologize..I want to implement SMS from Twilio, and are following this guide: https://www.twilio.com/blog/2018/03/sending-text-messages-in-swift-with-twilio.html When I try to test using the command: swift build && ./.build/debug/MyDrive/MyFolder/MySwiftProject I get the following error: error: terminated(72): xcrun --sdk macosx --find xctest output: xcrun: error: unable to find utility "xctest", not a developer tool or in PATHWhat is this error? And what can have gone wrong?
I need to send a mail(s) in the background for my app. What is the best way of doing this? I have tried Mailgun, but hav not got it working. Any tips on what the best/easiest way to send mail in background? Here´s the code I was trying for Mailgun: let parameters = [
"from": "my@mail.com",
"to": "you@mail.com",
"subject": "Test",
"text": "Testing"]
let header : HTTPHeaders = [
"Authorization": "MY-KEY",
"Content-Type" : "application/x-www-form-urlencoded"]
let url = "MY-URL"
AF.request(url,
method: .post,
parameters: parameters,
encoding: URLEncoding.default,
headers: header)
.responseJSON { response in
print("Response: \(response)")
}This throws the following error:failure(Alamofire.AFError.responseSerializationFailed(reason: Alamofire.AFError.ResponseSerializationFailureReason.jsonSerializationFailed(error: Error Domain=NSCocoaErrorDomain Code=3840 "Invalid value around character 0." UserInfo={NSDebugDescription=Invalid value around character 0.})))
I´m currently making an app for a small business that are located in another part of my country. This is a app just for that one business, and should not be available to others. What is the best way to do this? I need to be able to update, and add functions to the application at a later time. Do I need to put it up on AppStore?
I'm trying to implement sending of SMS in my app. I want to try this via a 3rd party. So I need to make a HTTP GET request for sending the SMS:
https://sveve.no/SMS/SendMessage?user=*&passwd=*&to=***&msg=Meldingstekst&f=json
I tried this:
let url = URL(string: "https://sveve.no/SMS/SendMessage?user=myUser&passwd=myPassword&to=12345678&msg=This is the message text&f=json")!
let task = URLSession.shared.dataTask(with: url) {(data, response, error) in
guard let data = data else { return }
print(String(data: data, encoding: .utf8)!)
}
task.resume()
Fatal error: Unexpectedly found nil while unwrapping an Optional value
The error is on the URL. What can be the issue?
I want to use a iPad to display a web app. The iPad will be used by many people, so I dont want the users to be able to navigate to any other sites. Is it possible to "remove" the top bar in safari (or any other browsers on iPad)