iOS Buy SDK
The iOS Buy SDK makes it easy to create custom storefronts in your mobile app, where customers can buy products using Apple Pay or a credit card. The SDK connects to the Shopify platform using GraphQL, and supports a wide range of native storefront experiences.
Requirements
Anchor link to section titled "Requirements"Before you can use the iOS Buy SDK, you'll need the following:
- iOS 10.0 or higher
- Xcode 8.0 or higher
- An Apple developer account
Step 1: Generate an access token
Anchor link to section titled "Step 1: Generate an access token"To generate an access token, you can generate one in the Shopify admin. Alternatively, you can create a custom app and use authorization code grant.
Step 2: Make your products and collections available
Anchor link to section titled "Step 2: Make your products and collections available"After you've generated an access token, you need to make products and collections available to your custom app to access them from your app. After the products and collections are available, you can retrieve them using their respective IDs.
Make a product available
Anchor link to section titled "Make a product available"- From your Shopify admin, go to Products.
- From the Products page, click the product you want to make available.
- Next to SALES CHANNELS AND APPS click Manage.
- In the Sales channels and apps dialog box, select the box next to the name of your custom app.
Make a collection available
Anchor link to section titled "Make a collection available"- From your Shopify admin, go to Products and click Collections.
- From the Collections page, click the collection you want to make available.
- Next to SALES CHANNELS AND APPS click Manage.
- In the Sales channels and apps dialog box, select the box next to the name of your custom app.
Step 3: Configure your app
Anchor link to section titled "Step 3: Configure your app"You can configure your mobile app to use Apple Pay and universal links in the Shopify admin.
Enable Apple Pay
Anchor link to section titled "Enable Apple Pay"From your Shopify admin, go to Apps.
Click Develop apps.
Click the name of your app.
Click Capabilities.
In the Storefront API integration section, click Configure.
- If you've previously assigned any Storefront API scopes, then click Edit.
Expand the iOS Buy SDK configuration section.
Click Download file to get the Shopify certificate signing request.
Generate your Apple Pay merchant identity certificate on your Apple Developer account. Refer to Apple's certificates documentation for detailed instructions.
Click Upload certificate.
Click Choose file, then select the Apple Pay merchant identity certificate that you downloaded.
Click Save to upload the certificate.
Set up universal links
Anchor link to section titled "Set up universal links"You can set up universal links to integrate your app with Safari. When an iOS user taps a link to your website, they'll be redirected to your app if they have it installed.
From your Shopify admin, go to Apps.
Click Develop apps.
Click the name of your app.
Click API Integrations.
In the Storefront API integration section, click Configure.
Expand the iOS Buy SDK configuration section.
Enter your Apple App ID.
Select Use iOS universal links.
Step 4: Access the iOS Buy SDK
Anchor link to section titled "Step 4: Access the iOS Buy SDK"The Mobile Buy SDK includes the iOS Buy SDK and sample apps that show how you can use the SDK.
Checkout on mobile
Anchor link to section titled "Checkout on mobile"You can use Shopify’s web checkout for your mobile app.
Using Shopify’s web checkout makes sure that your customers always have access to the latest version of the checkout, which is optimized for speed, conversion, and customer experience.
Where to get help
Anchor link to section titled "Where to get help"Mobile app development falls outside the scope of our support service. This means that Shopify support can't help if you run into problems, unless they're specifically related to the iOS Buy SDK itself. Below are the ways you can get help with the iOS Buy SDK.
Find a Shopify Partner for hire in our ecosystem of talented development agencies.
Visit the developer forums to connect with the community and learn more about the Shopify API and app development.
Open an issue in the GitHub repository.