Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-1066

window.invokeString is not set on resume

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 1.9.0
    • 2.0.0
    • cordova-ios
    • None
    • iOS 4.1

    Description

      When I switch to another application (such as Safari) and follow a link that leads to my application such as: myapp://some/path the window.invokeString is not set to "myapp://some/path" as I expect.

      To reproduce, create an custom url schema for the app add this to the app:
      document.addEventListener("resume", function() {
      console.log("Invoke: " + window.invokeString);
      }, false);

      Exit the app and follow a link that leads to the app.

      I suspect that the bug should be fixed by adding something like this to the resume:
      if (self.invokeString)

      { // this is passed before the deviceready event is fired, so you can access it in js when you receive deviceready NSString* jsString = [NSString stringWithFormat:@"var invokeString = \"%@\";", self.invokeString]; [theWebView stringByEvaluatingJavaScriptFromString:jsString]; }

      The code is taken from MainViewController.m

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rohdef Rohde Fischer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified