<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Shoutem - Medium]]></title>
        <description><![CDATA[We write about making great apps. - Medium]]></description>
        <link>https://medium.com/shoutem?source=rss----ec8f9d10e071---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Shoutem - Medium</title>
            <link>https://medium.com/shoutem?source=rss----ec8f9d10e071---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 20:12:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/shoutem" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Declare Peace with React Native Animations]]></title>
            <link>https://medium.com/shoutem/declare-peace-with-react-native-animations-e947332fa9b1?source=rss----ec8f9d10e071---4</link>
            <guid isPermaLink="false">https://medium.com/p/e947332fa9b1</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[higher-order-components]]></category>
            <category><![CDATA[declarative-programming]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[animation]]></category>
            <dc:creator><![CDATA[Ivan Vuković]]></dc:creator>
            <pubDate>Thu, 20 Apr 2017 16:29:45 GMT</pubDate>
            <atom:updated>2017-04-20T16:29:44.648Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hf5feoKJ1uivxMyYeEJfIQ.png" /></figure><p>Animations make your mobile app stand out, look more interactive, and help you increase engagement. <a href="https://medium.com/u/26d90a99f605">Slack</a> would be just another chat app without so many eye candy details.</p><p>I’ll try to explain how to think about animations, show what are possibilities for animations in React Native, and expose some of my tricks on how to make them reusable all over the app across various components with a different type of interactions.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fi.imgur.com%2FDt3FY80.mp4&amp;src_secure=1&amp;url=https%3A%2F%2Fi.imgur.com%2FDt3FY80.gifv&amp;image=https%3A%2F%2Fi.imgur.com%2FDt3FY80h.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=video%2Fmp4&amp;schema=imgur" width="375" height="667" frameborder="0" scrolling="no"><a href="https://medium.com/media/029556b65636ac019a7be6f2a73d99c5/href">https://medium.com/media/029556b65636ac019a7be6f2a73d99c5/href</a></iframe><p>About a year ago, when we started making the first <a href="https://new.shoutem.com/">Shoutem</a> extensions, our design team asked me if it’s possible to make the following animation. Make details screen in <a href="https://github.com/shoutem/extensions/tree/master/shoutem-news">News extension</a> with bounce zoom and parallax animations on a header image, and a color changing animation on the navigation bar.</p><p>I have immediately said “Yes, of course”, but I soon realized it isn’t going to be easy to implement.</p><h3>Breaking it to basics</h3><p>First of all, when a designer gives you a prototype, try to look at the animations one by one. Animations in their essence are just presentations of each step of change between two states. Looking at it like this, we could examine each animation as a composition of changes between two different states of various properties, so thatany animation could be described as a change of:</p><ul><li>opacity (some object fades in or out)</li><li>position (object translates from one part of the screen to another)</li><li>size (object grows or shrinks in one or both dimensions)</li><li>rotation (object rotates towards the x, y or z-axis for a given angle)</li><li>color (object changes color of text, background or border from one to the other)</li></ul><p>There are also some other animations that could be described with transformation matrices (e.g. perspective), but they are essentially the composition of size, position, and rotation with a different point of gravity.</p><p>Having the previous definition in mind, we could break down our animations into two groups: <strong>Navigation bar</strong> and <strong>header</strong> animation.</p><ol><li><strong>Navigation bar:<br></strong>- title and icons change color from white to black<br>- container changes its background from transparent to white.</li></ol><p><strong>2. Header animation:</strong> <br>- title animates its opacity, from 0 when the scroll bounces to 1 when the scroll is about 0 and to the opacity of 0 when the scroll continues. <br>- image grows when scroll bounces and has some parallax when scroll continues</p><p>If we consider that scroll bounce is just scrolling from a negative value, the image actually shrinks in size as the scroll is being changed from negative to 0, and then stays in the same scale ever after.</p><p>Parallax is just a compensation of scroll, so if the scroll is moving with speed x we should move slower or faster than that. On our prototype, the image is scrolling slower than content. To achieve the desired animation, we should translate through the y-axis with the negative shift.</p><p>So, now when we understand all animations, in theory, let’s see how we can achieve that with React Native.</p><h3>React Native animations</h3><p>Currently there are 3 types of animations available in React Native at the moment:</p><ul><li>LayoutAnimation</li><li>Animated API</li><li>Navigation transitions</li></ul><h4><strong>LayoutAnimation</strong></h4><p><strong>LayoutAnimation</strong> typically animates views to their new positions when the next layout happens. A common way to use this API is to call it before calling <em>setState</em> which causes layout change. This will give you nice and smooth animations on the native thread, but sometimes (in 10% cases) it will result with unexpected animations.</p><p>For example, if you want to create a fade in the animation of an element, the common way to do it with LayoutAnimation. Add the element to your layout after you configure layout animations for the next layout change, by calling `LayoutAnimation.easeInEaseOut()`. It will produce the fade in effect, but sometimes newly added element will just slide into its position. And that happens in a nondeterministic way.</p><h4>Animated API</h4><p>The simplest workflow to work with Animated API is to create an <strong>Animated.Value.</strong> Hook it up to one or more style attributes of an animated component, and then drive updates either via animations, such as <strong>Animated.timing</strong> or by hooking into gestures like panning or scrolling via <strong>Animated.event</strong>.</p><p>Animated.Value can also bind to props other than style and can be interpolated as well. Animations could be driven by JS or native thread, depending on what style prop you want to interpolate. This API is what you will use to create most of the animations.</p><h4>Navigation transitions</h4><p>The navigation transition is the animations between app screens. It differs a lot from library to library. Some libraries, like <a href="https://github.com/airbnb/native-navigation">native-navigation</a> from <a href="https://medium.com/u/ebe93072cafd">AirbnbEng</a>, supports shared element transitions.</p><h3>Solution no. 1: plain React Native</h3><p>Year ago, just before <a href="https://medium.com/u/1ed63648fd08">react-europe</a> 2016, we created the first prototype of our extensions which we showed at our booth at the time. Visitors were impressed with animations in our demo app, but the code for our prototype News details screen looked like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/49f6f72e358926fca9ff61a4fc097891/href">https://medium.com/media/49f6f72e358926fca9ff61a4fc097891/href</a></iframe><p>This produced a screen which looked and worked as we wanted, but the code was not reusable. We needed to duplicate a lot of things if we wanted to have any similar screen to this one. The idea of extensions was to provide developers with an easy and reusable way of making nice apps. At the time being we were focused on releasing our <a href="https://shoutem.github.io/ui/">UI Toolkit</a>, but we haven’t come up with a solution for animations yet, and this amount of code wasn’t acceptable for us.</p><h3>Solution no. 2: Declarative animations</h3><p>The first idea we implemented, to reduce the amount of boilerplate animation code, was to extract them in React components. With this approach, we could have a component for each basic animation and just compose them to create the complex one.</p><p>Besides creating React components that represent animations, we also had to determine how to setup the animated values that drive those animations. For example, animations from our example screen are usually controlled by a ScrollView. We wanted to allow users to easily connect their animations to any source they want to use.</p><h4><strong>The idea of Driver</strong></h4><p>Let’s think about animations for a moment. We said animation is a change of some state, and that change should be driven by something. In UI, animations are driven by <strong>time</strong>, <strong>force</strong> and <strong>user interaction</strong>. In this particular case, the animation is caused by user interaction of scrolling.</p><p>To support generic animation components we had to introduce the concept of an animation <strong>Driver</strong>. According to our <a href="http://shoutem.github.io/docs/ui-toolkit/animation/driver">documentation</a>, animation Driver is:</p><blockquote>An animation is driven by the driver. It encapsulates the creation of animation <a href="https://facebook.github.io/react-native/docs/animations.html#input-events">input events</a>, making React Native animations even more declarative. Drivers are attached to animation components which are set to listen to specific driver inputs.</blockquote><p>In this case, we need to create animations driven by scrolling, so we need a <strong>ScrollDriver </strong>which should handle all scrolling related animation handling.</p><h4>Declarative animations</h4><p>With all these we were able to create components for all basic animation types:</p><ul><li>FadeIn/FadeOut (animating opacity)</li><li>SlideIn/SlideOut (animating translation transform)</li><li>Rotate (animating rotation transform)</li><li>ZoomIn/ZoomOut (animating scale transform)</li><li>Parallax (animating translation on scroll)</li><li>HeroHeader (just a wrapper for ZoomOut + Parallax effect)</li></ul><p>Take a look at these components and notice, that they always animate opacity or transform style property.</p><blockquote>Remember, always try to bring down animations on a change of transform or opacity style prop. Change of these props doesn’t cause layout recalculations and will help you to keep animations on 60fps. These props are also supported by native animations, which run on the native thread.</blockquote><p>Finally, with these components our screen became more reusable and looked like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1acc0f576882093f0e45c2d806d02bf7/href">https://medium.com/media/1acc0f576882093f0e45c2d806d02bf7/href</a></iframe><p>This solution has a lot less code and is easy for everyone to write or learn. We wanted to provide an even simpler way of doing these animations.</p><h3>Solution no. 3: connectAnimation HOC</h3><p>We wanted a way of reusing complex animations, not just pre-exported compositions of basic animations such as <em>HeroHeader</em> component. We wanted to reuse more complex animations that could animate any style prop and be changed over the theme. We also didn’t want to declare ScrollDrivers all over again on each ScrollView.</p><p>To solve this, we created <em>connectAnimation</em>, component that enables components reusage of multiple animations. Each connected component may have multiple animations defined through its style, and those animations can be activated by specifying their name through the animationName prop:</p><pre>&lt;Image animationName=&quot;hero&quot; source={{ uri: article.imageUrl }} /&gt;</pre><p><strong>animationName </strong>is a name of animation function which is going to be used to create animated style. Hero animation on Image component then looks like this:</p><pre>heroAnimation(driver, { layout, options }) {<br>  return {<br>    transform: [<br>      {<br>         scale: driver.interpolate({<br>           inputRange: [-0.9 * layout.height, 0],<br>           outputRange: [3, 1],<br>           extrapolateRight: &#39;clamp&#39;,<br>           useNativeDriver: true,<br>         }),<br>      }, {<br>         translateY: driver.interpolate({<br>           inputRange: [-100, 100],<br>           outputRange: [-50, 50],<br>           extrapolateLeft: &#39;clamp&#39;,<br>           useNativeDriver: true,<br>         }),<br>      },<br>    ],<br>  };<br>}</pre><p>Each animation function is named as animationName + ”Animation” suffix to distinct animation functions when they are defined in style. Driver argument represents driver which will be used to drive animation and second argument is an object that holds layout and options.</p><p><em>layout</em> is measured layout on each <strong>onLayout</strong> event of the component and has <strong>height, width, x, </strong>and<strong> y</strong>.</p><p><em>options </em>represent an object that is passed as animatedOptions to the connected component. For example, if we wanted to pass maximum scale factor to hero animation we would do it like this:</p><pre>&lt;Image animationName=&quot;hero&quot; animationOptions={{ maxScaleFactor: 5 }} source={{ uri: article.imageUrl }} /&gt;</pre><p>and use it in function like this:</p><pre>heroAnimation(driver, { layout, options }) {<br>  return {<br>    transform: [<br>      {<br>         scale: driver.interpolate({<br>           inputRange: [-0.9 * layout.height, 0],<br>           outputRange: [<strong>options.maxScaleFactor</strong>, 1],<br>           extrapolateRight: &#39;clamp&#39;,<br>           useNativeDriver: true,<br>         }),<br>      }, {<br>         translateY: driver.interpolate({<br>           inputRange: [-100, 100],<br>           outputRange: [-50, 50],<br>           extrapolateLeft: &#39;clamp&#39;,<br>           useNativeDriver: true,<br>         }),<br>      },<br>    ],<br>  };<br>}</pre><p>Having connectAnimation and all components connected ArticleDetailsScreen now becomes as it is today:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1727bbfbc52171dbbd98024f4ed50cdc/href">https://medium.com/media/1727bbfbc52171dbbd98024f4ed50cdc/href</a></iframe><p>This solution didn’t only give us a simpler way of reusing animations but enabled us to customize each animation through style which could result with a whole different experience in different application themes. Now, to change the animation we should only customize its animation function. To see it in action and how did we do that in our themes, check out this repo:</p><p><a href="https://github.com/shoutem/extensions">shoutem/extensions</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fi.imgur.com%2Fadm7voj.mp4&amp;src_secure=1&amp;url=https%3A%2F%2Fi.imgur.com%2Fadm7voj.gifv&amp;image=https%3A%2F%2Fi.imgur.com%2Fadm7vojh.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=video%2Fmp4&amp;schema=imgur" width="375" height="667" frameborder="0" scrolling="no"><a href="https://medium.com/media/ec0207600a5cf2f8ba99580ddcb83580/href">https://medium.com/media/ec0207600a5cf2f8ba99580ddcb83580/href</a></iframe><h3>Conclusion</h3><p>You are now familiar with the power of React Native Animated API. You have seen what needs to be done to make an animation with it. You have seen the evolution of our code. But what is the real power of <a href="https://github.com/shoutem/animation">@shoutem/animation</a>? Could you do anything with it? What needs to be done yet to have real superpowers?</p><p>As I have mentioned it before @shoutem/animation provides you with these animation drivers:</p><pre>this.driver = new <a href="https://github.com/shoutem/animation/blob/develop/src/drivers/TimingDriver.js#L9">TimingDriver</a>({<br>  duration: 400, // animation will last 400ms<br>  delay: 200, // animation will be delayed for 200ms<br>  easing: &#39;ease-in&#39;, // change will not be uniform trough time<br>  useNativeDriver: true, // native animations will be used<br>});</pre><pre>this.driver = new <a href="https://github.com/shoutem/animation/blob/develop/src/drivers/ScrollDriver.js#L7">ScrollDriver</a>({ useNativeDriver: false });</pre><pre>this.driver = new <a href="https://github.com/shoutem/animation/blob/develop/src/drivers/TouchableDriver.js#L27">TouchableDriver</a>();</pre><p>And these animation components:</p><pre>render() {<br>  return (<br>    &lt;<a href="https://github.com/shoutem/animation/blob/develop/src/animations/FadeIn.js#L5">FadeIn</a> driver={this.driver}&gt;<br>      &lt;Text&gt;I will fade in&lt;/Text&gt;<br>    &lt;/<a href="https://github.com/shoutem/animation/blob/develop/src/animations/FadeIn.js#L5">FadeIn</a>&gt;<br>    &lt;<a href="https://github.com/shoutem/animation/blob/develop/src/animations/FadeOut.js#L5">FadeOut</a> driver={this.driver}&gt;<br>      &lt;Text&gt;I will fade out&lt;/Text&gt;<br>    &lt;/<a href="https://github.com/shoutem/animation/blob/develop/src/animations/FadeOut.js#L5">FadeOut</a>&gt;<br>    &lt;<a href="https://github.com/shoutem/animation/blob/develop/src/animations/Slide/SlideIn.js#L6">SlideIn</a> driver={this.driver} from=&quot;top right&quot;&gt;<br>      &lt;Text&gt;I will slide in from top right&lt;/Text&gt;<br>    &lt;/<a href="https://github.com/shoutem/animation/blob/develop/src/animations/Slide/SlideIn.js#L6">SlideIn</a>&gt;<br>    &lt;<a href="https://github.com/shoutem/animation/blob/develop/src/animations/Slide/SlideOut.js#L6">SlideOut</a> driver={this.driver} from=&quot;bottom left&quot;&gt;<br>      &lt;Text&gt;I will slide out from bottom left&lt;/Text&gt;<br>    &lt;/<a href="https://github.com/shoutem/animation/blob/develop/src/animations/Slide/SlideOut.js#L6">SlideOut</a>&gt;<br>    &lt;<a href="https://github.com/shoutem/animation/blob/develop/src/animations/ZoomIn.js#L5">ZoomIn</a> driver={this.driver} maxFactor={3}&gt;<br>      &lt;Text&gt;I will zoom in&lt;/Text&gt;<br>    &lt;/<a href="https://github.com/shoutem/animation/blob/develop/src/animations/ZoomIn.js#L5">ZoomIn</a>&gt;<br>    &lt;<a href="https://github.com/shoutem/animation/blob/develop/src/animations/ZoomOut.js">ZoomOut</a> driver={this.driver} maxFactor={3}&gt;<br>      &lt;Text&gt;I will zoom out&lt;/Text&gt;<br>    &lt;/<a href="https://github.com/shoutem/animation/blob/develop/src/animations/ZoomOut.js">ZoomOut</a>&gt;<br>    &lt;<a href="https://github.com/shoutem/animation/blob/develop/src/animations/Rotate.js#L5">Rotate</a> driver={this.driver} axis=&quot;y&quot; angle=&quot;180deg&quot;&gt;<br>      &lt;Text&gt;I will rotate around y-axis for 180 degrees&lt;/Text&gt;<br>    &lt;/<a href="https://github.com/shoutem/animation/blob/develop/src/animations/Rotate.js#L5">Rotate</a>&gt;<br>    &lt;<a href="https://github.com/shoutem/animation/blob/develop/src/animations/Parallax.js#L7">Parallax</a> driver={this.driver} scrollSpeed={1.2}&gt;<br>      &lt;Text&gt;I scroll 20% than others&lt;/Text&gt;<br>    &lt;/<a href="https://github.com/shoutem/animation/blob/develop/src/animations/Parallax.js#L7">Parallax</a>&gt;<br>    &lt;<a href="https://github.com/shoutem/animation/blob/develop/src/animations/Parallax.js#L7">HeroHeader</a>&gt;<br>      &lt;Text&gt;<br>        I will zoom when scroll bounces and have parallax after<br>      &lt;/Text&gt;<br>    &lt;/<a href="https://github.com/shoutem/animation/blob/develop/src/animations/Parallax.js#L7">HeroHeader</a>&gt;<br>  );<br>}</pre><p>But real power is in higher order components:</p><pre><a href="https://github.com/shoutem/animation/blob/develop/src/components/measure.js#L5">measure</a>(MyComponent) // adds layout { x, y, height, width, pageX, pageY } object to MyComponent&#39;s state</pre><pre><a href="https://github.com/shoutem/animation/blob/develop/src/components/connectAnimation.js#L73">connectAnimation</a>(MyComponents, {<br>  fadeOutAnimation(driver, context) {<br>    return { <br>      opacity: driver.interpolate({  <br>        inputRange: [0, context.layout.height],<br>        outputRange: [1, 0] <br>      }) <br>    } <br>  }<br>}) // now your component can use animationName=&quot;fadeOut&quot;</pre><p>If you take a look at this file, you will figure out how all our animated components are just a simple React Native View connected with connectAnimation.</p><p>Let’s see what else remains to be done. Maybe this will inspire you to contribute and submit a pull request to the repo :)</p><p>I think that we need more Driver types. That will enable more animation types. What first comes to my mind is:</p><ul><li><em>PanDriver</em> — Driver that will encapsulate usual <strong>PanResponder</strong> handlers</li><li><em>SpringDriver</em> — Driver that will behave like <strong>Animated.spring </strong>(I think I will do it soon)</li><li><em>ComputedDriver</em> — Driver that could combine various values or drivers to calculate new value on each change of included arguments.</li></ul><blockquote>Any your ideas are welcome, we are waiting for it.</blockquote><p>Beside animations, I hope that this article showed you that sometimes:</p><blockquote>It is worth to solve a problem on a higher level and give that solution to the community.</blockquote><p><em>I work at </em><a href="http://www.shoutem.com/?utm_medium=social&amp;utm_source=medium&amp;utm_campaign=dev_posts&amp;utm_content=animations"><strong><em>Shoutem</em></strong></a><em> where I help creating tools to </em><a href="http://shoutem.github.io/?utm_medium=social&amp;utm_source=medium&amp;utm_campaign=dev_posts&amp;utm_content=animations"><strong><em>supercharge your React Native development</em></strong></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e947332fa9b1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/shoutem/declare-peace-with-react-native-animations-e947332fa9b1">Declare Peace with React Native Animations</a> was originally published in <a href="https://medium.com/shoutem">Shoutem</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Keeping your API tokens fresh]]></title>
            <link>https://medium.com/shoutem/keeping-your-api-tokens-fresh-72059a7b0586?source=rss----ec8f9d10e071---4</link>
            <guid isPermaLink="false">https://medium.com/p/72059a7b0586</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[oauth]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Domagoj Rukavina]]></dc:creator>
            <pubDate>Thu, 13 Apr 2017 15:42:03 GMT</pubDate>
            <atom:updated>2017-04-28T08:53:15.489Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0CcTeGkE1hMGoK1l." /></figure><p>In a world where your data has to be accessed from multiple platforms, your APIs become first class citizens. Modern API security is important when you build real world apps that run on servers, mobile, web etc. There are so many aspects of security to consider, from infrastructure to frameworks.</p><p>It’s often cumbersome and requires meticulous planning, implementation and maintenance because of its cross cutting nature throughout your system. One wrong move and suddenly your company is enjoying the front row seats in public humiliation train. And you don’t want that ride…</p><h3>OAuth 2.0</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/0*RohJ_otBHPUmCNVc." /><figcaption>source: <a href="https://xkcd.com/1121/">XKCD</a></figcaption></figure><p><a href="https://oauth.net/2/">OAuth 2.0</a> emerged as a second iteration of the security framework endorsed by big names like Facebook, Google and Microsoft and it set out to standardise how API access delegation would work, i.e. how other services could access your data on your behalf.</p><p>You’ve seen this when you log in or register with your Facebook or Google account. OAuth2 never aimed to be a complete solution, it just laid the grounds and best practices to achieve API security standardisation. So some gaps had to be filled in, and among them were <a href="https://tools.ietf.org/html/rfc6750">Bearer tokens</a>.</p><p>Bearer tokens are used to authorize requests to protected resources and to quote RFC spec they are “a string representing an access authorization issued to the client“, the main idea was to remove user’s credentials from authorization headers and instead issue a token which would replace user’s credentials.</p><p>So now all you had to do to access user’s data is to obtain his access token and attach it to any request to protected resources. Now we have an authorization mechanism which didn’t include user’s credentials and could represent a set of user’s claims in a secure and compact manner.</p><p>As any security expert will tell you, changing passwords is important, they should expire often so that you limit the window of opportunity to wannabe password crackers. People genuinely love changing passwords, see the following google popularity suggestions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/0*E6JzLuqn1rpJnxTA." /></figure><p>If you’ve just lost faith in humanity, don’t worry. There is a better way, one which doesn’t force user to change passwords and it brings us other benefits too. We could create a long lived “master” token which could then be exchanged for the new access token every time the access token expires.</p><p>Also, you could request different access tokens to access different APIs and you could dynamically change user’s set of claims (remember they are stored in token). If security is breached this token can be blacklisted and denied access.</p><p>This is, in essence, the idea behind refresh token flow which you can read about in detail <a href="https://tools.ietf.org/html/rfc6749#page-10">here</a> (also check this great <a href="https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/">article</a>). To understand this, it’s best to take a look at the diagram, and I’m a huge fan of the awesome RFC ASCII art diagrams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/0*_k9SFaovWfJ-Ital." /></figure><p>So to force a client to get a new token you would just invalidate it server-side and client will automatically get a new one. Well… not exactly, the client will have to do it manually on each request, not what we hoped for. Let’s see an example…</p><h3>Fetching data</h3><p>Now that we’ve covered theory it’s time to jump to code. In modern apps you’d ditch the old <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest">XMLHttpRequest</a> and instead use the new <a href="https://developer.mozilla.org/en/docs/Web/API/Fetch_API">fancy fetch api</a>. To follow the spec, and let’s assume you’d like to request a list of tweets, you’d probably write something like this:</p><pre>fetch(‘https://api.twitter.com/1.1/search/tweets.json&#39;, {<br>  headers: {<br>   authorization: ‘Bearer your-access-token’<br>  }<br>}).then(response =&gt; {<br>  if (response.status === 401) {<br>    // try getting the new access token and repeat the same request<br>  }<br>  // otherwise carry on<br>})</pre><p>This is OK if you have one request, but in the long run, as your app grows, and you add more and more fetch requests, it becomes unmaintainable. You’re duplicating this logic all across the app on every request. Even if you extract it to utility methods it still repeats all over the place. There should be a better way…</p><h3>Fetch token interceptor</h3><p>We thought so too… What if we could enhance the fetch behavior somehow to automate this? We set out with this idea, and managed to create a library that does just that. It will intercept fetch requests and if they fail to authorize, it will try to renew the access token and retry the request.</p><p>We’ve packaged this into a utility library, for which you can find the whole source code on our <a href="https://github.com/shoutem/fetch-token-intercept">Github repository</a>.</p><p>All parts of this library are configurable, you only have to tell it how to authorize your requests and how to renew the token when it’s rejected, it will do the rest on it’s own.</p><p>This is a simple example of configuration object:</p><pre>config: {<br>  // specify if request should be intercepted here we intercept<br>  // all requests<br>  shouldIntercept: (request) =&gt; true,<br>  // add authorization to request<br>  authorizeRequest: (request, accessToken) =&gt; {<br>    request.headers.set(‘Authorization’, `Bearer ${accessToken}`);<br>    return request;<br>  },<br>  <br>  // create a request for renewing access token<br>  createAccessTokenRequest: (refreshToken) =&gt; {<br>    return new Request(‘example.com/v1/auth/tokens’), {<br>      headers: {<br>        Authorization: `Bearer ${refreshToken}`,<br>      },<br>      method: ‘POST’,<br>    });<br>  },<br>  // extract the new access token from response<br>  parseAccessToken: (response) =&gt; {<br>    return response.clone().json().then(json =&gt; json.accessToken);<br>  },<br>}</pre><p>And when you configure it, all that is left to do is register it globally to change fetch behavior.</p><pre>import { <br>  configure, <br>  authorize,<br>} from ‘@shoutem/fetch-token-intercept’;</pre><pre>…<br>configure(configuration);<br>// here you provide tokens obtained from your Authorization Server<br>authorize(refreshToken, accessToken);<br>…</pre><p>The library will now intercept the requests and authorize them accordingly. It will also renew the token when it expires and retry the operation. Now you can write all your fetch requests without polluting them with all this authorization logic.</p><p>Here is an example from Chrome Developer Tools showing it at work:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nq39bHcTbxvwmQJ3." /></figure><p>Here we can see that the first request failed with 401 status indicating that the access token is invalid. If we inspect it in more detail we can see that it had <strong>token1 </strong>in Authorization header.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*bicb4XpqjLxtHqVk." /></figure><p>Token interceptor went ahead and used refresh token to obtain a new access token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/0*kstmKAUaCoiFfHlp." /></figure><p>After that, the initial request was repeated with the new access token <strong>token2</strong> which resolved successfully. You can check and see that it was authorized with the newly fetched token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/0*Jxhp90LVzjfoPEkx." /></figure><p>We invite you to try it out and use Github to reach out with any questions!</p><h3>Acknowledgements</h3><p>I’d like to thank <a href="https://github.com/vedrani">Vedran Ivanac</a> and <a href="https://github.com/zrumenjak">Željko Rumenjak</a> for providing invaluable feedback and reviews during the development of this library.</p><p><em>I work at </em><a href="https://new.shoutem.com/?utm_medium=social&amp;utm_source=medium&amp;utm_campaign=dev_posts&amp;utm_content=api-tokens"><strong><em>Shoutem</em></strong></a><em> where I help creating tools to </em><a href="http://shoutem.github.io/?utm_medium=social&amp;utm_source=medium&amp;utm_campaign=dev_posts&amp;utm_content=api-tokens"><strong><em>supercharge your React Native development</em></strong></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72059a7b0586" width="1" height="1" alt=""><hr><p><a href="https://medium.com/shoutem/keeping-your-api-tokens-fresh-72059a7b0586">Keeping your API tokens fresh</a> was originally published in <a href="https://medium.com/shoutem">Shoutem</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ways to pass objects between native and JavaScript in React Native]]></title>
            <link>https://medium.com/shoutem/ways-to-pass-objects-between-native-and-javascript-in-react-native-c3dcae7bf4f5?source=rss----ec8f9d10e071---4</link>
            <guid isPermaLink="false">https://medium.com/p/c3dcae7bf4f5</guid>
            <category><![CDATA[shopify]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Mihovil Kovačević]]></dc:creator>
            <pubDate>Mon, 27 Mar 2017 16:11:14 GMT</pubDate>
            <atom:updated>2017-04-28T08:54:48.293Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BBajfagsRZPYS706H9FHbQ.png" /></figure><p>This is the second part of our story on how we built a <a href="https://github.com/shoutem/react-native-shopify">React Native bridge for Shopify’s</a> iOS and Android SDK. In the <a href="https://medium.com/shoutem/top-lessons-we-learned-while-building-a-react-native-bridge-library-bd6485cc6212#.cd3nk0k4q">first par</a>t, I described how to set up the project structure for the bridge library. With that out of the way, it’s time to write methods that will expose the native APIs to JavaScript. This article will be a bit longer than the first one. There’s a lot of ground to cover!</p><p>The <a href="https://facebook.github.io/react-native/docs/native-modules-ios.html">official documentation</a> explains the basics of native modules. But, sometimes you’ll need to handle more complex cases. For example, we had to pass most of Shopify’s data model, such as products and collections, to JavaScript. We also had to create native objects from ones we passed from JavaScript.</p><p>One such example was creating a native checkout from a collection of cart items. Since a lot can go wrong during a checkout, we also needed a way to handle native errors. We thought: how hard can this be?</p><p>But, we couldn’t find all the answers in the documentation, so we had to dig deeper. We learned a lot along the way, and I’m here to share this with you. This article lists recipes and best practices for various use cases you’ll encounter.</p><h3>Passing complex data structures from native to JavaScript</h3><p>The first challenging bridge method we implemented was getting a list of products. Both the iOS and Android SDK have custom models for products. The models have nested objects such as variants. SDK methods for fetching products all return these native objects. If you try to send them over the bridge, you’ll get an error.</p><p>A React Native bridge method works only with standard JSON types. These are strings, numbers, booleans, arrays and maps. You’ll need to convert native objects to structures that have only these types. For iOS, you’ll have to transform native objects to NSDictionaries. With Android, you’ll need WritableMaps and WritableArrays for objects and collections.</p><p>You could create these data structures on your own. One way is to create an empty dictionary and add an entry for each property of the native object. These objects can have dozens of properties and even nested objects. The manual approach can become cumbersome.</p><h3>Converting objects for iOS — the easy and hard way</h3><p>For iOS, we noticed that the SDK has a <em>JSONDictionary</em> method. At first, we thought that this was a method of all native objects. It turned out that the SDK had it as a helper method. It helped with serialization and deserialization when making calls to Shopify API.</p><p>There’s a high chance that the SDK you’re bridging will have a similar method. You might not see it in the documentation but try to find it by digging through the source files. The difference between using such a method and the manual way is outstanding:</p><pre>/**<br>  * This method adds options for variants the manual way. <br>  * The SDK’s JSONDictionary method doesn’t include them.<br>  */</pre><pre>- (NSArray *) getDictionariesForProducts:(NSArray&lt;BUYProduct *&gt; *)products <br>{ <br>  NSMutableArray *result = [NSMutableArray array]; <br>  <br>  for (BUYProduct *product in products) { <br>    NSMutableDictionary *productDictionary = [[<strong>product     <br>     JSONDictionary</strong>] mutableCopy]; </pre><pre>   NSMutableArray *variants = [NSMutableArray array]; <br>   for (BUYProductVariant *variant in product.variants) {        <br>     // A lot of code to create a dictionary for a variant <br>   } <br>   productDictionary[@”variants”] = variants; <br>   [result addObject:  productDictionary]; <br>  } <br>  return result;<br>}</pre><p>In the above example, you can see both approaches and a common pattern that we used. Where we could get the entire data structure that way, we used the <em>JSONDictionary</em> method. Where there was a missing implementation, we created a dictionary. Then we added all the entries we needed. You can use the pattern above in your own code.</p><p>When creating native objects from their JavaScript counterparts, the same principles apply. You get NSArrays and NSDictionaries in your native code. To convert them, first look for SDK specific methods. In our case, Shopify had a method to create a product variant from a dictionary. We used it to create a native cart object from an array of JavaScript cart items:</p><pre>- (BUYCheckout *) createCheckoutFromCart:(NSArray *)cartItems<br>{    <br>  BUYModelManager *modelManager = self.client.modelManager;                           </pre><pre>  BUYCart *cart = [modelManager insertCartWithJSONDictionary:nil]; <br>    <br>  for (NSDictionary *cartItem in cartItems) {          </pre><pre>    BUYProductVariant *variant = <strong>[[BUYProductVariant alloc]    <br>     initWithModelManager:modelManager       <br>     JSONDictionary:cartItem[@&quot;variant&quot;]]</strong>;        </pre><pre>    for(int i = 0; i &lt; [cartItem[@&quot;quantity&quot;] integerValue]; i++) {                  </pre><pre>      [cart addVariant:variant];        <br>    }    <br>  }     <br>  BUYCheckout *checkout = [modelManager checkoutWithCart:cart];      <br>  return checkout;<br>}</pre><p>I’ve bolded the part where the SDK creates an object for us. This a similar pattern to what we’ve seen in the previous example.</p><h3>Converting objects for Android and a few helper methods</h3><p>With the Android SDK things are a bit different. For most objects, we couldn’t find a method to get a dictionary we could send over the bridge. But, the pattern to convert a Java object to a WritableMap and vice versa is simple:</p><ol><li>Serialize the object to a JSON string. You can do this with the help of <a href="https://github.com/google/gson"><strong>Gson</strong></a>, a well-known library.</li><li>Create a new instance of JSONObject from the JSON string.</li><li>Create a new WritableMap instance.</li><li>Iterate through the keys of the JSONObject instance.</li><li>Check each value using the <strong><em>instanceof </em></strong>operator. If it’s a simple type, put it in the WritableMap instance. If it’s a JSONArray or another JSONObject, iterate through it.</li></ol><p>You’ll need recursive methods to convert JSON Arrays/Objects to Writable Arrays/Maps. We found a Gist online that had these methods, and used it in our code. Let’s see how this recipe plays out in practice. We’ll use it to convert a list of Product objects to a WritableArray.</p><p>The Shopify SDK already implements a helper method to convert a Product object to JSON:</p><pre>/** <br>  * @return A JSON representation of this object. <br>  */ <br>public String toJsonString() { <br>  return BuyClientUtils.createDefaultGson().toJson(this); <br>}</pre><p>Even if the SDK you use doesn’t have such a method, you can do it with Gson. It’s easy, as you can see from the implementation:</p><pre>public static Gson createDefaultGson() {             </pre><pre>  GsonBuilder builder = new GsonBuilder();<br>  return builder.create();    <br>}</pre><p>I’ve omitted the customization parts of the implementation. For some objects, you’ll need to help Gson out. This depends on the structure of the object. You can find more information in Gson’s documentation.</p><p>We convert a list of Product objects to a WritableArray by iterating through it. For each product, we create its WritableMap representation.</p><pre>private WritableArray getProductsAsWritableArray(List&lt;Product&gt;      <br>  products) throws JSONException {    </pre><pre>  WritableArray array = new WritableNativeArray();     <br>  for (Product product : products) {      <br>    WritableMap productMap = <strong>convertJsonToMap(new        <br>      JSONObject(product.toJsonString()))</strong>;        </pre><pre>   array.pushMap(productMap);    <br>  }     <br>  return array;  <br>}</pre><p>The <strong><em>convertJsonToMap</em></strong> method is the recursive converter I mentioned above. You can find its implementation on this Gist:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c565d266e7c10af45e88556957d2928f/href">https://medium.com/media/c565d266e7c10af45e88556957d2928f/href</a></iframe><p>You can also find implementations for other conversion methods. There’s four of them. They convert JSON Arrays/Maps to Writable Arrays/Maps and vice versa. Speaking of conversion in the opposite way, the recipe is the same, but in reverse.</p><p>Note that in this case, the input to native code will be a Readable and not a WritableArray. They are almost the same, except that a ReadableArray is for reading values, not writing. Here’s how we created a native Cart object from a ReadableArray of cart items:</p><pre>cart = new Cart();      <br>for (int i = 0; i &lt; cartItems.size(); i++) {        <br>  ReadableMap cartItem = cartItems.getMap(i);        <br>  ReadableMap variantDictionary = cartItem.getMap(&quot;variant&quot;);          </pre><pre>  int quantity = cartItem.getInt(&quot;quantity&quot;);        <br>  <strong>JSONObject variantAsJsonObject =    <br>   convertMapToJson(variantDictionary);</strong>       <br> <br>  <strong>ProductVariant variant = <br>   fromVariantJson(variantAsJsonObject.toString());</strong>         <br>  <br>  for(int j = 0; j &lt; quantity; j++) {            <br>    cart.addVariant(variant);        <br>  }      <br>}</pre><pre>private ProductVariant fromVariantJson(String json) {    <br>  return BuyClientUtils.createDefaultGson().fromJson(json,  <br>   ProductVariant.class);  <br>}</pre><p>The bulk of the work was to create ProductVariant objects. First, we created a JSONObject instance from a ReadableMap with the helper method. Then we extracted its underlying JSON string. Finally, we used Gson to create an object from this JSON string and a class descriptor. Actually, we used Gson through the SDK’s wrapper. You saw the implementation earlier.</p><p>You can see that for Android you don’t even need native SDK helpers. You can use a combination of Gson and the above-mentioned utility methods. To reuse them in many parts of your bridge, put them in a utility class.</p><h3><strong>Creating errors users can understand</strong></h3><p>Sometimes a bridge call can fail and an error object can contain a lot of useful data. It might be the only way to figure out what went wrong. A checkout on Shopify is one such example. A checkout error has a structure with deep nesting:</p><pre>{&quot;errors&quot;:<br>  {&quot;checkout&quot;:<br>   {<br>    &quot;email&quot;:[{<br>     &quot;code&quot;:&quot;invalid&quot;,<br>     &quot;message&quot;:&quot;is invalid&quot;,<br>     &quot;options&quot;:{}<br>    }], <br>    &quot;shipping_address&quot;:{<br>      &quot;country_code&quot;:[{<br>        &quot;code&quot;:&quot;not_supported&quot;,<br>        &quot;message&quot;:&quot;is not supported&quot;, <br>        &quot;options&quot;:{}<br>      }]<br>    },<br>    &quot;billing_address&quot;:{<br>      &quot;country_code&quot;:[{<br>        &quot;code&quot;:&quot;not_supported&quot;, <br>        &quot;message&quot;:&quot;is not supported&quot;,<br>        &quot;options&quot;:{}<br>      }]<br>    }<br>   }<br>  }<br>}</pre><p>With iOS, there’s a standard way of rejecting a promise:</p><pre>if (error) {            <br>  return reject(<br>    [NSString stringWithFormat: @&quot;%lu&quot;, (long)error.code],    <br>    error.localizedDescription, <br>    error<br>  );        <br>}</pre><p>The <em>localizedDescription</em> and <em>userInfo</em> properties contain the error message. This works for simple cases. For errors such as the one from Shopify we saw above, you’ll get no useful description.</p><p>We solved this challenge by using a neat trick. Since the <em>userInfo </em>property of an error object is an NSDictionary, we serialized it to JSON. Then we sent this string to JavaScript:</p><pre>- (NSString *) getJsonFromError:(NSError *)error<br>{    <br>  NSError * err;    <br>  NSData * jsonData = [<strong>NSJSONSerialization <br>    dataWithJSONObject:error.userInfo</strong> options:0 error:&amp;err];     <br>  <br> return [[NSString alloc] initWithData:jsonData <br>   encoding:NSUTF8StringEncoding];<br>} </pre><p>In JavaScript land, we parsed it to get a message we could show to the user.</p><pre>const checkout = (cart) =&gt; {    <br>  return RNShopify.checkout(cart).catch((<strong>error</strong>) =&gt; {        <br>    throw new Error(<strong>getCheckoutError(error.message, cart)</strong>);      <br>});  </pre><pre><br>const getCheckoutError = (errorBody, cart) =&gt; {  <br>  if (!errorBody) {    <br>   return UNKNOWN_ERROR;  <br>  }   <br>  <br>  <strong>const errorObject = JSON.parse(errorBody); </strong>  <br>  const checkoutErrors = errorObject.errors.checkout;</pre><pre>  if (checkoutErrors.line_items) {    <br>   return getLineItemsErrorMessage(checkoutErrors.line_items, cart);       <br>  }   <br>  return getErrorMessageFromCheckoutObject(checkoutErrors);<br>};</pre><p>On Android, we got the JSON error string straight from the SDK:</p><pre>// Sync the checkout with Shopify    buyClient.createCheckout(checkout, new Callback&lt;Checkout&gt;() {             </pre><pre>    @Override      <br>    public void failure(BuyClientError error) {  <br>      promise.reject(&quot;&quot;, <strong>error.getRetrofitErrorBody()</strong>);      <br>    }    <br>});</pre><p>In theory, we could’ve implemented error handling in native parts of the bridge. But, we would have to duplicate a lot of the business logic. Here’s where React Native and the bridge concept shine. Notice that we did very little on the native side. We passed raw data to the JavaScript realm. That’s all. There we concentrated all our error handling logic in one place.</p><h3>Closing thoughts</h3><p>Transformations between native objects and their JavaScript counterparts are not straightforward. There’s very little documentation available on this. For example, we had to dig through React Native’s source code to learn about Writable and Readable maps and arrays.</p><p>I hope that this article will shed some light on how to approach this problem. We‘ll find even better ways in the future. If you know any, leave a comment below.</p><p><strong>There are a few other points I’d like to highlight before we close the series:</strong></p><ul><li>Keep the native part of your module thin. Put all the business logic in the JavaScript part. An obvious advantage is code reuse. If you’re a JavaScript developer, this is your home turf. You’ll be able to use all the tricks and tooling that you have years of experience with. Most of the users of your bridge are also JavaScript developers. They’ll have an easier time understanding it.</li><li>Get to know the SDK and look for methods that’ll make your native code simpler. Use JavaScript to create a single entry-point and enhance the SDKs. Avoid reimplementing things.</li><li>Consider simplifying the API for your users. For example, the Shopify SDK has several methods for fetching products. We found it convenient to create a single method with optional parameters:</li></ul><pre>export default {  <br>  ...RNShopify,  <br>  getProducts: (page = 1, collectionId, tags) =&gt; {    <br>   if (collectionId) {      <br>    return RNShopify.getProductsWithTagsForCollection(page, <br>      collectionId, tags);    <br>   }    <br>   return tags ? <br>    RNShopify.getProductsWithTags(page, tags) <br>    :  <br>    RNShopify.getProductsPage(page);  <br>},</pre><p>All said and done, building a bridge for native SDKs is a rewarding experience. It also pays big dividends for its creators and users. We‘d like to see React Native bridges for all SDKs soon! Now let’s go and build something.</p><p>You can find our <a href="https://github.com/shoutem/react-native-shopify"><strong><em>React Native Shopify bridge</em></strong></a> on GitHub. Stay tuned for more stories!</p><p><strong><em>If you like what you read, please tap or click “♥︎” </em></strong><em>to help to promote this piece to others.</em></p><p><em>I work at </em><a href="https://new.shoutem.com/?utm_medium=social&amp;utm_source=medium&amp;utm_campaign=dev_posts&amp;utm_content=bridge_library"><strong><em>Shoutem</em></strong></a><em> where I help creating tools to </em><a href="http://shoutem.github.io/?utm_medium=social&amp;utm_source=medium&amp;utm_campaign=dev_posts&amp;utm_content=bridge_library"><strong><em>supercharge your React Native development</em></strong></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3dcae7bf4f5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/shoutem/ways-to-pass-objects-between-native-and-javascript-in-react-native-c3dcae7bf4f5">Ways to pass objects between native and JavaScript in React Native</a> was originally published in <a href="https://medium.com/shoutem">Shoutem</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top lessons we learned while building a React Native bridge library]]></title>
            <link>https://medium.com/shoutem/top-lessons-we-learned-while-building-a-react-native-bridge-library-bd6485cc6212?source=rss----ec8f9d10e071---4</link>
            <guid isPermaLink="false">https://medium.com/p/bd6485cc6212</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[shopify]]></category>
            <dc:creator><![CDATA[Mihovil Kovačević]]></dc:creator>
            <pubDate>Mon, 13 Mar 2017 19:18:20 GMT</pubDate>
            <atom:updated>2017-04-28T08:56:56.058Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ChBbLhTHsn6TAm0CstHqQA.png" /></figure><p>This will be a two-part article. The first part focuses on the big picture and setting up the library structure. In the second part I’ll describe best practices for writing methods and passing objects.</p><p>As you build <a href="http://bit.ly/2poxM4q">React Native applications</a>, sooner or later you’ll want to use a 3rd party SDK. These usually come in iOS and Android variants. A bridge library lets you call native methods from both worlds, in Javascript.</p><p>You can find them for many popular SDKs. But, what if there is no bridge for the SDK you want to use, what do you do? Well, you’re out of luck. We recently had a similar situation in <a href="http://bit.ly/2poxM4q">Shoutem</a> when we wanted to integrate with Shopify.</p><p>I’ll show you how we went from zero to publishing a <a href="https://github.com/shoutem/react-native-shopify">library</a> that’s growing in popularity. We want to help you avoid all the pitfalls we met and make the process effortless.</p><h3>Sharing is caring</h3><p>You might be thinking why not plug the native SDKs in your application and call it a day. The official documentation on native modules for <a href="https://facebook.github.io/react-native/docs/native-modules-ios.html">iOS</a> and <a href="https://facebook.github.io/react-native/docs/native-modules-android.html">Android</a> covers this well. But, if you create a bridge library and use it in your application as a dependency:</p><ul><li>You’ll have an easier time maintaining it</li><li>If you open source it, others will give you feedback and even contribute. With our Shopify bridge, other developers are integrating Apple Pay</li><li>You’ll help the community, and you can’t put a price on that</li></ul><h3>Let’s start a library</h3><p>If you think that <em>react-native init </em>is a good place to start, you’re not alone. We thought that as well. But, it’s meant to scaffold an application, not a library, and won’t work for our purpose. Luckily, there is a great tool, called <a href="https://github.com/peggyrayzis/react-native-create-bridge"><em>react-native-create-bridge</em></a><em>, </em>that does exactly this. Run it, and your library is good to go. You can set up this structure on your own, but it’s a cumbersome and error-prone process. Before we continue, consider giving some appreciation to the author.</p><p>React Native changed the import format for its iOS headers in version 0.40. If you want to support both older and newer applications, use this neat trick for all React imports:</p><pre>// import RCTBridgeModule</pre><pre>#if __has_include(&lt;React/RCTBridgeModule.h&gt;)</pre><pre>#import &lt;React/RCTBridgeModule.h&gt;</pre><pre>#elif __has_include(“RCTBridgeModule.h”)</pre><pre>#import “RCTBridgeModule.h”</pre><pre>#else</pre><pre>#import “React/RCTBridgeModule.h” // Required when used as a Pod in a Swift project</pre><pre>#endif</pre><p>For local development, add the module as a dependency in your <em>package.json. </em>Then<em> </em>install it and run <em>react-native link. </em>Projects that’ll use it will do the same.</p><h3>Where to put the native SDK?</h3><p>You should let the consumer of your library decide. The bridge shouldn’t include it but assume that it can import its header files. For iOS, applications usually install SDKs with CocoaPods. You should change your header search paths to look for header files in the Pods directory. The image below shows how to do it. We’re in <em>node_modules/library_name/ios, </em>so we need to move up three times to get to the application root. Then we move down to the Pods folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*uXyhUYAhK-v9NUDWJRyItA.gif" /><figcaption>Header search path for SDKs that you install with CocoaPods</figcaption></figure><p>Including the SDK in the bridge is a bad idea. It introduces a transitive dependency, but that’s a topic for another story.</p><p>You can find our <a href="https://github.com/shoutem/react-native-shopify"><strong><em>React Native Shopify bridge</em></strong></a> on GitHub. Stay tuned for the second part!</p><p><strong><em>If you like what you read, please tap or click “♥︎” </em></strong><em>to help to promote this piece to others.</em></p><p><em>I work at </em><a href="http://bit.ly/2poxM4q"><strong><em>Shoutem</em></strong></a><em> where I help creating tools to </em><a href="http://shoutem.github.io/?utm_medium=social&amp;utm_source=medium&amp;utm_campaign=dev_posts&amp;utm_content=bridge_library"><strong><em>supercharge your React Native development</em></strong></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd6485cc6212" width="1" height="1" alt=""><hr><p><a href="https://medium.com/shoutem/top-lessons-we-learned-while-building-a-react-native-bridge-library-bd6485cc6212">Top lessons we learned while building a React Native bridge library</a> was originally published in <a href="https://medium.com/shoutem">Shoutem</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React — to Bind or Not to Bind]]></title>
            <link>https://medium.com/shoutem/react-to-bind-or-not-to-bind-7bf58327e22a?source=rss----ec8f9d10e071---4</link>
            <guid isPermaLink="false">https://medium.com/p/7bf58327e22a</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Luka Bracanovic]]></dc:creator>
            <pubDate>Fri, 10 Mar 2017 13:03:00 GMT</pubDate>
            <atom:updated>2018-11-12T08:41:05.886Z</atom:updated>
            <content:encoded><![CDATA[<h4>When and why do we bind <strong>this</strong> to the React component method.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dV7u8BzRaUfwgh0-1IBBRw.png" /></figure><p>Handling events in React components is the most common case to use binding. Before going any further, I recommend reading an article about <strong>this</strong> at <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/this">MDN</a> if you are uncertain how does <strong>this</strong> works.</p><h3>Why do we bind “this” to the function?</h3><p>To retain <strong>object instance </strong>when the function is going to be passed. Certainly, it must be semantically correct for the function to expect such <strong>object</strong>.<strong> </strong>Most common case is to bind <strong>this</strong> when passing object <strong>method</strong>. Remember:</p><blockquote><strong>This</strong> depends how the <strong>function</strong> is called, not how/where it is created.</blockquote><p><strong>This</strong> should be retained when used in the function. <strong>This </strong>is used for an internal matter, data which, is not dynamic, doesn’t depend on function caller, usually already defined when the function is passed away.</p><h3>Lets dig in an example</h3><p>React generic components, for example, <strong>Buttons</strong>, by their <strong>generic</strong> nature <strong>should not</strong> know anything about data model and application behavior. That being said, generic buttons should not have properties like <strong>id</strong>, <strong>value</strong>, etc<strong> </strong>and shouldn’t do any specific operation. Generic buttons are dumb, they are pressable, and that’s all.</p><p>Press handle entirely defines what is going to happen when the button is pressed. That handle has all needed information within itself or more specific <strong>this</strong> (or in scope). It is an internal matter of the handle; the button does <strong>not</strong> add any value to the action, except an event.</p><pre><strong>class </strong>ArticlesListScreen <strong>extends </strong>Component {<br>  constructor(props, context) {<br>    <strong>super</strong>(props, context);<br>    <em>// Binding &quot;this&quot; creates new function with explicitly defined &quot;this&quot;<br>    // Now &quot;openArticleDetailsScreen&quot; has &quot;ArticleListScreen&quot; instance as &quot;this&quot;<br>    // no matter how the method/function is called.<br>    </em><strong>this</strong>.openArticleDetailsScreen = <strong>this</strong>.openArticleDetailsScreen.bind(<strong>this</strong>);<br>  }</pre><pre>  openArticleDetailsScreen() {<br>    <strong>const </strong>{ article } = <strong>this</strong>.<strong>props</strong>;<br>    openArticleScreen(article.id);<br>  }</pre><pre>  renderArticle() {<br>    <strong>return </strong>(<br>      &lt;<strong>View</strong>&gt;<br>        &lt;<strong>Text</strong>&gt; An Article! &lt;/<strong>Text</strong>&gt;<br>        &lt;<strong>Button<br>          </strong>{<em>/*Passing method to the component as handle.*/</em>}<br>          <strong>onPress=</strong>{<strong>this</strong>.openArticleDetailsScreen}<br>        &gt;<br>          Open Details<br>        &lt;/<strong>Button</strong>&gt;<br>      &lt;/<strong>View</strong>&gt;<br>    );<br>  }<br>}</pre><pre><strong>function </strong><em>Button</em>({ onPress, children }) {<br>  <strong>return </strong>(<br>    &lt;<strong>TouchableOpacity onPress=</strong>{onPress}&gt;<br>      &lt;<strong>Text</strong>&gt;{children}&lt;/<strong>Text</strong>&gt;<br>    &lt;/<strong>TouchableOpacity</strong>&gt;<br>  );<br>}</pre><p>What about a smart, specific button, for example, <strong>ArticleDetailsButton</strong>? <br>It is <strong>the same thing</strong>, but it is just different place where handle is defined. On the end, last component is always generic one.</p><pre><strong>class </strong>ArticlesListScreen <strong>extends </strong>Component {<br>  getArticle(articleId) {<br>     const { articles } = <strong>this</strong>.<strong>props;</strong>    <br>     <strong>return articles</strong>.<strong>find</strong>(article =&gt; article.id === articleId);<br>  }</pre><pre>  renderArticle(articleId) {<br>    <strong>const </strong>{ article } = <strong>this</strong>.<strong>props</strong>;</pre><pre>    <strong>return </strong>(<br>      &lt;<strong>View</strong>&gt;<br>        &lt;<strong>Text</strong>&gt; What a great article! &lt;/<strong>Text</strong>&gt;<br>        {<em>/*Calling method directly from &quot;this&quot;, so no need for binding.*/</em>}<br>        &lt;<strong>Button article=</strong>{<strong>this</strong>.getArticle(articleId)} /&gt;<br>      &lt;/<strong>View</strong>&gt;<br>    );<br>  }<br>}</pre><pre><strong>class </strong>ArticleDetailsButton <strong>extends </strong>Component {<br>  constructor(props, context) {<br>    <strong>super</strong>(props, context);<br>    <em>// It is the same thing, only difference is Component where we do the binding.<br>    // Component is lower in the tree, and now button has the logic how to open the screen.<br>    </em><strong>this</strong>.openArticleDetails = <strong>this</strong>.openArticleDetails.bind(<strong>this</strong>);<br>  }</pre><pre>  openArticleDetails() {<br>    <strong>const </strong>{ article } = <strong>this</strong>.<strong>props</strong>;<br>    openArticleDetails(article.id);<br>  }</pre><pre>  render() {<br>    <strong>return </strong>(<br>      &lt;<strong>TouchableOpacity onPress=</strong>{<strong>this</strong>.openArticleDetails}&gt;<br>        &lt;<strong>Text</strong>&gt;Open Details&lt;/<strong>Text</strong>&gt;<br>      &lt;/<strong>TouchableOpacity</strong>&gt;<br>    );<br>  }<br>}</pre><h3>Other binding cases</h3><p>Event handles (callbacks in general) are not only case to bind of course, as mentioned before, if passed method refers to the <strong>this</strong> in any way, proper <strong>this</strong> must be retained. Another common case when method is passed is as <strong>comparator</strong> or <strong>iterator</strong>.</p><p>This is a very neat thing, it removes unnecessary wrappers as well as anonymous functions.</p><p>For example, imagine <strong>ArticleDetailsScreen</strong> connected to <strong>redux</strong> state with <strong>article</strong> and <strong>tags</strong> props. For the purpose of example, article will have multiple tag ids. Goal is to render <strong>article content</strong> with <strong>tags titles.</strong></p><pre><strong>class </strong>ArticleDetailsScreen <strong>extends </strong>Component {<br>  constructor(props, context) {<br>    <strong>super</strong>(props, context);<br>    <strong>this</strong>.renderTagComponent = <strong>this</strong>.renderTagComponent.bind(<strong>this</strong>);<br>  }</pre><pre>  renderTagComponent(tagId) {<br>    <strong>const </strong>{ tags } = <strong>this</strong>.<strong>props</strong>;<br>    <strong>const </strong>tag = tags.<strong>find</strong>(tag =&gt; tag.id === tagId);</pre><pre>    <strong>return </strong>&lt;<strong>Text key=</strong>{tagId}&gt;{tag.title}&lt;/<strong>Text</strong>&gt;;<br>  }</pre><pre>  render() {<br>    <strong>const </strong>{ article } = <strong>this</strong>.<strong>props</strong>;<br>    <em>// Nice, isn&#39;t it? <br>    // Without anonymous function monster as argument :)<br>    </em><strong>const </strong>articleTags = article.<strong>tags</strong>.map(<strong>this</strong>.renderTagComponent);</pre><pre>    <strong>return </strong>(<br>      &lt;<strong>View</strong>&gt;<br>        &lt;<strong>Text</strong>&gt;{article.content}&lt;/<strong>Text</strong>&gt;<br>        {articleTags}<br>      &lt;/<strong>View</strong>&gt;<br>    );<br>  }<br>}</pre><h3>Arrow function to the rescue?</h3><p><strong>Arrow function</strong> should not be used in the component render method. Render is called repeatedly, thus arrow function create a new function often and unnecessary. Remember:</p><blockquote><strong>Bind</strong> creates a <strong>new</strong> function!</blockquote><h3>Finally, when to bind?</h3><p>Depending on how a function is called or passed and whether it uses <strong>this</strong> or not you have to <strong>bind</strong>.</p><p>If the function is called on <strong>this</strong>, a method actually, then it has <strong>caller</strong> <strong>this</strong>.</p><p>By default, if the function is not called, but rather passed, then that function will have <strong>this</strong> depending on how it is called later, most likely <strong>undefined</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3EY_Z2JtfGe71d_Hi4fokQ.png" /></figure><h3>Bind “disclaimer”</h3><p>Not to talk only “rainbows and unicorns”, even though bind is a very powerful tool it shouldn’t be abused. The <strong>bind</strong> adds complexity to the function because it hides a certain part of the <strong>context</strong>. It is much more cleaner for function to use <strong>only</strong> its own arguments. Function which <strong>bind</strong> any <strong>context</strong> isn’t <strong>pure</strong>, that is a big downside.</p><p><em>I work at </em><a href="http://bit.ly/2poxM4q"><strong><em>Shoutem</em></strong></a><em> where I help creating tools to </em><a href="http://shoutem.github.io/?utm_medium=social&amp;utm_source=medium&amp;utm_campaign=dev_posts&amp;utm_content=bridge_library"><strong><em>supercharge your React Native development</em></strong></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7bf58327e22a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/shoutem/react-to-bind-or-not-to-bind-7bf58327e22a">React — to Bind or Not to Bind</a> was originally published in <a href="https://medium.com/shoutem">Shoutem</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Evolution of Mobile Banking]]></title>
            <link>https://medium.com/shoutem/the-evolution-of-mobile-banking-4d69e7eee5d4?source=rss----ec8f9d10e071---4</link>
            <guid isPermaLink="false">https://medium.com/p/4d69e7eee5d4</guid>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[banking]]></category>
            <category><![CDATA[payments]]></category>
            <dc:creator><![CDATA[Shoutem]]></dc:creator>
            <pubDate>Tue, 20 Dec 2016 12:52:34 GMT</pubDate>
            <atom:updated>2016-12-20T12:52:40.618Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*soAQk-V4wDaJmzrj1g_7sA.png" /><figcaption>The Evolution of Mobile Banking</figcaption></figure><p>Mobile devices are reshaping the world as we know, gradually transforming our lives, daily behaviors, and how we do business with banks. Together with the evolution of mobile technologies, customers also evolved, pushing banks to be more consumer-driven.</p><h3>Fulfilling customer needs</h3><p>In the beginning of the smartphone era almost a decade ago, it was easy to impress customers with the possibilities new devices and technologies provided; the leap of progress was huge, even maybe it was a small change presented as a new way of dealing with the convenience.</p><p>Over the years, customers shifted to mobile devices, adopting new technologies with the goal of simplifying their lives and demanding more from banks. Forrester predicts that <a href="http://www.forrester.com/home#/The+State+Of+Mobile+Banking+2012/fulltext/-/E-RES75582">by 2017, 108 million customers in the United States alone</a> will be using mobile banking.</p><p>Mobile banking stands out from the rest of the industries affected by mobile technology due to millennials’ willingness to use feature-rich banking apps. <a href="https://www.federalreserve.gov/communitydev/mobile_finance.htm">A study by the Federal Reserve</a> reported that millennials’ mobile banking <strong>usage in now close to 70%</strong>, compared to 18% of consumers aged 60 or over.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0pj4eRrYFE7qZIbuf5LjDQ.png" /><figcaption>Mobile banking is important for millennials.</figcaption></figure><p>As the way in which we handled our finances changed, banking also needed to keep up with mobile trends to survive in a mobile-first customer environment by <strong>tailoring their businesses to suit customers’ needs and creating mobile apps.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1RFRBH_Fxof1USv6Lu2e3g.png" /><figcaption>Preferred devices for banking activities.</figcaption></figure><h3>Improving customer experience</h3><p>Not long ago, it was a common practice to go directly to local bank’s branch to make a simple transaction or transfer funds. Then came telebanking, and then banks finally spruced up their websites and started offering services on the web. However, with the mobile evolution, opening a mobile bank app on a smartphone is a strong alternative to going to a bank branch.</p><p>The ability to access information in just a few clicks from our smartphones changed how we access our bank accounts. With a mobile banking app, customers can check their bank balances, transfer funds, or make payments in just a few seconds.</p><p>In a recent <a href="http://www.nielsen.com/us/en/insights/news/2016/digital-deposits-mobile-banking-around-the-world.html">Nielsen survey</a>, nearly half of the global respondents (47%) said they had checked an account balance or conducted a transaction on their mobile devices in the past six months, and 42% said they had paid a bill using their mobile devices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kKd1rCoHEtN6btYgh-97eA.png" /><figcaption>Engagement with mobile banking by region.</figcaption></figure><h3>Creating new sales and communication channel</h3><p>Customers have evolved from passive recipients to hyper-informed ones, constantly looking to get more from their mobile devices. Therefore, mobile banking needed to <strong>extend the portfolio of services offered by mobile apps</strong>, resulting in new sales and communication channels.</p><p>By adding some simple services to their mobile apps, such as checking bank balances and transferring funds, banks realized the enormous potential those apps have for their customers and their businesses. Banks started building mobile apps with more complex services available, such as requesting loans, opening savings accounts, or making mortgage payments.</p><p>In 2015, <a href="http://newsroom.bankofamerica.com/press-kits/bank-america-trends-consumer-mobility-report">Bank of America</a> reported over 18 million active mobile banking users and its biggest annual earnings in nearly a decade as well as a <strong>29% growth in bill payments and a 20% percent growth in money transfers</strong>. The report also showed a trend of customers opening new accounts through mobile apps, with sales increasing by 50% over the previous year.</p><p>Tracking customer behavior in apps by interpreting collected data creates a chance for banks to offer products and services that better fit their customers’ needs.</p><p>In addition, sales and marketing teams now have new channels to market new services and to upsell and cross-sale services since <a href="http://www.ey.com/Publication/vwLUAssets/ey-global-consumer-banking-survey-2012/$FILE/ey-global-consumer-banking-survey-2012.pdf"><strong>70% of customers are willing to provide their banks with more information if doing so leads to increased personalization or better service</strong></a><strong>.</strong></p><h3>Reducing operational costs</h3><p>Banking apps are not only fulfilling customers’ needs but also lowering banks’ operational costs by reducing the need for physical branches. Last year, there were <a href="http://www.bizjournals.com/buffalo/news/2016/01/15/report-more-than-1-600-bank-branch-closures-in-the.html">more than 1,600 bank branch closures in the United States</a>. A study titled “<a href="https://ir.citi.com/D%2F5GCKN6uoSvhbvCmUDS05SYsRaDvAykPjb5subGr7f1JMe8w2oX1bqpFm6RdjSRSpGzSaXhyXY%3D">Digital Disruption</a>” by Citi predicted that by 2025, up to 30% of current employees could lose their jobs because of new technologies.</p><p>However, this does not mean that jobs at bank branches will disappear; these employees will simply need to jump into different roles. Customers still have positive perceptions of physical branches due to the human touch they provide when it comes to long-term financial decisions, such as mortgages.</p><p>The shift will require employees and banks to open new, customer-oriented departments to provide individual and personalized support, focusing on small business loans, personal investment advice, and help with the onboarding process and mobile issues.</p><h3>Mobile banking experience redesigned</h3><p>Mobile banking is growing and evolving rapidly, pushing innovation in the first plan. <strong>We are witnessing the dawn of new mobile banking solutions</strong> that are trying to change the mobile banking experience from the inside out.</p><p><a href="https://www.simple.com/">Simple</a> and <a href="https://www.moven.com/">Moven</a> are working on changing the banking experience as we know it. Their mobile solutions include all the regular services you would expect from a banking app, such as tracking expenses and making mobile payments. However, they are paving the way and raising the bar for other players on the market by building apps and integrating exciting new features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zs03VQskjMM0FMSNlq78qA.png" /><figcaption>Simple online bank</figcaption></figure><p>With Simple, you can create Goals. A Goal is a digital envelope that allows you to save and stash away funds daily. Users can set aside discrete amounts of money for specific purposes and effectively hide money from themselves before they spend it. On average, Simple customers who use these Goals <a href="https://www.simple.com/features/goals">save twice as much as those who do not</a>.</p><p>Another exciting feature is Safe-to-Spend. This feature allows users to spend spontaneously and worry less about overspending their monthly budgets by calculating the difference between their total balances and all their scheduled bills and Goals.</p><p>Simple also offers a way for customers to visualize their spending, discover how they really spend, and find easy ways to save money. The app can search and analyze every transaction made from a bank account while allowing users to add notes, photos, and hashtags to any purchase. Best of all, Simple does not charge any fees, not even maintenance, card replacement, or minimum balance fees.</p><p>Moven’s mission is to change how people engage with their banks by delivering mobile-first, customer-centric solutions. Moven is a financial service provider that creates digital bank accounts and provides an innovative app that provides real-time insights to empower users to make informed decisions that directly affect how they save and spend money.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WctNTC983RvSxrWrTu_ELA.png" /><figcaption>Moven mobile app</figcaption></figure><h3>The new breed: mobile-only banks</h3><p>Mobile banking adoption resulted in a few banks trying to position themselves as pioneers of <strong>a new type of banks: mobile-only</strong>. While all major banks provide some form of mobile banking, with either a smartphone app or a mobile website, these new banking players only offer digital solutions and do not have a single physical branch.</p><p>German mobile bank N26 is <a href="http://www.businessinsider.com/n26-mobile-banking-app-receives-banking-license-2016-7">on a mission to replace traditional banks</a>. To become a client, users must install the company’s app and have a short video call with a clerk. During the call, the bank representative turns on your front phone camera to take your profile photo and scans your passport through the back camera of your phone. In only few minutes, you have new bank account, debit card, and credit card — pretty elegant, right?</p><p>The UK’s first bank built exclusively for mobile is <a href="https://www.atombank.co.uk/">Atom Bank</a>, which aims to disrupt the banking industry just as Uber did with transportation. Even before this app-only bank officially launched, the startup was valued at around $226.6 million after only 18 months and <a href="http://uk.businessinsider.com/bbva-invests-45-million-in-atom-bank-at-150-valuation-2015-11">landed a massive investment of $68 million from Spanish bank BBVA</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7MpCnKv_KcLcE-cy6RNTOg.png" /><figcaption>Atom bank built exclusively for mobile.</figcaption></figure><p>Atom’s app provides complete customization with some high-end features. Opening an account is simple, and the process can be completed in just a few steps. For authorization and registration, users do not have to enter usernames or passwords or scan a photo ID since the app uses biometric security.</p><p>The app currently relies on face and voice recognition, but the company announced that it will implement <a href="http://www.cnbc.com/2015/11/24/atom-bank-gets-68-million-from-bbva-says-it-can-be-as-disruptive-as-uber.html">fingerprint ID and eye scans soon</a>. Once those features are introduced, users will set up three forms of biometric ID, two of which are mandatory, and a six-digit passcode to access their accounts.</p><p>Clydesdale Bank and Yorkshire Bank launched a digital banking service and created a mobile app: <a href="https://www.youandb.co.uk/">B</a>.</p><p>B promises to make everyday banking simple and intuitive for every financial action, from checking account balances to making payments, while providing tons of tools that allow users to take control of their funds.</p><p>B’s set of features allows users to tag purchases or set up their own savings and budget targets. One feature collects financial data to predict how a user’s account balance will look at the end of a month based on previous behavior.</p><p>If users are about to fall a little short, the app will send an alert, or if have some extra funds, the app will suggest spending or move funds to savings. B also integrates with Apple Pay, making wallet-less payments just a fingerprint away.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ROF8K7oN2woD7gzc59Rv3Q.png" /><figcaption>B makes your banking simple.</figcaption></figure><h3>The future of mobile banking</h3><p>The evolution of mobile banking has begun, with biometric security, smart automated savings, and deep expense analyses being introduced. <strong>So, what can we expect in the near future</strong>?</p><p>With the rise of virtual digital assistants, such as <a href="http://www.apple.com/ios/siri/">Siri</a>, <a href="http://www.windowscentral.com/cortana">Cortana</a>, and <a href="https://www.google.com/search/about/">Google Now</a>, and apps being <a href="https://techcrunch.com/2016/06/13/apple-finally-opens-siri-to-third-party-developers/">opened up to third-party developers</a>, mobile banking will become completely consumer-centric. As digital assistant capabilities become smarter with every OS update, users will not even need to tap on their devices; voice commands will allow users to manage their bank accounts, make payments, and analyze their spending.</p><p>Bankers will need to acquire a much deeper understanding of their customers and push services that go beyond transactional. Connecting data from third-party apps, learning about customers’ saving habits, and analyzing customers’ spending behaviors will allow banks to create complete profiles of individuals and lead to powerful intelligent interfaces.</p><p>This will result in complex portfolio management tools that allow users to obtain complex risk analyses on long-term investments and assistance when applying for mortgages or investing in emerging markets, high-yield bonds, or stock market bonds.</p><p><a href="http://www.apteligent.com/wp-content/uploads/2016/02/Banking-Survey-2016-WP-0216.pdf">Over one-third of the world’s population now owns a smartphone</a>, and in the next four years, that piece of the pie will expand to 70%. With one in three adults relying on mobile banking by 2020, customers will push banks in one direction if they want to survive: <strong>going mobile</strong>.</p><p><em>Who are </em><a href="http://www.shoutem.com/"><strong><em>Shoutem</em></strong></a><strong><em> </em></strong><em>and </em><a href="http://five.agency/"><strong><em>Five</em></strong></a><em>? Well, we are all about Mobile Apps. Shoutem is the leading app maker platform </em><strong><em>for building apps, </em></strong><em>and Five is a </em><strong><em>Design Driven App Development Company</em></strong><em> with offices in Europe and NYC.</em></p><p><em>Originally published at </em><a href="http://blog.shoutem.com/the-evolution-of-mobile-banking/"><em>blog.shoutem.com</em></a><em> on December 7, 2016.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d69e7eee5d4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/shoutem/the-evolution-of-mobile-banking-4d69e7eee5d4">The Evolution of Mobile Banking</a> was originally published in <a href="https://medium.com/shoutem">Shoutem</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moving in the Right Direction: The Evolution of City Transit Apps]]></title>
            <link>https://medium.com/shoutem/moving-in-the-right-direction-the-evolution-of-city-transit-apps-f500ce63653c?source=rss----ec8f9d10e071---4</link>
            <guid isPermaLink="false">https://medium.com/p/f500ce63653c</guid>
            <category><![CDATA[transportation]]></category>
            <category><![CDATA[mobile-apps]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[uber]]></category>
            <dc:creator><![CDATA[Shoutem]]></dc:creator>
            <pubDate>Wed, 23 Nov 2016 12:48:34 GMT</pubDate>
            <atom:updated>2016-11-21T15:49:09.976Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qsPUlOPS0Ur6NeBI4G9gxA.png" /></figure><p>In the dense urban centers of world’s greatest cities mobility is becoming a problem that is difficult to ignore. During peak ‘rush hours’ millions commute to work and back, creating long delays, congestion and environmental problems linked to carbon emissions and exhaust fumes.</p><h3>The state of city transit apps</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*kHbQpjoucKXX3TbTiuZEow.jpeg" /></figure><p>The Chinese city Beijing is infamous for its stifling smog, but other densely populated cities like Hong Kong, Los Angeles, and San Francisco, are also suffering from severe environmental issues due to excess traffic.</p><p>In recent years, apps like Uber, Lyft or BlaBlaCar have taken a step in the right direction in motivating citizens to leave their cars at home, and car-share options like <a href="https://www.uber.com/ride/uberpool/">Uber Pool</a> slightly reduce the number of vehicles on the road each day.</p><p>However, to make a real change which can dramatically reduce traffic, the local authorities need to make <strong>efficient and affordable public transportation options</strong> more attractive than services like <a href="https://www.uber.com/">Uber</a> and <a href="https://www.lyft.com/">Lyft</a>.</p><p>A number of forward-thinking local authorities have funded effective apps, like GoLA, that streamline travel on public transport and include social elements and even calculates the carbon footprint of each trip and streamline the whole process.</p><p>So what makes an effective city transit app which can motivate change to the benefit of citizens and the environment as a whole?</p><h3>Learning from Car Share Apps</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5egVH4WUFR401UmUo56nhQ.jpeg" /></figure><p>One of the most attractive aspects of car share apps is just how easy they are to use. Riders can make cashless payments via credit cards, call cars to their exact location via GPS and even monitor their driver’s progress in real time on a map. If transit apps are to going to really compete with other transport options, they have to be as convenient as them.</p><p>Creating an effective city transit app is a daunting task, due to the sheer amount of data and factors which an app needs to include such as cashless payments, real-time updates about stoppages, delays, maintenance, problems on the lines, information about detours and alternative route options to name a few.</p><h3>Forward-thinking transport apps</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*rTsNNWK4rYYRigon44XIAA.jpeg" /></figure><p>In Hong Kong — a bustling city with more than 57,000 inhabitants per square kilometer in its densest district — the local authorities funded the<a href="http://www.mtr.com.hk/en/customer/services/mtr_mobile.html">MTR Mobile app</a>, which really offers local commuters a helping hand. More than just a glorified train schedule and map, the app provides bus and train routes, schedules, a reliable trip planner, in-app ticket purchase, stations, accessibility information and navigation tips for popular tourist attractions.</p><p>Another great example is <a href="http://golaapp.com/">GoLA</a> — a transportation app built by Xerox which is probably the most complete<strong> city transit app built to date</strong>. Los Angeles is the second largest metro area in the U.S. and home to nearly 4 million people. The sheer number of transit options and available routes pose a big challenge when it comes to creating an effective transit app.</p><p>Xerox focused on building an app that calculates the cost and time of all possible modes of transportations available on a specific route based on real-time data, but also added a range of extra functions to reel in consumers. The app can calculate how many calories are burned on each trip, and connects users to Uber, Lyft, local taxi companies and is open to new integrations.</p><p>What’s more, to limit the amount of user interaction needed, GoLA has integrated deep learning technology, which learns from user input over time.</p><p>In this way, the app can offer the <strong>most efficient route based on previous behavior and real-time data</strong>, instead of just suggesting the shortest way. Customers can also save trips they take often, like from home to work, in their “My Rides” area of the app. Xerox has also developed a similar app for the public transport system in <a href="http://godenverapp.com/">Denver</a>.</p><p>An added bonus is that this type of <strong>custom-tailored, user-centric solution</strong> creates a pool of big data; the most traveled hours, most popular routes, most common changes and transfers, and user behavior–which can be used to improve the overall public transport service too.</p><h3>Adding extra value</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*6MNV-yEUtWC5V_NUGU73PQ.jpeg" /></figure><p>Effective travel apps need to be <strong>designed for the real needs and demands of real users</strong>. The <a href="https://itunes.apple.com/gb/app/bus-london-live-countdown/id480643687?mt=8">London Live Route Planner app</a>, offers a ‘wake me up’ function which sets off an alarm when the bus or train is reaching a sleepy traveler’s final destination.</p><p>Lessons could be learned from <a href="https://citymapper.com/">The Citymapper app</a>, which offers additional features like Smart commute, that updates automatically while on the move, sending users notifications such as when they should leave home to be on time at work, on top of giving a clear overview of all the types of transportation in the city.</p><p>San Francisco’s <a href="https://www.sfmta.com/getting-around/transit/munimobile">MuniMobile</a>, allows users to rate and recommend public transport, based on their experiences. Many transit apps, GoLA included, are open to integrations, and are <a href="http://www.techtimes.com/articles/123583/20160111/uber-will-take-to-public-transit-with-transloc-deal.htm">increasingly viewing transport share startups as partners</a> rather than competitors.</p><p>A truly effective transit app should <strong>offer users the route that fits their</strong>needs, and can get them to their destination in the quickest, most painless manner.</p><p>A successful city transit app isn’t just the app that tells you how to get from point A to point B, but the one that tells you where the nearest bicycle share stand is, connects you to your friends who are taking the same transport, and tells you how many calories you’ve burned on your journey.</p><p>The newest generation of transit apps needs to be developed for the real travelers who will use it in their day to day lives, otherwise they are more likely to choose more convenient, but less environmentally friendly options.</p><p>Different people have different lifestyles and prefer different modes of transportation. It’s up to city authorities and transit app developers to recognize that and <strong>provide the best experience possible</strong>.</p><p><strong><em>Thank you for reading. If you like the article, please click the little empty ❤ below and make it green :)</em></strong></p><p><em>Who are </em><a href="http://www.shoutem.com/"><strong><em>Shoutem</em></strong></a><strong><em> </em></strong><em>and </em><a href="http://five.agency/"><strong><em>Five</em></strong></a><em>? Well, we are all about Mobile Apps. Shoutem is the leading app maker platform </em><strong><em>for building apps, </em></strong><em>and Five is a </em><strong><em>Design Driven App Development Company</em></strong><em> with offices in Europe and NYC.</em></p><p><em>This article was originally published at </em><a href="http://blog.shoutem.com/evolution-city-transit-apps/"><em>blog.shoutem.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f500ce63653c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/shoutem/moving-in-the-right-direction-the-evolution-of-city-transit-apps-f500ce63653c">Moving in the Right Direction: The Evolution of City Transit Apps</a> was originally published in <a href="https://medium.com/shoutem">Shoutem</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 apps to ride out 2016 presidential election]]></title>
            <link>https://medium.com/shoutem/5-apps-to-ride-out-2016-presidential-election-4032261a3480?source=rss----ec8f9d10e071---4</link>
            <guid isPermaLink="false">https://medium.com/p/4032261a3480</guid>
            <category><![CDATA[mobile-apps]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[2016-election]]></category>
            <category><![CDATA[politics]]></category>
            <dc:creator><![CDATA[Shoutem]]></dc:creator>
            <pubDate>Tue, 25 Oct 2016 15:37:25 GMT</pubDate>
            <atom:updated>2016-10-25T15:09:03.652Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8fFYe3tzP0cjhUDSaz2bSg.png" /></figure><p>The presidential election race is entering its final phase. The next few weeks will be crucial for candidates as they battle to occupy the <a href="https://en.wikipedia.org/wiki/Oval_Office">Oval Office</a> and obtain one of the most powerful positions in the world.</p><p><a href="http://www.journalism.org/2016/02/04/the-2016-presidential-campaign-a-news-event-thats-hard-to-miss/">While about nine in ten Americans obtain information about the election in a given week</a>, staying on top of all the news, scandals, debates, and other cunning strategies can be very hard for voters.</p><p>However, it’s important to have a general overview of the elections: to understand the most important problems the US is facing, where the candidates stand, and how they plan to resolve these problems, so you can make the best possible decision for your country.</p><p>These<strong> five amazing apps will keep voters up-to-date with presidential election news and political developments</strong> and, hopefully, help them decide whom to vote for as the 45th U.S. president.</p><h3><a href="http://www.voter.xyz/">Voter</a></h3><p>If you still aren’t sure whom your vote go will go to, Voter is a perfect app for you. There are five different levels of yes-or-no questions (on topics such as National Security Agency regulations, the war on drugs, taxes, etc.); after completing them, the app shows you which candidate is your closest match. Voter is <strong>easy and fun to use as its Tinder-style user interface</strong> makes swiping through questions quickly.</p><p>If you’re unsure about any of the topics or not familiar enough with them, simply tap on the card and the app will provide more information about the topic with a bullet list of arguments for and against. Voter is available on both <a href="https://itunes.apple.com/us/app/voter-matchmaking-for-politics/id933655920?mt=8&amp;ign-mpt=uo%3D4">App Store</a> and <a href="https://play.google.com/store/apps/details?id=app.voter.xyz">Google Play Store</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*46VyxDbXVL4519RPXDB4dg.png" /><figcaption>Swipe right or left and get closest candidate match.</figcaption></figure><h3><a href="http://www.politifact.com/settleit/">Settle It!</a></h3><p>Regardless of the type of election, we’ve all been in situations where a harmless political discussion quickly escalates into an unpleasant situation around the dinner table, with a cross fire of arguable statements flying all over.</p><p>Thanks to the Settle It! PolitiFact’s Argument Ender, <strong>you can get true facts in a matter of seconds</strong>. With just a few clicks, you can end almost endless debates and enjoy that delicious pie while it’s still hot. Settle It! is available on both <a href="https://itunes.apple.com/us/app/settle-it!-politifacts-argument/id552914948?mt=8">App Store</a> and <a href="https://play.google.com/store/apps/details?id=com.politifact.settleit">Google Play Store</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kg0Ji3EumKPRCLfBN0hUww.png" /><figcaption>Settle the political discussion with Settle It!</figcaption></figure><h3><a href="http://votolatino.org/initiative/voterpal/">VoterPal</a></h3><p>Only <a href="http://www.statisticbrain.com/voting-statistics/"><strong>57.5 percent of eligible voters voted in the 2012</strong></a><strong> presidential elections</strong> and 6 percent of nonvoters said <strong>registration problems were their the top reason</strong>.</p><p>VoterPal makes the registration process as painless and straightforward as it can get. All you have to do is <strong>open the app and scan a QR code</strong> on the back of any state-issued driver’s license — the app will auto-populate the registration form. From there, the form is sent to your email address, with your state’s specific voter eligibility requirements.</p><p>While you still need to print, sign, and mail it, we hope this is the beginning of full online voter registration. VoterPal is available on both <a href="https://itunes.apple.com/us/app/voterpal/id1085731116?mt=8">App Store</a> and<a href="https://play.google.com/store/apps/details?id=air.VotoLatino&amp;hl=en">Google Play Store</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v1YRwWOUrUlyUL6ZX5Te2Q.png" /><figcaption>Every vote counts, so don’t forget to register.</figcaption></figure><h3>FrontRunner</h3><p>Before the official election results are published, both the media and the general public follow the latest trends and rely on poll results. FrontRunner <strong>delivers the most up-to-date polling results</strong>, using the <strong>Huffington Post’s Pollster API</strong> to track how are candidates performing in the polls over the time.</p><p>FrontRunner allows you filter and exclude candidates and track only those you wish to follow or have an affinity for. FrontRunner is available on <a href="https://itunes.apple.com/us/app/frontrunner-2016-presidential/id1137308390?mt=8">App Store</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*erIlH0SDsRXcZ5rGIcCe7A.png" /><figcaption>The latest national and state polls on the presidential election.</figcaption></figure><h3><a href="http://pollenize.org/">Pollenize</a></h3><p>Pollenize is another brilliant app that <strong>excellently breaks down where each of the candidates stands on specific subjects</strong>, such as immigration, taxes, economy, and foreign policy.</p><p>The app is developed by a “nonpartisan, apolitical organization,” so the chances of encountering biased reviews of beliefs or questionable information sources are eliminated. Pollenize is available on both <a href="https://itunes.apple.com/us/app/pollenize/id909233792">App Store</a> and <a href="https://play.google.com/store/apps/details?id=org.pollenize.app&amp;hl=en">Google Play Store</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LORYZqz_d-61Rg3lrcH_7A.png" /><figcaption>Make an informed decision on election day with Pollenize.</figcaption></figure><h3>Bonus item</h3><h3>Trump’s Wall</h3><p>With social media feeds crowded with political posts and TV channels buzzing with propaganda, it’s understandable to want to wander off and take a break from the presidential election. <strong>Trump’s Wall is a perfect getaway</strong>. You play the role of Donald Trump, and your mission is to build a huge wall to keep the ducks from pooping on Trump’s lawn while he motivates you with his famous quotes.</p><p>Just be careful while building the wall: if you knock it down, you’re fired. Trump’s Wall is available on both <a href="https://itunes.apple.com/us/app/trumps-wall-build-it-huge/id1093326711?mt=8">App Store</a> and <a href="https://play.google.com/store/apps/details?id=gnarcade.trumpswall&amp;hl=en">Google Play Store</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NR3TEddh-6JkgfsHTiw-9A.png" /><figcaption>It’s gonna be huuuge!</figcaption></figure><p><strong>Think we missed some brilliant apps that can help you survive presidential election? Let us know in the comments.</strong></p><p><strong><em>Thank you for reading. If you like the article, please click the little empty ❤ below and make it green :)</em></strong></p><p><em>Who are </em><a href="http://www.shoutem.com/"><strong><em>Shoutem</em></strong></a><strong><em> </em></strong><em>and </em><a href="http://five.agency/"><strong><em>Five</em></strong></a><em>? Well, we are all about Mobile Apps. Shoutem is the leading app maker platform </em><strong><em>for building apps, </em></strong><em>and Five is a </em><strong><em>Design Driven App Development Company</em></strong><em> with offices in Europe and NYC.</em></p><p><em>This article was originally published at </em><a href="http://blog.shoutem.com/5-apps-2016-presidential-election/"><em>blog.shoutem.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4032261a3480" width="1" height="1" alt=""><hr><p><a href="https://medium.com/shoutem/5-apps-to-ride-out-2016-presidential-election-4032261a3480">5 apps to ride out 2016 presidential election</a> was originally published in <a href="https://medium.com/shoutem">Shoutem</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Travel Apps: The Revolution in Traveling]]></title>
            <link>https://medium.com/shoutem/travel-apps-the-revolution-in-traveling-cde012e79dd4?source=rss----ec8f9d10e071---4</link>
            <guid isPermaLink="false">https://medium.com/p/cde012e79dd4</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[mobile-apps]]></category>
            <dc:creator><![CDATA[Shoutem]]></dc:creator>
            <pubDate>Tue, 20 Sep 2016 07:51:29 GMT</pubDate>
            <atom:updated>2016-09-08T07:50:24.694Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mDtIwIqazmEg8gAo." /></figure><p>From the nomadic tribes traveling several millennia ago to contemporary attempts at space tourism, it seems that traveling has had a great impact on the evolution of our species and society. It wasn’t until the 19th century, though, that people started traveling not out of necessity, but out of pleasure. It took less than a century for tourism to become a worldwide phenomenon, and another 60 years or so for it to be one of the biggest industries. The travel sector has become a powerhouse and it’s here to stay.</p><h3>Traveling out of pleasure</h3><p>Modern travel has seen its share of technological advances, but none have been as captivating as the surge in digital travel. Just take Google Maps and Google Street View as an example and think about how they have shaped the way we travel. Today, we could not imagine that the smartphone of a modern traveler would not have the TripAdvisor or Foursquare mobile apps. Not only do they provide local insights and recommendations on destinations but are a vital part also in planning a trip.</p><p>It is no wonder that the rapidly growing popularity of apps has revolutionized traveling once again and reshaped the digital economy. According to <a href="https://www.tnooz.com/article/mobile-travel-infographic-somo/">tnooz</a>, <strong>30 million people now search for travel information via mobile devices each month</strong> and this trend is only going to increase as the growth of apps shows no sign of slowing down. Countless services and apps are just setting the ground for what seems to be quite possibly the biggest travel revolution yet.</p><p>This isn’t the type of revolution in travel that we’re used to seeing. The means of transportation are not changing significantly. Sure, travel is getting faster and more convenient, but <strong>this revolution isn’t a technical one</strong> in the way that it was in the past.</p><h3>A social imperative</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cgA_TbLhOeo5oK7C." /><figcaption>Image credits: flickr.com/photos/ironypoisoning/</figcaption></figure><p>This revolution is <strong>both a communication and a social revolution</strong>. The core social dynamics of traveling are changing and it is up to businesses to find the best way to communicate with travelers. Travel is no longer just about leisure time. It’s almost a social imperative and the social component of travel is more important than ever.</p><p>As with most industries, <strong>the travel industry is becoming more and more user-centric</strong>. This is especially prevalent in tourism, where individualism and experiences are held in high regard. This is due both to technological advances and to the very nature of travel.</p><p>Modern travelers have a huge variety of tools at their disposal, making the travel experience easier, more individualistic, more profound and, ultimately, cheaper. While this is great for travelers, it does pose a great challenge for everyone else involved as <strong>travelers’ demands are becoming increasingly more sophisticated and complex</strong>. Luckily, for those who are looking beyond the horizon, this also poses a big opportunity for a plethora of new and old businesses.</p><h3>The travel business</h3><p><strong>This trend is absolutely fantastic for businesses</strong>, because no longer will they find that a small or dispersed niche is an obstacle. Everything is digital. Every niche can be reached and every single niche-specific need can be catered to. Take a look at <a href="http://www.tales2go.com/">Tales2Go</a>, a neat little app for parents who want to keep their kids entertained during long trips. It found its niche without a problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yFzCE3BKG2gxv5tL." /></figure><p>Let’s go beyond that. <a href="http://blog.shoutem.com/2016/01/08/hall-of-fame-bikeaid/">Apps for bikers</a>? <a href="http://www.tomsguide.com/us/pictures-story/504-best-great-outdoors-apps.html">Apps for hikers</a>? <a href="http://kayaklog.net/">Apps for kayak paddlers</a>? You name it, you got it. Each one of those apps caters to a specific audience and each one of them isn’t bounded by the limitations of their respective niches in the way that classical businesses used to be.</p><p>Travelers are adopting apps fast; in 2015, 36% of respondents in MMGY Global’s Portrait of American Travelers booked their travel through a mobile app. In 2016, this app-booking share of respondents jumped to 45%, according to <a href="https://skift.com/2016/06/20/4-charts-that-illustrate-the-state-of-mobile-travel-app-bookings/">Skift</a>.</p><h3>Highly personalized experiences</h3><p><strong>Contemporary travelers value their time and use apps to save it. </strong>That’s why they require apps for as many functions as possible, like for <a href="http://blog.shoutem.com/2016/05/09/hall-of-fame-gig-pic/">sharing their concert pics</a>, and getting recommendations, news, and always up-to-date snow or surf reports. On top of everything, they are looking for highly personalized experiences. This is a trend that has been thoroughly observed for a couple of centuries and it has shaped the face of the travel industry. It’s easy to see just why modern travel apps are gravitating toward that kind of experience nowadays.</p><p>Another important element is an <strong>active community</strong> that the user can relate to. <a href="http://www.trustyou.com/press/study-reveals-travelers-prefer-summarized-review-content-full-text-reviews">According to a recent study</a> from the New York University and TrustYou.com, 95% of respondents reported reading reviews prior to booking and <strong>most of the travelers read 6 or 7 reviews on average</strong>. This trend is significant and it highlights the importance of having a community-based model since word-of-mouth recommendations are still perceived to be the most significant.</p><h3>The best possible time for making apps for travelers</h3><p>When it comes to mobile and digital tourism, the time is now. Although tourism has been closely tied to technology, it has finally improved to the point where mobile travel is a determinant of a good trip. This has had profound effects on the industry. In the first two quarters of 2016, travel tech startups raised almost $1.5B across 141 deals, as reported in <a href="https://www.cbinsights.com/blog/travel-tech-funding-q2-16/">CB Insights</a>.</p><p><a href="http://www.euromonitor.com/from-the-online-to-the-mobile-travel-era/report">According to Euromonitor International</a> it is expected that mobile travel sales will account for 25% of total global online travel bookings by 2019. In certain countries, such as the United States, that percentage is <a href="http://www.statista.com/statistics/274481/percentage-of-mobile-travel-sales-in-the-united-states/">expected to reach 40%</a>. The <a href="http://www.applift.com/blog/travel-apps-mobile-infographic">more than 60,000 travel apps</a> in the App Store and Google Play Store in 2015 make a powerful statement as well.</p><p>This is an incredibly powerful market, one that still has a lot of untapped potential and, although the competition is strong, there is plenty of room for businesses to grow and expand. The rise of the global travel industry and modern traveler clearly show that, for digital travel, the future is already happening.</p><p><strong><em>Thank you for reading. If you like the article, please click the little empty ❤ below and make it green :)</em></strong></p><p><em>Who are </em><a href="http://bit.ly/2cBW0Vo"><strong><em>Shoutem</em></strong></a><strong><em> </em></strong><em>and </em><a href="http://bit.ly/2cBWhaO"><strong><em>Five</em></strong></a><em>? Well, we are all about Mobile Apps. Shoutem is the leading app maker platform </em><strong><em>for building apps </em></strong><em>and Five is a </em><strong><em>Design Driven App Development Company</em></strong><em> with offices in Europe and NYC.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cde012e79dd4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/shoutem/travel-apps-the-revolution-in-traveling-cde012e79dd4">Travel Apps: The Revolution in Traveling</a> was originally published in <a href="https://medium.com/shoutem">Shoutem</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Four Forces That Will Drive Mobile App Development Prices Down]]></title>
            <link>https://medium.com/shoutem/four-forces-that-will-drive-mobile-app-development-prices-down-a3f013dba980?source=rss----ec8f9d10e071---4</link>
            <guid isPermaLink="false">https://medium.com/p/a3f013dba980</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Viktor Marohnic]]></dc:creator>
            <pubDate>Tue, 05 Jul 2016 16:03:59 GMT</pubDate>
            <atom:updated>2016-07-07T10:26:40.120Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*84U7GnwUPnWK7ETZa8Y0ow.png" /><figcaption>Mobile App Development Prices Are Going Down</figcaption></figure><p>Mobile apps have become an irreplaceable part of everyday life, so it’s no surprise that mobile app development is one of the most lucrative businesses out there. However, due to various economic factors, mobile app development prices are slowly but surely tumbling.</p><p>By <strong>2018</strong>, mobile application prices will <strong>drop up to 80%</strong>. This drop can be estimated by analyzing mobile market and business development data from two mobile app companies present on the U.S. and European markets: <a href="http://bit.ly/29bznkt">Five Agency</a> and <a href="http://bit.ly/29bzblc">Shoutem app builder</a>.</p><p><strong>Four factors</strong> influence the lowered costs of mobile development: the use of SDKs due to custom development, global market competition, frameworks for web developers, and the automation of maintenance and less-demanding development tasks.</p><h3>1. SDKs are trending in app development</h3><p>A couple of articles have already written on this topic in <a href="http://techcrunch.com/2016/03/03/its-the-end-of-euphoric-times-for-custom-app-developers/">TechCrunch</a> and<a href="http://venturebeat.com/2016/03/06/features-as-a-service-is-changing-the-game-for-app-makers/"> VentureBeat</a>. We keep seeing the same pattern in practice. For example, the<a href="https://itunes.apple.com/us/app/web-summit-15/id723644593?mt=8"> WebSummit/Collision app</a> uses the<a href="http://www.layer.com/"> Layer SDK</a> for messaging between conference participants. Plugging in, customizing, and making the UI an integral part of the conference app, which usually would’ve taken months to develop, took only a couple of days.</p><p>It makes perfect sense that the list of SDKs used in our apps is getting longer every day. Analytics (Google, Flurry SDKs), push notifications (Parse, Urban airship), customer communication (Intercom), and deeplinking (Branch.io) are just some of them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PLcSyUMT8b2hPkd-nCdtCA.png" /><figcaption>Custom code vs SDKs</figcaption></figure><p>Mobile development was <strong>completely customized</strong> until a few years ago, when SDKs started evolving. Today, 20% of all app development happens with support from development kits or builders. In the future, we expect the majority of apps to be built on top of frameworks and SDKs. Up to 80% of our apps will be built with the help of SDKs, and all our effort will be spent on designing the UI and working on functionality, customization, and innovation.</p><p>Of course, building apps is less time consuming now, so the average time for the whole development process is also dropping. A few years ago, it took us six months to finish the first version of an app we built for an e-commerce giant. Today, apps of similar complexity are built within two or three months. On top of that, the production time for an app MVP will drop even further; to less than one month over the next couple of years. In addition, these apps will be much more stable, they will have better UIs, and the maintenance costs will be much smaller in the long run. Thus, they will be much higher quality in general, which brings us to our next point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TUMPL8QBzCp00DCHfA7zWw.png" /><figcaption>Historical overview of the length of app development process.</figcaption></figure><h3>2. High quality global competition</h3><p><a href="https://techcrunch.com/2015/04/04/app-development-prices/">The article “The Rationale Behind Soaring App Development Prices</a>” points out a huge gap between the top mobile app development prices per hour in the United States ($250) and Indonesia ($20). Eastern European developers are a bit more expensive than those in Indonesia. They charge around $40 an hour on average, which is still much cheaper than the average U.S. price of around $140 an hour.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uSkrTa4WuL5njwx6TzLodA.png" /><figcaption>App development prices per hour.</figcaption></figure><p>The data displayed was taken from the article <a href="https://techcrunch.com/2015/04/04/app-development-prices/">“The Rationale Behind Soaring App Development Prices”</a>. The displayed price estimations are based on the reported median value.</p><p>The truth is that if you’re looking for a mobile app development agency, you’re much better off working with an offshore company in Europe or Asia. Their development, UX/UI, business problem solving, and project management skills are at the same level, if not better than, those in U.S. companies.</p><blockquote>“The truth is that if you’re looking for a mobile app development agency, you’re much better off working with an offshore company in Europe or Asia.”</blockquote><p><strong>There is a reason for that: </strong>the agency ecosystem in the United States is not the sexiest. Everyone who is any good wants to work for a startup and get rich from stock options. If not, they want to work for Facebook or Google and enjoy all the perks of working for a big company with an unlimited budget (e.g., a slow-paced work environment and a huge salary). The agency business is strenuous and stressful, and there’s no immediate gratification to keep employees motivated for a long time. Development agencies in the United States have a hard time employing even below-average developers, who tend to leave companies after six to twelve months.</p><p>In Europe and Asia, the tech scene is much less developed, and the agencies working for global U.S.-based clients tend to be the top employers, easily attracting and retaining the best talent. Profit margins are high enough that the companies can pay employees top salaries and work under a reasonable amount of pressure. In short, working with a mobile dev shop in Europe will cost you less, and you’ll get better quality work than anywhere in the United States. Just saying.</p><h3>3. Frameworks for web developers</h3><p><strong>React Native </strong>and <strong>NativeScript</strong> have been picking up a lot of steam lately. Native developers have discussed these technologies a lot (i.e., in this Medium post), and one of the big reasons why these frameworks might succeed is that they use native UI libraries to render UIs that have native performances and that look and feel native. This opens up many possibilities for thousands of web developers familiar with JavaScript and CSS and enables them to build high-end, cross-platform apps.</p><p>The growing interest in React Native is also obvious if you look at this Google Trends graph:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*opBwbP6fOzGz4Lb-rcPbag.png" /><figcaption>Google Trends graph displaying framework interest over time.</figcaption></figure><p>Since late 2015, interest in React Native has increased, while relative search volumes for iOS and Android development have been more or less stagnant.</p><p>We saw the same thing happen 15 years ago when UI toolkits using native UI libraries on Windows, Linux, or Unix made cross-platform development much easier and provided a native look and feel on each platform. There are many parallels with the opportunities React Native brings to the table.</p><h3>4. Most of the manual costs of long-term app maintenance will be automated</h3><p>Enormous effort and huge budgets are required just to maintain compatibility with the fast-moving ecosystem. Things like SDK updates, UI design updates, and App Store and Google Play binary submissions currently require large amounts of effort and valuable resources to be executed. However, in a year or two, many maintenance processes will be automated. This will enable developers to invest their knowledge and efforts into where it matters the most: innovation.</p><p>What used to be the apple of discord between developers and investors, who usually set a budget for application development but often fail to include a budget for long-term app maintenance, has recently been made easier by the automation of the maintenance process.</p><blockquote>“However, in a year or two, many maintenance processes will be automated. This will enable developers to invest their knowledge and efforts into where it matters the most: innovation.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2CE-mNu1GG35p2Gicn3LNA.jpeg" /><figcaption>New tools allow more focus on innovation.</figcaption></figure><h3>Conclusion</h3><p>Based on all these factors, <strong>we should see the cost of a typical app development project decrease by half in the short term (1–2 years) and even more than that when we look at a five-year time frame</strong>.</p><p>Current prices for mobile app development can range from $50,000 to up to $500,000 just for the initial version. If you calculate the maintenance and update costs in a two-year lifetime for an app, you are looking at a budget between $200,000 and $1,000,000.</p><p>In the next couple of years, these prices should drop, and we will probably see prices between $15,000 and $20,000 for basic apps completed in a month and between $100,000 and $200,000 for more complex apps with longer production cycles.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3f013dba980" width="1" height="1" alt=""><hr><p><a href="https://medium.com/shoutem/four-forces-that-will-drive-mobile-app-development-prices-down-a3f013dba980">Four Forces That Will Drive Mobile App Development Prices Down</a> was originally published in <a href="https://medium.com/shoutem">Shoutem</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>