iOS Universal links

Implemented Universal Links today. I think this is essential for a platform in which you can share content through links like you will be able to do with Votavi .

It was actually a pretty simple implementation, the biggest challenge is getting AppDelegate to perform the open action in the right viewcontroller. By using this piece of code you will be able to return to the rootviewcontroller, in our case this is the mainViewController.

if let mainViewController = navController.viewControllers.first as? mainViewController {
navController.topViewController?.dismiss(animated: false, completion: {
navController.popToRootViewController(animated: false)

Where navcontroller is the UINavigationController via :

(if let navController = window?.rootViewController as? UINavigationController {)

This will get you to the mainViewController which is the root viewController.


Votavi, the launch is near.

We are happy to announce that the new project is nearing a launch date. The iOS app first release is almost finished, the web app is ready to start,  so these are exciting times.

And last but not least we have a (temporary) name and logo:

A social platform designed to give you answers.

Current project entering new fase

Upgraded to Laravel 5.2.  Moderation, management, security are now all implemented on top of the basic functionality. Performance looks good. Now adding Facebook and Twitter integration. Look and feel of the HTML views are done. Next step; the iOS part. The framework is prepared to spit out json data, so the app will just be a frontend with some content adding facilities. As I will be writing the iOS stuff, I will also document the json output so it will become a fully documented API. Than we can outsource the Android part …

questionmarkHint 😉

Laravel/blade ajax architecture

The current project has an architecture which uses a plain laravel/blade template approach. In the future we want to replace this approach by a total ajax/json approach to reduce server load and use the web application the same as a mobile client/app.

Now for the first release of our curren t project we are switching to an intermediate approach in which we are going to use a starting blade template which is going to use ajax calls to load the content/pages. This has a lot of benefits regarding managing server load/http requests, but it does require some extra coding.

Another drawback is that forward/backward buttons and direct urls functionality is lost. However, by utilising pushState & popState javascript functions we can solve this.



Laravel pagination and Nginx

So we are still benefitting the completeness of the Laravel framework and started using the Pagination functions of Laravel. Which is absurdly easy except for a slight hiccup which needed some configuration of the web server.

Since Laravel captures all url requests and captures the


parameter to do its magic, this parameter must be accepted by Nginx as part of the request. By default the ubuntu Nginx implementation we use actually has the following configured for the server

try_files $uri $uri/ index.php$query_string;

, this results in a 404 error when using larval pagination. So to get it working just use

try_files $uri $uri/ index.php?$query_string;

in the Nginx server configuration (watch the question mark) and you can enjoy the pleasure of using Laravels pagination implementation.

Implementing date/time functions

Since our current project will need to be available in multiple countries we needed to tackle the timezone challenge. However this proved to be really easy by using this great javascript code Momentsjs . It will convert almost anything you throw at it into some readable form. So the solution was to set the server in the UTC timezone and convert it to the users timezone at the client side via Momentjs, This way the date/time is displayed in the timezone set at the client side.

Now to make things even a bit more user friendly, Momentjs is able to convert it localised to “time from x”. So by using this command: moment.utc(utc_date).local().fromNow() , we got a really nice “x time ago” text for the date. In which time is displayed in seconds, hours, days etc.

Changed Javascript modal function

Until now we relied on Magnific Popup for our modal functions in the current project. And although it is a very nice modal solution it was overkill for our current project. In this project we really like to build and finetune the interface, and control all the aspects of it. So we changed to the far more basic but especially suited for our needs to the query-modal which fits this project.


Upgraded to Laravel 5.1 LTS

So now we can look to the future 🙂 The Laravel Long Term Support (LTS) release is here and we are going to build on that great foundation.  fiveone

It took about 40 minutes to upgrade from 5.0 with just a few hick-ups due to my own little knowledge of the framework.

It still amazes me how much I can do without having any in-depth knowledge of the framework. And I still feel comfortable with the security and stability of the application I am writing. Performance we shall solve through hardware 😉 Just kidding.