Skip to main content

Posts

Showing posts with the label HTML5

Building a web demo for a native iOS app in the mobile apps era

This is one of those achievements that had me yell a big "YAYYYYY" when I had it working, even though it is not complete at this stage. After coming across some hurdles, I finally managed to deploy a web demo for my iOS app  My Day To-Do  that anyone with a mobile or PC can try. In this short post, I will talk about my motivation for it as well as shed some light on my overall solution and I will conclude this post with my thoughts on this approach and what I think about it, in current day and age.  Motivation  My Day To-Dos has both a free and a paid version and the distinguishing features between the two are (at this stage) weather summary selecting the language the app talks in The above features are only available in the paid version and I wanted to give any prospective users a feel for what these features are like. Solution I have already written about the unique way in which I built my native iOS app i.e. Html5 for UI and native...

Html5 based widget for an iOS app: Today extension powered by the Ionic framework

At some point the thought of adding a Widget to my iOS app came to mind which was followed by starting work on adding a widget for my app, My Day Todos . Obviously the first step was to learn how to add a Widget to an iOS app and in that learning process I discovered many things about widgets in iOS first of which was a widget in iOS is a an app extension i.e a  Today Extension . While I am still haven't finished working on the widget for my iOS app, I thought I would take some time out and share what I have learned. In this post, I will share a few important tips and provide an example of how to add a Widget to an iOS app and have the widget UI powered by Html5 via  Ionic framework . I added some code to my Github repo, Html5StarterAppWithSwift in order to show how this can be achieved. There are already too many tutorials out on the Web on how to add a Today extension to an iOS app so I won't be including that here. Instead I will focus on sharing some of the useful tip...

Building my first mobile app: the journey - Part 3: App released

To start with part 3, I think it's best we have a recap of all the events leading up to this. So here we go, Previously in parts 1 and 2... I had a great life, a loving girlfriend, a job I liked etc etc and little did I know that it was the calm before the storm. One evening I had a really bad accident while I was out on my usual run, what happened was while crossing the road, I was hit by a car and left for dead on the street.  I suffered a few injuries as a result of the accident, one of which was a Traumatic Brain injury and I lost a lot of what was very dear to me. I lost my girlfriend(breakup), my ability to walk(at the time), my memory wasn't as good anymore and a number of other things. A few months after my accident, I started building my first mobile(iOS) app which would serve as a tool to help me in my daily life. That was a quick recap of the events, if you want to know more, you can have a read of part 1  and part 2 . Hmm, where do we begin? The app that I ...

Html5StarterAppWithSwift, featured in thechangelog.com weekly newsletter

So I have written a few posts about my Html5StarterAppWithSwift  and one of my objectives with that project/Github repo is to ensure more people know about it. So if anyone is trying to build a "native" HTML5 iOS app in a way similar to what is mentioned here , they are not slowed down by having to solve the same problems that I faced. How does thechangelog.com fit into the whole picture? I listen to thechangelog.com podcast often i.e. every time they have a new podcast on something that interests me (which is 80-85% of the time). I have been listening to their podcasts for a few years now and I know they like and support open-source stuff. So I decided to let them know about Html5StarterAppWithSwift by "Ping"  ...ing them i.e. create an issue in their Github repo , to let them know about Html5StarterAppWithSwift and then it got featured in thechangelog.com weekly. So I am hoping more people know about it and can make use of it, while working on their iOS app...

Local notifications in an Html5 powered iOS app(native)

Ok, so I have already written about why I decided to take the route of building an hybrid(Html5/Native) app, such that I get to know the native environment. So that post also mentions how I have built this Xcode starter project which can serve as a template for building html5 iOS apps using the Ionic framework.   Recently, I wrote about about how that initiative of mine helped someone . and what I have done now is created a branch, Notifications  which provides some sample code for adding local notifications to the project. In this post, I am going to talk about what is in the Notifications branch. Questions 1) Why build a Hybrid app such that I need to write some native code? Well one of the reasons outlined in my previous post , was that I wanted my app to use local notifications.   2) But scheduling local notifications is so simple, why add some sample code for it? Yes scheduling local notifications is simple and this tutorial does a good job of showing ho...

Displaying HTML content stored in a folder within an iOS app

Through this journey of getting to know "how to build apps for the iPhone with Swift", I have encountered a fair share of problems. You can have a read of my previous posts on Getting started with iOS programming Serving HTML content in an iOS app Discovering Core Data migrations And  how to deal with Core Data migrations  to get an idea of the sort of problems I have faced. In this post, I am going to share about a rather simple issue that I encountered very early when I started building my app. The app I am building is an HTML5 app, actually no; A more accurate statement for this would be that it is a hybrid app, as the logic is almost equally distributed between native code and HTML5 code. Problem The problem I had was that when I would add a folder to my iOS app with web content and tried to refer to it using let path = NSBundle.mainBundle().pathForResource("index", ofType: "html", inDirectory:"webContent") It simply wouldn...

Open source HTML5 visualisation library to draw charts on the web (morris.js)

At work(ongoing,full-time contract) we use the Google Visualizaton  library for our various data visualisation needs. So naturally when I was building this tool to streamline the process of Post Traumatic Amnesia(PTA) assessment, my first thought was to use Google Visualization library for the tool's data visualisation needs. However that was only till I realised that the tool needs to work offline. Google Visualisation is a very good library but it only works when the the web app is online, so after some looking around I found a tool that works offline too i.e. morris.js . It uses the fantastic Raphael.js  library to render beautiful SVG based charts, on the web. Problem The objective is to visualise data in a web application, so it can be easily interpreted without having to go through raw numbers. The web application needs to be demoed on....say a laptop and the places where it could potentially be demoed may not have internet connectivity. It could also be in a plac...

Doing some SVG drawings on a web page (Raphael.js)

So for this tree based problem that i am currently trying to solve, one of the first perquisites was to get better at Recursion , the next thing to work out was, how do I draw shapes and lines on an HTML page? So prior to this my only experience with drawing on an HTML page was this simple badly presented snake game that i had created using the canvas. Anyway for this little project i decided to look around for some libraries that would allow me to draw some shapes and I found a couple of libraries such as Raphel.js and D3.js that would let me draw SVG shapes on a web page. After very briefly investigating them, it seemed that Raphaeljs would be a better fit for my problem and hence i began my SVG drawing journey with Raphael. Now when i think about this problem, i can think of it as a sequential list of little sub-problems that i need to individually solve before i can build my great grand tree drawing solution. This is a slightly larger problem and hence it will be spread ou...