• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Objective C NSString ==> FREObject

Explorer ,
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

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 10, 2012 Oct 10, 2012

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines