views:

22

answers:

1

I cannot get Raphaël working in a UIWebView.

I load a simple HTML-Webpage with this content:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Page Title</title>

  <script src="js/lib/raphael-min.js" type="text/javascript" charset="utf-8"></script>
  <script type="text/javascript" charset="utf-8">
    alert("" + Raphael);
  </script>
</head>
<body>

</body>
</html>

If I open this page with Safari on the simulator, I get an alert with some version information.

When I start the app and load the HTML, I do not get an alert, which indicates some JavaScript-Error - but I cannot read it because UIWebView does not have an output for that.

Can anyone reproduce this problem?

Has anyone an idea why this might happen? Help is greatly appreciated.

+1  A: 

The problem was that .js-files often get into the "Compile" phase of your target, and not into the "Copy bundle items" phase where they should reside.

rpitting