---
# System prepended metadata

title: Streamlining Web3 Integration for Mobile Applications

---

---
title: Streamlining Web3 Integration for Mobile Applications
---

## Streamlining Web3 Integration for Mobile Applications

Polywrap DAO recently completed a prototype of the Swift client.  This client will make web3 iOS mobile development more efficient, accessible, and versatile.

![](https://hackmd.io/_uploads/rkXW59I4h.png =400x)
Polywrap clients gives applications access to *all* wraps written in any language.  We began with the JavaScript client which lets polywrap-enabled web applications to use wraps.  Once the Swift client is released, web3  developers will be able to effectively integrate web3 protocols into iOS mobile applications.

All clients use a GraphQL-esque query language to communicate with wraps.  As a quick example, below is the code for fetching a wrap and executing its methods using the Swift client library.

```swift=
// Swift Application

public func getSafeAddress(
    _ args: ArgsGetSafeAddress,
    _ client: PolywrapClient
) -> String {
    return client.invoke(
        uri: SAFE_FACTORY_URI,
        method: "predictSafeAddress",
        args: args.input,
        env: nil
    )
}

```

While the Swift client is still a prototype, it marks an important milestone in demonstrating the capability of Polywrap to bring web3 beyond the web browser and into mobile.

## Bringing Ethers to all Platforms

![](https://hackmd.io/_uploads/B1SCljUE3.png)


The new **Ethers wrap** brings the functionality of the Ethers.js library to all platforms.  Ethers is a popular and powerful library for interacting with the Ethereum Blockchain and its ecosystem.


## Demo – Safe Wrap in MetaMask iOS Mobile
We recently demoed Polywrap technology on mobile for the first time at the Safe Account Abstraction hackathon.  The demo makes use of the Swift client, Ethers wrap, and Safe wrap.

A video of the demo application can be found [here](https://www.youtube.com/watch?v=LI3pFhkFH4E).

The Safe wrap is an SDK that enables dApps to interact with the Safe smart contract from a variety of execution environments.  It includes the same functionality as the current Safe JavaScript SDK (but with all the benefits of Polywrap).  This means developers can use the wrap to deploy a new safe, perform off-chain signatures, and execute transactions.

In the demo, Cesar Brazon, a Polywrap engineer contributor, shows an iOS application with the new Polywrap Swift client library installed into MetaMask mobile.  The Swift client fetches the Safe wrap from decentralized storage to create a new Safe wallet for the user inside MetaMask.

The magic of Polywrap technology is that this exact same Safe wrap can be used in iOS apps, or Android, or web browser, or any environment, and it'd function the same way in any of these platforms!


## Resources

- [Safe Wrap Source Code](https://github.com/polywrap/safe-contracts-wrapper)
- [MetaMask Account Abstraction Demo](https://www.youtube.com/watch?v=LI3pFhkFH4E)