<?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 Maxime Julian on Medium]]></title>
        <description><![CDATA[Stories by Maxime Julian on Medium]]></description>
        <link>https://medium.com/@maximejulian?source=rss-e2ae75696f93------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*05nFC8wbXIuzWEQ1UpQqPw.jpeg</url>
            <title>Stories by Maxime Julian on Medium</title>
            <link>https://medium.com/@maximejulian?source=rss-e2ae75696f93------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 08:45:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@maximejulian/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[Making it Easier to Fetch Blockchain Data Using GraphQL]]></title>
            <link>https://maximejulian.medium.com/making-it-easier-to-fetch-blockchain-data-using-graphql-60f23fe959bd?source=rss-e2ae75696f93------2</link>
            <guid isPermaLink="false">https://medium.com/p/60f23fe959bd</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[web3]]></category>
            <dc:creator><![CDATA[Maxime Julian]]></dc:creator>
            <pubDate>Tue, 20 Jun 2023 04:37:25 GMT</pubDate>
            <atom:updated>2023-06-23T11:13:29.973Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nEdPavzSG8Z_ovA4" /><figcaption>Photo by <a href="https://unsplash.com/@fakurian?utm_source=medium&amp;utm_medium=referral">Milad Fakurian</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Blockchain technology holds a lot of promise. It’s a fast-evolving area that’s changing what we can do, especially with Ethereum and other EVM-compatible blockchains. But because it’s so new, it can sometimes be harder to work with than traditional web technologies.</p><p>That’s why I’d like to introduce you to a new tool I’ve developed to help make things easier: <a href="https://github.com/therealemjy/eth-graphql">eth-graphql</a>.</p><h3>The Problem We’re Solving</h3><p>When you’re building apps that use blockchain data, one of the biggest headaches can be getting all the information you need. Each page might need data from dozens of different places, and pulling all this together can be a real challenge.</p><p>A common way to deal with this is by using a multicall contract. This is a kind of tool that lets you make lots of requests at once, saving you time and making sure all the data you get is as up-to-date as possible. This is particularly important for things that can change quickly, like token prices.</p><p>I’ve been using React Query and multicall contracts in my day job, but as someone who’s also worked with more traditional web technologies, I saw potential for something even better — GraphQL.</p><h3><strong>Introducing eth-graphql</strong></h3><p>After doing some research and testing out some ideas, I decided to develop and release <a href="https://github.com/therealemjy/eth-graphql">eth-graphql</a>. It’s an open source project that makes it easier to access contract data from any EVM-compatible blockchain using GraphQL.</p><p>I wanted the library to be simple to use. You just need to give the name of a contract and its <a href="https://www.alchemy.com/overviews/what-is-an-abi-of-a-smart-contract-examples-and-usage">ABI</a>, and it will automatically build a GraphQL schema for you. Then you can use this to get the data you need — all without leaving your web browser! Plus, it uses a multicall contract to make sure each query only needs to make one request, no matter how many contracts you’re dealing with.</p><p>As a bonus, eth-graphql also lets you open a GraphiQL page, where you can see what the generated GraphQL schema looks like and try out your queries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gzqhQ9hF2S3YZOPNWunfWw.png" /><figcaption>GraphiQL page opened by eth-graphql to see the generated schema and build your queries</figcaption></figure><h3><strong>Give eth-graphql a Try</strong></h3><p>If you’re interested, I’d encourage you to give <a href="https://github.com/therealemjy/eth-graphql">eth-graphql</a> a go. It’s easy to set up and you can start making your queries in no time. And if you find it useful, I’d appreciate it if you could give it a star on the repository. That way, more people can find out about it and benefit from it.</p><p>Integrating GraphQL with blockchain is just the start. As technology continues to advance, I’m sure we’ll see more tools and solutions that bring the best parts of the traditional web to the world of blockchain, making it stronger, more accessible, and more innovative.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60f23fe959bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up Multiple Environments on React Native for iOS and Android]]></title>
            <link>https://medium.com/swlh/setting-up-multiple-environments-on-react-native-for-ios-and-android-c43f3128754f?source=rss-e2ae75696f93------2</link>
            <guid isPermaLink="false">https://medium.com/p/c43f3128754f</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Maxime Julian]]></dc:creator>
            <pubDate>Sat, 02 May 2020 17:16:05 GMT</pubDate>
            <atom:updated>2023-06-20T05:29:30.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*P59NIn1UALfaKCfm" /><figcaption>Photo by <a href="https://unsplash.com/@guibolduc?utm_source=medium&amp;utm_medium=referral">Guillaume Bolduc</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>Edit 20/01/21: update tutorial for React Native 0.63.4</em></p><p>While working on a side project, I quickly realized I needed to be able to set up multiple targets for the same React Native project. There’s several big advantages to doing that:</p><ul><li>Store your environment variables in separate files</li><li>Multiple instances of your app with different environments can be installed on the same phone (with different bundle identifiers)</li><li>No need to add extra-logic to swap between API urls, constants, keys etc.</li></ul><p>There’s some great articles describing how to do that on React Native, but all the ones I could find were written a few years back and things have changed a bit since then. So I’ve decided to give an up-to-date tutorial on the matter.</p><h3>Before we start</h3><p>The goal of this tutorial is for you to set up multiple environments on your own React Native app. However, if you want to follow along for the sake of learning I’ve created <a href="https://github.com/therealemjy/react-native-tuto-multiple-environments">this repository</a> which you can clone on your machine.</p><h3>Install react-native-config</h3><p>We are going to use the package <a href="https://github.com/luggit/react-native-config">react-native-config</a> to handle our environment variables. In your repo, run:</p><pre>npm install react-native-config --save</pre><p>You then need to link the library, <strong>even if you are using Cocoapods</strong>:</p><pre>npx react-native link react-native-config</pre><p>If you’re using Cocoapods, you also need to run a pod install:</p><pre>cd ios<br>pod install<br>cd ../</pre><p>We will then create the files that will store our environment variables. We’ll set two environments: development and production, so we create two files at the root of our project: .env.development and .env.production.</p><p>For the sake of this tutorial, we’ll only store one variable in each file in order to know in what environment our app is running.</p><p>In .env.development:</p><pre>ENVIRONMENT=development</pre><p>And in .env.production:</p><pre>ENVIRONMENT=production</pre><p>In a real app, these files would contain all your API urls, constants, API keys… anything that is specific to each environment.</p><h3>Setting up build types on Android</h3><p>We will be using build types with suffixes to create different versions of our app on Android.</p><ul><li>Open android/app/build.gradle</li><li>At the very top of the file, we’ll assign an environment file to each build type:</li></ul><pre>project.ext.envConfigFiles = [<br>  release: &quot;.env.production&quot;,<br>  debug: &quot;.env.development&quot;,<br>  developmentrelease: &quot;.env.development&quot;,<br>]</pre><blockquote>The naming of your build types is important! Make sure to use only lowercase letters with no special characters and append “release” at the end of the name of your custom build types, or they might not work.</blockquote><ul><li>Add this line after apply plugin:</li></ul><pre>apply from: project(&quot;:react-native-config&quot;).projectDir.getPath() + &quot;/dotenv.gradle&quot;</pre><ul><li>Since we’ll use suffixes, we need to edit our default config:</li></ul><pre>defaultConfig {<br>  ...<br>  resValue &quot;string&quot;, &quot;build_config_package&quot;, &quot;com.myapp&quot;<br>  manifestPlaceholders = [label: &#39;MyApp&#39;]<br>}</pre><blockquote>Replace com.myapp with the bundle identifier of your app.</blockquote><blockquote>Note we also added a manifestPlaceholders property. We will use the label value it contains to change the name of the app depending on the environment it’s running in. More on that later.</blockquote><ul><li>Add developmentrelease build type with the &quot;.development&quot; suffix:</li></ul><pre>buildTypes {<br>  ...<br>  developmentrelease {<br>    initWith debug<br>    applicationIdSuffix &quot;.development&quot;<br>    manifestPlaceholders = [label: &#39;MyApp Dev&#39;]<br>  }<br>}</pre><ul><li>Add matching fallbacks to debug build type:</li></ul><pre>debug {<br>  ...<br>  matchingFallbacks = [&#39;debug&#39;, &#39;release&#39;]<br>}</pre><p>That’s it! Your environment variables are now <a href="https://github.com/luggit/react-native-config#native-usage">available to your native code</a>, as well as your Javascript code:</p><pre>import Config from &#39;react-native-config&#39;;</pre><pre>Config.ENVIRONMENT; // &quot;development&quot; or &quot;production&quot;</pre><p>If you are following this tutorial using the repository I gave earlier, add this line at the top of the App.js file:</p><pre>import Config from &#39;react-native-config&#39;;</pre><p>And change line 21 to:</p><pre><em>const</em> environment = Config.ENVIRONMENT;</pre><p>You can now run both versions of the app on your device.<br>Development:</p><pre>npx react-native run-android --variant=developmentrelease</pre><p>Production:</p><pre>npx react-native run-android --variant=release</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IYSVAb5Zd_fZpAbyrwJQWw.png" /></figure><h3>Adding a target on iOS</h3><p>We will be using targets to handle our environments on iOS. The configuration is a bit more daunting than for Android, so hold tight!</p><ul><li>Open the .xcworkspace file of your app in Xcode, then right click on your project &gt; New Group</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*72t7BVbjy7csYL0Sj-3vTg.png" /></figure><ul><li>Rename this group to MyAppDevelopment (replacing “MyApp” with the name of your app)</li><li>Right click on your main target ( MyApp for me) &gt; Duplicate &gt; Duplicate Only</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5rjmRi8hXLduEmTjPIak1A.png" /></figure><ul><li>Rename the duplicated target to MyAppDevelopment</li><li>In the General, set the Bundle Identifier to com.myapp.development. By having a different bundle identifier, we’ll be able to install the two versions of our app (development and production) on the same device.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lwTVbNozgprWVVttfDajsA.png" /></figure><ul><li>Move the new Info.plist file that got automatically created when you duplicated the target into MyAppDevelopment group, then rename it to Info.plist. Note that you’ll need to actually copy and paste the file into MyAppDevelopment group, if you just slide it from Xcode only the reference will be moved, not the actual file!</li><li><strong><em>If your main target contains a </em></strong><strong><em>.entitlements file</em></strong><em> (</em><em>MyApp.entitlements), duplicate it and move it inside </em><em>MyAppDevelopment group, then rename it to </em><em>MyAppDevelopment.entitlements. This will permit you to support different capabilities for each target (remote notifications, app groups…).</em></li><li>In the Build Settings tab of MyAppDevelopment target, search for the Packaging section then set Info.plist File to the path of the Info.plist we just moved; MyAppDevelopment/Info.plist in our case.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SgG1huTE41Q3PqfFdgvNog.png" /></figure><blockquote>If in the previous step you duplicated a .entitlements file, you’ll also need to search for the section Signing and set Code Signing Entitlements to the path of the .entitlements file (MyAppDevelopment/MyAppDevelopment.entitlements).</blockquote><ul><li>Click on MyApp in the left corner of the top bar &gt; Manage Schemes and scroll down to find the newly created scheme MyApp copy. Rename it to MyAppDevelopment, then click on Edit in the bottom left corner.</li><li>Click on Build accordion (without expanding it), then on the + in the bottom left corner. Search for “React” and add the item named React (dah). Make sure to untick Parallelize build.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m7uFK0g8uZy42edqpFdMIg.png" /></figure><p>Our new target should now be able to run, but we need to configure react-native-config.</p><ul><li>Expand Build accordion, click on Pre-actions then on the + in the bottom left corner &gt; New Run Script Action.</li><li>Replace the content of the script with:</li></ul><pre>echo &quot;.env.development&quot; &gt; /tmp/envfile</pre><ul><li>Repeat the same action for the main target, this time replacing the content of the script with:</li></ul><pre>echo &quot;.env.production&quot; &gt; /tmp/envfile</pre><p>We’re done playing with Xcode! We’ll now edit the Podfile of the project (ios/Podfile).</p><ul><li>Since you’re reading this tutorial, chances are your project is articulated around one main target. We’ll first need to set an abstract target, so multiple targets can use the same pods and also use their own pods. In the Podfile, replace the line:</li></ul><pre>target &#39;MyApp&#39; do</pre><p>With:</p><pre>abstract_target &#39;App&#39; do</pre><blockquote>App can be replaced with anything you want, but shouldn’t be the same as any of your targets’ names!</blockquote><ul><li>We now need to define our targets, that will inherit from our abstract target. Right bellow the last pod ‘SOME_PLUGIN’, :path =&gt; ‘../node_modules/SOME_PLUGIN’ (were SOME_PLUGIN will probably be react-native-config since that’s the last plugin we installed), add our two targets:</li></ul><pre>target &#39;MyApp&#39; do<br>  #Production-specific pods</pre><pre>  target &#39;MyAppTests&#39; do<br>    inherit! :complete<br>    # Pods for testing<br>  end<br>end</pre><pre>target &#39;MyAppDevelopment&#39; do<br>  #Development-specific pods<br>end</pre><blockquote>Note: we moved the default test target MyAppTests inside MyApp to respect the original architecture.</blockquote><p>If you used the repository I linked at the beginning of this tutorial, your Podfile should look like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d1f77accecfd62f7a30de661feb375a9/href">https://medium.com/media/d1f77accecfd62f7a30de661feb375a9/href</a></iframe><ul><li>Finally, if you use Cocoapods you’ll need to run pod install again:</li></ul><pre>cd ios<br>pod install<br>cd ../</pre><p>That’s it! Your environment variables are now <a href="https://github.com/luggit/react-native-config#ios">available to your native code</a>, as well as your Javascript code.</p><blockquote>If you want to access your environment variables from your Info.plist files, follow <a href="https://github.com/luggit/react-native-config#availability-in-build-settings-and-infoplist">these extra steps</a> for each scheme.</blockquote><p>You can now run both versions of the app on your device.<br>Development:</p><pre>npx react-native run-ios --scheme &quot;MyAppDevelopment&quot;</pre><p>Production:</p><pre>npx react-native run-ios</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*car_1pZA0GiWGqJqJQay-w.png" /></figure><p>I hope this tutorial was helpful to you. If you’d like to see the codebase on Github with all the environments set up, <a href="https://github.com/therealemjy/react-native-tuto-multiple-environments/tree/result">here it is</a>.</p><p>Feel free to ask me any questions you have by commenting on this post. Have fun!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c43f3128754f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/setting-up-multiple-environments-on-react-native-for-ios-and-android-c43f3128754f">Setting up Multiple Environments on React Native for iOS and Android</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>