Want to convert your design in Figma to SwiftUI code, but don't have an idea how to do it efficiently? If so, you are at the right place. In this tutorial, you will learn how to transform your design in Figma to Swift code through a step-by-step guide with DhiWise iOS App Builder.
Transforming a design to code has never been so easy before the introduction of DhiWise. It helps you to convert your beautiful design to a production-ready application within a few clicks. Moreover, it provides complete flexibility in code customization and lets you generate your app code with high accuracy.
Sounds amazing, right? 🤩
If you are solely an iOS developer then DhiWise’s iOS App Builder is what you really need to get your app faster to the market. Besides that, it adds the extra benefits of native app development such as better performance, security, scalability, and code accessibility.
So, let’s dive deeper into the amazing platform, and explore how to transform Figma to SwiftUI/iOS code with DhiWise iOS App Builder.
Well, before that first have a quick overview of DhiWise and its top features.
DhiWise is a multi-technology-based web and mobile app development platform that aims to eliminate repetitive tasks in software app development by leveraging the power of automation. It empowers developers to deliver high-quality, scalable, maintainable, and customizable apps faster to the market.
Here are a few feature highlights of DhiWise app development platform.
Overall, the platform makes software development error-free, cost-effective, and highly efficient.
Bringing your design ideas to life with coding all from scratch can be time consuming and requires much effort but iOS App Builder helps you to eliminate the major hurdles in mobile app development.
It provides you with everything to build a successful app for an Apple ecosystem. Follow the steps below to convert your design from Figma to SwiftUI.
Sign up to DhiWise with your Google, GitHub, or Discord account.
To create an iOS application navigate to the platform “Dashboard”, select technology as “mobile”, click “New application”, then select “Create a new app”.
DhiWise iOS Builder- Dashboard
In the “Create a new app” window you need to add the Application Name, Technology as iOS, Design platform as Figma, Figma account details, and the Figma URL.
Enter the required information to create an iOS app
Note: For now, DhiWise only supports Figma designs. For the designs in Adobe XD, and Sketch, you need to send a request to migrate them, and DhiWise shall be handling the same within 24 to 48 hours.
After entering the required information which is the design platform, Figma account details, and the Figma URL, click “Create a new app”. Then the new pop-up window will appear where you can select the app screens/pages from the Figma design you have selected.
Select app screen/screens
Here, you need to select the screens you want to import into the platform. After selecting the screens click “Submit”. Now, the platform will start to fetch the screen designs from Figma as shown in the snippet below.
Platform fetching screen design from Figma
Developers can either opt to “Wait and setup config” or proceed directly to the “Screen list”. Nonetheless, it's also possible to perform the configuration setup from the “Setting screen”.
Selecting the “Wait and set up config” option will take you back to the “Fetch design data screen”, click “Next” to set the configuration.
DhiWise iOS builder allows you to select UI code (If you only want responsive UI using SwiftUI) or complete code with MVVM Architecture, responsive UI using SwiftUI, ViewModel code, and other integrations when you build the app.
In addition, the iOS app builder offers seamless integration with GitHub and GitLab. This enables you to push your app code automatically and create a pull request in your repository every time you commit new changes.
Next, you can move to the screen list from here.
Auto-identified UI components
In the above snap, you can view how DhiWise iOS Builder has the capability to automatically identify UI components, auto-setup actions, and validations.
Once the components are identified you can proceed to the setup splash screen and screen next to the splash screen as shown below.
Set up screen next to splash screen
In the below snippet you can see all the selected screens from the Figma design. To start customizing each of them, just select the screen and click “Configure.” Moreover, you can search for the desired screen, edit the screen name, view the screen, and more.
DhiWise iOS Builder allows you to customize UI through its visual builder, you can change view set actions, integrate API, and more.
Customize screen UI- Change view and setup actions
The UI builder also provides a conditional workflow builder so you can ensure one screen leads to the specific window, login screen, or anything else.
Set up conditional workflow
With the Integrate API functionality, you can set up a connection with the server and add, view, edit, and delete APIs.
For adding a new API you can either upload a Postman file from the existing Postman collection or create and add API manually with a DhiWise API runner.
Note: The platform uses Alamofire library to handle the web request and responses in iOS and macOS.
The one more thing DhiWise simplifies is adding constants to your code. It allows you to create and manage multiple constant files in the app.
After completing your UI customization tasks, which may involve adding actions, setting up APIs, and other necessary adjustments, you can proceed to generate the app code.
With DhiWise iOS builder, you have the option of generating code for individual screens or multiple screens or generating app code directly with the “Build app” option.
Export screen code or Build app
Once you click “Build app” you will be asked to select the build type as shown below. Here, let’s select the Only UI Code as desired build type to proceed and build the app.
As you select the build type you can see how DhiWise iOS builder starts building your iOS app.
Building an iOS app
The platform generates clean code with reusable code components. As your final code is generated you can download the entire source code from the platform or sync it with your GitHub or GitLab Repository.
Download the source code
Sync code with GitHub or GitLab
Even after generating the source code, you can still make the app changes using the iOS App Builder or another IDE. The platform gives you complete code ownership, so you can download the code and update the same on your favorite IDE.
Have a look at this sample code generated with DhiWise iOS app builder.
👉 Check out our Youtube videos to know more about the Figma to Swift code feature in DhiWise’s iOS builder: A complete playlist of DhiWise iOS Builder.
The tutorial provides a step-by-step guide on converting Figma to SwiftUI/iOS code using DhiWise iOS App Builder. With the platform, you need to follow a few steps to generate the final UI code from Figma Design, ultimately speeding up your app development process.
Furthermore, the platform goes above and beyond by offering a Flutter builder, capable of transforming Figma designs into Flutter code effortlessly.
And for developers who want to start right at the code level, the ProCode platform offers the Figma to Code plugin that lets them get the code from the Figma platform. The plugin can also convert Figma design to Flutter, Android, and React code.
Yes, you get that right!
Where most other No-Code and Low-Code development platforms are restricted to only front-end development, DhiWise- A ProCode platform goes one step further.
It offers support for the most popular backend technology- Node.js with a choice of databases that is PostGRE, MySQL, MongoDB, and standard SQL servers. So you can build the entire iOS app using the same platform.
Sign up for free to experience the bliss of efficient, cleaner, and effortless app development.