VenueNext iOS SDK Migrating Versions

< 1.2.1

  • No breaking changes if upgrading from v1.1.3 or higher.

< 1.2.0

  • No breaking changes if upgrading from v1.1.3

< 1.1.3

  • Compiled with Swift 5.2.2 and compatible with Xcode 11.4+

< 1.1.2

  • No breaking changes if upgrading from v1.1.0 or higher

< 1.1.1

  • No breaking changes if upgrading from v1.1.0

< 1.1.0

  • All frameworks have changed from VN<name> to VenueNext<name> to fix an Apple bug related to library evolution. Please change all imports to VenueNext<name>
  • Analytics has been renamed VNAnalytics

< 1.0.1

  • New forceReset parameter in the JWT initializers that can force the resetting of CoreData, UserDefaults and Keychain. Please use carefully.
    @objc public func initialize(sdkKey: String, sdkSecret: String, jwt value: String, configURL: URL, forceReset: Bool = false, completion: @escaping ((Bool, Error?) -> Void))
    
@objc public func initialize(sdkKey: String, sdkSecret: String, jwt value: String, configData: Data, forceReset: Bool = false, completion: @escaping ((Bool, Error?) -> Void))
  • The PaymentProcessable implementation has been updated. Please refer to the example in the demo repo PaymentAdapter.swift. If you are using the Braintree Drop-In with Apple Pay, it is highly suggested that you update the file with these changes or replace it with the file in the demo.

< 1.0.0

  • All coordinators have been removed and replaced with new navigation logic

Presenting

  • SDK controllers used for presentation can be found via VNOrderNavigation and VNWalletNavigation
  • Presenting a view controller from the SDK now looks like this:
navigationController?.present(VNOrderNavigation.orderHistoryNavigationController(dismissDelegate: self), animated: true, completion: nil)

Dismissing

  • DismissDelegate can now be conformed to to control the dismissal of presented controllers. You may also pass nil and the SDK will dismiss for you.
  • A typical DismissDelegate implementation looks like this:
extension MyViewController: DismissDelegate {
    public func shouldDismiss(viewController: UIViewController) {
        navigationController?.dismiss(animated: true, completion: nil)
    }
}

Embedding

  • SDK controllers used for embedding in tab bars follow the same concept as ones used for presentation. DismissDelegate in this case is unnecessary, though not harmful.
  • An SDK controller used for embedding is initialized like this:
    let viewController = VNOrderNavigation.orderHistoryNavigationController(dismissDelegate: nil)
    

Pushing

  • Pushing SDK controllers comes as an extension on UINavigationController
  • A push now looks like this:
    navigationController?.pushVNOrderHistory(animated: Bool)
    

New Init methods for JSON Config file

This release includes a simplified way of passing in your SDK configuration using a JSON config file. You will notice our init methods have been updated with configURL parameter for passing in the URL of the config file. There is also another option to pass in the config file via configData if you prefer to parse the file and pass in the Data instead.

@objc public func initialize(sdkKey: String, sdkSecret: String, jwt value: String, configURL: URL, completion: @escaping ((Bool, Error?) -> Void))

@objc public func initialize(sdkKey: String, sdkSecret: String, externalID: String? = nil, configURL: URL, completion: @escaping ((Bool, Error?) -> Void))

@objc public func initialize(sdkKey: String, sdkSecret: String, jwt value: String, configData: Data, completion: @escaping ((Bool, Error?) -> Void))

@objc public func initialize(sdkKey: String, sdkSecret: String, externalID: String? = nil, configData: Data, completion: @escaping ((Bool, Error?) -> Void))

Deprecated methods

These were removed from VNWalletProtocol and are now set in the JSON config file. See JSON Config Docs for more info.

    @objc optional func walletTitle() -> String
    @objc func virtualCurrencyName() -> String
    @objc func walletVirtualCurrencyPaymentType() -> String
    @objc optional func walletProgramName() -> String

< 0.5.2

  • New interface for deep linking directly to an Experience item has been added:

Warning: These are async interfaces and the integrator will be responsible for showing loading/failure states while the call is made. This could change in the near future where perform this.

//Deeplinking via URL
//URL Format: <scheme>://vn/order/experienceItem?experienceID=<experienceItemUUID>
public static func presentExperienceItemReceipt(presenter: UIViewController, url: URL, completion: ((Bool) -> Void)?)

//Non-Deeplink interface for the same functionality
public static func presentReceipt(presenter: UIViewController, experienceUUID: String, completion: ((Bool) -> Void)?)
  • New interface has been added for deeplinking directly to order summary:

//Deeplinking interface
//URL Format: <scheme>://vn/order/orderSummary?orderSummaryID=<orderUUID>&productType=<productType>
public static func presentOrderSummary(presenter: UIViewController, url: URL, completion: ((Bool) -> Void)?)

//Non-deeplinking interface for the same functionality
public static func presentOrderSummary(presenter: UIViewController, orderSummaryID: String, productType: ProductType, completion: ((Bool) -> Void)?)

< 0.5.0

Gratuity on Checkout

  • Checkout screens now support selecting gratuity

Configuration for Virtual Currency

  • New configuration options available to enable/disable virtual currency on checkout pages based on ProductType:
    //Current ProductType cases
    @objc public enum ProductType: Int, CaseIterable {
      case food
      case experience
      case merchandise
    }
    
public func applicationDidFinishLaunching(_ application: UIApplication) {
    //...
    VenueNext.enableVirtualCurrency(for: [.food, .experience, .merchandise])
}

New Configuration for WalletMode

  • Aside from the current 3 modes, a new .none / nil option has been added so that all three modes can be turned off.
//Current WalletMode cases
@objc public enum WalletMode: Int, CaseIterable {
    case qrCode
    case qrScanner
    case virtualCurrencyToggle
}
public func applicationDidFinishLaunching(_ application: UIApplication) {
    //...
    VNWallet.enableModes(walletModes: [.qrCode, .qrScanner, .virtualCurrencyToggle])
    //...
}

Deprecations

  • walletModeConfig() as part of VNWalletDelegate is now deprecated, please transition to the new WalletMode config stated above

< 0.4.8

Experience deep linking

Ability to deep link directly to an experience item is now supported.

Minor bug fixes and improvements.

< 0.4.5

Season Ticket Holder status

Wallet UI now allows for additional customization for indicating season ticket holder status. In order to enable this behavior:

  • Optionally implement walletProgramName on the VNWalletDelegate
    • This value represents the marketing name for season ticket holders, eg ‘VIP Member’, ‘Superfan’, etc
  • Optionally implement a subclass of VNWalletBaseTheme and override the secondaryAccent color to provide a color that indicates season ticket holder status
class CustomWalletTheme: VNWalletBaseTheme {
  override var accent: UIColor {
      return navigationBarBackground
  }

  override var secondaryAccent: UIColor {
      return UIColor(hexString: "78BE20")
  }
}

Be sure to pass this class to the wallet configuration method: VenueNext.configure(wallet: VNWallet.shared, walletDelegate: self, theme: CustomWalletTheme())

< 0.4.4

Apple Pay

ApplePay is enabled via the Braintree DropIn UI. Please follow the steps listed out in the Braintree Apple Pay setup guide.

The PaymentAdapter.swift file will enable the bulk of the ApplePay functionality and should be used exactly as provided. For custom support outside of the supported Braintree Drop-In UI, please contact us.

VNWalletDelegate

  • Implement virtualCurrencyName() to return a string representing the name of the customer’s in-venue virtual currency.
  • Optionally implement walletTitle() to customize the navigation title of the Wallet.

OrderCoordinators

  • Optionally pass titles to pushRvCList to customize the navigation titles for food, merch, and experience lists

0.3.8 - 0.3.x

VNWalletDelegate has deprecated the use of func shouldShowVirtualCurrencyToggle() -> Bool, please use the new func walletModeConfig() -> WalletModeConfig which supports multiple modes through one configuration object. See Wallet for more info.

Configuring PaymentProcessable has changed slightly for consistency. Please also keep in mind that this should be called before initializing other modules that rely on payment. Any other places the currently require PaymentProcessor i.e. coordinators will be removed in subsequent releases. This will be the single initializing point for a payment processor.

VenueNext.configure(paymentProcessor: PaymentProcessor())

Location services are now required for certain geo-exclusive functionality. Please include the correct permission level in Info.plist for your use case (whenInUse or always). Also include the CoreLocation.framework to your app’s linked frameworks.

<key>NSLocationWhenInUseUsageDescription</key>
<string>Location is required to use certain features of this App</string>

If utilizing the QR Code scanning functionality i.e. Rich Checkout, please be sure to include the permission for camera in your Info.plist.

<key>NSCameraUsageDescription</key>
<string>Access to camera is needed</string>

0.3.5 - 0.3.8

VNPaymentProcessor.shared should be assigned after inintializing the SDK with the object that conforms to PaymentProcessable and PaymentMethodRepresentable.

VNPaymentProcessor.shared = PaymentProcessor()

0.2.x ~> 0.3.5

New optional parameter that now accepts a custom theme (conform to VNCoreThemable) See more here

VenueNext.configure(theme: CustomTheme())

Wallet configure with optional theme (override VNWalletBaseTheme)

VenueNext.configure(wallet: VNWallet.shared, walletDelegate: self, theme: CustomWalletTheme())`

vnorder-colors.plist is no longer needed.

PaymentMethodRepresentable added a new function defaultPaymentMethod() Below is a sample of how this can be used the with BrainTree

    func defaultPaymentMethod(completion: @escaping ((PaymentMethodRepresentable?) -> Void)) {
        VNPayment.shared.getPaymentToken() { [weak self] (result) in
            switch result {
            case .success(let token):
                guard let btAPIClient = BTAPIClient(authorization: token) else {
                    completion(nil)
                    return
                }

                //Fetch the default payment method
                btAPIClient.fetchPaymentMethodNonces(true, completion: { (paymentMethods, error) in
                    guard let paymentMethod = paymentMethods?.first, paymentMethod.isDefault else {
                        completion(nil)
                        return
                    }

                    self?.nonce = paymentMethod.nonce
                    completion(self)
                })

            case .failure(let error):
                print(error.error.localizedDescription)
            }
        }
    }

0.1.x ~>

VNOrder.framework has been renamed to VNOrderService.framework. If you have the older VNOrder framework, remove it from your project.

0.1.x ~>

vnorder-colors.plist has been replaced by VNCoreThemable.

Updated: