Locked
1
Reply
1
0
Objective C NSString ==> FREObject
Explorer
,
/t5/air-discussions/objective-c-nsstring-gt-freobject/td-p/3813008
Nov 30, 2011
Nov 30, 2011
Copy link to clipboard
Copied
Hi,
I am new to Objective C and am trying for some days already to get an iOS AIR native extension working.
I am confronted with the following problem:
Withing my function I have an NSString and would like to pass this over to the ActionsScript side as a "String". How can I create an adequate FREObject out of an NSString ???
Thanks for you help,
Henning
TOPICS
Development
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Engaged
,
LATEST
/t5/air-discussions/objective-c-nsstring-gt-freobject/m-p/3813009#M13480
Oct 10, 2012
Oct 10, 2012
Copy link to clipboard
Copied
It's pretty simple once you figure it out. In your FREFunction you'll need:
NSString * someString = @"test string";
FREObject result = NULL;
FRENewObjectFromUTF8( strlen((const char*)[someString UTF8String]) + 1, (const uint8_t*)[someString UTF8String], &result);
return result;
air native extensions // https://airnativeextensions.com
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
