Skip to main content
Inspiring
February 6, 2014
Answered

Updating ContactEditor ANE

  • February 6, 2014
  • 2 replies
  • 1420 views

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

This topic has been closed for replies.
Correct answer FunkyJunk

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.

2 replies

Known Participant
April 18, 2014

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!

FunkyJunkAuthor
Inspiring
February 7, 2014

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....

FunkyJunkAuthorCorrect answer
Inspiring
February 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.

Inspiring
April 6, 2014

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!