We are testing the "PhoneMin" example in the iOS SDK 2.4.2
Although the original example is in objective-c we are converting it to swift (we need it to include it in our apps)
The connection is the same in both (the example and the real project), excepting for the diferent params for the connection.
But we are facing a problem when we initiate a call. In the example we have this code:
- (FPWCSApi2Call *)call {
FPWCSApi2Session *session = [FPWCSApi2getSessions][0];
FPWCSApi2CallOptions *options = [[FPWCSApi2CallOptionsalloc] init];
options.callee = _callee.input.text;
//used for only recv audio
.....
And in the real project in swift we are using this:
funccall() -> FPWCSApi2Call?{
let session:FPWCSApi2Session = FPWCSApi2.getSessions()![0] as! FPWCSApi2Session
let options:FPWCSApi2CallOptions = FPWCSApi2CallOptions()
options.callee = self.input.text
.....
This code works perfectly when we are using XCode in a development environment, building the app directly to an iPhone, but when the app is uploaded to iTunesConnect and we try it with TestFlight the application always crashes when is going to make the call. After investigating the cause we realized that the break is always in this line:
let session:FPWCSApi2Session = FPWCSApi2.getSessions()![0] as! FPWCSApi2Session
As we said this only happens when the app is uploaded to a production environment.
Any suggestion to fix it?
BR
Mario
Although the original example is in objective-c we are converting it to swift (we need it to include it in our apps)
The connection is the same in both (the example and the real project), excepting for the diferent params for the connection.
But we are facing a problem when we initiate a call. In the example we have this code:
- (FPWCSApi2Call *)call {
FPWCSApi2Session *session = [FPWCSApi2getSessions][0];
FPWCSApi2CallOptions *options = [[FPWCSApi2CallOptionsalloc] init];
options.callee = _callee.input.text;
//used for only recv audio
.....
And in the real project in swift we are using this:
funccall() -> FPWCSApi2Call?{
let session:FPWCSApi2Session = FPWCSApi2.getSessions()![0] as! FPWCSApi2Session
let options:FPWCSApi2CallOptions = FPWCSApi2CallOptions()
options.callee = self.input.text
.....
This code works perfectly when we are using XCode in a development environment, building the app directly to an iPhone, but when the app is uploaded to iTunesConnect and we try it with TestFlight the application always crashes when is going to make the call. After investigating the cause we realized that the break is always in this line:
let session:FPWCSApi2Session = FPWCSApi2.getSessions()![0] as! FPWCSApi2Session
As we said this only happens when the app is uploaded to a production environment.
Any suggestion to fix it?
BR
Mario