Launching Viber app via URL scheme on iOS

后端 未结 9 1221
野趣味
野趣味 2020-11-30 12:46

I\'m making an iOS app which can open Viber app and automatically call a person or go to chat window with the person. Is there any url scheme for Viber to do that such as:

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-30 13:18

    For Swift, you can do like that :)

    let viberShareUrl = "viber://forward?text=\(shareUrl)"
    let url:NSURL =NSURL(string: viberShareUrl)!  
    UIApplication.sharedApplication().openURL(url)
    

提交回复
热议问题