Fill your app with expert sign and share the order amount.
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate ArtSignProSdk into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
pod 'ArtSignProSdk'
end
Then, run the following command:
$ pod install
please connect our business
for exmple:
BusinessName >> Beijing QiCode Technology Co., Ltd.
AppIdentify >> com.qicode.ArtSignProSdkDemo
AppVersion >> 1.0.0
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string></string>
<key>CFBundleURLSchemes</key>
<array>
<string>your app name</string>
</array>
</dict>
</array>
please replace with Your App Name
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
<string>wechat</string>
<string>alipay</string>
<string>alipays<string>
<string>mqq<string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
import ArtSignProSdk
public func application(_ application: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any]) -> Bool{
···
return ArtSignProSdk.handleOpen(url: url)
}
public func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
···
return ArtSignProSdk.handleOpen(url: url)
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
···
ArtSignProSdk.initArtSignPro(key: "key_XXX", secret: "secret_XXX", scheme:"your scheme")
ArtSignProSdk.setEnvironment(environment: .Test)
···
}
- the key and secret in Prepare
- the scheme is your app name , when complete perchase , return to your app
- the key and secret will be different in Test and Production environment
- in Test environment the perchase is free
- in Production environment the perchase will be REAL
import ArtSignProSdk
import ArtSignProSdk
implement ArtSignProSdkDelegate
class ViewController: UIViewController, ArtSignProSdkDelegate {
var isShowSdk:Bool = false
func isShowSdk(show:Bool){
isShowSdk = show
}
···
}
when some event happend eg:click,to show expert sign list or not
@IBAction func onClick(_ sender: UIButton) {
if isShowSdk {
performSegue(withIdentifier: "ShowExpertSignList", sender: self)
}else{
print("set pay method for this production before show expert sign list")
}
}
please show ExpertSignListViewController with
StoryBoard >> ArtSignPro
Referenced ID >> ExpertSignListViewController
Bundle >> org.cocoapods.ArtSignProSdk