Menu

SaleSmartly iOS Developer Documentation

IOS has not yet opened the SDK developer documentation. IOS temporarily needs to use webview. For details about webview, see: SaleSmartly chat plug-in JSSDK developer documentation

  1. The Info.plist file needs to have the following permissions configured:

Copy
 <code>	&lt;key&gt;NSCameraUsageDescription&lt;/key&gt;
	&lt;string&gt;我们需要访问相机以便您能拍照&lt;/string&gt;
	&lt;key&gt;NSPhotoLibraryAddUsageDescription&lt;/key&gt;
	&lt;string&gt;请求访问相册&lt;/string&gt;
	&lt;key&gt;NSMicrophoneUsageDescription&lt;/key&gt;
	&lt;string&gt;请求访问麦克风&lt;/string&gt;
</code>
  1. Modify the address where the corresponding code block is loaded

File path: plugin-ios/ContentView.swift

Copy
 <code class="language-swift">struct ContentView: View {
    // 需要加载的链接地址(https://xxx),请替换为业务对应的H5地址或专属链接地址
    let url = URL(string: &quot;https://xxx/&quot;)!
    
    var body: some View {
        ZStack {
            WebView(url: url)
                .edgesIgnoringSafeArea(.all)
            Spacer()
        }
    }
}
</code>

The url is the address displayed on the page and needs to be replaced by yourself.

Demo Example

SaleSmartly IOS Demo example, click to download

Last modified: 2025-05-21Powered by