Set up
Before starting, make sure you follow the Get started guide, where you'll find what's needed for integration.
Installing the Weavr Push Provisioning SDK
Swift Package Manager
To install the Weavr Push Provisioning iOS SDK using Swift Package Manager (SPM) you will need to:
- Open your Xcode project.
- Navigate to File > Add Packages...
- In the search bar, enter the following URL, replacing
<TOKEN>
with the token we provided youhttps://<TOKEN>@github.com/weavr-io/push-provisioning-ios
- Select the version you wish to use. Weavr adheres to Semantic versioning and so recommends using the
Up to next major version
dependency rule. - Click Add Package to integrate the SDK into your project, and select the target where you want to add the SDK.
CocoaPods
CocoaPods is currently being sunset. We are currently providing support, but are planning to drop it in the future, so we encourage you to switch to Swift Package Manager instead.
To install the SDK via CocoaPods you'll need to update your Podfile
to include a specific source
as well as adding a dependency to our private repository:
...
source 'https://gitlab.com/phyreapp/ios-specs.git'
target 'MyApp' do
...
# Replace the x.y.z tag with the relevant version. See Release notes for the latest version.
pod 'WeavrPushProvisioning', :git => 'https://github.com/weavr-io/push-provisioning-ios', :tag => 'x.y.z'
end
Configuring the SDK
You will need to provide a configuration file for the correct functioning of the SDK.
To do so, add the mea_config
file to all iOS bundles that will interact with the SDK. e.g., it can be located in an assets folder, and added to your app's and extension targets.
Get in touch with our support team at support@weavr.io to obtain this file.
This file is sensitive, make sure you store and distribute it in a secure manner.
It's recommended to not commit this file to your repository, and distribute it via a secure file sharing software amongst your team.
Finally, use the secrets feature of your CI software to avoid failing jobs.
Setting up your App's entitlements
Finally, you need to edit your app's entitlement to support the capabilities required to provision cards.
To do so, select your project file, then your app's target, then the Signing & Capabilities
tab.
Once you have opened tis tab, make sure you have the following capabilities:
In-App Provisioning
so that you can provision cards from your app.Wallet
, selectingAllow all team pass types
so you can check the status of cards from your app.App Groups
, specifying at least one group. This is required so that the token and card data can be stored in a shared location, that your app and your Wallet Extensions can all access.
Finally, you'll need to ensure that the provisioning profiles used to sign the app grant the required entitlements.