Post

Replies

Boosts

Views

Activity

Reply to docarchive can't be rendered with local python web server
Currently (Beta 1) you can't use an entirely static file host to serve a .doccarchive. You need to host it like described in the session Host and automate your DocC documentation The example there is for an Apache .htaccess file — but in general the single page application contained in the archive seems to expect the following: it will be served from a path starting with /documentation/<moduleName> or /tutorials/<moduleName> (if you browse to /documentation/ only it will show the message "The page you’re looking for can’t be found.") it is served from the server root because all links are relative to the server root and resources (CSS, JS) are also looked up from there. I've filed FB9153714 to ask for an option to at least allow a prefix to be specified. A fully static version may be nicer — but it could limit the functionality that can be offered like search.
Jun ’21
Reply to OSLogStore:getEntries(with:at:matching:) missing from iOS?
This seems to be in fact working in Beta 1 in the simulator and on device: see the sample below. Despite being marked as NS_REFINED_FOR_SWIFT you need to call this as described in https://developer.apple.com/documentation/swift/objective-c_and_c_code_customization/improving_objective-c_api_declarations_for_swift @main struct LogReaderApp: App {     var body: some Scene {         WindowGroup {             ContentView()         }     }     init() {         do {             os_log("Test message! \(UInt(42), format: .hex)")             let store = try OSLogStore.init(scope: .currentProcessIdentifier)             let position = store.position(date: Date().addingTimeInterval(-3600))             let enumerator = try store.__entriesEnumerator(options: [.reverse], position: position, predicate: nil)             enumerator.forEach { element in                 var message = element as? OSLogEntry                 dump(message.debugDescription)                 dump(message?.composedMessage)             }         } catch {             dump(error)         }     } }
Jun ’21