Search
Generic filters
Share on facebook
Share on twitter
Share on linkedin

The Ultimate Ethereum iOS Dev Kit

With iOS being one of the most popular smartphone operating systems, a blockchain developer would benefit from having a mobile-first approach when creating dApps for Ethereum. Moreover, if you could master the skill of creating phenomenal and optimized Ethereum mobile dApps for iOS, you would separate yourself and your Web3 applications from the competition and attract more users. However, while some are developing native mobile dApps using the tedious and time-consuming way of building around RPC nodes, programmers are better off using an Ethereum iOS dev kit from Moralis. With Moralis’ ultimate Ethereum iOS dev kit, you’ll be able to have mobile dApps up and running in minutes.

In this guide to creating native mobile dApps, you will learn how to create mobile dApps that are cross-chain interoperable. Moreover, even if you are primarily interested in serving iOS users, the ultimate Ethereum iOS dev kit also offers full support for Android. As such, you will future-proof your mobile dApp development career since you’ll be able to transition between other programmable blockchains and operating systems.

Essentially, the two main tools make up the ultimate Ethereum iOS dev kit is this Ethereum mobile boilerplate and the premier Web3 development platform – Moralis (a.k.a. the Firebase for crypto). Moreover, you will learn how to get started with both of these tools herein, and if you do not want to limit your development to mobile dApps, you may also use Moralis’ Ethereum dApp boilerplate to deploy regular Web3 applications. All in all, with Moralis on your side, blockchain development becomes a simplified and straightforward process.

What is React Native?

If you are an experienced mobile applications developer, then you’re most likely quite familiar with React Native. In that case, feel free to jump over to the next section, where we show you the Ethereum iOS dev kit in action. However, in case you are just getting started with your journey as a mobile developer, make sure to learn the basics of React Native. 

So, what is React Native? React Native is a JavaScript (JS) framework for writing native rendering mobile applications for Android and iOS. Moreover, as the “React” part suggests, it is based on React. The latter is Facebook’s JavaScript library for creating user interfaces (UIs), which in the case of React Native targets mobile platforms instead of browsers. Essentially, React Native enables web developers to write mobile applications that feel and look truly native. Moreover, you should always aim to build native mobile apps because they run a lot smoother when it comes to user input and output. Furthermore, native apps inherit their devices’ OS interfaces, making them look and feel as if they were an integrated part of that device. Thanks to the option to share the code between platforms, React Native makes it possible to develop for both iOS and Android simultaneously. 

The reason why we are discussing React Native is that this JavaScript framework is what the ultimate Ethereum iOS dev kit is based on. This means that anyone who is JavaScript proficient can immediately start deploying mobile dApps. However, in case you don’t know JavaScript yet, we highly recommend enrolling in the 2021 JavaScript Programming for Blockchain Developers course from Moralis Academy. Moreover, if you are serious about going full-time crypto, make sure to check out other high-quality courses at Moralis Academy.

Ethereum iOS Dev Kit in Action

We could go on about the Ethereum iOS dev kit and its features for hours; however, we believe that you’ll get the most out of this article if we take on an example project. By creating a fully functional mobile dApp in minutes using the core aspect of the ultimate Ethereum iOS dev kit – the best Ethereum mobile boilerplate, you will easily see the gist of this phenomenal tool. We encourage you to follow along and create your own mobile dApp. By doing so, you will learn how to set things up properly, which will come in handy during your future mobile dApp development. 

Example Mobile dApp Preview

Before we move on to the setup guide, we want you to have a proper sense of what kind of dApp is available to you in minutes when using the ultimate Ethereum iOS dev kit. So, let’s do a brief preview of our finished mobile dApp. Let’s start with the login page:

Looking at the image above, you can see that our mobile dApp provides users with a login option via WalletConnect. After the users tap the “Crypto Wallet Login” button, WalletConnect offers them a selection to choose between numerous supported crypto wallets. These also serve as authentication facilitators in the crypto realm. For the purpose of this demonstration, we selected Trust Wallet. 

After users successfully authenticate themselves (log in), they get to access the dApp’s functionalities (as shown in the image below). The first tab of our mobile dApp’s functionalities enables users to view assets and balances across multiple blockchains (currently supported chains are Ethereum, Binance Smart Chain (BSC), Polygon, and Avalanche).

The second tab displays past transactions. Moreover, this is where users get to easily access the details of any transactions by simply tapping on them. By doing so, a pop-up window with details and a link to the transaction explorer will appear (see image above). The third tab showcases transfers. There, your users can send their crypto assets by entering the address of the recipient, selecting the asset that they want to send, entering the amount, and tapping the “Transfer” button, which becomes active after all of the previous details have been entered:


On the far right-hand side, we have the “Profile” tab. This is where users get to log out. After tapping the “Logout” button, the dApp displays the initial login screen.

Ethereum iOS Dev Kit Setup

Being able to create a mobile dApp that includes all of the basic Web3 functionalities in minutes makes this Ethereum iOS dev kit one of the best mobile Web3 development tools currently available. Aside from covering all of the basic features, the dApp also looks neat and clean. Fortunately, you’re just moments away from being able to create that kind of mobile dApp yourself.

If you remember, we’ve mentioned that there are two key elements of the ultimate Ethereum iOS dev kit – Moralis and the best Ethereum mobile boilerplate. As such, there are two sets of setup steps that you need to complete to start creating mobile dApps seamlessly. 

Ethereum iOS Dev Kit Setup – Mobile Boilerplate Quick Start

Getting started with the Ethereum mobile boilerplate is simple. All it takes is to complete the five steps shown in the following image:

You’re most likely able to complete the above steps on your own; however, just in case, let’s guide you through the process.

  1. For starters, clone or fork the Ethereum mobile boilerplate by clicking the copy icon next to the GitHub URL on the GitHub page of the boilerplate: 
  1. Next, go to your code editor (we use Visual Studio Code [VSC]) and paste the copied URL in VSC’s terminal:
  1. Then, you need to install the “expo CLI” globally. You do this by typing “npm i -g expo-cli” (or copy the code from GitHub) into the code editor’s terminal:
  1. It is time to rename the “.env.example” file to “.env”. Next, insert your Moralis server URL and application ID (obtained from the Moralis setup part – follow the instruction in the subsection below):
  1. Once your Moralis server details are inserted in the “.env” file, you need to install all dependencies. However, since you’re most likely already in the folder, you can skip the “cd ethereum-react-native-boilerplate” command. Thus, move on to the next command (type or paste “yarn install” in VSC’s terminal):
  1. After completing the above steps, it’s time to run your dApp. The actual command you need to use for this purpose depends on the operating system you are working with:
  • Web: yarn web
  • iOS: yarn ios
  • Android: yarn android

Since we are focusing on the ultimate Ethereum iOS dev kit herein, you need to go with the “yarn ios” command. This command will also automatically initiate the mobile app simulator:

Creating a Moralis Server

In order to make use of the Ethereum iOS dev kit, particularly the best Ethereum mobile boilerplate, you need to create a Moralis server. As such, complete the following steps:

  1. Log In to Your Moralis Account – If you already have your Moralis account ready, just log in to access your admin area. However, if that’s not the case, make sure to create your free Moralis account now.

Create Your Moralis Server – After logging in and accessing your Moralis admin area (as shown in the image below), click “+ Create a new Server” in the top-right corner. Next, select the network type that best suits your needs from the drop-down menu. When dealing with example projects, selecting “Testnet Server” (check out our Ethereum testnet guide) is usually the best way to go. However, when you want your mobile dApps to go live, you need to go with the “Mainnet Server” option. 

Then, a pop-up window will appear. It will ask for your server’s name (this can be anything you want), region, network, and chain(s). After entering those details, click “Add Instance”. 

  1. Access Server Details – Once your server is up, you get to view its details by clicking on the “View Details” button next to your server’s name. 


By clicking the “View Details” button, another window will pop up. In it, you’ll see your server URL and application ID:

  1. Initialize Moralis – As instructed in the previous section (step four), you now need to populate your “.env” file with the Moralis server details. That way, you’ll obtain backend functionality offered by Moralis’ SDK. Just copy and paste each of the above two details:

Note: Make sure NOT to use the details from the image above. Instead, you need to paste the details of your particular server.

Ethereum iOS Dev Kit – Beyond the Boilerplate

In the sections above, you’ve completed all of the steps required to create a fully functional mobile dApp (according to the details presented in the “Example Mobile dApp Preview” section above). The next step is to make the necessary tweaks to best meet your or your clients’ needs. Moreover, this will also make your mobile dApp unique. Fortunately, the Ethereum iOS dev kit provides you with all of the tools to take your dApp to the next level without breaking a sweat. For one, you can use the components that the Ethereum mobile boilerplate provides anywhere in your application. You can take things even further by using the hooks from Moralis. To use the latter in the best way possible, make sure to rely on Moralis’ documentation

You can view the core code behind your mobile dApp in the “App.jsx” file (as shown in the image above). This is where Moralis experts have ensured that you get the proper navigation and can take advantage of all of the functionalities as previously presented. Moreover, do not forget to explore additional options that Moralis has to offer. These include smart contract events, creating live queries, triggers, address casing, and much more. 

For a video walkthrough, look over a Moralis expert’s shoulder as he takes on the tasks we’ve covered above:

Ethereum iOS Dev Kit – Guide to Creating Native Mobile dApps – Summary

We hope that you’ve taken action and completed the steps as instructed throughout the article. If so, you now have a fully functional mobile dApp available. Moreover, you also know how to make the most out of the best Ethereum iOS dev kit. It takes just 15 minutes to clone the Ethereum mobile boilerplate, set up your server, and run your boilerplate dApp. Of course, to make your mobile dApp unique, you’ll want to play around with the components and hooks. 

Furthermore, the Ethereum mobile boilerplate, combined with Moralis, is the best Ethereum iOS dev kit currently available. Aside from offering the fastest way to deploy iOS dApps, it also offers full support for Android. Thus, it makes the development of Ethereum mobile applications frictionless regardless of the OS platform. Moreover, Moralis’ cross-chain interoperability further expands the range of possibilities and also prepares you for the future. Whichever chain becomes the most popular choice for mobile dApps, this Ethereum iOS dev kit means you’ll be ready.

If you want to learn more about Web3 development, check out the Moralis YouTube channel and the Moralis blog. Both outlets deliver fresh and empowering content daily. Some of the latest topics show you how to create a Reddit clone for Web3, how to send Ethereum transactions with one line of code, how to lazy mint NFTs, how to create an Ethereum dApp instantly, and how to generate thousands of NFTs

November 28, 2021
Moralis Blog
Moralis Blog
Become a Moralis Mage
Get the latest information about Moralis Web3 in your email
Search
Generic filters
Related Articles
Become a Web3 Expert
Subscribe to our newsletter and get our E-book Web3 Speed run for FREE