How can i make an app that will work for desktop windows and IOS with phonegap? - ios

I want to be able to access folders and files via my app, the problem is, when i want to access files on the desktop, i have to run it from a server or at least to emulate one using a program like xampp.
I know PhoneGap has it's own API to access files, but i need to make the app work on desktop too, and i don't mind it to be as normal offline website ( via index.html, not an exe ), but i still need to solve the security issues, i can't tell clients to run it from a server...
The big idea after it, is that i need the app to check for new files in the server, if there are any, to download them.
Also, i want the app to be able to access those downloaded files when it is offline as well.
I guess using only phonegap in ios will solve this, but i still need it to work on windows desktop as well.

PhoneGap released PhoneGap Desktop
http://phonegap.com/blog/2014/12/11/phonegap-desktop-app-beta/
I think this is what you are looking for!

Related

Electron using screen sharing through Electron webview (loadUrl())

I developed a small Electron Dekstop application that handle's login on my webapp and then "load" the webapp through an Electron loadUrl().
We already implemented Jitsi meet in that webapp (with specific UI etc). Everything works fine except the screen sharing.
(The first development was years ago, and since Electron did not allowed custom chrome extension we just didn't bother to make the screen sharing work).
Since then a lot of changes happened and it seems like this project managed to make it work.
I am aware of the solution that allows electron to use the jitsi screen sharing through #jitsi/electron-sdk but i'm wondering whether a solution exists in my case (AKA Jitsi not being implemented directly in Electron, but through a loadUrl()).
Is there a chrome extension that I could add to my electron project allowing chromium to get the JitsiMeetElectron.obtainDesktopStreams function ?
Or is the only solution to implement from scratch jitsi in our Electron project ?
Thanks in advance.

PWA Android and IOS Cache

We are experiencing a pwa application with services worker and everything that surrounds this theme.
I have questions about cache. Information is currently cached and accessed when offline. This works well when we talk about Android. In IOS it seems that the cache is not shared when we add the application to the home screen (installed). It seems that IOS keeps a cache for the application accessed in Safari and the installed one (I'm talking about the same application). In android it seems that the same cache is shared for the version installed and accessed in chrome.
In IOS after adding the home screen I am forced to log in online to generate the installed application cache.
About IOS would you like to know if you have already gone through this? And what would be the best way to persist this data so that the same cache is shared in the application accessed in Safari and the installed version.
In the service worker you mention the name of the cache, until and unless you change it there or update it e.g;
const staticCacheName = 'pages-cache-v3'; it will remain same and will be shared among versions. This may be true for the Android am not sure about IOS. Please update me if you have already found a better answer. Cheers:)
If this is still relevant, then I think that you should look at my answer in this question, because you are faced with the same problem.
PWAs on iOS 12 no longer shares Service Worker cache with Safari?

Ionic 2 Storage does not work on iOS

I am using #ionic/storage as it looked quite promising after reading about it in the V2 Docs.
I use Chrome on my Windows 10 laptop so things appeared to be working perfectly fine at first. However, when I tested it on iPad, or even Firefox on my laptop, I was surprised to find out it did not work.
I was able to resolve the issue on Firefox by removing the sqlite plugin (I thought I will add it when I am ready for native testing):
cordova plugin remove cordova-sqlite-storage --save
Sadly, storage still doesn't work on the iPad. I tested it on Safari and Chrome. I am unable to debug this given the lack of developer tools or console.
I am quite frustrated how Apple makes you dependent on using a Mac to develop on their devices.
How do I go about fixing and debugging this?
I first import storage in Ionic 2:
import { Storage } from '#ionic/storage';
Then to save the data, I do this:
this.storage.set(pk, JSON.stringify(reportObj));
Where pk is just a unique key, and reportObj is an object that I stringify before storing. Again, keep in mind this just doesn't work in iOS.
Thanks.
Update:
So I managed to run the app in Safari and found out that .set actually works and the data gets stored in WebSQL. However, the get does not seem to work and I wasn't able to get any useful errors in the console.
OK, so after a lot of trial and error, I found out that the problem is not really with Storage. There appears to be some other issue with my UI, where it doesn't seem to work on iOS.
I decided to answer the part about testing the app on iOS while in development if you are not a Mac user. The best way for this appears to be to use Ionic View. You can use this simply by typing:
ionic upload
Make sure you create your account. In your iPad or iPhone, you can then download Ionic View app from iTune, sign in, and the app will appear there.
As you upload your code, simply upload again and almost instantly the app would upload on the device as you click Sync.
Hope other Windows users benefit from this.

Access a Qlikview dashboard on an iOS app

I have a Qlikview dashboard that I need to present and I've created a site that loads the Qlikview server onto the browser and runs it from there.
I now need to create an iOS app that does this. But the requirement is that the dashboard shouldn't open on the browser. The server should be loaded and run from the app itself. Is there any way to do this?
PS, I'm completely new to iOS App development and any help will be appreciated.
Yes. While saving it as a shortcut and opening it in the browser would be simple, using Apache Cordova is the best way to develop a smartphone app with HTML5/CSS/JavaScript. From the website:
When using the Cordova APIs, an app can be built without any native
code (Java, Objective-C, etc) from the app developer. Instead, web
technologies are used, and they are hosted in the app itself locally
(generally not on a remote http server).
And to make things better, it's open source.

How to copy html files to ipad and then launch in a browser

Here's a crazy question...The client wants a web application to be available on the ipad when not connected to the internet. My first thought was that it would be a great opportunity to use the offline app feature of HTML5, except that the entire web app (including all the media) is 3GB, and apparently all of it must be available. This exceeds the 5MB limit of the app cache. The website does not necessarily have to rely on any dynamic server side code. It can be straight HTML files. Does anyone know if it would be possible to manually copy the entire website onto the ipad and from there easily launch it in a browser? I was not able to do this, but I have to believe there's a way. Any other approaches to this problem that you can think of? Thank you.
I had a similar problem and here's what I found that worked (using an iPad and a PC):
Download (on the PC) the program HTTrack to the PC. This program can create an offline mirror of a website and has all sorts of options for what gets included.
Run HTTrack on the PC and create a folder for your website.
Install (on the iPad) the free App "Documents 5" by Readdle.
Connect Documents 5 to some sort of cloud based storage (I used by Google drive account, but I'm sure Drop Box would work also)
Zip the entire offline website folder mirrored using HTTrack and upload the zip file to cloud storage (Google drive)
Click on the zip file in Documents 5. It should be downloaded to the iPad
Click on the downloaded zip file in Documents 5. It should be automatically extracted.
Now open the extracted folder and click on index.html. This is your website offline.
I don't know if there is a way to move the index link to the home screen...
There are several apps that can be used for storing files on the iPad and viewing them in an embedded browser. I use GoodReader, but this might be overkill for your purpose.
I've been able to view them using FileApp (after transferring via DropBox), but it's far less than ideal.
Use hightail.com, you can link a website as a space, it will actually convert the website to preview image, then can be access on iPad as webpage in browser, no need to copy file to iPad or install any software.

Resources