FNCY Chain
FNCY 2.0.2 (ENG)
FNCY 2.0.2 (ENG)
  • Introduction
  • Getting Started
  • Design
    • Structure
    • Three Main Sets of Participants
    • PoSA Consensus
    • Governance
    • Staking
    • Mining Reward
    • Gas Fee
    • Runtime Upgrade
    • Cross-Chain Bridge
    • Security
  • Build On FNCY Chain
    • RPC Endpoints
    • Testnet Faucet
    • Block Explorer
      • Token Listing
    • BEP20 Token
    • NFT
    • Validator Requirements
    • NFT Market
      • FNCY Marketplace
  • For Developers
    • JSON-RPC
    • FNCY Chain API
      • Wallet API
      • Transaction API
      • Blockchain API
    • Wallet
      • FNCY Wallet
      • Use MetaMask for FNCY Chain
      • SDK
        • Android
          • Install
          • Guide
            • Initialize
            • Create/Restore Wallet
            • Wallet Search
            • Execute SendCoin/Contract
            • Transaction Search
            • Other Features
          • Methods
          • Domain
          • ETC
        • iOS
          • Install
          • Guide
            • Initialize
            • Create/Restore Wallet
            • Wallet Search
            • Execute SendCoin/Contract
            • Transaction Search
            • Other Features
          • Methods
          • Domain
          • ETC
    • Smart Contract
      • Deployment
        • Truffle
        • Hardhat
        • Remix IDE
      • Verify Your Contract on FncyScan
    • Gasless Transaction
    • with FNCY
      • FNCY Login
      • GAME AUTH Login
  • Tokenomics
  • Ecosystem Partner
  • FNCY Governance Partner
Powered by GitBook
On this page
  • Obtaining Fncy AuthToken
  • Declaring Initialization in the AppDelegate
  • Create FncyWalletCore Object
  1. For Developers
  2. Wallet
  3. SDK
  4. iOS
  5. Guide

Initialize

This document describes the initialization steps for using the iOS SDK in your project.

PreviousGuideNextCreate/Restore Wallet

Obtaining Fncy AuthToken

  • Link for instructions on how to get your .

Declaring Initialization in the AppDelegate

To use the FncyWalletSDK in your project, select your development environment and call initSDK.

The environment can be either testnet or mainnet.

  • Testnet : .testnet

  • Mainnet : .mainnet

import FncyWallet

class AppDelegate: UIResponder, UIApplicationDelegate {
    
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    
        ...
        // FncyWalletSDK initialize
        FncyWalletSDK.initSDK(environment: .testnet) // .testnet or .mainnet
        
        return true
    }
    ...
}

Create FncyWalletCore Object

After iOS SDK initialization, an instance of FncyWalletCore object with the authentication token as a parameter is required to communicate with the wallet server.

import UIKit
import FncyWallet

class ViewController : UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        //Creates an FncyWalletCore object to communicate with the wallet server with the authentication token as a parameter.
        let fncyWallet = FncyWalletCore(authToken: authToken)
        
        
    }
}

AuthToken