Hi, Experts
I'm now trying to run iOS tutorial application with SUP2.1.3. Project and Source code is downloaded from SCN Site.
Some changes and addition should be done and then compile error were removed.
In runtime some authentication process was passed and it displayed Synchronize view and then push the Synchronize button.
but data was not synchronized and not downloaded from SUP server.
On the other hand, from iOS tutorial(SUP 2.0 client API) can download data from SUP server(2.1.3).
From SUP 2.1.3 iOS synchronization architecture is changed from MBS to RBS.
Could someone please give me some ideas.
Regards, Takayoshi
Changes and Additions
From [SUPDatabaseManagerFactory dbManagerOfType:SUPDatabaseManager_UltraLite]; to self.manager = [SUPDatabaseManagerFactory dbManagerOfType:SUPDatabaseManager_SQLite]
From app.applicationIdentifier = @"SUP101"; To app.applicationIdentifier = @"sup101";
Log
wait_fences: failed to receive reply: 10004003 2012-06-12 17:55:47.093 Sup101[205:707] App has been run before. 2012-06-12 17:55:47.097 Sup101[205:707] Unlock messaging vault 2012-06-12 17:55:47.631 Sup101[205:707] [SQL TRACE][DEBUG] re-encrypt using new key 038d03ebbdf8f3af00e3de37f38e7503dd36e780770820bbf38f3a179f77038e77e340c3042df9f75e020c40001430b6 2012-06-12 17:55:47.736 Sup101[205:707] Got the encryption key: 038d03ebbdf8f3af00e3de37f38e7503dd36e780770820bbf38f3a179f77038e77e340c3042df9f75e020c40001430b6 2012-06-12 17:55:47.750 Sup101[205:707] ================================================= 2012-06-12 17:55:47.752 Sup101[205:707] onConnectionStatusChanged: status = 202, code = 0, message = (null) 2012-06-12 17:55:47.754 Sup101[205:707] ================================================= 2012-06-12 17:55:47.980 Sup101[205:707] ================================================= 2012-06-12 17:55:47.981 Sup101[205:707] onConnectionStatusChanged: status = 102, code = 0, message = (null) 2012-06-12 17:55:47.983 Sup101[205:707] ================================================= 2012-06-12 17:55:48.015 Sup101[205:4403] ================================================= 2012-06-12 17:55:48.016 Sup101[205:4403] onConnectionStatusChanged: status = 105, code = 0, message = 2012-06-12 17:55:48.018 Sup101[205:4403] ================================================= 2012-06-12 17:55:48.021 Sup101[205:4403] ================================================= 2012-06-12 17:55:48.022 Sup101[205:4403] onConnectionStatusChanged: status = 105, code = 0, message = 2012-06-12 17:55:48.024 Sup101[205:4403] ================================================= 2012-06-12 17:55:48.296 Sup101[205:4c03] ================================================= 2012-06-12 17:55:48.297 Sup101[205:4c03] onConnectionStatusChanged: status = 103, code = 0, message = 2012-06-12 17:55:48.297 Sup101[205:4c03] ================================================= 2012-06-12 17:55:48.299 Sup101[205:4c03] ================================================= 2012-06-12 17:55:48.300 Sup101[205:4c03] onConnectionStatusChanged: status = 103, code = 0, message = 2012-06-12 17:55:48.300 Sup101[205:4c03] ================================================= 2012-06-12 17:55:48.661 Sup101[205:4c03] ================================================ 2012-06-12 17:55:48.662 Sup101[205:4c03] onApplicationSettingsChanged: names = [Default - 1] 2012-06-12 17:55:48.663 Sup101[205:4c03] ================================================ 2012-06-12 17:55:48.664 Sup101[205:4c03] ================================================= 2012-06-12 17:55:48.665 Sup101[205:4c03] onRegistrationStatusChanged: status = 203, code = 0, message = (null) 2012-06-12 17:55:48.666 Sup101[205:4c03] ================================================= 2012-06-12 17:55:48.667 Sup101[205:4c03] ================================================ 2012-06-12 17:55:48.669 Sup101[205:4c03] onApplicationSettingsChanged: names = [Default - 1] 2012-06-12 17:55:48.670 Sup101[205:4c03] ================================================ 2012-06-12 17:55:48.671 Sup101[205:4c03] ================================================= 2012-06-12 17:55:48.672 Sup101[205:4c03] onRegistrationStatusChanged: status = 203, code = 0, message = (null) 2012-06-12 17:55:48.674 Sup101[205:4c03] ================================================= 2012-06-12 17:55:59.516 Sup101[205:707] Unlock SUP101 vault to get username/password credentials 2012-06-12 17:55:59.586 Sup101[205:707] Application was run before -- set authentication credentials, no need to check with server wait_fences: failed to receive reply: 10004003 2012-06-12 17:56:21.211 Sup101[205:707] [SQL TRACE][DEBUG] synchronize default 2012-06-12 17:56:21.218 Sup101[205:707] [SQL TRACE][DEBUG] Synchronizing... ULRemoteId SynchronizationGroup UserContext<> 2012-06-12 17:56:57.830 Sup101[205:707] [SQL TRACE][DEBUG] synchronize default 2012-06-12 17:56:57.836 Sup101[205:707] [SQL TRACE][DEBUG] Synchronizing... ULRemoteId SynchronizationGroup UserContext<>
Items 4-6. from http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc00835.0213/doc/html/apr1333473730281.html
states:
Hi,Alexei
Thank you for your reply.
What you mentioned above was already done.
As iOS application tutorial(2.1.3) uses libraries(2.1.3) and header files(2.1.3),
iOS application tutorial(2.0) uses libraries(2.0) and header files(2.0).
I am not sure but..
in SUP2.0 before onSubscribeSuccess and onImportSuccess callback is called, onLoginSuccess callback is called.
But SUP2.1.3 there is no onLoginSuccess in the log. Is this something wrong?
Give me some advice.
Regards Takayoshi
I read the source code and I think that one of reason not to get synchronize data is
case SYNC_STATE_DONE (below) is not processed and MenuViewController is not instantiated.
So data is not downloaded to IPhone and Synchronize View is not transited to Menu View.
Could someone please help me.
Regards Takayoshi
In SubscribeController.m
-(void) onGetSyncStatusChange:(SUPSyncStatusInfo*)info
{
switch(info.state)
{
-- (omitted)---
case SYNC_STATE_DONE:
MBOLogDebug(@"SYNC_STATE_DONE");
self.menuController = [[MenuListController alloc] initWithStyle:UITableViewStylePlain];
[self showListController];
break;
-- (omitted)---
}
}
According to this :
Normally, the user is authenticated through the registerApplication and startConnection methods in the Application class. Once this is done there is no need to authenticate again. However, the user can authenticate directly with the server at any time during the application's execution by calling the generated database instance's beginOnlineLogin method.
That's why handling of onLoginSuccess is no longer necessary - at least for apps using Object API.
Thanks Alexei
I confirmed that "NSConcreteNotification {name = SUPLoginSuccess}" was received by callback handler (below). so login process was done successfully.
In SubscribeController.m
- (void)onLoginSuccess:(NSNotification *)notification {
NSLog(@"***** onConnectSuccess (SubscribeController) %@", notification); // <==
self.button.enabled = YES;
[[NSNotificationCenter defaultCenter] removeObserver:self name:ON_LOGIN_SUCCESS object:nil];
}
But to show Menu View in iPhone it should be necessary to process below code. maybe ; -)
Please give me some advice.
-(void) onGetSyncStatusChange:(SUPSyncStatusInfo*)info
{
switch(info.state)
{
-- (omitted)---
case SYNC_STATE_DONE:
MBOLogDebug(@"SYNC_STATE_DONE");
self.menuController = [[MenuListController alloc] initWithStyle:UITableViewStylePlain];
[self showListController];
break;
-- (omitted)---
}
}
Thanks Takayoshi
Thank you Alexei and everyone.
Finally iOS tutorial application works fine. it takes long time.
Source code is good except 1 change.
In Sup101AppDeelgate.m From app.applicationIdentifier = @"SUP101"; To app.applicationIdentifier = @"sup101";
Reason why "case SYNC_STATE_DONE" sentence in SubscribeController.m was not processed is that I changed dbManagerOfType SUPDatabaseManager_UltraLite to SUPDatabaseManager_SQLite.
UltraLite is original generated source code but in my case before setting libraries like libMO.a
I compile source code and Xcode shows me Fix-it solution "SQLite" then made a mistake.
Regards Takayoshi
Hi,
I just got this error too.
In MBO DB.m file
use of undeclared identifier 'SUPDatabaseManager_UltraLite'; did you mean 'SUPDatabaseManager_SQLite'? [3]
I changed all files that Alexei Isaev said. How did you solved this?
Hi Erhan,
Choose SUPDatabaseManager_UltraLite as database.
Since SUP 2.1.3 UltraLite is default database.
If you could not choose UltraLite in Xcode confirm your configuration of build setting.
1) Header Search Path
(ex) "$SRCROOT/SUP101/iOS/includes/**"
2) Library Search Paths
(ex) "$SRCROOT/SUP101/iOS/Libraries/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"
I hope this will help you.
Regards
Hi,
Thanks for reply. I couldnt select that. In databasefactorymanager.h file there is no const for that. But I find that file is different than other files. SUP is verry verry buggy.
Sorry for typos, just writing from mobile.
I also have the same problem, Now its get corrected
Do synchronize, after completed the connection process