2
我存儲我的憑據在鑰匙串中Login.m類現在如何使用SFHFKeyChainUtils?
[SFHFKeyChainUtils storeUsername:self.usernameField.text andPassword:self.passwordField.text forServiceName:@"myApp" updateExisting:TRUE error:&error];
當我從記憶從我的iPhone中刪除我的應用程序,並再次啓動它,如果用戶之前已登錄,我想要跳過的登錄屏幕和下一個要顯示的屏幕。 現在我的問題是,如何在AppDelegate.m類中做到這一點。我想訪問當前用戶的憑據,如果他們充滿了數據,登錄屏幕將被跳過。
[SFHFKeyChainUtils getPasswordForUsername:??? andServiceName:@"myApp" error:&error];
我知道,這是如果獲取給定的用戶名密碼的方式,但問題是,我沒有在AppDelegate類的訪問用戶名。
有人可以幫助我嗎? 謝謝:)
只是將用戶名存儲在NSUserDefaults中。 – erkanyildiz