我正在使用來自here的zksforce SDK。 每當我開始我的應用程序,它顯示我的登錄表單。取而代之,我只想保持登錄會話,直到用戶註銷。 這可能嗎?我應該怎麼做?以下是我的代碼,顯示salesforce的登錄表單。Salesforce登錄
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
sectionViewController = [[SFT1SectionViewController alloc] init];
oAuthViewController = [[FDCOAuthViewController alloc] initWithTarget:sectionViewController selector:@selector(loginOAuth:error:) clientId:kSFOAuthConsumerKey];
oAuthViewController.modalPresentationStyle = UIModalPresentationFormSheet;
self.navigationController = [[UINavigationController alloc] initWithRootViewController:oAuthViewController];
self.window.rootViewController = self.navigationController;
[self.window makeKeyAndVisible];
return YES;
}
我也嘗試了自定義登錄使用loginWithUsername:密碼:方法,但它給了我令牌錯誤,說我應該使用密碼令牌一起附加的安全性。那是什麼意思?我正在使用以下行呼叫方法:
[[FDCServerSwitchboard switchboard] loginWithUsername:usernameTextField.text password:passwordTextField.text target:rootViewController selector:@selector(loginResult:error:)];
此問題也可以通過在用戶使用web視圖登錄時保存密碼來解決。是否可以保存這樣的密碼?如果是,如何?
我沒有看到任何Objective-C++代碼。重新標記。 – vikingosegundo 2013-05-14 20:24:43