To run the example project, clone the repo, and run pod install
from the Example directory first.
- Swift 5
- iOS 14
#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
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"])
]
)
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
}
In the imports section:
import FncyWallet
let authToken = "authorizationToken"
let fncyWallet = FncyWalletCore(authToken: authToken)
let walletData = try await fncyWallet.getWallet()
print(walletData.walletAddress)
Metaverse World, Inc