<?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[Stories by Labidi Aymen on Medium]]></title>
        <description><![CDATA[Stories by Labidi Aymen on Medium]]></description>
        <link>https://medium.com/@labidiaymen?source=rss-57e740e96082------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sDh_UpVIuJvFinpXzLX0oQ.png</url>
            <title>Stories by Labidi Aymen on Medium</title>
            <link>https://medium.com/@labidiaymen?source=rss-57e740e96082------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 22:53:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@labidiaymen/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A NativeScript plugin that works — Making a NativeScript plugin]]></title>
            <link>https://medium.com/@labidiaymen/a-nativescript-plugin-that-works-making-a-nativescript-plugin-7f6e390996a5?source=rss-57e740e96082------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f6e390996a5</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nativescript]]></category>
            <category><![CDATA[plugins]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[community]]></category>
            <dc:creator><![CDATA[Labidi Aymen]]></dc:creator>
            <pubDate>Wed, 17 Jan 2018 16:47:11 GMT</pubDate>
            <atom:updated>2018-01-17T16:47:11.823Z</atom:updated>
            <content:encoded><![CDATA[<p>Before that this pass through my mind I lost a half day searching for plugin to JUST works without any additional tricks to continue my journey, but I didn’t, so that’s why I created this plugin and I call it “A NativeScript plugin that works”, just kidding I call it “nativescript-google-places-autocomplete”.</p><p>In the current app that I’m working on with a Client, we just want to display autocomplete a search input, with list of place predictions so I tried some plugins and some vanilla Javascript code (not good for code maintainability) but no, I choose to create my own plugin and share it with the community.</p><p>To start off I need a kickstart project or file structures, I never start a project with plain files, it took times to implement the essential need, so I found a seed project (That I contributed to it</p><p>) on the Nativescript GitHub account: <a href="https://github.com/NativeScript/nativescript-plugin-seed">https://github.com/NativeScript/nativescript-plugin-seed</a></p><p>Then I created my own API key and I start implementing my own things.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/0*sL79CNtQCrpccLLx.png" /></figure><p>So we will work on some of these files, all files are generated from the seed except this one</p><blockquote><em>google-places-autocomplete.static.ts</em></blockquote><p>This file holds static variable to keep the structure and the code clean.</p><p>Ok,</p><blockquote><em>google-places-autocomplete.android.ts</em></blockquote><blockquote><em>google-places-autocomplete.common.ts</em></blockquote><blockquote><em>google-places-autocomplete.ios.ts</em></blockquote><p>when we have a common functionality between iOS &amp; Android, we put in: <em>google-places-autocomplete.common.ts, </em>otherwise we implement each file with the platform needs.</p><blockquote><em>google-places-autocomplete.android.ts</em></blockquote><blockquote><em>google-places-autocomplete.common.d.ts</em></blockquote><blockquote><em>google-places-autocomplete.ios.d.ts</em></blockquote><p>These files are auto-generated with Typescript and hold the types &amp; definition of the TS files.</p><p>So all work will be on the <em>google-places-autocomplete.common.ts</em> file because we will use the Nativescript modules that support both of the platforms and here’s our file.</p><p>First, let’s <em>import </em>the module that we will use</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/0*8RYK0mhd-L4s4mPv.png" /></figure><p>The plugin does two things, search places from a query, and display place detail from place id.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/0*AklBSXo---5WTyKA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/0*AZBzgQ9twXt0fkgI.png" /></figure><p>In this two functions, we did two simple requests (using HTTP module from nativescript) to the google places API</p><p>Here’s the final product and to know more about the module or to check to demo go to this link: <a href="https://github.com/labidiaymen/nativescript-google-places-autocomplete">https://github.com/labidiaymen/nativescript-google-places-autocomplete</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*PoZBVNXSSugzvwl7.gif" /></figure><p>This package is hosted on npmjs.com</p><p><a href="https://www.npmjs.com/package/nativescript-google-places-autocomplete">https://www.npmjs.com/package/nativescript-google-places-autocomplete</a></p><p><strong>Hope it helps, thanks</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f6e390996a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hybrid mobile framework — NativeScript, Ionic, ReactNative]]></title>
            <link>https://medium.com/@labidiaymen/hybrid-mobile-framework-nativescript-ionic-reactnative-2a063a285662?source=rss-57e740e96082------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a063a285662</guid>
            <category><![CDATA[nativescript]]></category>
            <category><![CDATA[ionic]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[plugins]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Labidi Aymen]]></dc:creator>
            <pubDate>Tue, 16 Jan 2018 21:53:43 GMT</pubDate>
            <atom:updated>2018-01-16T21:53:43.837Z</atom:updated>
            <content:encoded><![CDATA[<p>Nowadays if you wanna make a low budget mobile App, definitely you will pass by one of the hybrid mobile application frameworks, let’s cite some :</p><p><strong>Ionic</strong>, any web developer wants to make a mobile app he will occur this framework, why?, because Ionic is built on top of <a href="https://cordova.apache.org/">Apache Cordova</a> using <a href="https://angular.io/">Angular</a> and WebView, the Ionic team made Ionic1 with Angularjs 1.* and the Ionic 2&amp;3 with Angular 2+, to know more: <a href="https://ionicframework.com/">ionicframework.com</a></p><p><strong>Nativescript</strong> (my favorite one, keep reading to know why):<em> is how you build cross-platform, native iOS and Android apps without web views. </em>(<a href="https://www.nativescript.org/about">https://www.nativescript.org/about</a>), with Nativescript you get access to native APIs via JavaScript, also you can use <a href="https://www.npmjs.com/">npmjs.com</a> packages, CocoaPods(iOS) and Gradle (Android) <em>I will explain how (next article)</em>.</p><p><strong>Xamarin</strong> I didn’t use it until now but here’s what they said about it: <em>Xamarin’s</em> mobile application development platform with native user interfaces enables sharing of code across all platforms with a single C# codebase (<a href="https://www.xamarin.com/platform">www.xamarin.com/platform</a>)</p><p><strong>ReactNative </strong>made by Facebook based on React.js philosophies same like Nativescript but it required some Objective-C or Swift for iOS and/or Java for Androids skills to write Bridge, (ReactNative Bridge) and that’s the main difference between Nativescript and ReactNative, the first does not require to write bridges the second does.</p><blockquote>If you know other mobile frameworks put them in comments …</blockquote><p>There are two main sides, the first side has <strong>Nativescript &amp; Reactnative &amp; Xamarin</strong> and the other side has only <strong>Ionic,</strong> the first use Native UI like UILabel(iOS) TextView(Android) with single XML tag <a href="https://docs.nativescript.org/cookbook/ui/text-view"><em>text-view</em></a> the other side use WebView (HTML input &amp; tags) which make the first side much better and smoother for complex UI even hot performance for simple UI.</p><p>And of course, I definitely choose native UI over Web UI.</p><p>Let’s talk about why I choose <strong>Nativescript</strong> and talk about my <strong>experience</strong>.</p><p>Android &amp; iOS, each mobile platform has its own ecosystem and offers completely different development tools and languages, in order to translate JavaScript code to the corresponding native APIs so they made a runtime for each platform, let’s call it <strong>the Bridge</strong></p><p>Let’s take an example, if we want to use <a href="https://sentry.io/">sentry.io</a> (Open-source error tracking) to track bugs on mobile devices in real-time, we can use this plugin <a href="https://www.npmjs.com/package/nativescript-sentry.io">npmjs.com/package/nativescript-sentry.io</a> which is hosted on <a href="https://www.npmjs.com/">npmjs</a> and immediately we can start using it in Javascript or Typescript.</p><p>So how this plugin made?</p><p>This plugin adds some <strong>dependencies</strong> with Gradle in Android And CocoaPods in iOS, and with <strong>The bridge, </strong>we can immediately start using them in plain Javascript code without any tweaks,(<strong><em>that’s the main part</em></strong> why I love Nativescript over all other platforms/frameworks) then we have the implementations parts wich done with javascript, no other languages or skills required .</p><h3>My Experience</h3><p><strong>The Garbage collector</strong>: I wrote two application with NativeScript one of them is in production right now, with iOS always works like charm but the Android version with google machine V8 I’ve got some lags, and that because the synchronisation between garbage collector of the JavaScript and the garbage collector of Java (GC), they announce a fix for that on the version 3.2 of Nativescript (<a href="https://www.nativescript.org/blog/announcing-the-release-of-nativescript-3.2">Announcing the Release of NativeScript 3.2 &amp; New Experimental GC Mode for Android</a>), they add an experimental flag and it solves the lags for now.</p><p><strong>Google maps:</strong> Also when I used Google maps plugin I had some issues, one of them is (Of course it works like a charm on iOS, I got the issue on Android) when you create a page that contains a Google map card and you enter to a child route (i’m using Angular with Nativescript) and you press back button the app crash, so I switch to MapBox.</p><p>I started making plugins for Nativescript, you can follow them at <a href="https://github.com/labidiaymen">Github.com/labidiaymen</a></p><p>If you wanna contribute to this articles or to one of my plugins you can make a comment or you can reach me: labidi{at}aymen.co</p><p><strong>Thanks</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a063a285662" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>