Posts

Post not yet marked as solved
2 Replies
0 Views
One year later, another dev also gets into the waiting line...
Post not yet marked as solved
3 Replies
0 Views
I'm getting this:https://developer.apple.com/forums/thread/709578
Post not yet marked as solved
1 Replies
0 Views
Me2 why don't try Ventura?
Post not yet marked as solved
2 Replies
0 Views
Replied In No idea
OK I figured it out my self
Post not yet marked as solved
2 Replies
0 Views
...There's such thing as .background
Post not yet marked as solved
3 Replies
0 Views
Look at my post. I solved it with some others  https://developer.apple.com/forums/thread/708216
Post marked as solved
2 Replies
0 Views
OK I found out why Compiler found a bug in our code of the body of the Stack Instead of telling SwiftUI checking the body of the VStack it thinks it's a faulty initialization So when we use @absar's method it forced SwiftUI into initalizing as it should and therefore, find out the bug in our code in body. or rather: VStack(body: { .... }) but after you fix your bug it should be back to normal. Please continue to post if you have any other infos. Thanks!
Post marked as solved
1 Replies
0 Views
Replied In @AppStorage
OK found it out myself: https://www.jianshu.com/p/7591a7cd5eb1 I can do extension Array: RawRepresentable where Element: Codable { public init?(rawValue: String) { guard let data = rawValue.data(using: .utf8), let result = try? JSONDecoder().decode([Element].self, from: data) else { return nil } self = result } public var rawValue: String { guard let data = try? JSONEncoder().encode(self), let result = String(data: data, encoding: .utf8) else { return "[]" } return result } } Also Date: extension Date: RawRepresentable{ public typealias RawValue = String public init?(rawValue: RawValue) { guard let data = rawValue.data(using: .utf8), let date = try? JSONDecoder().decode(Date.self, from: data) else { return nil } self = date } public var rawValue: RawValue{ guard let data = try? JSONEncoder().encode(self), let result = String(data:data,encoding: .utf8) else { return "" } return result } }
Post marked as solved
2 Replies
0 Views
OK I found out CLI target does that
Post not yet marked as solved
2 Replies
0 Views
log: 2022-07-04 11:40:45.280798+0800 WeatherSpotter[52480:1169305] [logging-persist] cannot open file at line 45522 of [9ff244ce07] 2022-07-04 11:40:45.280847+0800 WeatherSpotter[52480:1169305] [logging-persist] os_unix.c:45522: (0) open(/Users/wangkeshijian/Library/Weather/geocode_wk.db) - Undefined error: 0 2022-07-04 11:40:45.316209+0800 WeatherSpotter[52480:1169305] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)"" 2022-07-04 11:40:45.722978+0800 WeatherSpotter[52480:1169295] [WK_Geocode] failed to reverse geocode. location=CLLocationCoordinate2D(latitude: 0.0, longitude: 0.0), error=reverseGeocodeFailed(Error Domain=GEOErrorDomain Code=-8 "Received no results status from server" UserInfo={NSDebugDescription=Received no results status from server}) 2022-07-04 11:40:45.897488+0800 WeatherSpotter[52480:1169295] [Database] Attempting to invalidate an assertion that is no longer valid 2022-07-04 11:40:46.162678+0800 WeatherSpotter[52480:1169312] [] nehelper sent invalid response: <dictionary: 0x7ff851e60560> { count = 1, transaction: 0, voucher = 0x0, contents = "XPCErrorDescription" => <string: 0x7ff851e606f8> { length = 18, contents = "Connection invalid" } } 2022-07-04 11:40:46.162724+0800 WeatherSpotter[52480:1169312] [] nw_parameters_set_source_application_by_bundle_id_internal Failed to convert from bundle ID (X.WeatherSpotter) to UUID. This could lead to wrong data usage accounting. 2022-07-04 11:40:46.165122+0800 WeatherSpotter[52480:1169312] [connection] nw_endpoint_flow_validate_delegation [C1 weather-data.apple.com:443 in_progress parent-flow (satisfied (Path is satisfied), interface: en1, ipv4, dns)] Network Delegation Failure: Invalid Bundle ID "X.WeatherSpotter" [M] 2022-07-04 11:40:46.165831+0800 WeatherSpotter[52480:1169312] [] nw_path_necp_check_for_updates Failed to copy updated result (0) 2022-07-04 11:40:46.166900+0800 WeatherSpotter[52480:1169312] [] nw_resolver_can_use_dns_xpc_block_invoke Sandbox does not allow access to com.apple.dnssd.service 2022-07-04 11:40:46.168282+0800 WeatherSpotter[52480:1169312] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:17 Err:-1 Errno:1 Operation not permitted 2022-07-04 11:40:46.168420+0800 WeatherSpotter[52480:1169312] [connection] nw_resolver_create_dns_service_locked [C1.1.1] DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563) 2022-07-04 11:40:46.171563+0800 WeatherSpotter[52480:1169312] Connection 1: received failure notification 2022-07-04 11:40:46.171617+0800 WeatherSpotter[52480:1169312] Connection 1: failed to connect 10:-72000, reason -1 2022-07-04 11:40:46.171645+0800 WeatherSpotter[52480:1169312] Connection 1: encountered error(10:-72000) 2022-07-04 11:40:46.174522+0800 WeatherSpotter[52480:1169319] Task <B2DA3329-BBFE-4F82-B71B-16059B13C5DD>.<1> HTTP load failed, 0/0 bytes (error code: -1003 [10:-72000]) 2022-07-04 11:40:46.178879+0800 WeatherSpotter[52480:1169304] Task <B2DA3329-BBFE-4F82-B71B-16059B13C5DD>.<1> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=-72000, NSUnderlyingError=0x6000038e0420 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en1, ipv4, dns, _kCFStreamErrorCodeKey=-72000, _kCFStreamErrorDomainKey=10}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <B2DA3329-BBFE-4F82-B71B-16059B13C5DD>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(     "LocalDataTask <B2DA3329-BBFE-4F82-B71B-16059B13C5DD>.<1>" ), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=https://weather-data.apple.com/v2/token, NSErrorFailingURLKey=https://weather-data.apple.com/v2/token, _kCFStreamErrorDomainKey=10} 2022-07-04 11:40:46.179253+0800 WeatherSpotter[52480:1169304] [WeatherService] Encountered an error when fetching weather data subset; location=<+0.00000000,+0.00000000> +/- 0.00m (speed -1.00 mps / course -1.00) @ 2022/7/4, 11:40:45 China Standard Time,  error=Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=-72000, NSUnderlyingError=0x6000038e0420 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en1, ipv4, dns, _kCFStreamErrorCodeKey=-72000, _kCFStreamErrorDomainKey=10}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <B2DA3329-BBFE-4F82-B71B-16059B13C5DD>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(     "LocalDataTask <B2DA3329-BBFE-4F82-B71B-16059B13C5DD>.<1>" ), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=https://weather-data.apple.com/v2/token, NSErrorFailingURLKey=https://weather-data.apple.com/v2/token, _kCFStreamErrorDomainKey=10} WeatherSpotter/WeatherForecaster.swift:17: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=-72000, NSUnderlyingError=0x6000038e0420 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en1, ipv4, dns, _kCFStreamErrorCodeKey=-72000, _kCFStreamErrorDomainKey=10}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <B2DA3329-BBFE-4F82-B71B-16059B13C5DD>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(     "LocalDataTask <B2DA3329-BBFE-4F82-B71B-16059B13C5DD>.<1>" ), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=https://weather-data.apple.com/v2/token, NSErrorFailingURLKey=https://weather-data.apple.com/v2/token, _kCFStreamErrorDomainKey=10} 2022-07-04 11:40:46.179874+0800 WeatherSpotter[52480:1169312] WeatherSpotter/WeatherForecaster.swift:17: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=-72000, NSUnderlyingError=0x6000038e0420 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en1, ipv4, dns, _kCFStreamErrorCodeKey=-72000, _kCFStreamErrorDomainKey=10}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <B2DA3329-BBFE-4F82-B71B-16059B13C5DD>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(     "LocalDataTask <B2DA3329-BBFE-4F82-B71B-16059B13C5DD>.<1>" ), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=https://weather-data.apple.com/v2/token, NSErrorFailingURLKey=https://weather-data.apple.com/v2/token, _kCFStreamErrorDomainKey=10} (lldb)
Post not yet marked as solved
6 Replies
0 Views
I like swiftUI's declarative syntax, but UIKit and AppKit is really much more powerful. Anyway, I like to create a swiftUI app and then add whatever I need in NS/UIViewRepresentable.
Post not yet marked as solved
2 Replies
0 Views
Same problem. First check if your's apple silicon if not (like me) there's no luck whether with or not storyboard. Then, in the WWDC session it says that the VM UI is a NSView so you can learn some AppKit and use NSViewRepresentable and then it's a swiftUI View.
Post not yet marked as solved
1 Replies
0 Views
I don't think you need to add the axis. I remember it' automatic.