Apache Cordova
  1. Apache Cordova
  2. CB-387

try/catch wrapper in native iOS code for cordova-js initialization firing alerts when page without cordova.js is loaded in

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.6.0
    • Component/s: iOS
    • Labels:
      None
    • Environment:

      1.6.0rc1 <--- FYI!!

      Description

      Originally authored by code I wrote! My bad!

      See line 370 of CDVViewController.m:

      NSMutableString *result = [[NSMutableString alloc] initWithFormat:@"try{require('cordova/plugin/ios/device').setInfo(%@);}catch(e){alert('errorz1!!!');alert(JSON.stringify(e))}", [deviceProperties JSONString]];
      

      We should have a graceful way of degrading this, perhaps run a console.log instead? Suggestions?

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Shazron Abdullah
            Reporter:
            Filip Maj
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development