Archive for the ‘ iOS ’ Category

StageWebView StageWebViewBridge Communicating between actionscript and javascript and vice versa

I have made an extended StageWebView Class that lets you:

* Communicate Actionscript with Javascript.
* Communicate Javascript with Actionscript.
* Load local files and resources in a easy way.
* Extend loadString method with AS3 – JS communication.

By example you can call javascript from as3

1
2
// call javascript with callack function
webView.bridge.call('someFunctionToCall', callBackFunction, ...arguments );

// reference local resources in a easy way

1
<img src="appfile:/image.png">

You can find it at:

http://code.google.com/p/stagewebviewbridge/

I will post a tutorial here…

Testing Iphone Webapps in iPad

How to use my iPad to verify sites developed for iphone …

To carry out the process, we need a Jailbroken iPad, iFile and OpenSSH installed.

The process is very simple, enter the terminal and access your ipad through ssh using root and alpine as username / password:
[cc lang = "xml"]
ssh root@ip.de.nuestro.ipad
[/ cc]

Once we have accessed use the following commands to make a copy of MobileSafari:
[cc lang = "xml"]
cd / Applications /
cp-R MobileSafari.app / MobileSafariIphone.app
[/ cc]

After the copy process is done, use iFile to navigate the next directory:
[cc lang = "xml"]
Disk -> Applications -> MobileSafariIphone.app
[/ cc]

Edit the info.plist file, look for an entry called CFBundleIdentifier and change its value to com.apple.mobilesafariiphone. This tells the system recognize the executable as an independent application from the original safari.
After that change the value of UIDeviceFamily entry removing the line 2 .

With this we have a copy of Safari, version iPhone.

Respring for the changes to take effect.