Integrating the iOS SDK
Make it easy for iOS users to buy from your business by enabling customers that use iOS devices to make in-app payments conveniently and effortlessly -- including checking out with Apple Pay. You can do so rapidly by integrating the Amazon Payment Services iOS SDK into your iOS app.
This page will help you understand how the Amazon Payment Services mobile SDK for iOS works, and explains how you can use our iOS SDK to offer a safe and trusted in-app payment experience for your iOS mobile app.
As an alternative you may want to consider custom-coding your in-app payment processing by making direct use of our APIs, you can read more about custom coding in-app payments here.
iOS SDK support
The Amazon Payment Services iOS SDK is supported on devices running iOS 8 and above. We support both English and Arabic in our iOS SDK, but note that there is no support for landscape orientation: our SDK only supports the portrait orientation.
👆 Note that the iOS mobile SDK does not offer the same range of payment options as our web-based integration routes. This version of the iOS mobile SDK can only process payments made with an ordinary debit or credit card. The supported card payment options are Visa, Mastercard, American Express, Mada, and Meeza.
Setting up your iOS project
You need an OS X-based computer (Mac) to complete these steps. You can choose to code in either Objective-C or in Swift. Swift is the latest programming environment from Apple.
To get started you need to download the iOS SDK and extract it. We provide a step by step guide to adding our SDK to the Project Navigator in the API reference page for the iOS SDK. Note that the integration steps for Objective-C and Swift are slightly different.
Hiding the Amazon Payment Services loading prompt
You have the option to hide the "loading" prompt while the Amazon Payment Services SDK is initializing the connection request. You can disable the loading prompt by setting the HideLoading option to yes (or true) as shown in the sample code. If you are using Objective-C then you have to set it to yes, if you are using Swift you have to set it to true. Please refer to below code.
Custom design for the in-app payment view
The payment view is what your customers see when they attempt to make a payment in your merchant app on their mobile device. The payment view is there to help your customer complete an in-app payment.
You can create your own custom UI theme for the in-app payment view by doing the following:
-
Create a nibFile .xib and set the name of Arabic xib to match the name of the English xib, with suffix -ar.
-
Link the xib with PayFortView and bind all the IBOutlets in interface section as shown in the code example below.
Go to the full API reference
This page is intended to help you understand how the iOS SDK works. Developers should review the full API reference for complete instructions on how to implement our iOS SDK, including a full list of parameters and iOS-specific instructions.
Need further help?
If you get stuck feel free to get in touch with the Amazon Payment Services team. Just message our support team at merchantsupport-ps@amazon.com.