Hi everyone,
- 1. HTML -
my question is : is it currently possible to display some html in my app (locally stored or online)?
Yes
-> If yes, can you give me some pointers on how to do it?
No
-> If not, is that related to
Feature #48 : UIKit plugin?
What is written in the issue system :
[ Description ]
UIKit as a plugin for iOS, with webview, keyboard widget, dialog box, textedit widget, etc support. (name here all UIKit widgets).
Listed for
The Next major release (due summer 2012).
@atilim What's the chance to have it available in Gideros, and how soon would it be?
- 2. VIDEOS -
Is it possible to play a video (locally stored or streamed from internet) in Gideros? (Ex : launch a video trailer from Youtube and give the users access to play/pause buttons)?
Thank you
Comments
http://www.giderosmobile.com/forum/discussion/comment/8265
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Sure. This is easy using my tweaked uikit.mm plugin. (*iOS only*) Read this thread and follow the instructions there http://www.giderosmobile.com/forum/discussion/1206/newbie-question-about-pluginsuikit#Item_4 and grab my iOS iPad simulator installer linked there.
Then try this:
To populate the web view, you can use:
UIWebViewInstance:loadHTMLString(HTML_string);
-- load a HTML String into the webview
UIWebViewInstance:loadHTMLStringWithBaseURL(HTML_string, filename_of_existing_asset_as_base_URL);
-- load a HTML string into the webview, and specify a base URL
-- for relative path references for assets (media, javascript files etc.)
UIWebViewInstance:loadLocalFile(local_html_filename);
-- load a local HTML file. The .html file is used as the base URL
-- for relative path references for assets (media, javascript files etc.)
UIWebViewInstance:loadURL(URL_string)
-- loads a remote URL
and if you need to do some JavaScript injection...
UIWebViewInstance:evalJavaScript(javascript_string);
-- performs a JavaScript eval() statement with the javascript_string on the UIWebView instance
I'm currently on sick leave but I'll try to upload my changes to the uikit.mm to github late next week. In the meantime, you can experiment with the Xcode iOS simulator build.
Best,
- Ian
More info: http://www.google.com.au/search?client=safari&rls=en&q=uiwebview+remote+debugging+localhost:9999
I'll look forward to seeing your additions to the github real soon.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
@ianchia
Thank you for writing such detailed posts. That will be so helpful (to me and future searches).
I've already added in-app-email functionality to my forked uikit.mm file since I was porting an existing ObjC/Three20 app to Gideros and matching existing functionality ... I'll take a look at the SMS functionality before I upload to github. It uses the same API, so it should be a no brainer. I haven't looked into the map API changes for iOS6 but I guess I'll probably add MapKit as well at some point along the way.
- Ian
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill