- Home /
Pass array of strings to iOS bridge?
How can I pass an array of strings to iOS bridge?
How about other types?
maybe you can join the strings and stick a rare character inbetween, then cut it back down in iOS? or... well this is very strange way but still - maybe you can create 2 functions, one accepting a string argument and augmenting an array on the iOS side and once all the strings are passed call the second function to process I'm pretty sure there must be a better way tho
Answer by Umai · Dec 25, 2014 at 09:08 AM
I found out how to do it like this:
void _Mj_iosbridge_dosomething(const char* urls[], int urlcount) {
for (int i = 0; i < urlcount; i++) {
NSString* stringurl = CreateNSString(urls[i]);
}
}
On the C# Unity side of things you have to send a List
etc converted to array, also you have to specify the length of the array in the next parameter.
Your answer
Follow this Question
Related Questions
Cocoa Bridge to Unity 2 Answers
Using HingeJoint2D to Join Objects at Specific Points 2 Answers
quixel bridge,quixel bridge live link 0 Answers
Wheel Colliders and Rope Bridges 1 Answer
Quickly Updating Texture2d in Unity from Android Java 0 Answers