Version: 3.0.0
Installation
This guide will walk you through a straightforward solution to accept payments within your iOS application. The iOS SDK is a small framework built with SwiftUI that allows you to quickly and safely integrate Moyasar payments within your SwiftUI or UIKit apps.
Installing CocoaPods
Before you can add the library to your project, you need to install CocoaPods on your macOS using the following command:
- Homebrew
- RubyGems
brew install cocoapods
gem install cocoapods
Add the Dependency
If you haven't already added CocoaPods to your project, initialize it with:
pod init
Now add the following pod to your Podfile
:
pod 'MoyasarSdk', git: 'https://github.com/moyasar/moyasar-ios-pod.git'
info
Make sure to add use_frameworks!
.
Installing via Swift Package Manager
Starting from version v1.0.5, the Moyasar iOS SDK supports Swift Package Manager (SPM). To add the SDK to your project using SPM :
- Open your project in Xcode.
- Navigate to File > Add Packages....
- Enter the Moyasar iOS SDK repository URL:
https://github.com/moyasar/moyasar-ios-pod.git
- Add the package to your project.