Post not yet marked as solved
I would remove your DEVELOPMENT_TEAM id from the xcodeproj file and put them to xcconfig file. Then in your project file, specify
DEVELOPMENT_TEAM = "$(inherited)";
Other devs forking/cloning your project would then specify their dev team id in their xcconfig file.
See https://help.apple.com/xcode/mac/11.4/#/dev745c5c974 for more information.
Still an issue but now I do have contact with dev support and provided them more details. Hopefully this gets resolved soon.
Do you have WKExtensionDelegateClassName with value $(PRODUCT_MODULE_NAME).ExtensionDelegate in your extension's Info.plist file? And the delegate adaptor in the App:
@main
struct Mypp: App {
@WKExtensionDelegateAdaptor(ExtensionDelegate.self) var extensionDelegate
Latter produces a SwiftLint warning though:
Weak Delegate Violation: Delegates should be weak to avoid reference cycles. (weak_delegate)
Adding weak produces an error. Don't know what to do with this, so currently I have to live with the warning.
Well it started working later after I posted my reply. Don't know what was the issue.
Yes, same issues. Rebooted watch, Mac, Xcode but to no avail. I see my developer account details in the Xcode Preferences. I'll contact developer support.
Got the following from macOS logs when looking at process Xcode log entries:
(Redirect Count) 0
(Transaction Metrics) (Request) {"object":"<NSURLRequest 0x7fd39fce6f10>","url":"https:\/\/devimages-cdn.apple.com\/downloads\/xcode\/dsc\/Watch4_2_18R395.dmg"}
(Response) <NSHTTPURLResponse: 0x7fd3892bcf50> { URL: https://devimages-cdn.apple.com/downloads/xcode/dsc/Watch4_2_18R395.dmg } { Status Code: 403, Headers {
...
self=<ACSURLSession: 0x7fd389ada4d0> { canUseCachingServer: 1, phase: valid, session: <__NSURLSessionLocal: 0x7fd38951eb60>, delegate: 0x7fd3998df040, tasks: (0x7fd38951ea20) }
oletus 16:19:56.611135+0300 Xcode DVTDownloadable: Download Failed. Downloadable: https://devimages-cdn.apple.com/downloads/xcode/dsc/Watch4_2_18R395.dmg. Error Domain=DataWritingACSURLSessionDelegate Code=1 "Failed with HTTP status 403: forbidden" UserInfo={NSLocalizedDescription=Failed with HTTP status 403: forbidden, NSHTTPURLResponse=<NSHTTPURLResponse: 0x7fd38943ce70> { URL: https://devimages-cdn.apple.com/downloads/xcode/dsc/Watch4_2_18R395.dmg } { Status Code: 403, Headers {
	
...
				"no-store, no-cache, must-revalidate"
		);
		"Content-Length<…>
oletus 16:19:59.713998+0300 Xcode iPhoneSupport: Unable to cache symbols for <DVTProxiediOSDevice: 0x7fd389b0a930> device (Error Domain=DVTDownloadableErrors Code=-1 "Could not download and install Symbols for watchOS 7.0.1 (18R395). Failed to download package from ADC." UserInfo={NSUnderlyingError=0x7fd3998e22f0 {Error Domain=DataWritingACSURLSessionDelegate Code=1 "***.***@gmail.com does not have access to Symbols for watchOS 7.0.1 (18R395)." UserInfo={NSRecoveryAttempter=<_DVTErrorRecoveryHandler: 0x7fd399a08c50>, NSLocalizedRecoverySuggestion=Contact Apple Developer Program Support to resolve account access issues., NSLocalizedDescription=***.xxxx@gmail.com does not have access to Symbols for watchOS 7.0.1 (18R395)., DVTRecoveryBlockKey=<NSMallocBlock: 0x7fd3998f0070>, NSLocalizedRecoveryOptions=(
		OK,
		"Contact\U2026"
), NSHTTPURLResponse=<NSHTTPURLResponse: 0x7fd389a6d150> { URL: https://download.developer.apple.com/Developer_Tools/watchOS_18R395/Watch4_2_18R395.dmg } { Status Code: 403<…>
Verifying that this works now.
@developer555, my app is getting them pretty much as expected. ExtensionDelegate launches scheduleBackgroundRefresh the first time 5 mins after, and later 20 mins later. After the background refresh is executed, the background URLSession is scheduled to happen after 5 mins. So the actual interval of URL download is 25 mins (first time it is 10 mins).
OK this works when not using the new Swift App struct. Instead, it works using hosting controller and extension, notifications defined using storyboards. Haven't yet tested if beta 6 makes any difference.
Post not yet marked as solved
Why not use Bundle.main.url instead of path to get the full file URL to begin with? path returns only the path to the file, not the file included.
Post not yet marked as solved
Same issue here, reported it using Feedback app. After iPhone restart, it works fine (so far).
Post not yet marked as solved
Obviously at least when your app has no complications on the watch face. Or did you mean something else?
Post not yet marked as solved
Questo è un problema noto nella beta 4. Guarda il file readme della beta 4, c'è un avviso. Ci scusiamo per la traduzione. Questo è tradotto utilizzando google.
Now when I read this in another context :) ... this came into my mind:
func getPrivacyBehavior(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationPrivacyBehavior) -> Void) {
// Call the handler with your desired behavior when the device is locked
handler(.showOnLockScreen)
}
This maybe something you do already and my comment is not relevant. Surely you can see that the complication is not active when you take the watch from your wrist, if the above code is not in the CLKComplicationDataSource.
Post not yet marked as solved
I couldn't get this to work by using App and WKExtensionDelegateAdaptor (see discussion here - https://developer.apple.com/forums/thread/654464) with watchOS beta 3, but if you do, I'd like to hear how. I had to revert to using Interface.storyboard and a WKHostingController.
I'll have to recheck everything and try it out again some day soon. My use case is exactly as yours, downloading a simple JSON and then updating complications.