在您的数据库生成类中,您有以下方法:
/*!
@method
@abstract synchronize the synchronizationGroup with server.
@discussion
@throws SUPPersistenceException
*/
+ (void)synchronize;
/*!
@method
@abstract synchronize the synchronizationGroups with server, using custom syncStatusListener.
@discussion
@throws SUPPersistenceException
*/
+ (void)synchronizeWithListener:(id<SUPSyncStatusListener>) listener;
/*!
@method
@abstract synchronize the synchronizationGroup with server, using custom syncStatusListener.
@discussion
@throws SUPPersistenceException
*/
+ (void)synchronize:(NSString *)synchronizationGroup withListener:(id<SUPSyncStatusListener>)listener;
/*!
@method
@abstract synchronize the synchronizationGroup with server.
@discussion
@throws SUPPersistenceException
*/
+ (void)synchronize:(NSString*)synchronizationGroup;
采用参数synchronizationGroup的那些是您需要在您的情况下使用的(带有 of 没有侦听器,具体取决于您是否需要同步或异步操作)。
另外,请记住,如果您的 MBO 具有同步参数,它们将不会在主要的 synchronize/synchronizeWithListener 方法中同步。