I'm working on a project that will need to be inside an iOS app as well as a website. It will need to run inside the app since it will must be accessed without a wireless connection.
Is it possible to run my web files inside the app without using something like phone gap?
What is the web connection for? Is it for user authentication? Is it for parsing data from a website? It really depends what you need an internet connection for, if you need some external data from a website or database then you would need to internally create some stores/sqlite db's to hold the data and sync that data when there is a connection.
If you are just running a client side app that you decided to create in HTML then I'd still use Sencha Touch, then Cordova to get it to compile natively.
You can always "Add to home screen" from Safari, to make it run locally. To do this, just visit the webpage when you have internet then add it to the homepage, it will run fullscreen without an internet connection; it will work fine offline IF AND ONLY IF you don't need to connect for any data.
Related
I'd like to create a flutter IOS app which stores data and allows to edit it within the iOS app.
Then the iOS app be able to provide a webserver [start an internal webserver e.g. using jaguar] and serve a WebApp, which operates on the same data on the iDevice.
Idea: Make the iDevice the only data store. And allow a e.g. windows client to access the data on the iOS device using a web interface [and not require it to push it into a cloud].
I have used Flutter jaguar to make it work, have you tried to run the example ?
I think what would be very challenging is that IOS kill background processes, so to use your IOS app as a (reliable) server in the background would be impossible (if reliability, and it should, is a concern), only audio streaming apps would not be killed. So it means you will have to run your server at all time in the foreground
And not to mention that if your phone is out of battery it would also stop working (but of course, you are aware of that, and that's true that if connect to charger, it could perfectly act as a server, as I have tested myself!).
NB: If it's for some serious project, not a fun personal project/challenge, I advise you to reconsider and what you could still do is to manage your server data from the IOS app (meaning that you would send data on on-premise or cloud server like Firebase). But as you stated in your question you are looking to make it work on the Iphone device.
I have recently gone through couple of Progressive Web application(PWA) articles on google. What I have got it it is concept for web application
which combines best of two world i.e. latest browser features(like web workers etc) and native application(speed, home page etc).
I have two basic doubts .
Is PWA applicable for mobile sites only or for desktop based application also ? In the couple of examples I have gone through mainly talks that using
PWA allows the mobile user to user the mobile sites like app without installing and equally good speed.
I understand the point with PWA user does not have to install the native app on his/her mobile but i believe even in case of PWA all content(static content like html,css,jss,images etc) will be stored in cache as user navigates to web application. Service worker checks if content
available in cache it will serve it from there otherwise fetch it from server.
So when PWA caching the content on client side, it will be equivalent
of size of native app. Is n't it ?
Its applicable to both. Think a PWA as a website that gets stored in local cache.
It really depends on what you configure service workers in the browser to do, but the gist of the thing is:
cache HTML, CSS, and JS on the client (usually on a per need basis, load and cache)
use browser local database storage to store data coming from your back end database
use AJAX, and/or WebSockets to get data back and forth from your back end systems
Call it a website, a javascript application, whatever you call it, its just the same old/new browser tricks working with local cache introduced; so it loads offline.
And loading offline is pretty much as close as they come to a native app, PWAs as of today are HTML, CSS, JS applications running on a browser; generically called a website.
Hope its clear.
I am writing an app in order to automate the process of connecting an Apple mobile device to a wifi network and downloading configuration profiles to the device. Since it is being automated (by something such as Native Driver), all of the functions need to be controlled by the app itself, not sent to another app such as Settings or Safari.
I am already using Apple80211 private framework to connect to a wifi network as well as UIWebView in place of a browser in order to navigate to a specific webpage. Once I navigate to this webpage, my server will send the mobile device a .mobileconfig file in order to install a configuration profile. I haven't been able to find a clear answer on how to handle this .mobileconfig file once it is sent by the server. I have read in a few different places that UIWebView cannot handle the .mobileconfig file once it is sent. What would be the best way to handle this file when it is sent?
Also, once it is sent, and granted that something can handle the file, is there a way to install the configuration profile programmatically without the need for user input? i.e. are there any public or private frameworks that I can implement in order to install the configuration profile "behind the scenes?"
This app is only ever going to be used for testing purposes, and will only ever live on a handful of devices. Thanks in advance, any help will be much appreciated.
I tried a similar thing to do.
Unfortunately I didn't get it running with the UIWebView, but with switching to the Safari it worked:
Switch to safari, let the user install the config and send him back to your app. Just register to a custom URL Scheme like "yourapp://" and add a link to this URL in the HTML.
I want to show some really simple graphics in a http-page in the local network using an iOS App as local server.
Now I heard showing some http-page over the local network is quite easy, using for example CocoaHTTPServer.
Would it also be possible to adjust the content of the page dynamically, from the iPhone side?
Meaning
user types in URL at the desktop-pc-browser of his choice
user goes to his sofa, flicking through text/images with his iPhone, looking at the remote screen
(no need to go to the browser to refresh page?)
Would this be feasible?
Of course I could also try to set up some Bluetooth-Connection, connecting between iOS/MacOS Apps, but I figured the browser version would be much more flexible :)
Stable connection? No need to support each and every browser? Then open up a websocket connection between your app and your browser. You’d then advise your browser to reload or show another picture through the websocket.
If you need to support more browsers, you might need comet / long-polling support. I’m not sure, though, whether CocoaHTTPServer supports it.
If none of these work, you could have your webapp do an Ajax request every now and then, in order to check whether something has changed.
I have gone through following link
http://zachwaugh.com/2009/03/programmatically-retrieving-ip-address-of-iphone/
and I have also tried this one (but this isn't recognized by Apple).
http://appsamuck.com/day4.html
I just want that when user tap on "wifi" button.
Reports stored in documents directory can be accessed by other pc using wifi using the IP that I display on my iPhone application. How is it possible?
In my apps, I use CocoaHTTPServer to get local info into and off of the phone. You run the server and out-of-the-box, it indexes all the files in the documents directory.
To do what you want, you will need to edit the code to return some other kind of data format (xml probably is the easiest) the call this from inside your app to get that data. CocoaHTTPServer easily take POST right out of the box too, so you can post an xml response as well.
After thinking about it, CocoaHTTPServer is best run on the computer side behind the scenes. the iphone can then send info to the computer where handling the code should be easier and you have more options.
I can't point to any specific examples but the way to do this would be the ZeroConf protocol - both the iPhone and PC would have to be on the same network to have this work.