iOS
Don't have an Instabot account yet?
Overview
Instabot can be integrated into your native iOS app using a full-screen webview.

Instabot launching in a native iOS webview
Contents
1. Get your bot microsite URL
- In the conversations page, find the bot that you want to launch, open the menu, then click 'Share'

Get your bot's microsite URL
- Copy the microsite URL from the page that's launched. You'll need this for the next step!
2. Create a full-screen webview
- In your app, create a full-screen webview that will launch your bot's microsite URL
import UIKit
import WebKit
// replace with your own bot microsite URL
let botUrl = "https://YOUR-BOTS-MICROSITE-URL"
class WebViewController: UIViewController {
@IBOutlet weak var webView: WKWebView!
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
guard let url = URL(string: botUrl) else {
webView.loadHTMLString("<H1>Bot URL is incorrect</H1>", baseURL: nil)
return
}
webView.load(URLRequest(url: url))
}
}
- That's it!
Updated over 5 years ago