Git Product home page Git Product logo

spark-ios-sdk's People

Contributors

asynchrony-ringo avatar bbender avatar dciobanu avatar joe-still avatar kliu avatar noble-six avatar olivierproffit avatar pauzhang-cisco avatar qucui avatar rwpeek avatar xiuwwu avatar xu0101 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spark-ios-sdk's Issues

Server-side support

It would be awesome to be able to use the SDK for building bots etc. at server side :)

Unable to determine if an incoming call is a video or audio call

It would be useful if the video/audio settings of an incoming call were accessible through the Call class. The video/audio settings are available internally through CallInfo, but that information isn't making it out of the SDK to the consumer. There are three existing variables called sendingVideo, receivingVideo, and remoteSendingVideo in the Call class. It's a little unclear the difference between remoteSendingVideo and receivingVideo as they seem like very close concepts. In either case, however, they provide the wrong information at the entry point CallObserver.callIncoming(_ call: Call). Even when the other party has an audio-only call, all of those properties return 'true', which clearly makes no sense.

Note that the CallObserver is on the 'jwt' branch, and this used to be on the PhoneObserver in master.

We see the information is available under the other participant/status as videoStatus, which will be SENDRECV if there is video and INACTIVE if there is not.

Answering a call on two devices at the same time causes problems

Steps to reproduce:

  1. Log in with the same user on two different devices with fresh installs.
  2. Log in with a second user on a third device.
  3. Go to the incoming call screen on the first two devices.
  4. Call the first user with the third device.
  5. Answer the call at the same time on the first two devices.

Result on Master branch: One of the devices crashes and the other starts a normal call.

Result on JWT branch: Either all three devices will end up in a call or two devices will go into a call and the third will hang up. Either way, future calls from the third device to the first two devices will fail until all three devices concurrently log out of Spark.

When the third device calls and then hangs up, it won't leave the call screen. Instead, the video from its camera will go black.


Our best guess is that the server is ending up with corrupted call information and not refreshing it until everyone logs out.

Evidence to that effect: If you log in on new devices as the same users, those devices end up in the same broken state.

Steps to reproduce the evidence:
If the state is broken as above, and you log in as the first user on a fourth device and the second user on a fifth device, the fifth device still can't call the fourth device. They're in that same broken state.

Spark JWT authentication

Hello

I'm trying to create an app that allows users to authenticate as guest users with spark SDK and make video calls, can this be done with the JWT authentication of the SDK?

thanks.

Add support for sending region and device type in join/call requests to locus

In order to support decoupling Locus and WDM, clients should include the same deviceType and region information with join/call requests as they do in WDM registration.

Today the join request looks like:

{
    "correlationId": "bc5a6d40-9f7f-4691-8186-cf555a999883",
    "deviceUrl": "https://wdm-a.wbx2.com/wdm/api/v1/devices/ios/80f3cea3-c6ab-473e-9de2-95c58cc8d5cf",
    "localMedias": [ {
        "localSdp": "<sdp value>",
        "topologyHints": [],
        "type": "SDP",
    } ],
    "moderator": false,
    "supportsNativeLobby": true
}

Change it to:

{
    "correlationId": "bc5a6d40-9f7f-4691-8186-cf555a999883",
    "localMedias": [ {
        "localSdp": "<sdp value>",
        "topologyHints": [],
        "type": "SDP",
    } ],
    "device": {
        "url": "https://wdm-a.wbx2.com/wdm/api/v1/devices/ios/80f3cea3-c6ab-473e-9de2-95c58cc8d5cf",
        "deviceType": “xxx”,
        "regionCode": “US-WEST”,
        "countryCode: “01”
    },
    "moderator": false,
    "supportsNativeLobby": true
}

where region and country code come from https://ds.ciscospark.com/v1/region.

Race condition while setting up device registration

There are several classes involved in device registration and initialization of the phone. The entry point is Phone.register. It makes a service call to do the actual registration then kicks off multiple processes that begin to race against each other.

  1. The WebSocketService is told to connect.
  2. The active calls are retrieved from the CallClient through the CallManager.
  3. When the WebSocketService finally connects, then a) the reachability service is kicked off to collect Reachability data and b) new CallInfo begins to flow in to the WebSocketService
  4. CallManager will process CallInfo from both the active calls returned from the service call from (2) or from (3b) then it will interact in complex ways, sometimes needing the Reachability (3a) which may not have completed.

The entire process of registering the device, starting the web socket, and obtaining reachability information should probably take place completely before any processing of CallInfo objects from either the web socket or the service. Those can still take in the data, but should pass it through to a stateful model (probably a refactored version of the CallManager/Phone) than can manage the processing of those only when it makes sense to do so. This would also be a good place to manage concepts of disconnects and reregistration.

Use latest version of ObjectMapper and SwiftyJSON

Hi there,

As per the podspec these two pods are stuck to old versions:
s.dependency 'ObjectMapper', '> 2.0'
s.dependency 'SwiftyJSON', '
> 3.0'

Whereas the most recent versions of these pods are as such:
ObjectMapper (3.1.0)
SwiftyJSON (4.0.0)

Our mobile app needs to use those pods latest versions.

Is there a plan to update spark-ios-sdk accordingly?

Thanks in advance.

Refresh token in iOS Spark Integration.

I have integrated Spark SDK into an iOS application. I have done authorization and am able to perform Spark features (i.e., Sending message, Video Calling, Creating Room, etc..)

I have done the authorization using SDK as follows.

**let authenticator = OAuthAuthenticator(clientId: clientId, clientSecret: clientSecret, scope: scope, redirectUri: redirectUri)
let spark = Spark(authenticator: authenticator)

if !authenticator.authorized {
  authenticator.authorize(parentViewController: self) { success in
    if !success {
      print("User not authorized")
    }
 }
}**

Do we have to do any additional implementation for refreshToken functionality? Or Will Spark SDK will take care of refreshing token from background?
Please guide me through the steps if we need to refresh the token explicitly.

Phone.requestVideoCodecActivation fails if the phone is not registered

When the user confirms their acceptance of the video codec, a call is made that requires a URL only obtained through the phone registration. If the phone is not registered by that time, it crashes. If the registration of the phone and the activation of the video codec are called at the same time, then a race condition exists in which the app crashes if the user accepts too quickly.

Mic/camera access dialogs prevent video from showing

We recently updated our SparkSDK pod to point to the latest develop branch, to get some as-of-yet unreleased fixes. We noticed after doing this that when you try to make a video call for the first time, when the app prompts to allow microphone and camera access, the video will never start properly.

We have worked around this by calling AVCaptureDevice.requestAccess prior to attempting the video call, but we still wanted to let you know this appears to be a regression currently in your develop branch.

Readme - Target Deployment Version for SparkSDK 1.1

After updating to Xcode version 8.2, I was unable to build projects using the new SparkSDK. This is because the current installation steps had instructed me to set the platform ios version set to 8.0. This resulted in many syntax and linker errors when using the latest version of Xcode.

To solve the problem:
1.) I updated Xcode and the Cocoapods gem to the latest versions.
2.) I changed the Xcode project's deployment target to 9.0.
3.) I changed the Podfile to include: platform :ios, '9.0', rather than 8.0.
Finally, I was able to pod install the correct versions and then I successfully build the project using the Spark 1.1 SDK.

Versions:
Cocoa pods (1.1.1)
macOS Sierra (10.12.2)
Xcode (8.2 (8C38)) (target iOS version set to 9.0)

Call state problem when hanging up early

Description: The application crashes when hanging up too quickly on an outgoing call

Reproduction: Make an outgoing call, but hang up before the initial service call to the server is complete.

Expected: The call is logically "hung up" and responds to the eventual server response by sending a new service call to terminate the call. In the case the first service call failed and the call never ended up being created in the first place, no call need be made afterward. In either case the hangup completion handler is not called until all service calls are completed.

Actual: The Call assumes a participant URL is already available, force-unwraps it and crashes

Note: The pull request #16 improves on this by immediately returning a "failure" to hang up, but that is not the ultimate desired behavior. It's better than crashing, but not perfect.

How to receive Message Events

Hello! just wanna find out how i should be receiving message events using the iOS SDK 1.4.1

I added the following to my ViewDidLoad :

sparkSDK.messages.onEvent = { messageEvent in
switch messageEvent{
case .messageReceived(let message):
// received message...
break
case .messageDeleted(let messageId):
// deleted messageId...
break
}
}

However, I can't seem to catch any messageReceived events... I do see the Receive Conversation Activity in my logs though...

Add support Alamofire 4.5.

Hi guys,

I have a conflict in dependencies for Alamofire framework. Spark-iOS SDK locks Alamofire version to 4.0.x, but I tried to update Podfile like below and it compiles without any errors.
Could you update your pod spec to support Alamofire for 4.5?
Thanks!

	pod 'Alamofire', '~> 4.0'
	pod 'ObjectMapper', '~> 2.0'
	pod 'AlamofireObjectMapper', '~> 4.0'

Compiler warning Seu.framework umbrella header

In version 1.4, when importing the SparkSDK, the Swift compiler generates the following warning messages:

<#Project directory#><module-includes>:1:1: Umbrella header for module 'Seu' does not include header 'NSData+Extensions.h'

<#Project directory#><module-includes>:1:1: Umbrella header for module 'Seu' does not include header 'KmsEphemeralKeyRequest+Private.h'

<#Project directory#><module-includes>:1:1: Umbrella header for module 'Seu' does not include header 'CjoseWrapper+Private.h'

These warnings occur because these headers are present in the Headers directory of the Seu.framework within the SparkSDK Pods project, but are not included in the Seu.h umbrella header. The issue can be replicated by building the latest version of the KitchenSink demo app.

The issue seems relatively simple to fix (either remove the headers from the public Header directory, or add them to the umbrella header), but because the framework is not open for outside collaborators I cannot submit a pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.