简体   繁体   中英

How to fix “http not found in com.apple.developer.associated-domains entitlement” in iOS app?

I have created a basic iOS app in Swift that uses a WKWebView. I am using SecAddSharedWebCredential and SecRequestSharedWebCredential to save and load usernames and passwords within the users KeyChain.

When I launch the app with the simulator, everything works perfectly fine. Although, when I launch on a device, I get the error of:

http not found in com.apple.developer.associated-domains entitlement

Within the simulator and device, when displaying the credential list to a user, it comes up as (note the http ):

在此处输入图片说明

When using my save and get functions, I make sure that I pass in my URL, so I don't think that could be the problem.

SecAddSharedWebCredential(self.URLPath, loginUsername, loginPassword)
SecRequestSharedWebCredential(self.URLPath, nil)

It looks like you have something like webcredentials: http://example.com in your entitlements. Try getting rid of the http so it's just webcredentials:example.com .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM