Код: Выделить всё
let text = "By submitting, I confirm that I am an American, above 18 yrs of age & residing in America. I have read & agree to American Bank. I also agree to receive calls, SMS & WhatsApp messages from American Bank"
Код: Выделить всё
let encodedTxt = text.removingPercentEncoding?.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? ""
Код: Выделить всё
var components = URLComponents(string: "bear://x-callback-url/create")!
components.queryItems = [
URLQueryItem(name: "title", value: "Title),
URLQueryItem(name: "text", value: encodedTxt),
URLQueryItem(name: "x-success", value: "myapp://bear-note-created")
]
Код: Выделить всё
bear://x-callback-url/create?title=\(title)&text=\(encodedTxt)&x-success=myapp://bear-note-created
Код: Выделить всё
By%20submitting,%20I%20confirm%20that%20I%20am%20an%20American,%20above%2018%20yrs%20of%20age%20&%20residing%20in%20America.%20I%20have%20read%20&%20agree%20to%20American%20Bank%20Privacy%20Policy.%20I%20also%20agree%20to%20receive%20calls,%20SMS%20&%20WhatsApp%20messages%20from%20American%20Bank
Любая помощь приветствуется.
Подробнее здесь: https://stackoverflow.com/questions/787 ... wift-for-i