Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
6 Views

iOS MCU connection fails.

The connection was successful in windows or mac with javascript.

Environment:
 - Ver: 3.5.1
 - The certificate is self sign

First try:

AFHTTPRequestOperationManager * manager = [AFHTTPRequestOperationManager manager];
  manager.requestSerializer = [AFJSONRequestSerializer serializer];
  [manager.requestSerializer setValue: @ "* / *" forHTTPHeaderField: @ "Accept"];
  [manager.requestSerializer setValue: @ "application / json" forHTTPHeaderField: @ "Content-Type"];
  manager.responseSerializer = [AFHTTPResponseSerializer serializer];

  manager.securityPolicy.allowInvalidCertificates = NO;
  manager.securityPolicy.validatesDomainName = YES;

console log:
Error: Domain = NSURLErrorDomain Code = -1012 "(null)" UserInfo = {NSErrorFailingURLStringKey = https: //172.16.34.108:3004/createToken/, NSErrorFailingURLKey = https: //172.16.34.108: 3004 / createToken /
<0> HTTP load failed (error code: -999 [1:89]) Task <D27C7195-B242-4BBE-A65D-B93074EAD6D5> <0> WoogeenConference [444: 43799]

 

Second try:
 manager.securityPolicy.allowInvalidCertificates = YES;
 manager.securityPolicy.validatesDomainName = NO;

console log:
[2017-12-15 17:49:45] [connect] Successful connection
[2017-12-15 17:49:45] [connect] WebSocket Connection 172.16.34.108:8080 v-2 "WebSocket ++ / 0.5.1" /socket.io/?EIO=4&transport=websocket&t=1513327785 101

It will not run anymore here.

Tags (2)
0 Kudos
1 Reply
Highlighted
Beginner
6 Views

I solved it.
The iOS SDK version was 3.5.1 and the MCU server version was 3.4.1.
So I changed the version of MCU server from 3.4.1 to 3.5.1.

0 Kudos