PWA for IOS on safari and chrome with javascript in html - javascript

I managed to create a custom pwa install button in html javascript that works well on an android only based on this documentation:
Android Pwa
My current problem is getting it to work on safari ios and chrome for ios.
I have read from my research that browsers like safari do not support pwa installs.
I would now like to ask if there is at this time an alternative to create a custom "Install ios app" button in my PWA. Thank you for your propositions.

Related

Prevent multiple browsers installing the same PWA

I have created a Progressive Web App and it can be installed on many different mobile browsers, be it Chrome (Android), Edge Mobile, or Opera Mobile.
My problem is as such, lets say I have Chrome and Opera on my phone. I installed the PWA from Chrome. Then I visit Opera and it also allows me to install the PWA.
So, how can I detect if the PWA is installed and, if possible, prevent other browsers from installing the PWA if detected?
I know that the getInstalledRelatedApps() can be used to detect if similar native app is installed. But I would like to detect is if similar PWA is installed before, is it even possible?

Record live video and audio using iOS, Android and desktop and save it using PHP

I am trying to record a video with audio (for desktop it will use web cam and headphone if any, for IOS and Andriod it will use phone camera and mic).
Tried to implement using (http://www.html5rocks.com/en/tutorials/getusermedia/intro/) but when I tried the given demo its not working with Andriod and IOS even not working in firefox too.
Tried to implement using (https://www.webrtc-experiment.com/RecordRTC) too but we have different js for firefox and chrome and its not working with IOS and Andriod.
If anybody know a solution which one work for chrome, firefox, andriod and IOS than please reply.
Waiting for the response, in the mean time trying my own to find out some solutions.

MeteorJs mobile-config settings for landscape only?

I am developing an app for tablets (android and iOS), I am looking for some kind of settings in mobile-config that disable landscape orientation. I know how to do that on iOS by changing some settings on XCode but is their any setting that can do it for both android and iOS.
This only works for android not iOS device
App.setPreference('Orientation', 'landscape');
Also is it possible to deploy a meteor app just for ipad, i mean now you if deploy it with below command it make it for any ios device. Can i be specific so that it makes only for ipads
meteor deploy your-desired-app-hostname.meteor.com
meteor build ~/build-output-directory \
--server=your-desired-app-hostname.meteor.com
After searching on the topic i came to conclusion that its an open bug and only way to prevent portrait mode on apple's ipad is by manually editing the settings through XCode.
You can check out but here

Javascript on mobile os, android and ipad

Hello
I am trying to do a javascript function compatible on android and ipad, but i notice that android doesnt support ongesture** events?
1.It's really true?
.ongesturestart=function(e){
.ongesturechange=function(e){
.ongestureend=function(e){
2.Since I cant buy niether an Android system nor a Ipad, is there any Android/Ipad simulator for pc/windows/linux around the web? I need them for developenig and simulating web application based on touch/gestures events.
3.Is there possible that google hasnt develop chrome for android platform? and firefox for android/Ipad?
Thanks
1) These are new events added to iOS's version of WebKit. They haven't yet propagated to Android.
2) There is an Android simulator as part of the Android SDK. The iPad simulator is Mac only. But neither will tell you the true performance of your code--you need a device to accurately test your work.
3) Chrome is a desktop browser; Android's built-in browser is roughly equivalent. Firefox is a third-party browser and Google is not responsible for developing it. The very first hit for the Google search "firefox android", however, is a link to a Firefox Android beta. Search engines are your friends.

Best way to debug Javascript on an iPhone app?

I'm doing some rough development on the iPhone. I'm writing a native iPhone app, which uses an UIWebView object to load web sites with javascript. I find very difficult to debug the javascript code on an iPhone.
What are the methods/techniques available for this matter?
Since Safari on the iPhone is using webkit, you could use the debugger built into desktop Safari's web inspector. While there will probably be some quirks that are different between platforms, it will give you a pretty good idea of what's going on in the interpreter.
If you have access to an Android phone, you can debug your application using desktop Chrome's full developer tools and a USB cable (very convenient).
That means the debugger, profiler, HTML inspector, etc, all running on your mobile phone, but accessed through chrome running on your laptop/desktop computer.
Android Chrome and iPhone Mobile Safari are usually more similar to each other than Desktop Safari is to Mobile Safari, the screen format will be similar, the layout similar, and you'll be able to try real touch events, etc.
https://developers.google.com/chrome/mobile/docs/debugging
It'll require Chrome, an Android device able to run the android Chrome app, and a USB cable.
You have to install and use the ADB console command, but once its working, you'll have the full chrome developer tools interface available for debugging mobile.
Similar to Adrian Harris, it is possible to debug any website on the iphone by creating a dummy project in dashcode, clicking on "Mobile Safari" and then "Run"
Once the iPhone Simulator opens and safari opens with the dummy project website, click on the url bar of safari, enter any public url, and when you are at the site, you can click "Pause" and the debugger will pop up after any javascript code runs. At this point, variables can be inspected, breakpoints set, etc.
I know this is an old question, but wanted to update the answers with the latest info ->
The new safari (for mac) has a way to use the web inspector on an actual iphone or ipad in real time if you have the latest software (safari, iOS6, and MacOS) and an attached (with a cable) iDevice.
You access it by enabling it in the "advanced" safari preferences on the iphone, then under the develop menu in safari on the mac. See here for more info: http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/DebuggingSafarioniPhoneContent/DebuggingSafarioniPhoneContent.html#//apple_ref/doc/uid/TP40006515
You can also access the simulators in the same way (installed with xCode).
I agree with pjbeardsley. I would add to use your web page within http://www.testiphone.com/ just so you can see what the dimensions will be like. I would definitely use Safari and the Web Inspector for it as well
I have had mixed success using Dashcode which has a javascript debugger paired with the iPhone Simulator. It is a bit tricky to get working because you can't launch it without opening a project. But as I recall, I posted the project on the web, launched a placeholder project, and then debugged the placeholder project in Dashcode. Then I navigated to my url in the Simulator and was able to set breakpoints. There were probably a few other hoops to jump through, but once it was working, it was like I had a real debugger within Mobile Safari, which was great.
Good luck

Categories

Resources