News for hackers. Stuff that matters.
Re:Boilerplate for turning a mobile website into an iPhone app by yid on Sunday June 21, 2015 @12:51PM (#9754037)
Isn't this exactly what Cordova does? You mention "so you don't have to use Cordova", but you don't mention what the advantages are.
Re:Boilerplate for turning a mobile website into an iPhone app by nfrmn on Sunday June 21, 2015 @01:13PM (#9754118)
Cordova does indeed do this, and gives you access to iOS hardware APIs. This doesn't.

With this in mind, the reason I made it was for projects which don't require those things. There is no middleware here, just a very simple Xcode project with a couple of code modifications.

You can literally drop an existing web app into this and get going! :D

Re:Boilerplate for turning a mobile website into an iPhone app by icefox on Sunday June 21, 2015 @02:41PM (#9754466)
When I looked at Cordova it was a complete mess and pain to deal with. The docs where confusing and out of date. I just needed a simple x-code project, not a kitchen sink that was installed in the attic for some reason.
Re:Boilerplate for turning a mobile website into an iPhone app by gpmcadam on Sunday June 21, 2015 @02:58PM (#9754517)
Setup:

    npm install -g cordova
    cordova create HelloWorld
    cordova platform add [ios|android|wp8|..]
    
Running:

    cordova serve # browser
    cordova emulate [ios|android|wp8|..] # emulation
This has always been pretty straightforward to me, it's a bit of an extra pain to debug iOS development on a non-OSX machine, but that's true of the parent link, too.

What's been a complete mess to deal with for you? And how long ago did you last use Cordova?

Re:Boilerplate for turning a mobile website into an iPhone app by logane on Sunday June 21, 2015 @07:47PM (#9755490)
We tried to do that with our Cordova project and it wasn't this straightforward at all - we weren't even accessing the hardware. Some main points are behaviors when opening URLs, a completely unresponsive canvas, and slow rendering on the canvas.
Re:Boilerplate for turning a mobile website into an iPhone app by icefox on Monday June 22, 2015 @11:54PM (#9762522)
Looking at the doc page I have no real clue I would get to what you did.

http://cordova.apache.org/docs/en/5.0.0/

Granted when I looked at the docs it was a while ago and much worse, but still it wants to teach you everything before letting you see something.

Re:Boilerplate for turning a mobile website into an iPhone app by gpmcadam on Tuesday June 23, 2015 @04:44AM (#9763369)
I would start at the home page, instead.

  1. http://cordova.apache.org/
  2. Click 'Download'
  3. Click the link in "[For the] npm version see the Command-Line Interface section [..]"
There's the same set of instructions listed in my comment above.

http://cordova.apache.org/docs/en/5.0.0//guide_cli_index.md....

Re:Boilerplate for turning a mobile website into an iPhone app by firloop on Sunday June 21, 2015 @12:57PM (#9754063)
Agreed. This just seems like a homebrewed version of Cordova lacking the ability to add plugins that provide a JS bridge to native OS features.
Re:Boilerplate for turning a mobile website into an iPhone app by gpmcadam on Sunday June 21, 2015 @02:59PM (#9754519)
And without any of the maturity a project like Cordova brings to the table.
Re:Boilerplate for turning a mobile website into an iPhone app by Animats on Sunday June 21, 2015 @02:34PM (#9754445)
Now for a program to turn iPhone apps into web pages. Immediate download! No app store! No space tied up on your phone! Searchable with Google!
Re:Boilerplate for turning a mobile website into an iPhone app by coldtea on Sunday June 21, 2015 @02:47PM (#9754485)
Slowed rendering! Lower responsiveness! Non-native controls widgets! No good way to monetize them! Not able to take advantage of all native APIs! Can't use offline except with the limited storage APIs! Worse battery performance for demanding code!
Re:Boilerplate for turning a mobile website into an iPhone app by nfrmn on Sunday June 21, 2015 @05:40PM (#9755106)
...For now. You should have a play with a Chromebook, Web software is incredible when the hardware / APIs are there :)
Re:Boilerplate for turning a mobile website into an iPhone app by ivan_ah on Sunday June 21, 2015 @02:45PM (#9754481)
Thank you!

I've been waiting for so long for something simple like this to popup. Bonus points for also making an Android version: https://github.com/nabilfreeman/android-webview-boilerplate

Re:Boilerplate for turning a mobile website into an iPhone app by nfrmn on Sunday June 21, 2015 @05:38PM (#9755097)
No problem! I've forked the Android version from somebody else on Github and haven't made many changes to it yet, so the credit for that one should go to http://github.com/slymax.

I plan to make an Android one as simple as this. Google are working hard to make development easier but it's still a very poor experience compared to Xcode.

Re:Boilerplate for turning a mobile website into an iPhone app by bdcravens on Sunday June 21, 2015 @01:31PM (#9754189)
As this simply wraps a web view, and doesn't really add anything more than what Safari does, isn't the odds of it ever being accepted by the App Store very small?

Cordova apps are accepted because they do have an API into phone functions.

Re:Boilerplate for turning a mobile website into an iPhone app by colinbartlett on Sunday June 21, 2015 @10:27PM (#9755841)
First app I ever built was a Cordova-based database of visa requirements for US Citizens. You could find a country by Name or see all countries that you could visit without a visa or with instant visa at the border.

I had dreams of using it myself when wandering the world without a local internet connection and seeing where I wanted to fly to next.

Apple rejected it saying it was nothing more than a web page wrapped in an app.

Re:Boilerplate for turning a mobile website into an iPhone app by timpark on Monday June 22, 2015 @12:17AM (#9756119)
If you build it in Ionic (which was built on top of Cordova), you can get it onto the device via Ionic View. http://view.ionic.io/

There may be other solutions, but this is what I'm currently familiar/playing with.

Re:Boilerplate for turning a mobile website into an iPhone app by kekub on Sunday June 21, 2015 @01:43PM (#9754237)
I submitted a JavaScript/Canvas based game, created on a game jam, and it got approved without any problems. [1] https://appsto.re/de/hxAB5.i
Re:Boilerplate for turning a mobile website into an iPhone app by logane on Sunday June 21, 2015 @07:43PM (#9755482)
To add another anecdote, we just wrapped a webapp [0] and it was accepted. It's pretty easy to get into the app store, it's my understanding that Apple stopped truly vetting apps (there are some pretty terrible, broken apps on the app store approved by Apple).

[0] http://hextris.github.io/hextris/

Re:Boilerplate for turning a mobile website into an iPhone app by nfrmn on Sunday June 21, 2015 @01:37PM (#9754212)
Well, I think it depends on the content of the application. If you take your website and straight up drop it into this, it will probably be rejected.

If you build something that fetches train times, or a game like 2048, then you have an iOS app that just happens to be built in HTML.

This boilerplate is useless without some good content put inside it :)