How to convert the data to IOSBytesArray

Hi To all


I am not able to convert NSdata to IOSBytesArray, this method for using the audioCall for the rtpSession for the time delay calculate , so how to convert IOSBYTESARRAy in swift

Answered by OOPer in 360929022

What is IOSByteArray? I think it is not included in Apple's frameworks.


One more, better find a more appropriate topic area.

Accepted Answer

What is IOSByteArray? I think it is not included in Apple's frameworks.


One more, better find a more appropriate topic area.

Hi OOPER


we have java library and we have converted java to Objective c , in java they declares the Bytes[] , but in Objective c they declares as IOSBYTESARRAy, we want pass Nsdata to IOSBYTESARRAY



className.h

- (IOSLongArray *)sendDataWithByteArray:(IOSByteArray *)buf;



className.m


- (IOSLongArray *)sendDataWithByteArray:(IOSByteArray *)buf {

NSLog(@"Print the buf iosbytes array:%@ ", buf);

IOSObjectArray *tmp = [IOSObjectArray arrayWithObjects:(id[]){ buf } count:1 type:IOSClass_byteArray(1)];

IOSObjectArray *ret = [self sendDataWithByteArray2:tmp withLongArray:nil withBooleanArray:nil withLong:-1 withLongArray:nil];

if (ret != nil) return IOSObjectArray_Get(ret, 0);

return nil;

}


in swift we are return

className.sendData( ....... ) // we have pass IOSBYtesArray

Sorry, but the type `IOSByteArray` seems to belong to the Java-to-ObjectiveC converter, and we cannot know the detals about it.


Generally, generated Objective-C codes are hard to read and hard to migrate into an actual app.

Please find some doc of the type or avoid using the converter.


One more, you should better not mark the thread as SOLVED unless your issue actually is solved.

How to convert the data to IOSBytesArray
 
 
Q