1"use strict";(globalThis.webpackChunkbambuser_docs||=[]).push([[5533],{6640(e,n,s){s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"mobileSDK/ios/vc-ios-installation","title":"iOS SDK \u2014 Installation","description":"Add BambuserCalls-shopper to your iOS app via Swift Package Manager. Prerequisites, minimum iOS version, camera and microphone entitlements.","source":"@site/video-consultation/mobileSDK/ios/installation.mdx","sourceDirName":"mobileSDK/ios","slug":"/mobileSDK/ios/mobile-sdk/ios/installation","permalink":"/docs/video-consultation/mobileSDK/ios/mobile-sdk/ios/installation","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"id":"vc-ios-installation","title":"iOS SDK \u2014 Installation","description":"Add BambuserCalls-shopper to your iOS app via Swift Package Manager. Prerequisites, minimum iOS version, camera and microphone entitlements.","sidebar_label":"Installation","slug":"mobile-sdk/ios/installation"},"sidebar":"someSidebars","previous":{"title":"Queue Status","permalink":"/docs/video-consultation/queue-status"},"next":{"title":"Architecture","permalink":"/docs/video-consultation/mobileSDK/ios/mobile-sdk/ios/architecture"}}');var t=s(74848),r=s(28453);const a={id:"vc-ios-installation",title:"iOS SDK \u2014 Installation",description:"Add BambuserCalls-shopper to your iOS app via Swift Package Manager. Prerequisites, minimum iOS version, camera and microphone entitlements.",sidebar_label:"Installation",slug:"mobile-sdk/ios/installation"},l="Installation",o={},d=[{value:"Requirements",id:"requirements",level:2},{value:"Add via Swift Package Manager",id:"add-via-swift-package-manager",level:2},{value:"Xcode",id:"xcode",level:3},{value:"Package.swift",id:"packageswift",level:3},{value:"Info.plist",id:"infoplist",level:2},{value:"Import",id:"import",level:2},{value:"Verify the setup",id:"verify-the-setup",level:2},{value:"Next steps",id:"next-steps",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"installation",children:"Installation"})}),"\n",(0,t.jsx)(n.p,{children:"The iOS Calls-shopper SDK ships as a Swift package. Add it to any Xcode project via Swift Package Manager, declare two Info.plist entries, and you're ready to start a call."}),"\n",(0,t.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{}),(0,t.jsx)(n.th,{})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"Minimum iOS"})}),(0,t.jsx)(n.td,{children:"16.0"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"Xcode"})}),(0,t.jsxs)(n.td,{children:["15 or newer (any ",(0,t.jsx)(n.a,{href:"https://developer.apple.com/news/upcoming-requirements/",children:"Apple-supported"})," version)"]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"Swift"})}),(0,t.jsx)(n.td,{children:"5.9+"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"Package name"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"BambuserCalls-shopper"})})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"Library product"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"BambuserCallsShopper"})})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:"Repository"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"https://github.com/bambuser/BambuserCallsShopperSDK",children:"https://github.com/bambuser/BambuserCallsShopperSDK"})})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"add-via-swift-package-manager",children:"Add via Swift Package Manager"}),"\n",(0,t.jsx)(n.h3,{id:"xcode",children:"Xcode"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.strong,{children:"File \u2192 Add Package Dependencies\u2026"})}),"\n",(0,t.jsxs)(n.li,{children:["Paste the repository URL:","\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"https://github.com/bambuser/BambuserCallsShopperSDK\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["Set the version rule to ",(0,t.jsx)(n.strong,{children:"Up to Next Major"})," starting at ",(0,t.jsx)(n.code,{children:"0.5.0"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Add the ",(0,t.jsx)(n.code,{children:"BambuserCalls-shopper"})," product to your app target."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"packageswift",children:"Package.swift"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-swift",children:'dependencies: [\n .package(\n url: "https://github.com/bambuser/BambuserCallsShopperSDK",\n from: "0.5.0"\n )\n],\ntargets: [\n .target(\n name: "YourApp",\n dependencies: [\n .product(name: "BambuserCalls-shopper", package: "BambuserCallsShopperSDK")\n ]\n )\n]\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Check the latest release on the ",(0,t.jsx)(n.a,{href:"https://github.com/bambuser/BambuserCallsShopperSDK/releases",children:"releases page"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"infoplist",children:"Info.plist"}),"\n",(0,t.jsx)(n.p,{children:"The widget uses the camera and microphone for the video call. iOS requires you to declare usage strings and background modes:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-xml",children:"<key>NSCameraUsageDescription</key>\n<string>This app uses the camera so you can talk face-to-face with an expert during a one-to-one video call.</string>\n\n<key>NSMicrophoneUsageDescription</key>\n<string>This app uses the microphone so you can speak with an expert during a one-to-one video call.</string>\n\n<key>
1UIBackgroundModes</key>\n<array>\n <string>audio</string>\n</array>\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"UIBackgroundModes: audio"})," keeps the call audio session alive during brief backgrounding (system dialogs, notifications). Without it, WebRTC audio can suspend and the WebView will stall on stream renegotiation."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["The Calls-shopper SDK does ",(0,t.jsx)(n.strong,{children:"not"})," need the ",(0,t.jsx)(n.code,{children:"-ObjC"})," linker flag."]})}),"\n",(0,t.jsx)(n.h2,{id:"import",children:"Import"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-swift",children:"import BambuserCallsShopper\n"})}),"\n",(0,t.jsx)(n.p,{children:"You now have access to the public API:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"BambuserCallController"})," \u2014 the object your host code creates and holds."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"BambuserCallConfiguration"})," \u2014 passed to the controller at init."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"BambuserCallHandlers"})," \u2014 data-source closures (product, search, cart)."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"BambuserCallDelegate"})," \u2014 fire-and-forget event stream."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"BambuserCallOverlay"})," \u2014 SwiftUI mount point."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"BambuserCallHostView"}),", ",(0,t.jsx)(n.code,{children:"BambuserCallWindowPresenter"})," \u2014 UIKit mount points."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"verify-the-setup",children:"Verify the setup"}),"\n",(0,t.jsx)(n.p,{children:"Create a controller, log the delegate events, and drop the overlay in your root view. If Xcode compiles and the app launches, the SDK is installed correctly."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-swift",children:'import SwiftUI\nimport BambuserCallsShopper\n\n@main\nstruct MyApp: App {\n @StateObject private var call = BambuserCallController(\n configuration: BambuserCallConfiguration(\n orgId: "YOUR_ORG_ID",\n environment: .us\n )\n )\n\n var body: some Scene {\n WindowGroup {\n ZStack {\n Text("Ready.")\n BambuserCallOverlay(controller: call)\n }\n }\n }\n}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/docs/video-consultation/mobileSDK/ios/mobile-sdk/ios/architecture",children:"Architecture"})," \u2014 how the SDK layers on top of a single WebView."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/docs/video-consultation/mobileSDK/ios/mobile-sdk/ios/integration-swiftui",children:"Integration with SwiftUI"})," \u2014 wire a full expert-call flow."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/docs/video-consultation/mobileSDK/ios/mobile-sdk/ios/integration-uikit",children:"Integration with UIKit"})," \u2014 mount inline or on a passthrough window."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453(e,n,s){s.d(n,{R:()=>a,x:()=>l});var i=s(96540);const t={},r=i.createContext(t);function a(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.