Guest User

Untitled

a guest
Apr 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. @IBAction func addButtonPressed(_ sender: UIButton) {
  2. let url = URL(string: "MyAppName://")!
  3.  
  4. extensionContext?.open(url) { isSuccess in
  5. switch isSuccess {
  6. case true: print("Open URL Success") // It print when opening app
  7. case false: print("Open URL Failed")
  8. }
  9. }
  10. }
  11.  
  12. // This delegate function is never call when the host application lauching
  13. func application(_ app: UIApplication, // break point not work
  14. open url: URL,
  15. options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
  16.  
  17. print("FUNCTION CALLED 😠😠😠") // Never print
  18.  
  19. return true
  20. }
Add Comment
Please, Sign In to add comment