Last active
May 28, 2019 11:52
-
-
Save vanessaaleung/52a879e004d403d77713f302b8b50e7e to your computer and use it in GitHub Desktop.
unityToIOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern "C" void unityToIOS(char *str) { | |
//add things you want to pass to iOS here | |
//e.g. I want to pass a string, I save the string in NSDictionary and assign it to userInfo | |
NSString* objcstring = @(str); | |
NSDictionary* dict = @{ @"data": objcstring}; | |
[[NSNotificationCenter defaultCenter] postNotificationName:@"NotificationName" | |
object:nil userInfo:dict]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment