5 industrial challenges mobile applications can solve

How can mobile applications support industries to undertake a digital transformation? In supply chain, risk management, or information distribution, mobile applications will make tasks easier for your employees, thus increasing efficiency. Read about 5 industrial challenges that mobile apps can solve.

First of all, it is important to carefully chose between a web and a mobile application. Mobile apps are useful when they use one of the device’s native capabilities (e.g. Bluetooth, GPS, camera, etc.), and when they enhance the experience provided to the user (compared to what a web application could do).

Industrial challenges

The challenges industries face are often very good candidates for mobile apps as they leverage all their potential. Therefore, I have identified five recurring issues that industries are facing nowadays. These pain points can be easily relieved by mobile applications.

Challenge 1: Productivity issues due to technical limitations

Continue reading about 5 industrial challenges mobile applications can solve

Tags: , , , , , , , , , , , , ,

Swift Alps Conference – experimentation and collaboration

The Swift Alps Conference has a special format focused on experimentation and collaboration. This is my report of the conference and the workshop Kilian and I held. The slides are available below.

Last month my colleague Kilian and I were pleased to attend the Swift Alps Conference, an experimental conference about Swift taking place in the Swiss Alps. This conference had a different format from what one can expect from a typical software development conference. In this case the format was more focused in experimenting and collaborating with other attendees with the goal of learning something new.

Experimenting with strangers

Continue reading about Swift Alps Conference – experimentation and collaboration

Tags: , , , , , ,

Easy Storyboard translation in Xcode with Swift3

In this post I explain how we created a modular library. Today we are happy to release and open source this lib. You can find the code on GitHub. Our objective was to have one set of translation files that could be used in the storyboard and Swift.

In our multilingual iOS projects, we always struggled to translate storyboards in Xcode. We checked all around CocoaPods, but couldn’t find any efficient solution so far. Every time, we ended up with multiple versions of the storyboard along with multiple versions of ‘Localizable.strings’. It was hard to keep everything under control, specially when translations needed to be updated throughout all files.

Continue reading about Easy Storyboard translation in Xcode with Swift3

Tags: , , , , , ,

Introducing Swift 3.0

With the new iPhone 7 Apple has released the iOS 10 operating system and with it comes Xcode 8 and a new version of the Swift language for the iOS developer community.

Swift 3.0 is an open source language that has been developed by the community together with Apple Engineers.

 

Swift Logo

 

One of the great things about developing an open source language is that everybody can see the evolution of the language and inspect the code. In the official release notes there is a list of all the changes that have been implemented in the new Swift version.

Continue reading about Introducing Swift 3.0

Tags: , , ,

Writing iOS Layout Constraints The Easy Way

Coming from a web-development background, native iOS development always feels a bit clunky to me when it comes to creating the layouts.

Yes, there is the Interface Builder and it is a great tool, but sometimes,
things get more generic and building the views and layouts can be more efficiently done by hand.

Except – layout constraints! Writing layout constraints can be tedious work.

Example, making an element the half of the width of its parent element in objective-c:

It is not much better in C# with Xamarin either:

But behold! There is our ConstraintHelper!

The ConstraintHelper is a small C# library to help with the layout constraints and it brings less common concepts like Method Chaining to the layout constraints.

ConstraintHelper is Open Source and can be forked from GitHub.

Tags: , , , ,

“Time for Coffee!” open sourced!

The public transport app “Time for Coffee!”, made by some Liipers, was finally published at Github under the MIT License. Furthermore the Apple Watch app for it was also released last week, just in time for the watch release in Switzerland this Friday.

Read more about it at the Time for Coffee! blog post.

Tags: , ,

React Native hackday

Yesterday we had a hackday on React Native. The goal was to find out how it feels to develop native iOS apps with Javascript and how much we have to learn to get started. GermainPedro and Adrian (myself) participated. Our combined knowledge of Javascript frameworks listed projects like Angular JS, Backbone, Exosjs, Ember, ReactJS and jQuery. Germain did a bit of Swift but basically we are web developers without iOS experience.

We started with setting up the sample app from the tutorial and played a bit with changing content and reloading the app. Live reloading worked for all three of us only for a few changes before it stopped reloading, we have to investigate further what the cause of that is. After setting up Apple Developer accounts we deployed the sample app on our phones which worked well. We liked how easy it was to get started thanks to the react-native-cli tool.

Since I already hacked on an example project with React Native before, I gave a short introduction of React, JSX and StyleSheets. We all got the UIExplorer example running which is great to see what React Native can do and to use as a reference when creating own applications. The examples felt great and well… native.

A hackday wouldn’t be called a hackday without hacking so we thought of something we could work on. We wanted to try to get a sliding menu and maybe hack a bit on the Guess the Liiper sample app. When sharing the Guess the Liiper code we had some issues with setting up the .gitignore file correctly for an XCode project and updating the react-library to the latest version. Pedro and Germain investigated the sliding menu and how to add images while I fixed the Guess the Liiper app to be actually usable. We found the react-native-slide-menu, integrated it into the sample app and used a background image for the content. When requiring the image we had some issues but that seems to be known. We ended up with a working app, see the source code. We went through the source code of Guess the Liiper and thought of how to create a circular progress bar like this. React-native-svg might be useful to create this.

React Native sliding menu sample app

Findings

Working with React Native is… reactive! It felt like developing for the web and we didn’t have to spend much time getting into it. With the tutorial, UIExplorer app and the sample app it was easy to get started. The Chrome Debugger and tooling like the great Chrome React extension was for us the usual way to debug javascript apps. When thinking about what to implement we found that many components already exist – mostly in a beta stage but the community is very active.

We had to get used to Xcode, digging into the native tools is necessary of course but finding things in Xcode wasn’t the most intuitive experience for us. With our existing knowledge we think we can get quite far to develop apps, especially for quickly prototyping. Probably it needs more iOS and Swift knowledge for specific functionality like applying filters to images, microphone and camera access etc.

When working on styling we noticed that it would be great to have live editing like in Chrome Developer Tools which we are used to. Since we don’t have any iOS development experience we can’t compare this to the normal way iOS apps are developed. But being able to immediately see style changes made in the Dev Tools would be awesome.

We think that the development experience with React Native is great for web developers. The project is very young and it is too early to tell how disruptive it will be. Many components are being developed and there is definitely traction in the community. We are especially looking forward to the Android version.

Tags: , , , ,

Time for Coffee for iOS and Apple Watch

Jan Hug, Cyril Gabathuler and myself worked hard in our free time the last few weeks on an iPhone app for the great website timeforcoffee.ch, a private project started by François Terrier and his friends Serge Pfeifer, Jean-Luc Geering and Kristina Bagdonaite. It also has newly addded support for the upcoming Apple Watch. As this is a project done by Liipers and non-Liipers alike, we talk about it more on medium.com, go and read it! And apply for the beta and follow us on twitter: @time4coffeeApp

Tags: , , ,

Using a powerful and full-featured search engine on mobile platforms

When Xamarin meets Lucene…

Introduction

As soon as we are dealing with a bigger amount of data, it can be complicated to find what you are actually looking for. It is obvious that we can ease the task of finding information by structuring our data and by offering an intuitive user interface.

Nonetheless, there are several scenarios where a search engine can come in handy.

Probably the best example is our good old friend the Internet. Information is stored and obtained in various ways and it is an immense yet growing collection of information resources. If you do not exactly know what you are looking for, your search engine of choice is an essential helper to point you into the right direction.

Implementing search capabilities in your desktop application is no rocket science because you can rely on powerful search engines that do the difficult work for you. It is rather a matter of configuration than implementing complex algorithms yourself. Especially when software is growing up, handcrafted search functionality is simply not satisfying anymore.

What do I expect from a “good” search engine? At first the obvious: return me the most accurate data I am looking for. It should find my information even if I misspell it (we all make mistakes). It should suggest me similar results and it should do all that fast. Pretty basic needs but quite some work if you have to implement this from scratch.

Continue reading about Using a powerful and full-featured search engine on mobile platforms

Tags: , , , , , , ,

Making a singlepage web application

If you want to make use of the webapp mode on ios you have to make sure you don’t follow normal links otherwise safari will open. Of course there are more reasons to make an application singlepage but this was our main motivation.

Updating URLs

Updating the URLs is a key problem. We still wanted normal URLs to work for copy & paste, crawlers, facebook sharing etc. In desktop browsers we also want the locationbar to update but we didn’t like hashes so we only use ajax / singlepage if pushState is available.

On Mobile devices you want to turn off URL updates, because if the user creates a homescreen bookmark you want him to be in your application and not on some deeplink. More on that later.

Using delegates

We never want safari to open except for external links for that we use a delegate to catch all links. In the callback we check what type of link it is, if it’s on our page we preventDefault otherwise we let it trough and safari opens.

The code looks something like this:

In the script loading the content we append a queryparameter to the URL so it’s easy to identify what type of request it is, but you could also just check if it’s an XMLHttpRequest if content replacing is enough for you.

Delivering the content

From the example above you see that we have different options to deliver content. We use classes on the link to decide what to do:

  • Replace only the content – used about 90% of the time to show a detailpage etc.
  • Replace the whole layout – this is what we do for special pages where the navigation etc. has to be something else than normal.
  • Open Safari – Only used for external links identified by target="_blank".
  • Uncatched link – you should somehow log those so you can fix them asap.

In the templates we check what type of request it is and use a different base template so only the relevant thing get delivered.

Remembering the state

Unfortunately iOS does not support backgrounding for webapps. Everytime the user switches to a different app and comes back it will be loaded from scratch. You want to make sure that you startup fast and that you remember the last state. We just remember the last URL in the localStorage and load it again if the user resumes.

Scripts and Events

On a singlepage you have to take care of freeing memory and detaching events to some extent. Whenever we load a new page we emmit an event so the current page can clean itself up. What we do is:

  • Detach global events like window resize
  • Destroy unecessary objects so they can get garbage collected
  • Purge the DOM

Tags: , , , ,