It seems WKWebview (which uses webkit) involves in a new technology called "App-Bound Domains" to protect user's privacy. Please refer to App-Bound Domains - https://webkit.org/blog/10882/app-bound-domains/ for more details.
However, I tried the solutions provided in the above document by adding "WKAppBoundDomains" in Info.plist and setting "webViewConfiguration.limitsNavigationsToAppBoundDomains = YES/NO;". They don't work.
For My Instance, I test getting cookies just after setting cookies in WKWebview.configuration.websiteDataStore.httpCookieStore.
It works well on iOS 13/12/11 simulator, but fails on iOS 14 simulator. It return empty cookie array in the callback closure.
var wkwebview = WKWebview()
if let cookie = HTTPCookie(properties: [
								HTTPCookiePropertyKey.domain: domain,
								HTTPCookiePropertyKey.path: "/",
								HTTPCookiePropertyKey.name: "Token",
								HTTPCookiePropertyKey.secure: "true",
								HTTPCookiePropertyKey.value: "\(token)",
								HTTPCookiePropertyKey.expires: Date()
						]) {
								wkwebview.configuration.websiteDataStore.httpCookieStore.setCookie(cookie) {
										request.setValue("\(cookie.name)=\(cookie.value);", forHTTPHeaderField: "Cookie")
										request.httpShouldHandleCookies = true
										wkwebview.load(request)
										
										NSLog("request=\(request.debugDescription)")
										wkwebview.configuration.websiteDataStore.httpCookieStore.getAllCookies { (cookies) in
												NSLog("----------- print out cookies begin -----------")
												for c in cookies {
														NSLog("\(c)")
												}
												NSLog("----------- print out cookies end -----------")
										}
								}
								return
						}
I suppose that, Apple doesn't include this feature in XCode 12 beta version.
Can anyone provide more hints?
Post
Replies
Boosts
Views
Activity
Update:
I find this not happened in older XCode versions. "Process Info.plist" is steady after "Compile asset catalogs" phase and before "Customer script" phase.
Build log (XCode 11.1) - https://developer.apple.com/forums/content/attachment/775dc079-2e8c-447e-9616-e8a5703f5c79
I am confused. Is your package built with ad-hoc provisioning file or in-house one?
However, no matter ad-hoc or in-house application, if the provisioning file expires, it cannot be installed onto your device. Also, the installed application with the in-house provisioning file can never start up (I am not sure about this of ad-hoc application, it doesn't seem to start up either).
How do Xcode managed profile and iOS Distribution certificate affect the Client's application?
I don't exactly know how Xcode managed profile works because I uses offline cert files and provisiong profiles. But as my understanding, the cert and provisiong profile are automatically created and update by this feature if you have an Developer AppleID and password.
iOS Distribution certificate determine the expiration of application and which devices the app (with the coresponding privisioning profile) can be installed on. The coresponding privisioning profile is binding to the specific one or more cert files. Each cert file is binding to only one Bundle Identifier(which you defined in your project). You can request cert file and donwload it to pair with the private key generated when you perform a cert request in Keychain app.
FYI, I suggest you to renew the cert or the provisioning profile which will be expired soon. If the old cert or privisioning profile is expired, then the app with the old one cannot start up. This is which Ad Hoc provisioning designed for. It has many limitations.
If you don't want these limitations, please upload your app to AppStore and release it.
Hope my answer could be helpful.
Apps built with beta versions of XCode cannot be approved on AppStore.
You have to wait until XCode12 GM seed version is released.
You can still upload apps built with XCode 11 for couple of days until Applle annouces apps built with previous version of XCode are no longer accepted.
Seems XCode is not installed correctly.
Any suggestion?
Update: This issue also happens on XCode 12 beta 6. So it seems to be a bug of XCode.