iPad のユーザーの連絡先からホームページ/Web サイトにアクセスしようとしています。私は実際にAdobe Airのネイティブ拡張として使用されている既存のスクリプトを変更しようとしています - https://github.com/memeller/ContactEditor/blob/master/ContactEditorXCode/ContactEditor.m
私はObjective-C/xCodeに非常に慣れていないので、この余分なフィールドが返されるのに本当に苦労しています...誰か助けてください。
FREObject homepagesArray = NULL;
FRENewObject((const uint8_t*)"Array", 0, NULL, &homepagesArray, nil);
ABMultiValueRef homepages = ABRecordCopyValue(person, kABPersonHomePageLabel);
if(homepages)
{
for (CFIndex k=0; k < ABMultiValueGetCount(homepages); k++) {
NSString* homepage = (__bridge NSString*)ABMultiValueCopyValueAtIndex(homepages, k);
DLog(@"Adding homepage: %@",homepage);
FRENewObjectFromUTF8(strlen([homepage UTF8String])+1, (const uint8_t*)[homepage UTF8String], &retStr);
FRESetArrayElementAt(homepagesArray, k, retStr);
//[email release];
}
CFRelease(homepages);
FRESetObjectProperty(contact, (const uint8_t*)"homepages", homepagesArray, NULL);
}
else
FRESetObjectProperty(contact, (const uint8_t*)"homepages", NULL, NULL);
retStr=NULL;