Skip to content

iException/BXAlipaySDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BXAlipaySDK

Version License Platform

The official Alipay SDK for iOS apps to access Alipay platform. This is a mirror repository maintained by iOS developers from Baixing.

Requirements

  • Xcode 7+
  • ARC

Installation

BXAlipaySDK is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "BXAlipaySDK"

iOS 9+

Add the following lines to your project's info.plist file so that your app would be allowed to open Alipay.app.

<key>LSApplicationQueriesSchemes</key>
<array>
  <string>alipay</string>
  <string>alipayshare</string>
</array>

Also, add Alipay domains to your app's whitelist.

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>alipay.com</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSTemporaryExceptionMinimumTLSVersion</key>
            <string>TLSv1.0</string>
            <key>NSTemporaryExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
        <key>alipayobjects.com</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSTemporaryExceptionMinimumTLSVersion</key>
            <string>TLSv1.0</string>
            <key>NSTemporaryExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
    </dict>
</dict>

Or if security is not an issue to your app, use the following lines.

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>