Retrieve session token from keychain without Parse iOS SDK

Hi,

We are completing the final bit of moving our app off or Parse. The last part means moving user signup/login to a new identity provider (we are using Amazon Cognito). I want to remove the Parse SDK entirely but I want logged in users to still have access. I can do that if I retrieve the Parse session token directly from the keychain. From my reverse engineering, it appears that I’m able to retrieve it using the follow Keychain query:

let query: NSMutableDictionary = [
    "acct": "currentUser",
    "class": "genp",
    "m_Limit": "m_LimitOne",
    "pdmn": "cku",
    "r_Data": 1,
    "svce": "{MY-APP-BUNDLE-ID}.com.parse.sdk",
]
query.setValue(kCFBooleanTrue, forKey: kSecReturnAttributes as String)

var result: CFTypeRef?
let status = SecItemCopyMatching(query, &result)

Can anyone confirm whether this approach is sound? My main concern is that there are device specific query fields that need to get set that I’m unaware of. It works on my device but I’d hate for the app to be released in then have this query not work.