CocoaDev

Edit AllPages

Note: This data applies to the latest gleaned info from production OS X - 10.3.5 as of this writing.

iSync uses a closed API defined in /System/Library/PrivateFrameworks/SyncConduit.framework to define it’s conduits (pieces of software that provide sync servicing for individual devices). As this is a Private Framework, Headers are not available and were gleaned from ClassDump. The tricky part of course is translating all the fun (id) defs in ClassDump -ed headers to real objects… and determining the whys and hows about these individual objects going in and out.

I (BrendanWMcAdams) have been doing some work on puzzling out NSSyncConduit myself over at www.twodot.org. My coding partner and I thought it might be nice to kick back some of the info we’ve puzzled to CocoaDev, so here goes…

This is the results of my work, off of the 10.3.5 verion of SyncConduit…

/*

#import <Foundation/Foundation.h>

@interface NSSyncConduit : NSObject { }

/**

/**

/**

/**

/**

/**

/**

/**

/**

@end

(some return and parameter types have been edited in a best guess manner… More data is forthcoming as we hack away)


– This is the original dump from this page, I believe it’s from an old version of OS .. 10.2? – Here some first learnings about NSSyncConduit (iSync):

iSync uses plugin bundles (suffix .conduit) stored at /System/Library/SyncServices. These apparently define a subclass of NSSyncConduit which is part of the private framework SyncConduit (/System/Library/PrivateFrameworks)

ClassDump of a conduit reveals (crashes on SyncConduit itself):

@interface xxConduit : NSSyncConduit

@end

I don’t know if this might help but someOne anonymous post a code on blackberry forum: http://www.blackberry.com/developers/forum/post.jsp?forum=1&thread=516&message=9211&reply=true&quote=true

#import <Foundation/Foundation.h>

@interface NSSyncConduitManager : NSObject { }

@end

@interface TESTSyncConduit : NSObject { }

@end

@interface NSSyncDBSynchronizer : NSObject { }

@end

int main( int argc, char** argv ) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];

NSSyncConduitManager* aConduitManager = [NSSyncConduitManager conduitManager]; if( aConduitManager != nil ) { NSArray* conduitClasses = [aConduitManager conduitClasses];

int i = 0; for( ; i < [conduitClasses count]; i++ ) { TESTSyncConduit* curConduitClass = [conduitClasses objectAtIndex:i];

NSLog( @”CONDUIT NAMED %@”, curConduitClass class] conduitName] );

[[NSArray* supportedDataClasses = curConduitClass class] supportedDataClasses];

[[NSArray* activeConduits = curConduitClass class] activeConduits]; if( activeConduits != nil && [activeConduits count] > 0 ) { int j = 0; for( ; j < [activeConduits count]; j++ ) { [[TESTSyncConduit* aConduit = [activeConduits objectAtIndex:j]; if( aConduit != nil && aConduit class]isApplication] == NO ) { int k = 0; for( ; k < [supportedDataClasses count]; k++ ) { [[NSString* supportedClass = [supportedDataClasses objectAtIndex:k]; NSSyncDBSynchronizer* syncher = [aConduit synchronizerForDataClass:supportedClass];

NSLog( @”SYNCHRONIZER FOR DATA CLASS %@”, supportedClass ); NSLog( @”NOW HERE’S WHERE IT GETS INTERESTING: DATABASE IS: %@”, [[syncher database] description] ); } } } } } }

[pool release];

return 0; }