iphonesynchronizationsup

Sybase Synchronization Group in iPhone


I am using Sybase Unwired Platform in my iPhone application.I created MBO 's using SAP functional modules.I am following the iOS developer guide 2.1 ESD #3 to creating my application.I have some Synchronization groups in my SUP server.I need to synchronize a particular group from my iPhone client application.I tried with "beginSynchronize" and "submitPendingOperations" method but it is not synchronizing.When I tried with "synchronizeWithListener" method it works but not a specific group.I need to increase the synchronization speed by synchronizing a specific group or a specific MBO.

I am new to SUP. Any help is appreciable


Solution

  • In you DB generated class, you have the following methods:

    /*!
      @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;
    

    The ones taking the parameter synchronizationGroup are the ones you need to use in your case (with of without listener depending if you want sync or async operations).

    Also, remember that if your MBOs have synchronization parameters, they won't be synchronized in the main synchronize/synchronizeWithListener methods.