This repository was archived by the owner on Jan 31, 2019. It is now read-only.
Description Hi,
I am trying to use mobileDeviceManger to get contacts from ios, For this I used
@implementation AMMobileSync
(id)initWithAMDevice:(AMDevice*)device
{
if (self = [super initWithName:@"com.apple.mobilesync" onDevice:device]) {
// wait for the version exchange
NSLog(@"waiting for the version exchange");
NSLog(@"%@", [self readXMLReply]);
NSLog(@"sending OK");
[self sendXMLRequest:[NSArray arrayWithObjects:@"DLMessageVersionExchange", @"DLVersionsOk",
[NSNumber numberWithInt:100],[NSNumber numberWithInt:100],nil]];
NSLog(@"%@", [self readXMLReply]);
[self getContactData];
}
return self;
}
(id)getContactData
{
NSDictionary *message;
message = [NSArray arrayWithObjects:
@"DLMessageProcessMessage",
[NSArray arrayWithObjects:
@"SDMessageProcessChanges",
@"com.apple.Contacts",
@"---",
[NSDate date],
[NSNumber numberWithInt:106], // protocol version 106
@"_EmptyParameterString _" ,
nil ],
nil];
NSLog(@"sending %@",message);
if ([self sendXMLRequest:message]) {
NSLog(@"waiting reply");
NSLog(@"%@", [self readXMLReply]);
}
return nil;
}
The output i got after using this is:
2015-06-02 10:45:24.125 mobileDeviceManager[1919:a0b] sending (
DLMessageProcessMessage,
(
SDMessageProcessChanges,
"com.apple.Contacts",
"---",
"2015-06-02 10:45:21 +0530",
106,
"_EmptyParameterString _"
)
)
2015-06-02 10:45:25.921 mobileDeviceManager[1919:a0b] waiting reply
What i am doing wrong or how to get contacts from ios.
Regards,
Reactions are currently unavailable