diff --git a/Package.swift b/Package.swift index 6aac1ef..7ea890b 100644 --- a/Package.swift +++ b/Package.swift @@ -5,14 +5,14 @@ import PackageDescription let package = Package( name: "swift-fcsdk-ios", + platforms: [.iOS(.v13), .macOS(.v11)], products: [ .library( - name: "SwiftFCSDKiOS", + name: "FCSDKiOS", type: .static, targets: ["SwiftFCSDKiOS"]), ], - dependencies: [ - ], + dependencies: [], targets: [ .target( name: "SwiftFCSDKiOS", @@ -20,8 +20,7 @@ let package = Package( "FCSDKiOS", "CBARealTime" ]), - .binaryTarget(name: "FCSDKiOS", url: "https://swift-sdk.s3.us-east-2.amazonaws.com/client_sdk/FCSDKiOS-4.0.0-rc.1.2.10.xcframework.zip", checksum: "a9bb46ecd7be832a4a2e8a7e8d4d0b03514dfd76c52a73d591de0af4e9ed2b6a"), + .binaryTarget(name: "FCSDKiOS", url: "https://swift-sdk.s3.us-east-2.amazonaws.com/client_sdk/FCSDKiOS-4.0.0.xcframework.zip", checksum: "618c1564e91c468d4fed64c9e6c6be6e9f56de201078c665a41a6b9963bd7e98"), .binaryTarget(name: "CBARealTime", url: "https://swift-sdk.s3.us-east-2.amazonaws.com/real_time/CBARealTime-m95-1.0.1.xcframework.zip", checksum: "b40b7d5b08dbe11f18d60779ffb0cd6576e8e45069d22d81b016a23db88a9633") ] - ) diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/AED.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/AED.md index 204581f..e4232c3 100644 --- a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/AED.md +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/AED.md @@ -1,5 +1,6 @@ # AED The application initially accesses the API via a single object called ACBUC, from which other objects can be retrieved. ACBUC has an attribute named aed, which is the starting point for all **Application Event Distribution** operations. + ## Overview To create an AED application, you need to: @@ -12,6 +13,16 @@ To create an AED application, you need to: 4. Disconnect from the topic when you no longer want to receive AED notifications. +#### FCSDK Technology used in AED + + + + + + + + + ## Creating and Connecting to a Topic @@ -113,3 +124,41 @@ If it is successful, the delegate receives a didSendMessageSuccessfullyWithMessa ### didReceiveMessage The delegate will receive a didReceiveMessage callback whenever any connected client (including itself) sends a message to the topic. The only parameter is the message parameter (containing the text of the sent message). + + +## Available FCSDK Objects + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Authentication.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Authentication.md index d283cb2..d176f61 100644 --- a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Authentication.md +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Authentication.md @@ -262,3 +262,39 @@ struct Authentication: View { } ``` +## Available FCSDK Objects + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/CreatingSession.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/CreatingSession.md index f5d60c7..afae1d2 100644 --- a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/CreatingSession.md +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/CreatingSession.md @@ -1,13 +1,27 @@ # Create a ACBUC Session -Here we will create our FCSDK Session in order to start using the SDK. +Here we will create our FCSDK Session in order to start using the SDK. ACBUC is the entry point for FCSDK clients. One very important factor is that after we authenticate our User, the server sends back a SessionID in the response. We need this SessionID in order to create our Session Object (ACBUC Object). First we will show you the properties and methods available to you and then we will show you how you can use them. -### ACBUC is the entry point for FCSDK clients. One very important factor is that after we authenticate our User, the server sends back a SessionID in the response. We need this SessionID in order to create our Session Object (ACBUC Object). So, without further ado, let's do that. +#### The ACBUC Object +These properties and methods are what is publicly available to you for creating an application. + + + +#### The ACBUCDelegate +You will need to conform to ACBUCDelegate in order to be notified of FCSDK behavior. + + + +#### ACBUCOptions +These are ACBUCOptions. For most applications you do not need to be concerned with applying options. + + -Inside of our Login Request Method, where we receive the response, we want to do something with that response. ## Handle Response Object +Now that you have been able to review the technology needed to create an FCSDK application, we can start creating a session. Inside of our Login Request Method, where we receive the response, we want to do something with that response. + ```swift class AuthenticationService: NSObject, ObservableObject { @@ -51,7 +65,8 @@ self.connectedToSocket = self.acbuc?.connection != nil // Initialize the ACBUC Object with our SessionID and set the Delegate self.acbuc = ACBUC.uc(withConfiguration: sessionid, delegate: self) -// Tell the object if the network is reachable or not +// Tell the object if the network is reachable or not. +// This is needed in order to successfully register a session and set the ACBUCDelegate. self.acbuc?.setNetworkReachable(networkStatus) // Tell the object if we accept any certificate from the server @@ -76,3 +91,40 @@ self.connectedToSocket = self.acbuc?.connection != nil } } ``` + +## Available FCSDK Objects + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/FCSDKExtras.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/FCSDKExtras.md index 76de37a..8541302 100644 --- a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/FCSDKExtras.md +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/FCSDKExtras.md @@ -2,16 +2,59 @@ This Article discusses all of the extra important details of FCSDK not covered in other articles +## Threading + +- We have created a new threading model built from tools by Apple. This threading model makes the best use of the voice and video concurrency flow. With that being said, whenever you are interacting with the UI in your application while interacting with the call flow, you will need to make sure you are running your code on the main thread. For example when we make a call using FCSDKiOS in the sample app, we are interacting with our apps UI during the call flow, therefore we need to make those calls on the main thread. You can run code on the main thread like so. + +```swift +func startCall() async throws { +// Run on the main thread + await MainActor.run { + self.hasStartedConnecting = true + } +} +``` + +- We also have async versions of methods you may decided to use. If you choose to await on a method your call to that method must be wrapped in a **Task** or the call must be **async**. If you write an async method any FCSDK calls you use will automatically detect that they should use the async version of that call. If you want to side step this logic simply use a Task to wrap the async call instead of writing an async method. For example... + +```swift + func someMethod() async { +// Valid + await uc.startSession() + +// Invalid, Swift Concurreny will force the await version + startSession() +} +``` + +or + +```swift + func someMethod() { +// Valid +Task { + await startSession() +} +// Valid + startSession() + } +``` + + ## SPM To set up a project using the Swift Package we want to depend on the Swift Package at the root level of your project. -1. Open your Xcode project, navigate to the project, and then into Package Dependencies. Click the + button and add the pacakge like so. +- Open your Xcode project, navigate to the project, and then into Package Dependencies. Click the + button and add the pacakge like so. + ![An image showing how to add FCSDKiOS](image_4.png) -2. We want to make sure that the binary has been linked to the project. Click the **General** tab of your Target, and expand the _Frameworks, Libraries, and Embedded Content_ section by clicking on the title. -3. If the Binary is not embedded then click the **+** button; the file explorer displays. -4. Select the FCSDK-iOS Library and press add + +- We want to make sure that the binary has been linked to the project. Click the **General** tab of your Target, and expand the _Frameworks, Libraries, and Embedded Content_ section by clicking on the title. +- If the Binary is not embedded then click the **+** button; the file explorer displays. +- Select the SwiftFCSDKiOS Library and press add + ![An image showing how to add FCSDKiOS](image_5.png) -5. Done, your project is now ready to use Fusion Client SDK + +- Done, your project is now ready to use Fusion Client SDK ## Bitcode Support Bitcode can be enabled in the Build Settings @@ -21,14 +64,17 @@ Bitcode can be enabled in the Build Settings ## Simulator Support We now offer simulator support with FCSDKiOS. It is simple to set up. The Simulator does not support the use of the camera, therefore we need to give it a video to stream to your real device. -1. Create a short placeholder video (about 5 seconds long) and name it `Simulator.mp4`. +- Create a short placeholder video (about 5 seconds long) and name it `Simulator.mp4`. -2. Drag and Drop the `.mp4` into the root level of your application like the picture shows bellow. +- Drag and Drop the `.mp4` into the root level of your application like the picture shows bellow. ![An image showing how to add FCSDKiOS](image_6.png) -3. Make sure you select `copy items if needed` and select the `target` you wish to add the video to, like the picture shows below. + +- Make sure you select `copy items if needed` and select the `target` you wish to add the video to, like the picture shows below. + ![An image showing how to add FCSDKiOS](image_7.png) -4. You will also want to add it to your Copy Bundle Resources in the apps target Build Phase. + +- You will also want to add it to your Copy Bundle Resources in the apps target Build Phase. ![An image showing how to add FCSDKiOS](image_8.png) @@ -193,6 +239,136 @@ Objective-C [ACBUC logToFile]; ``` After the program flow has completed and contains any relevent issues you expected you can navigate to Xcode's Window Tab in the status bar, select Devices and Simulators. Select the Device you ran your program on and download the Container. + ![An image showing how to add FCSDKiOS](image_9.png) + Go ahead and right click on the file and select **Show Package Contents**. Next navigate into AppData, then into the Library Directory where you should find a file called **fcsdk.log**. Inspect the file to make sure it contains what you want to share. + +## Self-Signed Certificates + +If you are connecting to a server that uses a self-signed certificate, you need to add that certificate, and the associated CA root certificate, to the keychain on your client. + +You can obtain the server certificate and CA root certificate through the FAS Administration screens. The **_FAS Administration Guide_** explains how to view and export certificates. You need to extract the HTTPS Identity Certificate (server certificate) and the Trust Certificate (CA root certificate) that has signed your server certificate. + +Once you have exported and downloaded the two certificates, you need to copy them to your client. Please follow the user documentation for your device to install the certificates. + +You should then view the installed server certificate through the appropriate tool (**iOS Settings-\>General-\>Profiles** or **OSX Keychain**) and confirm that the server certificate is trusted. If it is, then your application should connect to the server. + +Alternatively, you can use the acceptAnyCertificate method of the ACBUC object before calling startSession, although this should only be used during development: +```swift + let uc: ACBUC = ACBUC.uc(withConfiguration: sessionid, delegate: self) + uc.acceptAnyCertificate(true) + uc.startSession() +``` + +Since iOS 9, you also need to add a setting to your application's plist file to allow connection to a server using self-signed certificates. Set **Allow Arbitrary Loads** under **App Transport Security Settings** to YES. + + +### Requesting Permission to use the Microphone and Camera + +On iOS 7.0 and higher, your application needs to ask the end user for permission to use the microphone and camera before they can make or receive calls. Because the microphone and camera permissions in iOS function at an application-level and not per call, you need to consider the most appropriate time to ask the end user for their permission. iOS remembers the answer they provide until your application is uninstalled or the permissions are reset in the _iOS Settings_. The end user can also change the microphone and camera permissions for your application in _iOS Settings_. + +The iOS SDK provides a helper method to request access to the microphone and camera: ACBClientPhone requestMicrophoneAndCameraPermission. This method delegates to the iOS permission APIs, and you should typically call it before making or receiving calls. The first time you call this method, it displays an individual alert for each requested permission. Subsequent calls do not display an alert unless you have reset your privacy settings in _iOS Settings_. + +When subsequently making or receiving a call, the iOS SDK checks whether the user has given the necessary permissions. For example, if you make an audio-only outgoing call, the end user only needs to have granted permission to use the microphone; if you want to receive an incoming audio and video call, the end user needs to have granted permission to use the microphone and camera. + +If you attempt to make or answer a call with insufficient permissions, the application receives the optional ACBClientCallDelegate didReceiveCallRecordingPermissionFailure callback method, and the call ends. + +The keys NSCameraUsageDescription and NSMicrophoneUsageDescription in your app plist file provide (part of) the text of the alert when the user is asked for permission to use the camera and microphone. On iOS 10 and higher, these keys are mandatory, and your application will fail if you do not provide them. See iOS SDK documentation for details. + +### DTMF Tones + +We reccommend generating DTMF Tones using CallKit's DTMF tone generator, but you can use FCSDK's DTMF tone generator. + +Once a call is established, an application can send DTMF tones on that call by calling the playDTMFCode method of the ACBClientCall object: +```swift + call.playDTMFCode(_ code: "123", localPlayback: true) +``` +- The first parameter can either be a single tone, (for example, 6), or a sequence of tones (for example, \#123,\*456). Valid values for the tones are those characters conventionally used to represent the standard DTMF tones: 0123456789ABCD\#\*. + +The comma indicates that there should be a two second pause between the 3 and the \* tone. + +- The second parameter is a boolean which indicates whether the application should play the tone back locally so that the user can hear it. + +### Dial Failures + +FCSDK does not call the ACBClientCallDelegate failure methods (didReceiveDialFailure and so on) for failures caused by a timeout. This results in the client seeing the **Trying to call…** dialog, despite the call being inactive. To avoid this, handle these timeout errors using the status delegate methods; examples can be found in the [Monitoring the State of a Call](#monitoring-the-state-of-a-call) section and in particular to the callback: + +```swift + call(_ call: FCSDKiOS.ACBClientCall, didChange status: FCSDKiOS.ACBClientCallStatus) +``` + +## Testing IPv6 + +Apple require that apps submitted to the Apple store support IPv6-only networks, and you should test this during development; see: + + + +Neither Media Broker nor FAS support IPv6 directly; however, you can configure Media Broker to give an IPv6 public address to the client, and then you can access both FAS and Media Broker through a NAT64 router. Apple laptops support providing a NAT64 Wi-Fi hotspot, as long as you are able to connect to your network through another interface such as an Ethernet cable - for details on enabling this, see the _Test for IPv6 DNS64/NAT64 Compatibility Regularly_ section in the above link. + +To configure Media Broker to give IPv6 addresses to the client, edit the Media Broker’s settings: + +1. In the configuration console, expand _WebRTC Client_ settings. + +2. For each of the current public addresses click add, then enter an IPv6 equivalent in the public address. + +If using an Apple laptop hotspot, then the IPv6 address equivalent starts with + +64::ff9b:: + +and is followed by the hexadecimal version of the IPv4 address. For example c0a8:131d is the equivalent of 192.168.19.29 + +![An image showing RTP Ports](image_3.png) + +3. Duplicate the three other fields from the IPv4 port and address. + +Apple sometimes require testing an app in full during submission, in which case a public NAT64 is required - contact support for details on how to implement this. + +#### Delegate Method For Parsing SSRC Information + +A new optional method has been added to the delegate `ACBClientCallDelegate`: + +```swift + func call(_ call: ACBClientCall, didReceiveSSRCsForAudio audioSSRCs: [AnyHashable]?, andVideo videoSSRCs: [AnyHashable]?) +``` +This method has been implemented in the sample app (CBAFusion), and logs a console message ‘Received SSRC information for AUDIO XXX and VIDEO YYY’. (In PhoneViewController.m of the sample). There’s also a few lines of the code commented out in PhoneViewController.m following this call to logging; uncommenting them and building/testing the sample will pop up an alert showing the audio and video SSRC(s) when they become available. + + + +## Available FCSDK Objects + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/FCSDKUI.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/FCSDKUI.md index 19cce4d..fb05ffb 100644 --- a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/FCSDKUI.md +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/FCSDKUI.md @@ -210,3 +210,40 @@ var body: some View { } ``` So with all that hard work you should be able to get FCSDK working in your SwiftUI applications. Please play around with the UI flow to get the desired UI you wish and reference the sample app in order to see a real world example. + +## Available FCSDK Objects + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/GettingStarted.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/GettingStarted.md index 8201313..6dc9741 100644 --- a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/GettingStarted.md +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/GettingStarted.md @@ -12,6 +12,9 @@ This Documentation contains what you need in order to build an FCSDKiOS applicat - **You must be using Swift 5.5 or greater to use use this SDK** ### Articles + + +This article is to guide you through the changes in FCSDKiOS. @@ -43,6 +46,40 @@ Here we will discuss the process of setting up an application with VoIP enabled This Article discusses all of the extra important details of FCSDK not covered in other articles. - -This article is to guide you through the changes in FCSDKiOS. +## Available FCSDK Objects + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/MigratingFromLegacySDK.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/MigratingFromLegacySDK.md index ebac7d7..ad49843 100644 --- a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/MigratingFromLegacySDK.md +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/MigratingFromLegacySDK.md @@ -21,7 +21,8 @@ Objective-C ### Threading -- We have created a new threading model built from tools by Apple. This threading model makes the best use of the voice and video concurrency flow. With that being said, whenever you are interacting with the UI in your application while interacting with the call flow, you will need to make sure you are running your code on the main thread. For example when we make a call using FCSDKiOS in the sample app, we are interacting with our apps UI during the call flow, therefore we need to make those calls on the main thread. You can run code on the main thread like so. +- We have created a new threading model built from tools by Apple. This threading model makes the best use of the voice and video concurrency flow. With that being said, whenever you are interacting with the UI in your application while interacting with the call flow, you will need to make sure you are running your code on the main thread. For example when we make a call using FCSDKiOS in the sample app, we are interacting with our apps UI during the call flow, therefore we need to make those calls on the main thread. You can run code on the main thread like so. + Async/Await ```swift func startCall() async throws { @@ -48,6 +49,30 @@ Objective-C DispatchQueue }); } ``` +- We also have async versions of methods you may decided to use. If you choose to await on a method your call to that method must be wrapped in a **Task** or the call must be **async**. If you write an async method any FCSDK calls you use will automatically detect that they should use the async version of that call. If you want to side step this logic simply use a Task to wrap the async call instead of writing an async method. For example... + +```swift + func someMethod() async { +// Valid + await uc.startSession() + +// Invalid, Swift Concurreny will force the await version + startSession() +} +``` + +or + +```swift + func someMethod() { +// Valid +Task { + await startSession() +} +// Valid + startSession() + } +``` ### Method changes @@ -61,22 +86,95 @@ Objective-C DispatchQueue Bellow are examples of the change in API in Objective-C. Swift users will continues to use an **Int** value. +#### Changes in FCSDKiOS while using Swift as a client + ```swift -- (void)topic:(ACBTopic *)topic didUpdateWithKey:(NSString *)key value:(NSString *)value version:(NSInteger)version deleted:(BOOL)deleted -``` -```swift -- (void)topic:(ACBTopic *)topic didDeleteDataSuccessfullyWithKey:(NSString *)key version:(NSInteger)version -``` -```swift -- (void)topic:(ACBTopic *)topic didSubmitWithKey:(NSString *)key value:(NSString *)value version:(NSInteger)version -```` -```swift -- (void) call:(ACBClientCall*)call didChangeStatus:(ACBClientCallStatus)status +// FCSDKiOS 4.0.0 API + self.acbuc = ACBUC.uc(withConfiguration: "", delegate: self) +// Legacy API + self.acbuc = ACBUC.init(configuration: "", delegate: self) + +// FCSDKiOS 4.0.0 API + func topic(_ topic: ACBTopic, didUpdateWithKey key: String, value: String, version: Int, deleted: Bool) {} +// Legacy API + func topic(_ topic: ACBTopic, didUpdateWithKey key: String, value: String, version: Int32, deleted: Bool) {} + +// FCSDKiOS 4.0.0 API + func topic(_ topic: ACBTopic, didSubmitWithKey key: String, value: String, version: Int) {} +// Legacy API + func topic(_ topic: ACBTopic, didSubmitWithKey key: String, value: String, version: Int32) {} + +// FCSDKiOS 4.0.0 API + func topic(_ topic: ACBTopic, didConnectWithData data: AedData) {} +// Legacy API + func topic(_ topic: ACBTopic, didConnectWithData data: [AnyHashable : Any]) + +// FCSDKiOS 4.0.0 API + func call(_ call: ACBClientCall, didReportInboundQualityChange inboundQuality: Int) {} +// Legacy API + func call(_ call: ACBClientCall, didReportInboundQualityChange inboundQuality: UInt) {} + +// FCSDKiOS 4.0.0 API + func call(_ call: ACBClientCall?, didReceiveCallRecordingPermissionFailure message: String) +// Legacy API + func call(_ call: ACBClientCall, didReceiveCallRecordingPermissionFailure message: String) + +// FCSDKiOS 4.0.0 API + func uc(_ uc: ACBUC, willRetryConnectionNumber attemptNumber: Int, in delay: TimeInterval) {} +// Legacy API + func uc(_ uc: ACBUC, willRetryConnectionNumber attemptNumber: UInt, in delay: TimeInterval) {} ``` -```swift -- (void) call:call didReportInboundQualityChange:(NSInteger)inboundQuality + +#### Changes in FCSDKiOS while using Objective-C as a client + +```objective-c +// FCSDKiOS 4.0.0 API +- (void)phone:(ACBClientPhone * _Nonnull)phone didReceive:(ACBClientCall * _Nonnull)call {} +// Legacy API +- (void) phone:(ACBClientPhone*)phone didReceiveCall:(ACBClientCall*)call {} + +// FCSDKiOS 4.0.0 API +- (void)call:(ACBClientCall * _Nonnull)call didChange:(enum ACBClientCallStatus)status {} +// Legacy API +- (void) call:(ACBClientCall*)call didChangeStatus:(ACBClientCallStatus)status {} + +// FCSDKiOS 4.0.0 API +- (void )call:(ACBClientCall *)call didReportInboundQualityChange:(NSInteger)inboundQuality {} +// Legacy API +- (void) call:call didReportInboundQualityChange:(NSUInteger)inboundQuality {} + +// FCSDKiOS 4.0.0 API +- (void)topic:(ACBTopic *)topic didUpdateWithKey:(NSString *)key value:(NSString *)value version:(NSInteger)version deleted:(BOOL)deleted {} +// Legacy API +- (void)topic:(ACBTopic *)topic didUpdateWithKey:(NSString *)key value:(NSString *)value version:(int)version deleted:(BOOL)deleted { + +// FCSDKiOS 4.0.0 API +- (void)topic:(ACBTopic *)topic didSubmitWithKey:(NSString *)key value:(NSString *)value version:(NSInteger)version {} +// Legacy API +- (void)topic:(ACBTopic *)topic didSubmitWithKey:(NSString *)key value:(NSString *)value version:(int)version { + +// FCSDKiOS 4.0.0 API +- (void)topic:(ACBTopic *)topic didConnectWithData:(AedData *)data {} +// Legacy API +- (void)topic:(ACBTopic *)topic didConnectWithData:(NSDictionary *)data {} + +// FCSDKiOS 4.0.0 API +- (void )call:(ACBClientCall *)call didReportInboundQualityChange:(NSInteger)inboundQuality {} +// Legacy API +- (void) call:call didReportInboundQualityChange:(NSUInteger)inboundQuality {} + +// FCSDKiOS 4.0.0 API + [disconnectedTopic disconnect:deleteTopic]; +// Legacy API + [disconnectedTopic disconnectWithDeleteFlag:deleteTopic]; + +// Deprecated in Legacy API + [ACBClientPhone requestMicrophoneAndCameraPermission: requestMic video: requestCam]; +// Use New Async API + [ACBClientPhone requestMicrophoneAndCameraPermission:requestMic video:requestCam completionHandler:^{}]; ``` + ### Property Name Changes - The following list is a list of properties that have changes and should be noted in your application. @@ -90,7 +188,7 @@ Swift self.currentCall?.call?.remoteView = self.currentCall?.remoteView ``` Objective-C -```swift +```objective-c self.call.remoteView = self.remoteVideoView; ``` As you can see the changes are identical in both Swift and Objective-C @@ -104,7 +202,7 @@ Swift Constants.SDK_VERSION_NUMBER ``` Objective-C -```swift +```objective-c Constants.SDK_VERSION_NUMBER; ``` @@ -130,9 +228,46 @@ let aed = AedData( timeout: 0) ``` Objective-C -```swift +```objective-c TopicData *topicData = [[TopicData alloc] initWithKey:@"Key" value:@"Value"]; NSMutableArray *dataArray = [[NSMutableArray alloc] init]; [dataArray addObject:topicData]; AedData *data = [[AedData alloc] initWithType:@"Some Type" name:@"Some Name" topicData:dataArray message:@"Some Message" _timeout:0]; ``` + +## Available FCSDK Objects + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Network Activity.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Network Activity.md new file mode 100644 index 0000000..4eba299 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Network Activity.md @@ -0,0 +1,95 @@ +# Network Activity + +This article talks about how FCSDK reacts toward the internet of things. + +## Overview + +It is strongly encouraged to move away from the old Reachability API that Apple provided for you in your applications and use the newer API called Network Framework. With that being said our Sample app give an idea of how to use this framework. When creating a ACBUC Session we must remember to call the **setNetworkReachable(true)** method right after we create our ACBUC object. This tells FCSDK that there is an internet connection and that we can proceed making calls. If we do not monitor our network connection and tell FCSDK about it then you will experience unexpected behavior in using FCSDK. + +## Note + +You may want to consider reactively monitoring your network changes in order for FCSDK to always know when you have an internet connection, rather than only when a ACBUC Object is created. + +## Responding to Network Issues + +As the iOS SDK is network-based, it is essential that the client application is aware of any loss of connection. **Fusion Client SDK** does not dictate how you implement network monitoring; however, the sample application uses the SystemConfiguration framework. + +Depending on the nature of the issues with the network, the client application should react differently. + +### Reacting to Network Loss + +In the event of network connection problems, the SDK automatically tries to re-establish the connection. It will make seven attempts at the following intervals: 0.5s, 1s, 2s, 4s, 4s, 4s, 4s. A call to the willRetryConnectionNumber:in:\] on the ACBUCDelegate precedes each of these attempts. The callback supplies the attempt number (as an Int) and the delay before the next attempt (as an TimeInterval) in its two parameters. + +When all reconnection attempts are exhausted, the ACBUCDelegate receives the ucDidLoseConnection callback, and the retries stop. At this point the client application should assume that the session is invalid. The client application should then log out of the server and reconnect via the web app to get a new session, as described in the section. + +If any of the reconnection attempts are successful, the ACBUCDelegate receives the ucDidReestablishConnection callback. + +Note that both the willRetryConnectionNumber and ucDidReestablishConnection are optional, so the application may choose to not implement them. The connection retries are attempted regardless. + +The retry intervals, and the number of retries attempted by the SDK are subject to change in future releases. Do not rely on the exact values given above. + +### Reacting to Network Changes + +If the issues with the network are caused by a temporary loss of connectivity (for example, when moving between two Wi-Fi networks, or from a Wi-Fi network to a cellular data connection), the client application should not log out from the session and log back in (as described in the **Reacting to Network Loss** section), as all session state will be lost. + +To avoid this, the client application should register with iOS to receive notification of changes in network reachability. When iOS notifies the client application that the network has changed, the application should pass these details to the ACBUC instance. + +When the client application starts, it should check for network reachability. When the network is reachable, the application calls **ACBUC.setNetworkReachable(true)** until this call is made, the application does not attempt to create a session. + +If the network reachability drops after a session has been established, the client application needs to call **ACBUC.setNetworkReachable(false)** + +If the network reachability changes from a cellular data connection to a Wi-Fi network, or _vice versa_, the client application should call **ACBUC.setNetworkReachable(false)** followed by **ACBUC.setNetworkReachable(true)** to disconnect from the first network and re-register on the second. + +### Network Quality Callbacks + +The application can implement the didReportInboundQualityChange callback on the ACBClientCallDelegate object to receive callbacks on the quality of the network during a call: + +```swift + func call(_ call: ACBClientCall?, didReportInboundQualityChange inboundQuality: Int) { + // Reflect in UI + print("Call Quality: \(inboundQuality)") + } +``` + +The inboundQuality parameter is a number between 0 and 100, where 100 indicates perfect quality. The application might choose to show a bar in the UI, the length of the bar indicating the quality of the connection. + +The SDK starts collecting metrics as soon as it receives the remote media stream. It does this every 5s, so the first quality callback fires roughly 5s after this remote media stream callback has fired. + +The callback then fires whenever a different quality value is calculated; so if the quality is perfect then there will be an initial quality callback with a value of 100 (after 5s), and then no further callback until the quality degrades. + +## Available FCSDK Objects + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/PictureinPicture.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/PictureinPicture.md index 80cf42c..f2ac86f 100644 --- a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/PictureinPicture.md +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/PictureinPicture.md @@ -1,2 +1,40 @@ # Picture in Picture + +## Available FCSDK Objects + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Extras/image_4.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Extras/image_4.png deleted file mode 100644 index 2d4eb7e..0000000 Binary files a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Extras/image_4.png and /dev/null differ diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Extras/image_5.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Extras/image_5.png deleted file mode 100644 index aeeac07..0000000 Binary files a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Extras/image_5.png and /dev/null differ diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBAudioDevice.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBAudioDevice.md new file mode 100644 index 0000000..c74ca72 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBAudioDevice.md @@ -0,0 +1,97 @@ +# ACBAudioDevice + +ACBAudioDevice provides available device audio capabilities. Please see for instructions on how to set the device capability. + + +## Overview + +```swift +/// Available AudioDevices +@objc public enum ACBAudioDevice : Int, Comparable { + + /// speaker phone enabled + case speakerphone + + /// wired headset enabled + case wiredHeadset + + /// earpiece enabled + case earpiece + + /// bluetooth enabled + case bluetooth + + /// no audio device + case none +} + +extension ACBAudioDevice : CaseIterable { + + /// A type that can represent a collection of all values of this type. + public typealias AllCases = [FCSDKiOS.ACBAudioDevice] + + /// A collection of all values of this type. + public static var allCases: [FCSDKiOS.ACBAudioDevice] { get } +} + +extension ACBAudioDevice : RawRepresentable { + + /// The raw type that can be used to represent all values of the conforming + /// type. + /// + /// Every distinct value of the conforming type has a corresponding unique + /// value of the `RawValue` type, but there may be values of the `RawValue` + /// type that don't have a corresponding value of the conforming type. + public typealias RawValue = String + + /// The corresponding value of the raw type. + /// + /// A new instance initialized with `rawValue` will be equivalent to this + /// instance. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// let selectedSize = PaperSize.Letter + /// print(selectedSize.rawValue) + /// // Prints "Letter" + /// + /// print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) + /// // Prints "true" + public var rawValue: FCSDKiOS.ACBAudioDevice.RawValue { get } + + /// Creates a new instance with the specified raw value. + /// + /// If there is no value of the type that corresponds with the specified raw + /// value, this initializer returns `nil`. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// print(PaperSize(rawValue: "Legal")) + /// // Prints "Optional("PaperSize.Legal")" + /// + /// print(PaperSize(rawValue: "Tabloid")) + /// // Prints "nil" + /// + /// - Parameter rawValue: The raw value to use for the new instance. + public init?(rawValue: String) + + /// Returns a Boolean value indicating whether the value of the first + /// argument is less than that of the second argument. + /// + /// This function is the only requirement of the `Comparable` protocol. The + /// remainder of the relational operator functions are implemented by the + /// standard library for any type that conforms to `Comparable`. + /// + /// - Parameters: + /// - lhs: A value to compare. + /// - rhs: Another value to compare. + public static func < (lhs: FCSDKiOS.ACBAudioDevice, rhs: FCSDKiOS.ACBAudioDevice) -> Bool +} + +extension ACBAudioDevice : Hashable { +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBAudioDeviceManager.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBAudioDeviceManager.md new file mode 100644 index 0000000..aec352b --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBAudioDeviceManager.md @@ -0,0 +1,132 @@ +# ACBAudioDeviceManager + +ACBAudioDeviceManager allows us to set both default and preferred audio device capabilities. Please see for device capabilities. +## Overview + +```swift +/// `ACBAudioDeviceManager` is intended for applications to be able to interact with the AVSession in FCSDK +@objc final public class ACBAudioDeviceManager : NSObject { + + /// This method will start the `AVAudioSession` singleton and set some default values + @objc final public func start() + + /// Stops the `AVAudioSession` + @objc final public func stop() + + /// Available Audio Input Routes + /// - Returns: Any array of Available inputs + @objc final public func audioDevices() -> [AnyHashable]? + + /// The Selected Audio Devices perferred Input + /// - Returns: Returns the selected device with the perferred input + final public func selectedAudioDevice() -> FCSDKiOS.ACBAudioDevice + + /// Sets the default audio device from the ``ACBAudioDevice`` + /// - Parameter device: Takes a parameter of `AVAudioSession` + @objc final public func setDefaultAudio(_ device: FCSDKiOS.ACBAudioDevice) + + /// Sets the audio device from the ``ACBAudioDevice`` + /// - Parameter device: Takes a parameter of `AVAudioSession` + @objc final public func setAudioDevice(_ device: FCSDKiOS.ACBAudioDevice) + + /// This method is intended to referesh the speakerPhone setting if it is needed + @objc final public func refreshSpeakerphoneSetting() +} +``` + +## Bluetooth Support + +The user can set the active audio device (speaker and microphone) for an iOS device, and FCSDK calls will use this setting by default. However, this behavior may not be appropriate while an FCSDK application is running; and in particular, the default behavior does not allow the call to switch to an alternative device if the active device fails (a particular problem with Bluetooth devices). The application can override the default behavior using the ACBAudioDeviceManager class; a single instance of this class is available on the ACBClientPhone object which controls the call. While this is in use, the application can: + +- Define which audio output on the phone should handle the audio + +- Define a default audio output on the phone, which will handle the audio if the preferred device is interrupted. + +- Get a list of available audio outputs on the phone + +- Determine which of the phone's audio outputs currently handles the audio + +This class has been added specifically to support the use of Bluetooth headsets, and we expect this to be its main use; accordingly, the examples assume that this is how it is being used. However, an application could also use this class to manage the audio output to the speakerphone, the internal speaker, and an external headphone set, and to explicitly _exclude_ the use of Bluetooth headsets with the calls made by the application. + +### Starting and Stopping ACBAudioDeviceManager + +In order to use the methods on the ACBAudioDeviceManager, the application must first call the start method of the instance in the ACBClientPhone which is handling the call: +```swift + uc.phone.audioDeviceManager.start() +``` +An appropriate place to do this is during initialization of the object which is to control the call. + +After the ACBAudioDeviceManager starts, the application can call its methods to set the audio devices which the phone should use for calls made or received by the application. Calls which are not handled by the FCSDK application will be unaffected, and will use the phone's default behavior. + +In order to return to the iOS device's default behavior without ending the call, the application can call stop: +```swift + uc.phone.audioDeviceManager.stop() +``` +While the audio device manager is active the application **_must not_** call the setCategory method of the call's AVAudioSession object. Doing so can cause unexpected behavior. + +### Setting the Preferred Device + +The application can set the preferred device for the call: +```swift + uc.phone.audioDeviceManager.setAudioDevice(.earpiece) +``` +**The argument to the method must be one of the members of the enumeration:** +```swift + +/// Audio goes to the loudspeaker in the phone, and is audible to others in the vicinity. Audio input is from the phone's internal microphone. + .speakerphone + +/// Audio goes to a device attached to the jack in the phone. If this device has a microphone, that is used for audio input. + .wiredHeadset + +/// Audio goes to the internal speaker, and is received from the internal microphone. The user will have to hold the phone to their ear during the call. + .earpiece + +/// Audio is sent to and received from a paired Bluetooth device. + .bluetooth + +/// The application has no preference, and accepts the default behavior of the iOS device. + .none +``` + +If the preferred device is available when the application calls setAudioDevice, the call starts using that device; otherwise, there is no immediate change, but if it later becomes available (the Bluetooth device is switched on or is otherwise recognized), then the audio switches to this device. + +### Setting the Default Device + +The application can set a fallback device in case the preferred device is unavailable: +```swift + uc.phone.audioDeviceManager.setDefaultDevice( .earpiece) +``` +The argument is one of the values from the ACBAudioDevice enumeration + +Setting the default device establishes a fallback option in case the preferred device is temporarily unavailable. A common use would be: +```swift + uc.phone.audioDeviceManager.setAudioDevice( .bluetooth) + uc.phone.audioDeviceManager.setAudioDevice( .earpiece) +``` +which would establish the Bluetooth headset as the preferred device, with the normal phone internal speaker and microphone as a fallback. With these settings in operation: + +1. The call starts, but no Bluetooth headset is available. The call is sent to the internal speaker and microphone. + +2. The Bluetooth headset is switched on. The phone switches the audio to the headset, and the user can put the phone down and continue the call. + +3. The headset fails (perhaps the battery becomes too low). The application switches the call back to the internal speaker and microphone. + +4. The user switches on another (fully powered) Bluetooth headset and pairs it with the phone. The audio switches to the new headset and the call continues on that device. + +If the default device is also unavailable, the audio will be sent to whatever has been set as the active device on the phone (that is, it will fallback to the iOS default behavior). + +### Listing Available Devices + +The application can get a list of available audio devices by calling the audioDevices method: +```swift + let devices = uc.phone.audioDeviceManager.audioDevices() +``` +The resulting array contains members of the ACBAudioDevice enumeration, taken from the available inputs known to the AVAudioSession. + +It can also find which device is currently set as the preferred audio device: +```swift + let selectedDevice = uc.phone.audioDeviceManager.selectedAudioDevice() +``` +This will work whether the preferred device has been set explicitly (using setAudioDevice) or not. + diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientAED.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientAED.md new file mode 100644 index 0000000..d6f9f3c --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientAED.md @@ -0,0 +1,26 @@ +# ACBClientAED + +ACBClientAED allows users to create ACBTopics. Please see for information on implementing. + +## Overview + +```swift +/// This class represents the interface for creating AED Objects +@objc final public class ACBClientAED : NSObject { + + /// This method is what allows an ``ACBTopic`` to be created without an expiry time + /// - Parameters: + /// - topicName: The name of a topic you would like to create + /// - delegate: The ``ACBTopicDelegate`` + /// - Returns: The ``ACBTopic`` you created + @objc final public func createTopic(withName topicName: String, delegate: FCSDKiOS.ACBTopicDelegate?) -> FCSDKiOS.ACBTopic? + + /// This method is what allows an ``ACBTopic`` to be created + /// - Parameters: + /// - topicName: The name of a topic you would like to create + /// - expiryTime: The lengh of time as in `Int` + /// - delegate: The ``ACBTopicDelegate`` + /// - Returns: The ``ACBTopic`` you created + @objc final public func createTopic(withName topicName: String, expiryTime: Int, delegate: FCSDKiOS.ACBTopicDelegate?) -> FCSDKiOS.ACBTopic? +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCall.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCall.md new file mode 100644 index 0000000..5a6aa62 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCall.md @@ -0,0 +1,83 @@ +# ACBClientCall + +Please see for an explanation of how to use ACBClientCall + +## Overview + +```swift +/// `ACBClientCall` is the entry point for all call related methods in FCSDK. However this is limited to when incoming calls are made. For information on when outgoing calls are made please see ``ACBClientPhone``. +@objc final public class ACBClientCall : NSObject { + + /// Indicates whether or not the call has audio + @objc final public var hasRemoteAudio: Bool { get } + + /// The call's Identifier + @objc final public var callId: String + + /// The call's ``UIView`` used for displaying remote views + @objc final public var remoteView: UIView? + + /// The call's ``UIView`` used for displaying remote buffer views intended for use in picture in picture enabled applications + @objc final public func remoteBufferView() async -> UIView? + + /// The client should always remove the `remoteBufferView()` when finished using the bufferView. + @objc final public func removeBufferView() async + + /// A boolean value used to tell FCSDK if the client should have remote video when creating the call + @objc final public var hasRemoteVideo: Bool { get } + + /// The remote address intended to call + @objc final public var remoteAddress: String? { get } + + /// The remote display name for the call + @objc final public var remoteDisplayName: String? { get } + + /// The calls delegate used to pass information intended for client useage + @objc weak final public var delegate: FCSDKiOS.ACBClientCallDelegate? + + /// The status of our SDK. ``ACBClientCallStatus`` + @objc final public var status: FCSDKiOS.ACBClientCallStatus { get } + + /// Determines whether or not the SDK should enable Audio + /// - Parameter isAudioEnabled: A Boolean value to determine enabling + @objc final public func enableLocalAudio(_ isAudioEnabled: Bool) + + /// Determines whether or not the SDK should enable Video. if our **WebRTCHandler** has not been intialized yet we set the availabily and then call + /// **localVideoStreamEvent()** at a later point in time. The PeerConnection connection should only be nil if the call has not yet been established. + /// - Parameter isVideoEnabled: A Boolean value to determine enabling + @objc final public func enableLocalVideo(_ isVideoEnabled: Bool) + + /// Sends a DTMF message (to the server) given a number (0-9), ABCD, *, # as input. + /// - Parameters: + /// - code: The DTMF code in string format to be sent to the server + /// - localPlayback: A Boolean value to indicated whether or not the SDK should play the local DTMF Audio + @objc final public func playDTMFCode(_ code: String, localPlayback: Bool = false) + + /// This method ends the call entirely. If the call parameter is nil it will end the call associated with this current ACBClientCall object. However we may want to end a specific call which can be passed + /// in the parameter. + @objc final public func end() + + /// This method ends the call entirely. If the call parameter is nil it will end the call associated with this current ACBClientCall object. + /// However we may want to end a specific call which can be passed in the parameter. + /// When used in Objective-C a callback is available. + @objc final public func end() async +} + +extension ACBClientCall { + + /// You can use this method to tell FCSDK to hold a call. + @objc final public func hold() + + /// If your call is on ``hold()`` you may use this method to resume the call + @objc final public func resume() +} + +extension ACBClientCall { + + /// This is or method used to answer an incoming call. When a user calls our end point FCSDK will notify us of an incoming call, at that point we must answer the call with this method. + /// - Parameters: + /// - audioDir: The Direction we want to answer with. See... `ACBMediaDirection` + /// - videoDir: The Direction we want to answer with. See... `ACBMediaDirection` + @objc final public func answer(withAudio audioDir: FCSDKiOS.ACBMediaDirection, andVideo videoDir: FCSDKiOS.ACBMediaDirection) +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCallDelegate.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCallDelegate.md new file mode 100644 index 0000000..c77d8e8 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCallDelegate.md @@ -0,0 +1,49 @@ +# ACBClientCallDelegate + +Please see for an explanation of how to use ACBClientCallDelegate + +## Overview + +```swift +@objc public protocol ACBClientCallDelegate : NSObjectProtocol { + + /// Here we can receive the media change request from the delegate + @objc func callDidReceiveMediaChangeRequest(_ call: FCSDKiOS.ACBClientCall) + + /// Here we can be notified of `ACBClientCallStatus` changes + @objc func call(_ call: FCSDKiOS.ACBClientCall, didChange status: FCSDKiOS.ACBClientCallStatus) + + /// Here we can be notified on call failure + @objc func call(_ call: FCSDKiOS.ACBClientCall, didReceiveCallFailureWithError error: Error) + + /// Here we receive the call failure notice + @objc optional func call(_ call: FCSDKiOS.ACBClientCall, didReceiveDialFailureWithError error: Error) + + /// Here we receive the session interruption notice + @objc optional func call(_ call: FCSDKiOS.ACBClientCall, didReceiveSessionInterruption message: String) + + /// Here we receive the recording permission failure notice + @objc optional func call(_ call: FCSDKiOS.ACBClientCall?, didReceiveCallRecordingPermissionFailure message: String) + + /// Here we received the did change the remote display name notice + @objc optional func call(_ call: FCSDKiOS.ACBClientCall, didChangeRemoteDisplayName name: String) + + /// Here we are notfied when a call did add a local media stream + @objc optional func callDidAddLocalMediaStream(_ call: FCSDKiOS.ACBClientCall) + + /// Here we are notfied when a call did add a remote media stream + @objc optional func callDidAddRemoteMediaStream(_ call: FCSDKiOS.ACBClientCall) + + /// Here we are notified when we will receive media change requests + @objc optional func callWillReceiveMediaChangeRequest(_ call: FCSDKiOS.ACBClientCall) + + /// Here we will receive a notification when the inbound call quality will change + @objc optional func call(_ call: FCSDKiOS.ACBClientCall, didReportInboundQualityChange inboundQuality: Int) + + /// Here we are notfied when receiving SSRCs + @objc optional func call(_ call: FCSDKiOS.ACBClientCall, didReceiveSSRCsForAudio audioSSRCs: [AnyHashable]?, andVideo videoSSRCs: [AnyHashable]?) + + /// Here we are receive the provisional response + @objc optional func call(call: FCSDKiOS.ACBClientCall, didReceive responseStatus: FCSDKiOS.ACBClientCallProvisionalResponse, withReason reason: String?) +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCallErrorCode.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCallErrorCode.md new file mode 100644 index 0000000..e42138b --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCallErrorCode.md @@ -0,0 +1,89 @@ +# ACBClientCallErrorCode + +An enumeration of call error codes + +## Overview + +```swift +public enum ACBClientCallErrorCode : String, Error { + + /** Indicates that a general error has occurred when making an outgoing call. */ + case dialFailure + + /** Indicates that an attempt to make an outbound call failed because a call is already in progress. */ + case dialFailureCallInProgress + + /** Indicates that a general error has occurred with an established call. */ + case callFailure + + /** Indicates that the call was in the wrong state when an answer has been received. */ + case wrongStateWhenAnswerReceived + + /** Indicates that a session description could not be created. */ + case sessionDescriptionCreationError +} + +extension ACBClientCallErrorCode : CaseIterable { + + /// A type that can represent a collection of all values of this type. + public typealias AllCases = [FCSDKiOS.ACBClientCallErrorCode] + + /// A collection of all values of this type. + public static var allCases: [FCSDKiOS.ACBClientCallErrorCode] { get } +} + +extension ACBClientCallErrorCode : RawRepresentable { + + /// The raw type that can be used to represent all values of the conforming + /// type. + /// + /// Every distinct value of the conforming type has a corresponding unique + /// value of the `RawValue` type, but there may be values of the `RawValue` + /// type that don't have a corresponding value of the conforming type. + public typealias RawValue = String + + /// The corresponding value of the raw type. + /// + /// A new instance initialized with `rawValue` will be equivalent to this + /// instance. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// let selectedSize = PaperSize.Letter + /// print(selectedSize.rawValue) + /// // Prints "Letter" + /// + /// print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) + /// // Prints "true" + public var rawValue: FCSDKiOS.ACBClientCallErrorCode.RawValue { get } + + /// Creates a new instance with the specified raw value. + /// + /// If there is no value of the type that corresponds with the specified raw + /// value, this initializer returns `nil`. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// print(PaperSize(rawValue: "Legal")) + /// // Prints "Optional("PaperSize.Legal")" + /// + /// print(PaperSize(rawValue: "Tabloid")) + /// // Prints "nil" + /// + /// - Parameter rawValue: The raw value to use for the new instance. + public init?(rawValue: String) + + public static func < (lhs: FCSDKiOS.ACBClientCallErrorCode, rhs: FCSDKiOS.ACBClientCallErrorCode) -> Bool +} + +extension ACBClientCallErrorCode : Equatable { +} + +extension ACBClientCallErrorCode : Hashable { +} + +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCallProvisionalResponse.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCallProvisionalResponse.md new file mode 100644 index 0000000..a8ab576 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCallProvisionalResponse.md @@ -0,0 +1,77 @@ +# ACBClientCallProvisionalResponse + +A enum for provisional responses for SIP integration. Most applications will not need to implement. + +## Overview + +```swift +@objc public enum ACBClientCallProvisionalResponse : Int { + + /// Ignored + case ignored + + /// Indicates a ringing event + case ringing + + /// Indicates call is being forwarded + case beingForwarded + + /// Indicates call is queued + case queued + + /// Indicates general call progress + case sessionProgress + + /// Creates a new instance with the specified raw value. + /// + /// If there is no value of the type that corresponds with the specified raw + /// value, this initializer returns `nil`. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// print(PaperSize(rawValue: "Legal")) + /// // Prints "Optional("PaperSize.Legal")" + /// + /// print(PaperSize(rawValue: "Tabloid")) + /// // Prints "nil" + /// + /// - Parameter rawValue: The raw value to use for the new instance. + public init?(rawValue: Int) + + /// The raw type that can be used to represent all values of the conforming + /// type. + /// + /// Every distinct value of the conforming type has a corresponding unique + /// value of the `RawValue` type, but there may be values of the `RawValue` + /// type that don't have a corresponding value of the conforming type. + public typealias RawValue = Int + + /// The corresponding value of the raw type. + /// + /// A new instance initialized with `rawValue` will be equivalent to this + /// instance. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// let selectedSize = PaperSize.Letter + /// print(selectedSize.rawValue) + /// // Prints "Letter" + /// + /// print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) + /// // Prints "true" + public var rawValue: Int { get } +} + +extension ACBClientCallProvisionalResponse : Equatable { +} + +extension ACBClientCallProvisionalResponse : Hashable { +} + +extension ACBClientCallProvisionalResponse : RawRepresentable { +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCallStatus.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCallStatus.md new file mode 100644 index 0000000..32a8855 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientCallStatus.md @@ -0,0 +1,111 @@ +# ACBClientCallStatus + +The Status of an ACBClientCall. For implementation details please see and . + +## Overview + +```swift +/// `ACBClientCallStatus` determines the call flow base of FCSDK calls. +@objc public enum ACBClientCallStatus : Int, Comparable { + + /** Indicates the call is in a process of being setup. */ + case setup = 0 + + /** Indicates the call is ringing/alerting locally - incoming call. */ + case alerting + + /** Indicates the call is ringing on the remote side - outgoing call. */ + case ringing + + /** Indicates the call is connected and we're waiting for media streams to establish. */ + case mediaPending + + /** Indicates the call is in progress including media. */ + case inCall + + /** Indicates the dialled operation timed out. */ + case timedOut + + /** Indicates the dialled number is busy. */ + case busy + + /** Indicates the dialled number was unreachable. */ + case notFound + + /** Indicates the call has errored. */ + case error + + /** Indicates the call has ended. */ + case ended +} + +extension ACBClientCallStatus : CaseIterable { + + /// A type that can represent a collection of all values of this type. + public typealias AllCases = [FCSDKiOS.ACBClientCallStatus] + + /// A collection of all values of this type. + public static var allCases: [FCSDKiOS.ACBClientCallStatus] { get } +} + +extension ACBClientCallStatus : RawRepresentable { + + /// The raw type that can be used to represent all values of the conforming + /// type. + /// + /// Every distinct value of the conforming type has a corresponding unique + /// value of the `RawValue` type, but there may be values of the `RawValue` + /// type that don't have a corresponding value of the conforming type. + public typealias RawValue = String + + /// The corresponding value of the raw type. + /// + /// A new instance initialized with `rawValue` will be equivalent to this + /// instance. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// let selectedSize = PaperSize.Letter + /// print(selectedSize.rawValue) + /// // Prints "Letter" + /// + /// print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) + /// // Prints "true" + public var rawValue: FCSDKiOS.ACBClientCallStatus.RawValue { get } + + /// Creates a new instance with the specified raw value. + /// + /// If there is no value of the type that corresponds with the specified raw + /// value, this initializer returns `nil`. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// print(PaperSize(rawValue: "Legal")) + /// // Prints "Optional("PaperSize.Legal")" + /// + /// print(PaperSize(rawValue: "Tabloid")) + /// // Prints "nil" + /// + /// - Parameter rawValue: The raw value to use for the new instance. + public init?(rawValue: String) + + /// Returns a Boolean value indicating whether the value of the first + /// argument is less than that of the second argument. + /// + /// This function is the only requirement of the `Comparable` protocol. The + /// remainder of the relational operator functions are implemented by the + /// standard library for any type that conforms to `Comparable`. + /// + /// - Parameters: + /// - lhs: A value to compare. + /// - rhs: Another value to compare. + public static func < (lhs: FCSDKiOS.ACBClientCallStatus, rhs: FCSDKiOS.ACBClientCallStatus) -> Bool +} + +extension ACBClientCallStatus : Hashable { +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientPhone.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientPhone.md new file mode 100644 index 0000000..6c705f2 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientPhone.md @@ -0,0 +1,62 @@ +# ACBClientPhone + +Please see for an explanation of how to use ACBClientCall + +## Overview + +```swift +/// ``ACBClientPhone`` is an object that does all of the phone related work. You can expecte inbound and outbound call flows to originate from this class. +/// It is important to note that ``ACBClientPhone`` is lazily initialize once per ``ACBUC`` registration. +@objc final public class ACBClientPhone : NSObject { + + /// If true, the preview view is mirrored when using a front-facing camera (see .setCamera()). Does not affect video sent to callee. + @objc final public var mirrorFrontFacingCameraPreview: Bool + + /// An array of calls that are currently in progress. + @objc final public var currentCalls: [FCSDKiOS.ACBClientCall]? { get } + + /// The phone delegate. + @objc weak final public var delegate: FCSDKiOS.ACBClientPhoneDelegate? + + /// Manages audio session + @objc final public var audioDeviceManager: FCSDKiOS.ACBAudioDeviceManager { get } + + /// The preferred capture resolution. If no preferred resolution is specified, the best SD resolution that the device is capable of will be chosen. + @objc final public var preferredCaptureResolution: FCSDKiOS.ACBVideoCapture + + /// The preferred capture framerate. If no preferred frame rate is specified, the best frame rate that the device is capable of will be chosen. + @objc final public var preferredCaptureFrameRate: UInt + + /// This computed property is used to set the App's preview view for video calls using ``ACBView``. + @objc final public var previewView: UIView? + + /// This computed property is used to set the App's remote view for video calls using ``ACBView``. + @objc final public var remoteView: UIView? + + /// This method can be used to request permisions to use the microphone and camera. + /// - Parameters: + /// - audio: A boolean to indicate whether or not to request audio permissions + /// - video: A boolean to indicate whether or not to request video permissions + @objc final public class func requestMicrophoneAndCameraPermission(_ audio: Bool, video: Bool) async + + /// Sets the camera to be used based off the ``ACBClientCall``'s camera. + /// - Parameter camera: Camera postion i.e (.front, .back) + @objc final public func setCamera(_ camera: AVCaptureDevice.Position) + + /// Used to capture recommended settings + /// - Returns: The device Info's recommended capture settings + @objc final public func recommendedCaptureSettings() -> [FCSDKiOS.ACBVideoCaptureSetting]? +} + +extension ACBClientPhone { + + /// This method is the entry point in creating Outgoing FCSDK Calls. Call this method to start an FCSDK Outbound call. + /// - Parameters: + /// - remoteAddress: The address in string format you want to call + /// - audioDirection: The ``ACBMediaDirection`` for the audio on the call + /// - videoDirection: The ``ACBMediaDirection`` for the video on the call + /// - delegate: The ``ACBClientCallDelegate`` + /// - Returns: The ``ACBClientCall`` + @objc final public func createCall(toAddress remoteAddress: String, withAudio audioDirection: FCSDKiOS.ACBMediaDirection, video videoDirection: FCSDKiOS.ACBMediaDirection, delegate: FCSDKiOS.ACBClientCallDelegate?) -> FCSDKiOS.ACBClientCall? +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientPhoneDelegate.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientPhoneDelegate.md new file mode 100644 index 0000000..bf91221 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBClientPhoneDelegate.md @@ -0,0 +1,16 @@ +# ACBClientPhoneDelegate + +ACBClientPhoneDelegate is used to reveive notifications on the ACBClientPhone Object. Incoming calls are generated on the phone object. For more implementation details please see . + +## Overview + +```swift +@objc public protocol ACBClientPhoneDelegate : NSObjectProtocol { + + /// A notification to indicate an incoming call. + @objc func phone(_ phone: FCSDKiOS.ACBClientPhone, didReceiveCall call: FCSDKiOS.ACBClientCall) + + /// A notification that video is being captured at a specified resolution and frame-rate. Depending on the capabilities of the device, these settings may be different from the preferred resolution and framerate set on the phone. + @objc optional func phone(_ phone: FCSDKiOS.ACBClientPhone, didChangeSettings settings: FCSDKiOS.ACBVideoCaptureSetting?, forCamera camera: AVCaptureDevice.Position) +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBDevice.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBDevice.md new file mode 100644 index 0000000..da10673 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBDevice.md @@ -0,0 +1,15 @@ +# ACBVideoDevice + +Contains a method used to return an array of capture settings. + +## Overview + +```swift +/// We Define our device based off of the appropriate capture settings +final public class ACBDevice { + + /// FCSDK's ``ACBDevice`` Object's ``recommendedCaptureSettings()`` + /// - Returns: An array of ``ACBVideoCaptureSetting`` + @objc final public func recommendedCaptureSettings() -> [FCSDKiOS.ACBVideoCaptureSetting] +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBMediaDirection.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBMediaDirection.md new file mode 100644 index 0000000..e74cb41 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBMediaDirection.md @@ -0,0 +1,93 @@ +# ACBMediaDirection + +An enumeration containing possible media directions. This enum is useful for setting our video/audio direction. + +## Overview + +```swift +/// The media direction that we determine. **i.e (.sendOnly or .sendAndReceive)** +@objc public enum ACBMediaDirection : Int, Comparable { + + /// no media direction + case none + + /// only sending media + case sendOnly + + /// only receving media + case receiveOnly + + /// send and receive media + case sendAndReceive +} + +extension ACBMediaDirection : CaseIterable { + + /// A type that can represent a collection of all values of this type. + public typealias AllCases = [FCSDKiOS.ACBMediaDirection] + + /// A collection of all values of this type. + public static var allCases: [FCSDKiOS.ACBMediaDirection] { get } +} + +extension ACBMediaDirection : RawRepresentable { + + /// The raw type that can be used to represent all values of the conforming + /// type. + /// + /// Every distinct value of the conforming type has a corresponding unique + /// value of the `RawValue` type, but there may be values of the `RawValue` + /// type that don't have a corresponding value of the conforming type. + public typealias RawValue = String + + /// The corresponding value of the raw type. + /// + /// A new instance initialized with `rawValue` will be equivalent to this + /// instance. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// let selectedSize = PaperSize.Letter + /// print(selectedSize.rawValue) + /// // Prints "Letter" + /// + /// print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) + /// // Prints "true" + public var rawValue: FCSDKiOS.ACBMediaDirection.RawValue { get } + + /// Creates a new instance with the specified raw value. + /// + /// If there is no value of the type that corresponds with the specified raw + /// value, this initializer returns `nil`. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// print(PaperSize(rawValue: "Legal")) + /// // Prints "Optional("PaperSize.Legal")" + /// + /// print(PaperSize(rawValue: "Tabloid")) + /// // Prints "nil" + /// + /// - Parameter rawValue: The raw value to use for the new instance. + public init?(rawValue: String) + + /// Returns a Boolean value indicating whether the value of the first + /// argument is less than that of the second argument. + /// + /// This function is the only requirement of the `Comparable` protocol. The + /// remainder of the relational operator functions are implemented by the + /// standard library for any type that conforms to `Comparable`. + /// + /// - Parameters: + /// - lhs: A value to compare. + /// - rhs: Another value to compare. + public static func < (lhs: FCSDKiOS.ACBMediaDirection, rhs: FCSDKiOS.ACBMediaDirection) -> Bool +} + +extension ACBMediaDirection : Hashable { +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBTopic.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBTopic.md new file mode 100644 index 0000000..b9ff500 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBTopic.md @@ -0,0 +1,65 @@ +# ACBTopic + +ACBTopic represents the topic that we created in . On the topic we can perform different functionality. Please see for information on implementing. + +## Overview + +```swift +/// This class is used for creating AED Topics +@objc final public class ACBTopic : NSObject { + + /// The delegate for publicly exposing AED Topic methods + @objc weak final public var delegate: FCSDKiOS.ACBTopicDelegate? { get } + + /// A name for this topic + @objc final public var name: String { get } + + /// A boolean to determine if we are connected to this topic + @objc final public var connected: Bool { get } +} + +extension ACBTopic { + + /// This method will disconnect this object + @objc final public func disconnect() + + /// This method will disconnect this object. It is the same call as `disconnect()`, but in Objective-C you can get a completion handler. + @objc final public func disconnect() async + + /// This method will disconnect/delete the topic + /// - Parameter deleteTopic: A Boolean that determines to delete or not + @objc final public func disconnect(withDeleteFlag deleteTopic: Bool) + + /// This method will disconnect/delete the topic. In Objective-C you will get a callback on completion. + /// - Parameter deleteTopic: A Boolean that determines to delete or not. + @objc final public func disconnect(_ deleteTopic: Bool) async + + /// This method will create data for the currentTopic + /// - Parameters: + /// - key: The Key for the object + /// - value: The Value for the object + @objc final public func submitData(withKey key: String, value: String) + + /// This method will create data for the currentTopic. In Objective-C you will get a callback on completion. + /// - Parameters: + /// - key: The Key for the object + /// - value: The Value for the object + @objc final public func submitData(_ key: String, value: String) async + + /// This method will delete an data object with its key + /// - Parameter key: key for the object to delete + @objc final public func deleteData(withKey key: String) + + /// This method will delete an data object with its key. In Objective-C you will get a callback on completion. + /// - Parameter key: key for the object to delete + @objc final public func deleteData(_ key: String) async + + /// This method will create an AED Message + /// - Parameter aedMessage: A message to send + @objc final public func sendAedMessage(message aedMessage: String) + + /// This method will create an AED Message. In Objective-C you will get a callback on completion. + /// - Parameter aedMessage: A message to send + @objc final public func sendAedMessage(_ aedMessage: String) async +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBTopicDelegate.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBTopicDelegate.md new file mode 100644 index 0000000..83eab81 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBTopicDelegate.md @@ -0,0 +1,49 @@ +# ACBTopicDelegate + +The methods available to call via ACBTopic. + +## Overview + +```swift +@objc public protocol ACBTopicDelegate : NSObjectProtocol { + + /// Connects to a topic with a given data + @objc func topic(_ topic: FCSDKiOS.ACBTopic, didConnectWithData data: FCSDKiOS.AedData) + + /// Delete a message from a topic + @objc func topic(_ topic: FCSDKiOS.ACBTopic, didDeleteWithMessage message: String) + + /// Topic to submit + @objc func topic(_ topic: FCSDKiOS.ACBTopic, didSubmitWithKey key: String, value: String, version: Int) + + /// Topic to delete + @objc func topic(_ topic: FCSDKiOS.ACBTopic, didDeleteDataSuccessfullyWithKey key: String, version: Int) + + /// Gets the topic and then notifies the delegate with the message + @objc func topic(_ topic: FCSDKiOS.ACBTopic, didSendMessageSuccessfullyWithMessage message: String) + + /// Connection failed with message + @objc func topic(_ topic: FCSDKiOS.ACBTopic, didNotConnectWithMessage message: String) + + /// Did not delete with message + @objc func topic(_ topic: FCSDKiOS.ACBTopic, didNotDeleteWithMessage message: String) + + /// Did not submit key with message + @objc func topic(_ topic: FCSDKiOS.ACBTopic, didNotSubmitWithKey key: String, value: String, message: String) + + /// Did not delete data with message + @objc func topic(_ topic: FCSDKiOS.ACBTopic, didNotDeleteDataWithKey key: String, message: String) + + /// Did not send message with origianl message + @objc func topic(_ topic: FCSDKiOS.ACBTopic, didNotSendMessage originalMessage: String, message: String) + + /// A Topic to delete + @objc func topicDidDelete(_ topic: FCSDKiOS.ACBTopic?) + + /// Did update key + @objc func topic(_ topic: FCSDKiOS.ACBTopic, didUpdateWithKey key: String, value: String, version: Int, deleted: Bool) + + /// Did receive message + @objc func topic(_ topic: FCSDKiOS.ACBTopic, didReceiveMessage message: String) +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBUCDelegate.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBUCDelegate.md new file mode 100644 index 0000000..674ec63 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBUCDelegate.md @@ -0,0 +1,64 @@ +# ACBUCDelegate + +These are the methods available to you that you will need to use to be notified of FCSDK's behavior. + +## Overview + +```swift +/** + The delegate for the ACBUC instance. The delegate deals with session establishment notifications and high-level error scenarios. + */ +@objc public protocol ACBUCDelegate : NSObjectProtocol { + + /** A notification to indicate that the session has been initialised successfully. + - Parameters: + - uc: uc The UC. + */ + @objc func ucDidStartSession(_ uc: FCSDKiOS.ACBUC) + + /** A notification to indicate that initialisation of the session failed. + - Parameters: + - uc: uc The UC. + */ + @objc func ucDidFail(toStartSession uc: FCSDKiOS.ACBUC) + + /** A notification to indicate that the server has experienced a system failure. + - Parameters: + - uc: uc The UC. + */ + @objc func ucDidReceiveSystemFailure(_ uc: FCSDKiOS.ACBUC) + + /** A notification to indicate that there are problems with the network connection, the session + has been lost, and all reconnection attempts have failed. See `uc(uc: ACBUC?, willRetryConnectionNumber attemptNumber: Int, in delay: TimerInterval)` + for details. + The app should log in again and re-establish a new session, or direct the user to do so. + - Parameters: + - uc: uc The UC. + */ + @objc func ucDidLoseConnection(_ uc: FCSDKiOS.ACBUC) + + /** A notification to indicate that there are problems with the network connection and that an attempt + will be made to re-establish the session. + + In the event of connection problems, several attempts to reconnect will be made, and each attempt will + be preceded by this notification. If after all of these attempts the session still cannot + be re-established, the delegate will receive the ``ucDidLoseConnection(_:)`` callback and the attempts + will stop. If one of the retries is successful then the delegate will receive the + ``ucDidReestablishConnection(_:)`` callback. + + The delegate can decide to stop this retry process at any point by calling `stopSession()`. + - Parameters: + - attemptNumber: - 1 indicates the first reconnection attempt, 2 the second attempt, etc. + - delay: - the next reconnection attempt will be made after this delay. + */ + @objc optional func uc(_ uc: FCSDKiOS.ACBUC, willRetryConnectionNumber attemptNumber: UInt, in delay: TimeInterval) + + /** + A notification to indicate that a reconnection attempt has succeeded. + See `uc(uc: ACBUC?, willRetryConnectionNumber attemptNumber: Int, in delay: TimerInterval)` for details. + - Parameters: + - uc: uc The UC. + */ + @objc optional func ucDidReestablishConnection(_ uc: FCSDKiOS.ACBUC) +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBUCObject.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBUCObject.md new file mode 100644 index 0000000..98055c0 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBUCObject.md @@ -0,0 +1,75 @@ +# ACBUCObject + +These are the methods available to you that you will need to use in order to create an FCSDK application. + +## Overview +```swift +/// This is the delegate used to interact with the methods related to ``ACBUC`` +@objc weak final public var delegate: FCSDKiOS.ACBUCDelegate? + +/// This is the ``ACBClientAED`` Object +@objc final public var aed: FCSDKiOS.ACBClientAED { get } + +/// This property allows applications to use cookies +@objc final public var useCookies: Bool + +/// This property gives the up to date websocket connection status +@objc final public var connection: Bool + +/// This method is used to override the LoggingSystem and writes the logs to a file for Debugging. **We want to only initialize the LoggingSystem Bootstrap once** +@objc final public class func logToFile(_ logLevel: FCSDKiOS.LoggingLevel = .debug) + +/// The static method to initialize the ``ACBUC`` object +/// - Parameters: +/// - withConfiguration: The Configuration string +/// - delegate: The ``ACBUCDelegate`` +/// - Returns: The ``ACBUC`` Object +@objc final public class func uc(withConfiguration: String, delegate: FCSDKiOS.ACBUCDelegate?) -> FCSDKiOS.ACBUC + +/// The static method to initialize the ``ACBUC`` object +/// - Parameters: +/// - withConfiguration: The Configuration string +/// - stunServers: An array of Stun Servers +/// - delegate: The ``ACBUCDelegate`` +/// - Returns: The ``ACBUC`` Object +@objc final public class func uc(withConfiguration: String, stunServers: [String]?, delegate: FCSDKiOS.ACBUCDelegate?) -> FCSDKiOS.ACBUC + +/// The static method to initialize the ``ACBUC`` object +/// - Parameters: +/// - withConfiguration: The Configuration string +/// - stunServers: An array of Stun Servers +/// - delegate: The ``ACBUCDelegate`` +/// - options: Additional ``ACBUCOptions`` +/// - Returns: The ``ACBUC`` Object +@objc final public class func uc(withConfiguration: String, stunServers: [String]?, delegate: FCSDKiOS.ACBUCDelegate?, options: FCSDKiOS.ACBUCOptions) -> FCSDKiOS.ACBUC + +/// This method initializes the ``ACBClientPhone`` object lazily because we only want to initialized it, if it has not yet been intialized. +/// This behavior is needed because FCSDK does not support concurrent calls. +/// When we register we create the ``ACBClientPhone`` object via the lazy variable. This will only be initialized once per registration. +/// in which we set our `communicationDelegate` +@objc final public var phone: FCSDKiOS.ACBClientPhone + +/// Starts the call session async without a callback +@objc final public func startSession() + +///Starts the a call session. A callback is available on completion in Objective-C +@objc final public func startSession() async + +/// Stops a server session +@objc final public func stopSession() + +/// Stops a server session. A callback is available on completion in Objective-C +@objc final public func stopSession() async + +/// Use this method to notify FCSDK that the application has a network connection +/// - Parameter networkSatisfied: A boolean value determining whether or not the application has a network connection +@objc final public func setNetworkReachable(_ networkSatisfied: Bool) + +/// Use this method to notify FCSDK that the application has a network connection. A callback is available on completion in Objective-C +/// - Parameter networkSatisfied: A boolean value determining whether or not the application has a network connection +@objc final public func setNetworkReachable(_ networkSatisfied: Bool) async + +/// This method tells FCSDK the rule determined to allow any certificate +/// - Parameter accept: A boolean value determining whether or not the server accepts any certificate +@objc final public func acceptAnyCertificate(_ accept: Bool) +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBUCOptions.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBUCOptions.md new file mode 100644 index 0000000..b1cec53 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBUCOptions.md @@ -0,0 +1,161 @@ +# ACBUCOptions + +This is an outline of which ACBUCOptions are available to you in your custom apps. Generally you will not need to be concerned using these Options + +## Overview + +```swift +/** + Advanced options that can be specified when creating the ACBUC object (see + `uc(withConfiguration:stunServers:delegate:options:)`). Most applications will not need to use these options, and + should use one of the other `uc(withConfiguration...)` functions instead. + */ +@objc final public class ACBUCOptions : NSObject, OptionSet { + + /** Equivalent to not specifying any options. */ + @objc public static func none() -> FCSDKiOS.ACBUCOptions + + /** + Specifying this option replaces the iOS system echo cancellation (provided by the Voice Processing Audio Unit) + with an alternative software-based echo cancellation algorithm. Most applications will find the default + behaviour to provide the best performance, but this option may be worth experimenting with in case of echo + problems. + */ + @objc public static func useSoftwareEchoCancellation() -> FCSDKiOS.ACBUCOptions + + /** + Specifying this option disables iOS system voice processing (provided by the Voice Processing Audio Unit) + and does not use any form of echo cancellation. Note that ACBUCOptionUseSoftwareEchoCancellation has no effect + if ACBUCOptionNoVoiceProcessing is specified. + */ + @objc public static func noVoiceProcessing() -> FCSDKiOS.ACBUCOptions + + /// The corresponding value of the raw type. + /// + /// A new instance initialized with `rawValue` will be equivalent to this + /// instance. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// let selectedSize = PaperSize.Letter + /// print(selectedSize.rawValue) + /// // Prints "Letter" + /// + /// print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) + /// // Prints "true" + final public var rawValue: Int + + /// The raw type that can be used to represent all values of the conforming + /// type. + /// + /// Every distinct value of the conforming type has a corresponding unique + /// value of the `RawValue` type, but there may be values of the `RawValue` + /// type that don't have a corresponding value of the conforming type. + public typealias RawValue = Int + + /// Creates an empty set. + /// + /// This initializer is equivalent to initializing with an empty array + /// literal. For example, you create an empty `Set` instance with either + /// this initializer or with an empty array literal. + /// + /// var emptySet = Set() + /// print(emptySet.isEmpty) + /// // Prints "true" + /// + /// emptySet = [] + /// print(emptySet.isEmpty) + /// // Prints "true" + override dynamic public convenience init() + + /// Creates a new option set from the given raw value. + /// + /// This initializer always succeeds, even if the value passed as `rawValue` + /// exceeds the static properties declared as part of the option set. This + /// example creates an instance of `ShippingOptions` with a raw value beyond + /// the highest element, with a bit mask that effectively contains all the + /// declared static members. + /// + /// let extraOptions = ShippingOptions(rawValue: 255) + /// print(extraOptions.isStrictSuperset(of: .all)) + /// // Prints "true" + /// + /// - Parameter rawValue: The raw value of the option set to create. Each bit + /// of `rawValue` potentially represents an element of the option set, + /// though raw values may include bits that are not defined as distinct + /// values of the `OptionSet` type. + public init(rawValue: Int) + + @objc public convenience init(options: [FCSDKiOS.ACBUCOptions]) + + override final public var hash: Int { get } + + override final public func isEqual(_ object: Any?) -> Bool + + /// Adds the elements of the given set to the set. + /// + /// In the following example, the elements of the `visitors` set are added to + /// the `attendees` set: + /// + /// var attendees: Set = ["Alicia", "Bethany", "Diana"] + /// let visitors: Set = ["Diana", "Marcia", "Nathaniel"] + /// attendees.formUnion(visitors) + /// print(attendees) + /// // Prints "["Diana", "Nathaniel", "Bethany", "Alicia", "Marcia"]" + /// + /// If the set already contains one or more elements that are also in + /// `other`, the existing members are kept. + /// + /// var initialIndices = Set(0..<5) + /// initialIndices.formUnion([2, 3, 6, 7]) + /// print(initialIndices) + /// // Prints "[2, 4, 6, 7, 0, 1, 3]" + /// + /// - Parameter other: A set of the same type as the current set. + final public func formUnion(_ other: FCSDKiOS.ACBUCOptions) + + /// Removes the elements of this set that aren't also in the given set. + /// + /// In the following example, the elements of the `employees` set that are + /// not also members of the `neighbors` set are removed. In particular, the + /// names `"Alicia"`, `"Chris"`, and `"Diana"` are removed. + /// + /// var employees: Set = ["Alicia", "Bethany", "Chris", "Diana", "Eric"] + /// let neighbors: Set = ["Bethany", "Eric", "Forlani", "Greta"] + /// employees.formIntersection(neighbors) + /// print(employees) + /// // Prints "["Bethany", "Eric"]" + /// + /// - Parameter other: A set of the same type as the current set. + final public func formIntersection(_ other: FCSDKiOS.ACBUCOptions) + + /// Removes the elements of the set that are also in the given set and adds + /// the members of the given set that are not already in the set. + /// + /// In the following example, the elements of the `employees` set that are + /// also members of `neighbors` are removed from `employees`, while the + /// elements of `neighbors` that are not members of `employees` are added to + /// `employees`. In particular, the names `"Bethany"` and `"Eric"` are + /// removed from `employees` while the name `"Forlani"` is added. + /// + /// var employees: Set = ["Alicia", "Bethany", "Diana", "Eric"] + /// let neighbors: Set = ["Bethany", "Eric", "Forlani"] + /// employees.formSymmetricDifference(neighbors) + /// print(employees) + /// // Prints "["Diana", "Forlani", "Alicia"]" + /// + /// - Parameter other: A set of the same type. + final public func formSymmetricDifference(_ other: FCSDKiOS.ACBUCOptions) + + /// The type of the elements of an array literal. + public typealias ArrayLiteralElement = FCSDKiOS.ACBUCOptions + + /// The element type of the option set. + /// + /// To inherit all the default implementations from the `OptionSet` protocol, + /// the `Element` type must be `Self`, the default. + public typealias Element = FCSDKiOS.ACBUCOptions +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBVideoCapture.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBVideoCapture.md new file mode 100644 index 0000000..f3b68dc --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/ACBVideoCapture.md @@ -0,0 +1,108 @@ +# ACBVideoCapture + +An enumeration of Video Capture resolutions. + +## Overview + +```swift +/// Available Resolutions +@objc public enum ACBVideoCapture : Int, Comparable { + + /// automatic resolution best for the device + case resolutionAuto + + /// 352px by 288px + case resolution352x288 + + /// 640px by 480px + case resolution640x480 + + /// 1280px by 720px + case resolution1280x720 +} + +extension ACBVideoCapture : CaseIterable { + + /// A type that can represent a collection of all values of this type. + public typealias AllCases = [FCSDKiOS.ACBVideoCapture] + + /// A collection of all values of this type. + public static var allCases: [FCSDKiOS.ACBVideoCapture] { get } +} + +extension ACBVideoCapture : RawRepresentable { + + /// The raw type that can be used to represent all values of the conforming + /// type. + /// + /// Every distinct value of the conforming type has a corresponding unique + /// value of the `RawValue` type, but there may be values of the `RawValue` + /// type that don't have a corresponding value of the conforming type. + public typealias RawValue = String + + /// The corresponding value of the raw type. + /// + /// A new instance initialized with `rawValue` will be equivalent to this + /// instance. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// let selectedSize = PaperSize.Letter + /// print(selectedSize.rawValue) + /// // Prints "Letter" + /// + /// print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) + /// // Prints "true" + public var rawValue: FCSDKiOS.ACBVideoCapture.RawValue { get } + + /// Creates a new instance with the specified raw value. + /// + /// If there is no value of the type that corresponds with the specified raw + /// value, this initializer returns `nil`. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// print(PaperSize(rawValue: "Legal")) + /// // Prints "Optional("PaperSize.Legal")" + /// + /// print(PaperSize(rawValue: "Tabloid")) + /// // Prints "nil" + /// + /// - Parameter rawValue: The raw value to use for the new instance. + public init?(rawValue: String) + + /// Returns a Boolean value indicating whether the value of the first + /// argument is less than that of the second argument. + /// + /// This function is the only requirement of the `Comparable` protocol. The + /// remainder of the relational operator functions are implemented by the + /// standard library for any type that conforms to `Comparable`. + /// + /// - Parameters: + /// - lhs: A value to compare. + /// - rhs: Another value to compare. + public static func < (lhs: FCSDKiOS.ACBVideoCapture, rhs: FCSDKiOS.ACBVideoCapture) -> Bool +} + +extension ACBVideoCapture : Hashable { +} + +/// This class is used to set the Video Capture Settings, such as `resolution` and `frameRate`. +@objc final public class ACBVideoCaptureSetting : NSObject { + + /// The resolution to be set. See ``ACBVideoCapture`` + @objc final public var resolution: FCSDKiOS.ACBVideoCapture { get } + + /// An interger value to set as the frameRate + @objc final public var frameRate: UInt { get } + + /// We want to return the size for our capture resolution from our available resolutions + /// - Parameter resolution: The ``RawValue`` of a ``ACBVideoCapture``'s resolution + /// - Returns: ``CGSize`` + @objc final public class func sizeForVideoCaptureResolution(resolution: FCSDKiOS.ACBVideoCapture.RawValue) -> CGSize +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/AedData.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/AedData.md new file mode 100644 index 0000000..090beca --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/AedData.md @@ -0,0 +1,136 @@ +# AedData + +An Object used for AedData. Please see for information. + +## Overview + +```swift +/// Properties are optional for encoding and decoding puposes as defined by FCSDK +/// We also need to be a class because Objective-C doesn't play well with `Structs`` +@objc final public class AedData : NSObject, Codable { + + @objc final public var type: String? + + @objc final public var name: String? + + @objc final public var topicData: [FCSDKiOS.TopicData]? + + @objc final public var message: String? + + final public var timeout: Int? + + @objc final public var _timeout: NSNumber? + + /// Custom coding keys because the server is not consistent in case type + public enum CodingKeys : String, CodingKey { + + case type + + case name + + case topicData + + case message + + case timeout + + /// Creates a new instance with the specified raw value. + /// + /// If there is no value of the type that corresponds with the specified raw + /// value, this initializer returns `nil`. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// print(PaperSize(rawValue: "Legal")) + /// // Prints "Optional("PaperSize.Legal")" + /// + /// print(PaperSize(rawValue: "Tabloid")) + /// // Prints "nil" + /// + /// - Parameter rawValue: The raw value to use for the new instance. + public init?(rawValue: String) + + /// Creates a new instance from the given string. + /// + /// If the string passed as `stringValue` does not correspond to any instance + /// of this type, the result is `nil`. + /// + /// - parameter stringValue: The string value of the desired key. + public init?(stringValue: String) + + /// Creates a new instance from the specified integer. + /// + /// If the value passed as `intValue` does not correspond to any instance of + /// this type, the result is `nil`. + /// + /// - parameter intValue: The integer value of the desired key. + public init?(intValue: Int) + + /// The raw type that can be used to represent all values of the conforming + /// type. + /// + /// Every distinct value of the conforming type has a corresponding unique + /// value of the `RawValue` type, but there may be values of the `RawValue` + /// type that don't have a corresponding value of the conforming type. + public typealias RawValue = String + + /// The value to use in an integer-indexed collection (e.g. an int-keyed + /// dictionary). + public var intValue: Int? { get } + + /// The corresponding value of the raw type. + /// + /// A new instance initialized with `rawValue` will be equivalent to this + /// instance. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// let selectedSize = PaperSize.Letter + /// print(selectedSize.rawValue) + /// // Prints "Letter" + /// + /// print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) + /// // Prints "true" + public var rawValue: String { get } + + /// The string to use in a named collection (e.g. a string-keyed dictionary). + public var stringValue: String { get } + } + + public init(type: String? = nil, name: String? = nil, topicData: [FCSDKiOS.TopicData]? = nil, message: String? = nil, timeout: Int? = nil) + + @objc public convenience init(type: String? = nil, name: String? = nil, topicData: [FCSDKiOS.TopicData]? = nil, message: String? = nil, _timeout: NSNumber? = nil) + + /// Creates a new instance by decoding from the given decoder. + /// + /// This initializer throws an error if reading from the decoder fails, or + /// if the data read is corrupted or otherwise invalid. + /// + /// - Parameter decoder: The decoder to read data from. + required public init(from decoder: Decoder) throws + + /// Encodes this value into the given encoder. + /// + /// If the value fails to encode anything, `encoder` will encode an empty + /// keyed container in its place. + /// + /// This function throws an error if any values are invalid for the given + /// encoder's format. + /// + /// - Parameter encoder: The encoder to write data to. + final public func encode(to encoder: Encoder) throws +} + +extension AedData.CodingKeys : Equatable { +} + +extension AedData.CodingKeys : Hashable { +} + +extension AedData.CodingKeys : RawRepresentable { +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/Constants.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/Constants.md new file mode 100644 index 0000000..d59b45d --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/Constants.md @@ -0,0 +1,85 @@ +# Constants + +Constant things useful for FCSDK. LoggingLevel is especially helpful for setting how much information you can receive for debugging FCSDK applications. Please see for more information. + +## Overview + +```swift +/// Constants +@objc final public class Constants : NSObject { + + /// The Version of the SDK + @objc public static let SDK_VERSION_NUMBER: String + + override dynamic public init() +} + +@objc public enum LoggingLevel : Int { + + case trace + + case debug + + case info + + case notice + + case warning + + case error + + case critical + + /// Creates a new instance with the specified raw value. + /// + /// If there is no value of the type that corresponds with the specified raw + /// value, this initializer returns `nil`. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// print(PaperSize(rawValue: "Legal")) + /// // Prints "Optional("PaperSize.Legal")" + /// + /// print(PaperSize(rawValue: "Tabloid")) + /// // Prints "nil" + /// + /// - Parameter rawValue: The raw value to use for the new instance. + public init?(rawValue: Int) + + /// The raw type that can be used to represent all values of the conforming + /// type. + /// + /// Every distinct value of the conforming type has a corresponding unique + /// value of the `RawValue` type, but there may be values of the `RawValue` + /// type that don't have a corresponding value of the conforming type. + public typealias RawValue = Int + + /// The corresponding value of the raw type. + /// + /// A new instance initialized with `rawValue` will be equivalent to this + /// instance. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// let selectedSize = PaperSize.Letter + /// print(selectedSize.rawValue) + /// // Prints "Letter" + /// + /// print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) + /// // Prints "true" + public var rawValue: Int { get } +} + +extension LoggingLevel : Equatable { +} + +extension LoggingLevel : Hashable { +} + +extension LoggingLevel : RawRepresentable { +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/TopicData.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/TopicData.md new file mode 100644 index 0000000..d5bd294 --- /dev/null +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Symbols/TopicData.md @@ -0,0 +1,119 @@ +# TopicData + +An Object used for AED topics. Please see for information. + +## Overview +```swift +/// Properties are optional for encoding and decoding puposes as defined by FCSDK +/// We also need to be a class because Objective-C doesn't play well with `Structs`` +@objc final public class TopicData : NSObject, Codable { + + @objc final public var key: String? + + @objc final public var value: String? + + /// Custom coding keys because the server is not consistent in case type + public enum CodingKeys : String, CodingKey { + + case key + + case value + + /// Creates a new instance with the specified raw value. + /// + /// If there is no value of the type that corresponds with the specified raw + /// value, this initializer returns `nil`. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// print(PaperSize(rawValue: "Legal")) + /// // Prints "Optional("PaperSize.Legal")" + /// + /// print(PaperSize(rawValue: "Tabloid")) + /// // Prints "nil" + /// + /// - Parameter rawValue: The raw value to use for the new instance. + public init?(rawValue: String) + + /// Creates a new instance from the given string. + /// + /// If the string passed as `stringValue` does not correspond to any instance + /// of this type, the result is `nil`. + /// + /// - parameter stringValue: The string value of the desired key. + public init?(stringValue: String) + + /// Creates a new instance from the specified integer. + /// + /// If the value passed as `intValue` does not correspond to any instance of + /// this type, the result is `nil`. + /// + /// - parameter intValue: The integer value of the desired key. + public init?(intValue: Int) + + /// The raw type that can be used to represent all values of the conforming + /// type. + /// + /// Every distinct value of the conforming type has a corresponding unique + /// value of the `RawValue` type, but there may be values of the `RawValue` + /// type that don't have a corresponding value of the conforming type. + public typealias RawValue = String + + /// The value to use in an integer-indexed collection (e.g. an int-keyed + /// dictionary). + public var intValue: Int? { get } + + /// The corresponding value of the raw type. + /// + /// A new instance initialized with `rawValue` will be equivalent to this + /// instance. For example: + /// + /// enum PaperSize: String { + /// case A4, A5, Letter, Legal + /// } + /// + /// let selectedSize = PaperSize.Letter + /// print(selectedSize.rawValue) + /// // Prints "Letter" + /// + /// print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) + /// // Prints "true" + public var rawValue: String { get } + + /// The string to use in a named collection (e.g. a string-keyed dictionary). + public var stringValue: String { get } + } + + @objc public init(key: String, value: String) + + /// Creates a new instance by decoding from the given decoder. + /// + /// This initializer throws an error if reading from the decoder fails, or + /// if the data read is corrupted or otherwise invalid. + /// + /// - Parameter decoder: The decoder to read data from. + required public init(from decoder: Decoder) throws + + /// Encodes this value into the given encoder. + /// + /// If the value fails to encode anything, `encoder` will encode an empty + /// keyed container in its place. + /// + /// This function throws an error if any values are invalid for the given + /// encoder's format. + /// + /// - Parameter encoder: The encoder to write data to. + final public func encode(to encoder: Encoder) throws +} + +extension TopicData.CodingKeys : Equatable { +} + +extension TopicData.CodingKeys : Hashable { +} + +extension TopicData.CodingKeys : RawRepresentable { +} +``` diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/VideoCalls.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/VideoCalls.md index d42ea48..bdc13dd 100644 --- a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/VideoCalls.md +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/VideoCalls.md @@ -11,7 +11,7 @@ In the complex world of Video Calls our goal is to make it as simple as possible ## ACBClientCall -ACBClientCall is the Call Object for Video/Audio Calls. +ACBClientCall is a communication object for Video/Audio Calls. You will need to be familiar with the different methods and properties available to you for the Call Object. Please review the article for implementation details of ACBClientCall. ### RemoteView We need to make sure our UI is setup properly for our Video to stream. ACBClientCall has a property that we need to set called remoteView that is used for remote video. @@ -26,7 +26,7 @@ self.acbCall?.remoteView = self.remoteView ## ACBClientPhone -ACBClientPhone is the Communication Object For Video/Audio Calls. +ACBClientPhone is a communication object for Video/Audio Calls. You will need to be familiar with the different methods and properties available to you for the Phone Object. Please review the article for implementation details of ACBClientPhone. ### PreviewView We need to make sure our UI is setup properly for our Video to stream. ACBClientPhone has a property that we need to set called previewView that is used for local video. @@ -350,6 +350,51 @@ func answerFCSDKCall() async throws { ``` So if your delegates are set properly, your preview and remote views are set properly, your call flow conforms to the behavior expected by FCSDK, and if you have conformed to ACBClientPhoneDelegate and ACBClientCallDelegate then you should have Voice and Video Calls that work great. But just to clarify let's review. +### Switching between the Front and Back cameras + +By default, during video calls, FCSDK uses the front camera. The application can change this by calling the setCamera method of ACBClientPhone. + +```swift + func switchToBackCamera() { + self.phone.setCamera(.back) + } +``` + +Two parameters can be passed to this method: + +- .back + +- .front + +These enumeration values are in \. + +The camera setting persists between calls; if the back camera is enabled during a video call, the next video call will also use that camera. + +The method can be called at any time; if there are no active video calls, the value takes effect when a video call is next in progress. + +### Monitoring the State of a Call + +A call transitions through several states, and the application can monitor these by assigning a delegate to the call: + +```swift + func phone(_ phone: ACBClientPhone, didReceiveCall call: ACBClientCall) { + call.delegate = self + } +``` +Each state change fires the call:didChangeStatus: delegate method. As the outgoing call progresses toward being fully established, the application receives a number of calls to didChangeStatus, containing one of the enumeration values each time. + +The application can adjust the UI by switching on the value of the status parameter, to give the user suitable feedback, for example by playing a local audio file for ringing or alerting: +```swift + func call(_ call: ACBClientCall, didChange status: ACBClientCallStatus) + switch status { + case .ringing: + //React accordingly + case ...etc: //Respond to all cases or only desired cases by providing a default + default: + break + } +``` + ## Review There are 5 steps to making Voice and Video work. * Setup UI @@ -403,4 +448,5 @@ func phoneDidReceive(_ phone: ACBClientPhone?, call: ACBClientCall?) { } } ``` -#### Also it is to be noted that you will want to conform to *ACBClientCallDelegate* in order to receive call status updates as mentioned earlier. + +Also it is to be noted that you will want to conform to in order to receive call status updates as mentioned earlier. diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/VoIPCallsAndCallKit.md b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/VoIPCallsAndCallKit.md index b782b55..26375b9 100644 --- a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/VoIPCallsAndCallKit.md +++ b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/VoIPCallsAndCallKit.md @@ -9,7 +9,9 @@ Here we will discuss the process of setting up an application with VoIP enabled ## Setup VoIP apps need permissions to be VoIP apps on iOS. We have 3 main tasks to accomplish. 1. Enable Voice over IP Background mode + ![Enable VoIP](image_8.png) + 2. Create a VoIP Certificate on developer.apple.com and install it into your Keychain ## Certificates @@ -18,9 +20,13 @@ The first thing you are going to want to do is... 2. Press **Certificates +** 3. Scroll to services 4. Create the VoIP Service + ![Enable Voip Service](image_10.png) + Before you can complete the service creation you will need to request a certificate from a certificate authority. Go ahead and save it to disk. + ![Enable Voip Service](image_11.png) + Apple is going to ask for the certificate when you set up the VoIP Service afterward you can download the certificate and double click on it to have Keychain Access install it. ## CallKit diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-001.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-001.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-001.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-001.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-002.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-002.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-002.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-002.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-003.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-003.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-003.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-003.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-004.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-004.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-004.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-004.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-005.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-005.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-005.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-005.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-006.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-006.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-006.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-006.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-007.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-007.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-007.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-007.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-008.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-008.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-008.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-008.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-009.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-009.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-009.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-009.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-010.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-010.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Architecture/architecture-010.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/architecture-010.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-001.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-001.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-001.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-001.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-002.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-002.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-002.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-002.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-003.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-003.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-003.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-003.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-004.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-004.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-004.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-004.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-005.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-005.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-005.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-005.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-006.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-006.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-006.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-006.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-007.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-007.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-007.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-007.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-008.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-008.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-008.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-008.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-009.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-009.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-009.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-009.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-010.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-010.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-010.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-010.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-011.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-011.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-011.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-011.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-012.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-012.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-012.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-012.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-013.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-013.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-013.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-013.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-014.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-014.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-014.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-014.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-015.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-015.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-015.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-015.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-016.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-016.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-016.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-016.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-017.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-017.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-017.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-017.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-018.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-018.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-018.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-018.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-019.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-019.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-019.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-019.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-020.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-020.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-020.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-020.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-021.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-021.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-021.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-021.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-022.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-022.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-022.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-022.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-023.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-023.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-023.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-023.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-024.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-024.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-024.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-024.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-025.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-025.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-025.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-025.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-026.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-026.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Authenticate/authenticate-026.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/authenticate-026.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Calls/call-001.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/call-001.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Calls/call-001.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/call-001.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Calls/call-002.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/call-002.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Calls/call-002.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/call-002.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Calls/call-003.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/call-003.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Calls/call-003.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/call-003.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Calls/call-004.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/call-004.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Calls/call-004.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/call-004.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Group/design-001.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/design-001.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Group/design-001.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/design-001.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Group/design-002.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/design-002.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Group/design-002.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/design-002.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Group/design-003.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/design-003.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Group/design-003.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/design-003.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Group/design-004.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/design-004.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Group/design-004.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/design-004.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Group/design-005.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/design-005.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Group/design-005.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/design-005.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/VoIP/image_10.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_10.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/VoIP/image_10.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_10.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/VoIP/image_11.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_11.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/VoIP/image_11.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_11.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_3.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_3.png new file mode 100644 index 0000000..3a13cd6 Binary files /dev/null and b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_3.png differ diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_4.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_4.png new file mode 100644 index 0000000..ddbd090 Binary files /dev/null and b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_4.png differ diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_5.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_5.png new file mode 100644 index 0000000..9520838 Binary files /dev/null and b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_5.png differ diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Extras/image_6.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_6.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Extras/image_6.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_6.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Extras/image_7.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_7.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Extras/image_7.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_7.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Extras/image_8.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_8.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Extras/image_8.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_8.png diff --git a/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Extras/image_9.png b/Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_9.png similarity index 100% rename from Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/Resources/Extras/image_9.png rename to Sources/SwiftFCSDKiOS/SwiftFCSDKiOS.docc/image_9.png