How to run webXR(AR) on iOS device? - ios

I tried running https://threejs.org/examples/#webxr_ar_cones example on my iPad(iOS 14.4.1).
I tried to run it in XRViewer, Chrome, and Safari but the example's AR button says "WEBXR NOT AVAILABLE".
So is it currently not possible to run webXR (AR) apps on an iOS device?

As the engine of all of those browsers is eventually safari and safari doesn't support WebXR at the current moment, this is the expected behavior.
There were a few attempts (maionly mozilla's https://github.com/mozilla-mobile/webxr-ios), but it is up to apple to add support for it in its core engine.

Related

Debugging PhoneGap on Device

Normally I'm a JEE guy but these days I'm working on a mobile app. I chose PhoneGap because there are not so many needs to UI and I thought this would be the easiest way to serve the app on many platforms.
I'm wondering if my setup is good and if it's possible to get console output when running on the device. I'm working on MacOS and iPhone6.
I installed PhoneGap and Cordova via npm and serving the files with phonegap serve.
For local debugging I'm using the chrome plugin "Ripple".
For debugging on the device I'm using the PhoneGap Developer App from the AppStore, together with weinre on my Laptop to get some debugging data. In weinre I can see everything except console outputs. Is this normal? Or any idea how I could get the console to weinre, too?
I also found some tutorials on the web using XCode and some native iPhone emulator but didn't get this working yet. Which way is the more preferable way of debugging on device?
You don't need any tool for debugging cordova app. For iOS just start the app in stimulator and start safari. In safari go to Develop > 'your pc name' > ios simulator.
http://webdesign.tutsplus.com/articles/quick-tip-using-web-inspector-to-debug-mobile-safari--webdesign-8787
For Android run the app in your device and in the chrome go to http://chrome://inspect/#devices
Weinre is quite old and should not be be used anymore, instead, you want to use the remote debugging tools in your browser. For iOS, you can use Safari to debug your Cordova app. I've got a full article here, https://dzone.com/articles/overview-mobile-debugging, but the process involves doing one setting on your mobile device, and then simply opening up Safari and going to the debug menu. You can also do this with Chrome and Android apps.
Another option is GapDebug (https://www.genuitec.com/products/gapdebug/) which lets you do iOS and Android together in one Chrome tab.

Reasons why cordova app behave differently in Safari and iPhone6

I'm deploying a cordova app for iOS. When debugging I run it on Safari browser (with ionic serve. I also tried ionic serve --lab) and on the iPhone with XCode.
But both results behave differently. In the browser it shows the desired result. Neither the app on the phone nor the browser are showing errors.
What could be the reasons? Aren't they suppose to show the exact same result (I'm not only referring to the design but also the behaviours)?
Since I'm using moment.js it would show this weird behaviour. Any known issues with moment.js in combination with iPhone?

Using Adobe Flash on iOS devices

Is there any way through which a flash content can be run on iOS devices?
I am getting two different view.
The link below says that it is possible that we can develop some flash application and run it on iOS devices.
http://www.adobe.com/inspire/2012/12/ios-apps-flash-cs6.html
But on the Apple website link it says running flash applications is not possible on iOS devices.
Can someone clarify if it is possible to run the flash applications on iOS?
You cannot run flash natively on iOS devices. Adobe does, however, provide a tool to run software built with flash on iOS devices.
This works in a similar way to Cordova/ Phonegap in that it takes your code and crosscompiles it into iOS code using other plugins and librarys.
As shown here:
http://www.infoworld.com/article/2623251/mobile-development/escape-the-ios-sdk--building-iphone--and-android--apps-via-flash.html
Safari on Mac OS will support Flash
Safari on iOS won’t support Flash.
We will need to write a native iOS app to deliver the functionality

iOS webapp performance safari vs home screen start

I read an article recently which states that web apps on iOS launched from the home screen running in full screen mode have slower performance than webapps running inside safari.
Then I found a followup article to it which seems to sugguest that the issue above is fixed.
Does anyone know if this is confirmed?
According to information from appleinsider, ios5 beta fixes that problem and now Nitro JavaScript engine enabled on Web.app.
I've iOS 5 installed on my iphone4 and updated SunSpider JavaScript testing framework 0.9.1 (to be able to start as fullscreen web application under ios). And I've started subspider several times in fullscreen webapp mode and in Safari mobile. So, see my results below (images are clickable):
May be something was fixed (apple insider provides 4 vs 10 seconds difference), but I can't say that performance is equals in both cases (3756.5ms vs 5243.8ms for those who can't see images).
UPD
Small interesting note about UIWebView, it is impossible to use Nitro-enabled JavaScript engine in native applications (I mean applications designed in Xcode and posted to AppStore) because Nitro JIT requires to be able to use dynamic code signing.
UPD
Look at iOS 5 Top 10 Browser Performance Changes on blaze.io, Seems Apple enabled Nitro for Fullscreen WebApps in iOS5 (nice statistics in article).

Debugging web app in iPad Simulator

I am developing a web app for iPad and testing it on Safari on Mac and Safari on iPad Simulator. Now there are some issues with CSS in iPad Simulator which work quite well in Safari on Mac.
Now my question is,
Is there a powerful debugging tool for Safari in iPad Simulator?
When running safari in an XCode device simulator, the desktop Safari (v6) Develop menu shows those devices. From there, you can fire up the developer tools (DOM browser etc.) for the mobile browser. This helped me debug an mobile safari css issue without hardware.
Note: As of iOS6 this is not the correct way of doing remote debugging, leaving this answer for historical reasons but you should look into remote inspection with Safari, here is a good article: http://jeffreysambells.com/2012/09/22/ios-safari-web-inspector
Have a look at this, (a bash script I wrote) https://gist.github.com/2241976. It will allow you to open the iPad simulator and run Webkit's remote inspector, which will look just like this.
iWebInspector is quite a powerful tool for the iOs simulator's Safari.
It uses the same inspector as Chrome and it works nicely (I've used it myself and found it really helpful).
From their website
iWebInspector is a free tool to debug, profile and inspect web
applications running on iOS Simulator (iPhone or iPad). You can check
resources, see and change HTML & CSS, use breakpoints on JavaScript
code, create charts and more just as if you were on Safari for
Desktop, Chrome or Firebug.
It works for any web in Safari -the web browser-, for a chrome-less
webapp (full-screen) and also for apps using UIWebView -including
PhoneGap applications-.

Resources