VGS Collect - is a product suite that allows customers to collect information securely without possession of it. VGSCollect iOS SDK allows you to securely collect data from your users via forms without having to have that data pass through your systems. The form fields behave like traditional input fields while securing access to the unsecured data.
You should have your organization registered at VGS Dashboard. Sandbox vault will be pre-created for you. You should use your <vaultId>
to start collecting data. Follow integration guide below.
CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate VGSCollectSDK into your Xcode project using CocoaPods, specify it in your Podfile
:
pod 'VGSCollectSDK'
VGCollectSDK is also available through Carthage.
Add the following line to your Cartfile
:
github "verygoodsecurity/vgs-collect-ios"
then run:
carthage update --platform iOS
If you don't need additional features like card scanning, you should add into your project only VGSCollectSDK
. Other submodules can safely be deleted from Carthage Build folder.
Check VGSCollecSDK submodules and required frameworks:
Build Frameworks | Core SDK | CardIO | Card Scan |
---|---|---|---|
VGSCollectSDK | ✔ | ✔ | ✔ |
CardIO | ✔ | ||
VGSCardIOCollector | ✔ | ||
CardScan | ✔ | ||
VGSCardScanCollector | ✔ |
Don't forget to import VGSCardIOCollector
or VGSCardScanCollector
in files where you use scan modules.
NOTE: At this time Carthage does not provide a way to build only specific repository submodules. All submodules and their dependencies will be built by default. However you can include into your project only submodules that you need.
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler.
Xcode with Swift tools version of 5.3 is required for VGSCollectSDK. Earlier Xcode versions don't support Swift packages with resources.
To check your current Swift tools version run in your terminal:
xcrun swift -version
NOTE: In some cases you can have multiple Swift tools versions installed.
Once you have your Swift package set up, add VGSCollectSDK dependency.
dependencies: [
.package(url: "https://github.com/verygoodsecurity/vgs-collect-ios", .upToNextMajor(from: "1.7.0"))
]
NOTE: At this time we support Swift Package Manager only for core
VGSCollectSDK
module. If you need to integrate Card Scanning solutions you should use other integration method. We will extend support of 3d party Card Scanning SDKs after they will become available to integrate via Swift Package Manager.
import VGSCollectSDK
Use your <vaultId>
to initialize VGSCollect instance. You can get it in your organisation dashboard.
VGSCardTextField automatically detects card provider and display card brand icon in the input field.
VGS Collect SDK provides several card scan solutions for the Payment Card Industry to help protect your businesses and the sensitive information of your consumers. It's required to use only Scan modules provided by VGS, which are audited by VGS PCI requirements.
Add 'VGSCollectSDK' alongside with one of scan modules pod:
pod 'VGSCollectSDK'
# Add CardIO module to use Card.io as scan provider
pod 'VGSCollectSDK/CardIO'
# Add CardScan module to use CardScan(Bouncer) as scan provider
pod 'VGSCollectSDK/CardScan'
Carthage users should point to VGSCollectSDK
repository and use next generated framework:
- To use Card.io:
VGSCollectSDK
,VGSCardIOCollector
, andCardIO
. In your file addimport VGSCardIOCollector
. - To use Card Scan:
VGSCollectSDK
,VGSCardScanCollector
, andCardScan
. In your file addimport VGSCardScanCollector
.
Other submodules can safely be deleted from Carthage Build folder.
NOTE: At this time, Carthage does not provide a way to build only specific repository submodules. All submodules and their dependencies will be built by default. However you can include into your project only submodules that you need.
Handle VGSCardIOScanControllerDelegate
functions. To setup scanned data into specific VGSTextField implement textFieldForScannedData:
. If scanned data is valid it will be set in your VGSTextField automatically after user confirmation. Check CradIODataType
to get available scand data types.
Don't forget to add NSCameraUsageDescription key and description into your App Info.plist
.
You can add a file uploading functionality to your application with VGSFilePickerController.
Use vgsCollect.cleanFiles() to unassign file from associated VGSCollect instance whenever you need.
Demo application for collecting card data on iOS is here.
- SDK Documentation: https://www.verygoodsecurity.com/docs/vgs-collect/ios-sdk
- API Documentation: https://verygoodsecurity.github.io/vgs-collect-ios/
To follow VGSCollectSDK
updates and changes check the releases page.
VGSCollectSDK tracks a few key metrics to understand SDK features usage, which helps us know what areas need improvement. No personal information is tracked.
You can easily opt-out of metrics collection in VGSAnalyticsClient
:
VGSAnalyticsClient.shared.shouldCollectAnalytics = false
- iOS 10+
- Swift 5
- Optional 3rd party libraries:
VGSCollect iOS SDK is released under the MIT license. See LICENSE for details.