Can an iPhone xcode application read cookies previously stored by Safari Mobile?

前端 未结 8 900
日久生厌
日久生厌 2020-11-28 10:05

Can an iPhone application read cookies previously stored by Safari Mobile?

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-28 10:53

    You might want to check

    if ([[NSHTTPCookieStorage sharedHTTPCookieStorage] cookieAcceptPolicy] != NSHTTPCookieAcceptPolicyAlways) {
        [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];       
    }
    

    But apparently NSHTTPCookieStorage does not even hold cookies from the last request in the current application on iOS (rdar://8190706)

提交回复
热议问题