IBM Worklight v6.1.0.1 : Error when using Ionic Framework with Worklight and run on IOS environment

Posted by NickNguyen on Stack Overflow See other posts from Stack Overflow or by NickNguyen
Published on 2014-05-23T04:48:42Z Indexed on 2014/05/28 3:26 UTC
Read the original article Hit count: 261

Filed under:
|
|

I have created demo app using Ionic with Worklight and it worked on Android but got error on IOS, when i used mobile browser simulator and debugged on IOS environment, i got the folowing error message:

Uncaught InvalidCharacterError: Failed to execute 'add' on 'DOMTokenList': The token provided ('platform-ios - iphone') contains HTML space characters, which are not valid in tokens.

I just add Ionic files in index.html:

<!DOCTYPE HTML>
<html>
        <head>
            <meta charset="UTF-8">
            <title>index</title>
            <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
            <link rel="shortcut icon" href="images/favicon.png">
            <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
            <link rel="stylesheet" href="css/main.css">
            <link rel="stylesheet" href="ionic/css/ionic.css">
            <script src="ionic/js/ionic.bundle.js"></script>
        </head>
        <body style="display: none;">
            <!--application UI goes here-->
            <div class="bar bar-header bar-positive">
                <h1 class="title">bar-positive</h1>
            </div>
            <script src="js/initOptions.js"></script>
            <script src="js/main.js"></script>
            <script src="js/messages.js"></script>
        </body>
</html>

I also tested on mobile device on both Android and IOS and only got error on IOS device.

I don't know how to fix this. Can anyone help? Thanks.

© Stack Overflow or respective owner

Related posts about ios

Related posts about worklight