我正在使用来自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