Nativeblocks Foundation
This document provides an overview of the Nativeblocks Foundation blocks and utilities. These blocks are fundamental components that allow developers to build rich and customizable user interfaces in SwiftUI. Additionally, utility functions and extensions are provided to enhance development workflows.
All the blocks described below are basic blocks provided in Nativeblocks Studio, making them readily available for use in projects.
Getting Started
To integrate NativeblocksFoundation into your project, add it via Swift Package Manager (SPM):
-
Add the library to your Package.swift file:
dependencies: [ .package( url: "https://github.com/nativeblocks/nativeblocks-foundation-ios.git", .upToNextMajor(from: "1.0.0") ), ],
-
Import the library in your Swift file:
import NativeblocksFoundation
-
Provide nativeblocks foundation blocks :
NativeblocksFoundationBlockProvider.provideBlocks()
-
Start using the blocks provided by NativeblocksFoundation to create dynamic, server-driven UIs.
Sample App Example
Here is an example of a basic app using NativeblocksFoundation:
import Nativeblocks
import NativeblocksFoundation
NativeblocksManager.initialize()
// ADD This line of codes
NativeblocksFoundationBlockProvider.provideBlocks()