Skip to content

FNCYchain/fncy-wallet-ios-sdk

Repository files navigation

Fncy Wallet SDK for iOS

Version Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Dependencies

Requirements

  • Swift 5
  • iOS 14

Installation

Podfile

#Podfile 
use_frameworks!

platform :ios, '14.0'

target 'YOUR_TARGET_NAME' do
    pod 'FncyWallet'
end

Replace YOUR_TARGET_NAME and then, in the Podfile directory, type:

$ pod install

Package.swift

let package = Package(
  name: "MyPackage",
  dependencies: [
    .package(url: "https://github.com/FNCYchain/fncy-wallet-ios-sdk.git", Version(0,1,0)..<Version(1,0,0))
  ],
  targets: [
    .target(name: "MyTarget", dependencies: ["FncyWallet"])
  ]
)

Getting Started

initialize Fncy Wallet SDK

import FncyWallet

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        
        FncyWalletSDK.initSDK(environment: .testnet)
        
        return true
    }

Get Wallet Address

In the imports section:

import FncyWallet
let authToken = "authorizationToken"
let fncyWallet = FncyWalletCore(authToken: authToken)
    
let walletData = try await fncyWallet.getWallet()
    
print(walletData.walletAddress)  

Documentation

Author

Metaverse World, Inc

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published