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

Updating ContactEditor ANE

Explorer ,
Feb 06, 2014 Feb 06, 2014

Copy link to clipboard

Copied

Hi Everyone,

I'm trying to make an update to the ContactEditor ANE as when calling getContactDetails is doesn't return all the fields available; in particular homepage and organisation.

I can't for the life of me work out where I'm going wrong, but when testing the new ANE the App just crashes and quits. No errorrs or anything.

I've tested that it's not a compiling issue by just recompile the source without editing it. All works fine.

The only file that I am editing is ContactEditor.m - https://github.com/memeller/ContactEditor/blob/master/ContactEditorXCode/ContactEditor.m

The function can be found from line 307 onwards. I'm added the following at line 373 :

//homepage

            CFStringRef personHomepage = ABRecordCopyValue(person, kABPersonHomePageLabel);

            if(personHomepage)

            {

                NSString *personHomepageString = [NSString stringWithString__bridge NSString *)personHomepage];

                DLog(@"Adding homepage: %@",personHomepageString);

                FRENewObjectFromUTF8(strlen([personHomepageString UTF8String])+1, (const uint8_t*)[personHomepageString UTF8String], &retStr);

                FRESetObjectProperty(contact, (const uint8_t*)"homepage", retStr, NULL);

                //[personSurNameString release];

                CFRelease(personHomepage);

            }

            else

            FRESetObjectProperty(contact, (const uint8_t*)"homepage", retStr, NULL);

            retStr=NULL;

I'm really new at editing/creating ANEs so please be patient. ( I watched some tutorials this morning on it )

I'm guessing it is something to do with compiling the xcode project with the new source or something... well tbh I've no idea that's just a guess

Please can someone help?

Many thanks

TOPICS
Development

Views

1.3K

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

correct answers 1 Correct answer

Explorer , Feb 10, 2014 Feb 10, 2014

Managed to get an answer from Stackoverflow - http://stackoverflow.com/questions/21633346/read-kabpersonhomepagelabel-from-contact/21667900#21667900

I've updated the iOS ContactEditor ANE to read in Organisation and Hompage is anyone is interested.

Votes

Translate

Translate
Explorer ,
Feb 07, 2014 Feb 07, 2014

Copy link to clipboard

Copied

Ok after another day of trying to work this out... I've found out that you can get crash reports from xCode...

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)

Exception Subtype: KERN_INVALID_ADDRESS at 0xd4f1cb04

Triggered by Thread:  0

Thread 0 Crashed:

0   AppSupport                              0x3388d57c CPRecordCopyProperty + 28

However I've no idea what that means....

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
Explorer ,
Feb 10, 2014 Feb 10, 2014

Copy link to clipboard

Copied

Managed to get an answer from Stackoverflow - http://stackoverflow.com/questions/21633346/read-kabpersonhomepagelabel-from-contact/21667900#216679...

I've updated the iOS ContactEditor ANE to read in Organisation and Hompage is anyone is interested.

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
Explorer ,
Apr 06, 2014 Apr 06, 2014

Copy link to clipboard

Copied

Hi,

I simply need to save a new contact into the address book (iOS and Android) but I can't run this ane.

After I included the ANE (flash cc) and declared a var, if I run the emulator I got this error:

"Provided parameter LoaderContext.SecurityDomain is from a disallowed domain. 2113"

You are talking about to modify the ane so I guess you have sucesfully used the "old" version...

I hope you can give me some advices, thanks!

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
Participant ,
Apr 18, 2014 Apr 18, 2014

Copy link to clipboard

Copied

LATEST

I have an issue with this ANE.  If I have a listener for ContactEditorEvent.CONTACT_SELECTED and issue pickContact()... then select a contact from Facebook, my app crashes.

Anyone see this happen and have a solution?

Thanks!

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