# Samples

Examples and references that can help you build your mobile application on top of the VGS Collect iOS SDK.

<figure><img src="https://2096104711-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUreALQAfVnRMQEz110rC%2Fuploads%2Fgit-blob-79a03fc72af9eea8d3b4e5643eeec1c7ed9610f4%2Fvgs-collect-ios-samples.svg?alt=media" alt=""><figcaption></figcaption></figure>

## Demo Applications

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th align="center"></th></tr></thead><tbody><tr><td><h4>Demo application</h4></td><td>Demo Application contains the most popular use-cases to configure VGSCollectSDK fields and collect various types of data.</td><td align="center"><a href="https://github.com/verygoodsecurity/vgs-collect-ios/tree/master/demoapp">Open demo</a></td></tr><tr><td><h4>Very Spacy Food</h4></td><td>Showcase Application with full payment flow, from collecting card details with VGSCollectSDK to making payments with third-party providers.</td><td align="center"><a href="https://github.com/vgs-samples/very-spacy-food-ios">Open App</a></td></tr></tbody></table>

## Use Cases

* [Collect Payment Card Details with Card Scanner](https://github.com/verygoodsecurity/vgs-collect-ios/blob/master/demoapp/demoapp/UseCases/CardsDataCollectingViewController.swift)
* [Tokenize Card Details with Vault API v2](https://github.com/verygoodsecurity/vgs-collect-ios/blob/master/demoapp/demoapp/UseCases/CreateCardAliasesViewController.swift)
* [Tokenize Card Details with Vault API v1](https://github.com/verygoodsecurity/vgs-collect-ios/blob/master/demoapp/demoapp/UseCases/CardsDataTokenizationViewController.swift)
* [Customize and Add Supported Payment Card Brands](https://github.com/verygoodsecurity/vgs-collect-ios/blob/master/demoapp/demoapp/UseCases/CustomPaymentCardsViewController.swift)
* [Collect US Social Security Numbers](https://github.com/verygoodsecurity/vgs-collect-ios/blob/master/demoapp/demoapp/UseCases/SSNCollectingViewController.swift)
* [Collect Any Data with custom Validation Rules](https://github.com/verygoodsecurity/vgs-collect-ios/blob/master/demoapp/demoapp/UseCases/CustomDataCollectingViewController.swift)
* [Collect ApplePay Data](https://github.com/verygoodsecurity/vgs-collect-ios/blob/master/demoapp/demoapp/UseCases/CollectApplePayDataViewController.swift)
* [Collect Files](https://github.com/verygoodsecurity/vgs-collect-ios/blob/master/demoapp/demoapp/UseCases/FilePickerViewController.swift)

## SwiftUI

VGS Collect SDK provides  a SwiftUI wrapper around `VGSTextField` and have similar attributes and functionality represented in a SwiftUI way.

* [Collect Card Data in SwiftUI](https://github.com/verygoodsecurity/vgs-collect-ios/blob/master/demoapp/demoapp/UseCases/SwiftUI/CardDataCollectionSwiftUI.swift)
