Can have a .html
file like -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TITLE</title>
<script type="text/javascript" src="Plugin.js"></script>
<link type="text/css" href="Plugin.css" rel="stylesheet"/>
</head>
<body>
<div id="Pluginwrapper">
<div id="Plugincontainer"></div>
</div>
</body>
</html>
Have the .html file, .js file and .css
(i.e. All the plugin files) file in the App bundle and, in order to display the content in UIWebView
, just make the .html
file and .js
files as Bundle Resources in Xcode's Build Phases Tab.
Then use -
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"htmlfile" ofType:@"html"] isDirectory:NO]]];