{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["json-schema"]},"type":"markdown"},"seo":{"title":"App Initialisation","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":["openapi"],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"app-initialisation","__idx":0},"children":["App Initialisation"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"tyrotaptopayenvironment-tyroenvironment-connectionprovider-connectionprovider","__idx":1},"children":["TyroTapToPay(environment: TyroEnvironment, connectionProvider: ConnectionProvider)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"public convenience init(\n  environment: TyroTapToPaySDK.TyroEnvironment,\n  connectionProvider: TyroTapToPaySDK.ConnectionProvider\n) throws\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters","__idx":2},"children":["Parameters"]},{"$$mdtype":"Tag","name":"JsonSchema","attributes":{"schema":{"type":"object","properties":{"environment":{"type":"TyroEnvironment","description":"An enumeration representing the available environments for use with Embedded Payments.","enum":["TyroEnvironment.sandbox","TyroEnvironment.prod"]},"connectionProvider":{"type":"ConnectionProvider","description":"Your class that implements the Connection Provider interface which makes a call to your server to fetch the `connectionSecret`."}},"required":["environment","connectionProvider"]},"options":{"schemaExpansionLevel":1},"schemaResolved":{"openapi":"3.1.0","components":{"schemas":{"__root":{"type":"object","properties":{"environment":{"type":"TyroEnvironment","description":"An enumeration representing the available environments for use with Embedded Payments.","enum":["TyroEnvironment.sandbox","TyroEnvironment.prod"]},"connectionProvider":{"type":"ConnectionProvider","description":"Your class that implements the Connection Provider interface which makes a call to your server to fetch the `connectionSecret`."}},"required":["environment","connectionProvider"]}}}},"schemaResolvedErrors":[]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/in-person-payments/tap-to-pay/ios/sdk/tyro-environment"},"children":["TyroEnvironment"]}," for the different environments the SDK can be initialised with."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/in-person-payments/tap-to-pay/ios/sdk/connection-provider"},"children":["ConnectionProvider"]}," for information about the provider you need to implement to return a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectionSecret"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"throws","__idx":3},"children":["Throws"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"taptopaysdkerrortaptopayinitialisationerror","__idx":4},"children":["TapToPaySDKError.tapToPayInitialisationError"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Throws ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TapToPaySDKError.tapToPayInitialisationError"]}," if there was an issue determining the version of the SDK"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/in-person-payments/tap-to-pay/ios/sdk/errors"},"children":["TapToPaySDKError"]}," for more information about errors."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"taptopaysdkconnect-async-throws","__idx":5},"children":["tapToPaySdk.connect() async throws"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Prepares the Tyro Embedded Payments SDK to communicate with your POS integration server and the reader device"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"public func connect() async throws\n","lang":"swift"},"children":[]}]},"headings":[{"value":"App Initialisation","id":"app-initialisation","depth":1},{"value":"TyroTapToPay(environment: TyroEnvironment, connectionProvider: ConnectionProvider)","id":"tyrotaptopayenvironment-tyroenvironment-connectionprovider-connectionprovider","depth":2},{"value":"Parameters","id":"parameters","depth":3},{"value":"Throws","id":"throws","depth":3},{"value":"TapToPaySDKError.tapToPayInitialisationError","id":"taptopaysdkerrortaptopayinitialisationerror","depth":4},{"value":"tapToPaySdk.connect() async throws","id":"taptopaysdkconnect-async-throws","depth":2}],"frontmatter":{"title":"App Initialisation","seo":{"title":"App Initialisation"}},"lastModified":"2026-09-02T01:02:13.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/in-person-payments/tap-to-pay/ios/sdk/app-init","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}