### Sample App using NativeblocksFoundation Source: https://github.com/nativeblocks/nativeblocks-foundation-ios/blob/main/README.md A complete example of a SwiftUI application demonstrating the integration of NativeblocksFoundation, including initialization of NativeblocksManager and rendering a NativeblocksFrame. ```swift import Nativeblocks import NativeblocksFoundation import SwiftUI @main struct SampleApp: App { @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate let NATIVEBLOCKS_API_ENDPOINT = "https://api.nativeblocks.io/graphql" let NATIVEBLOCKS_API_KEY = "" init() { NativeblocksManager.initialize( edition: .cloud( endpoint: NATIVEBLOCKS_API_ENDPOINT, apiKey: NATIVEBLOCKS_API_KEY, developmentMode: true ) ) NativeblocksFoundationProvider.provide() // add foundation provider } var body: some Scene { WindowGroup { NativeblocksFrame( route: "/", routeArguments: [:], loading: { AnyView(NativeblocksLoading()) }, error: { message in AnyView(NativeblocksError(message: message)) } ) } } } class AppDelegate: NSObject, UIApplicationDelegate { func applicationWillTerminate(_ application: UIApplication) { NativeblocksManager.getInstance().destroy() } } ``` -------------------------------- ### Import and Initialize NativeblocksFoundation Source: https://github.com/nativeblocks/nativeblocks-foundation-ios/blob/main/README.md Demonstrates how to import the NativeblocksFoundation library and call the `provide()` method to set up the foundation for server-driven UIs. ```swift import NativeblocksFoundation NativeblocksFoundationProvider.provide() ``` -------------------------------- ### Add NativeblocksFoundation via SPM Source: https://github.com/nativeblocks/nativeblocks-foundation-ios/blob/main/README.md Instructions on how to add the NativeblocksFoundation library to your project using Swift Package Manager (SPM) by specifying the repository URL and version. ```swift dependencies: [ .package(url: "https://github.com/nativeblocks/nativeblocks-foundation-ios.git", .upToNextMajor(from: "1.2.0")), ] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.