Code Monkey home page Code Monkey logo

Comments (3)

Maryom avatar Maryom commented on June 1, 2024

Ok deal I will try to do it ASAP. Can I take your opinion? I think we can solve it as mentioned here:
http://useyourloaf.com/blog/openurl-deprecated-in-ios10/

func open(scheme: String) {
  if let url = URL(string: scheme) {
    if #available(iOS 10, *) {
      UIApplication.shared.open(url, options: [:],
        completionHandler: {
          (success) in
           print("Open \(scheme): \(success)")
       })
    } else {
      let success = UIApplication.shared.openURL(url)
      print("Open \(scheme): \(success)")
    }
  }
}

// Typical usage
open(scheme: "tweetbot://timeline")

from appz.

Mazyod avatar Mazyod commented on June 1, 2024

Hmm, this is not ideal.
We should allow users to pass in a completion handler

-- 
Maz Jaleel ✌️
iOS Engineer, Game Developer, Python hacker

On September 21, 2016 at 11:00:24 AM, Mariam AlJamea ([email protected]) wrote:

Ok deal I will try to do it ASAP. Can I take your opinion? I think we can solve it as mentioned here:
http://useyourloaf.com/blog/openurl-deprecated-in-ios10/

`func open(scheme: String) {
if let url = URL(string: scheme) {
if #available(iOS 10, *) {
UIApplication.shared.open(url, options: [:],
completionHandler: {
(success) in
print("Open (scheme): (success)")
})
} else {
let success = UIApplication.shared.openURL(url)
print("Open (scheme): (success)")
}
}
}

// Typical usage
open(scheme: "tweetbot://timeline")`


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

from appz.

Maryom avatar Maryom commented on June 1, 2024

I will try with it to find a perfect solution.

Sent from my iPhone

On Sep 21, 2016, at 11:01 AM, Maz Jaleel [email protected] wrote:

Hmm, this is not ideal.
We should allow users to pass in a completion handler

Maz Jaleel ✌️
iOS Engineer, Game Developer, Python hacker

On September 21, 2016 at 11:00:24 AM, Mariam AlJamea ([email protected]) wrote:

Ok deal I will try to do it ASAP. Can I take your opinion? I think we can solve it as mentioned here:
http://useyourloaf.com/blog/openurl-deprecated-in-ios10/

`func open(scheme: String) {
if let url = URL(string: scheme) {
if #available(iOS 10, *) {
UIApplication.shared.open(url, options: [:],
completionHandler: {
(success) in
print("Open (scheme): (success)")
})
} else {
let success = UIApplication.shared.openURL(url)
print("Open (scheme): (success)")
}
}
}

// Typical usage
open(scheme: "tweetbot://timeline")`


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

from appz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.