Pass data between two Apps by url scheme in swift?
<p>There are two test Apps called Sender &amp; Receiver</p>

<p>They communicate with each other by Url Scheme. I would like to send a String from Sender to Receiver, is that possible?</p>

<p>Detail about the String:</p>

<p>I both create Textfields in Sender and Receiver, I would text some String on Sender Textfield. When I click button, the String will show on the Receiver Textfield.</p>

<p><a href="https://stackoverflow.com/questions/32824528/inter-app-communication-in-ios-using-url-scheme">It seems that I have to implement NSNotificationCenter.defaultCenter().postNotificationName in my Apps Receiver </a></p>

<p>Here is my App Receiver code:</p>

<p>In Appdelegate</p>

<pre><code>func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -&gt; Bool {

    calledBy = sourceApplication
    fullUrl = url.absoluteString
    scheme = url.scheme
    query = url.query
}
</code></pre>

<p>In viewController</p>

<pre><code>override func viewDidLoad() {
    super.viewDidLoad()

    NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(ViewController.displayLaunchDetails), name: UIApplicationDidBecomeActiveNotification, object: nil)
    // Do any additional setup after loading the view, typically from a nib.
}

func displayLaunchDetails() {
    let receiveAppdelegate = UIApplication.sharedApplication().delegate as! AppDelegate
    if receiveAppdelegate.calledBy != nil {
        self.calledByText.text = receiveAppdelegate.calledBy
    }
    if receiveAppdelegate.fullUrl != nil {
        self.fullUrlText.text = receiveAppdelegate.fullUrl
    }
    if receiveAppdelegate.scheme != nil {
        self.schemeText.text = receiveAppdelegate.scheme
    }
    if receiveAppdelegate.query != nil {
        self.queryText.text = receiveAppdelegate.query
    }
}
</code></pre>

<p>Now, I only can show the information about the url <a href="https://stackoverflow.com/questions/32824528/inter-app-communication-in-ios-using-url-scheme">like this</a></p>

<p><img src="https://i.stack.imgur.com/979KI.jpg" alt="image2"></p>

<p>Hope to get some suggestion!</p>