Search results for

[tags:wwdc20-10040]

8 results found

Post

Replies

Boosts

Views

Activity

Retrieving Logs from a Customer's Device
We tried to adopt OSLog in past years, but it was really cumbersome to retrieve the logs from customers. Doing a sysdiagnose is a really cumbersome task for most non-technical users to perform. Additionally they contain WAY more information than we need and are generally very large. This is true for macOS and iOS apps. Are there any new facilities for retrieving just the logs for a given subsystem that we could trigger with code, for instance in a help menu?
9
0
10k
Mar ’21
Get my application log on device programmatically
In our app, we need to provide a feature for user to send application logs to us in case they run into unexpected errors. If we use OSLog feature to log our app's error/warning state, is there a way to programmatically to collect our app log from within our app so that we can provide a feature for user to send us the archived log files within our app?
3
0
1.6k
Mar ’21
Will OSLogStore work on iOS without the com.apple.private.logging.admin entitlement?
It seems that OSLogStore allows accessing logs on both macOS (AppKit), macOS (Catalyst) and iOS. Currently it works on both mac variants, but it fails with an entitlement error on iOS. Sample Code: func getLogEntries() throws -> [OSLogEntryLog] { // FB8269189: OSLogStore does not work iOS. let logStore = try OSLogStore(scope: .currentProcessIdentifier) let oneHourAgo = logStore.position(date: Date().addingTimeInterval(-3600)) #if os(macOS) let allEntries = try logStore.getEntries(at: oneHourAgo) #else // FB8518476: The Swift shims for for the entries enumerator are missing. let allEntries = try Array(logStore.__entriesEnumerator(position: oneHourAgo, predicate: nil)) #endif // FB8518539: Using NSPredicate to filter the subsystem doesn't seem to work. return allEntries .compactMap { $0 as? OSLogEntryLog } .filter { $0.subsystem == subsystem } } When running on the iOS Simulator, the following error is thrown: Error Domain=OSLogErrorDomain Code=9 Client lacks entitlement to perform operation UserInfo={NSLoca
3
0
2.6k
Sep ’20
New logging in Swift, how do I remotely get these logs?
The new logging system looks nice, but the video didn't discuss how to get those logs from production devices. It only covered getting them during testing. If a customer contacts support from inside my app, I need to get a copy of the logs from that app/user. I currently am writing my logs to a text file, and then attaching that when they contact support. I realize that isn't ideal from a performance perspective. import os let logger = Logger(subsystem: com.example.Fruta, category: giftcards) logger.log(Started a task)
1
0
2.4k
Jun ’20
Runtime error using example code for logging In XC12
When trying to add the example code from WWDC 2020 to my project I get dyld: lazy symbol binding failed: Symbol not found: _$s2os6LoggerVMa ... Expected in: /usr/lib/swift/libswiftos.dylib @available(OSX 10.16, *) let logger = Logger(subsystem: com.example.Fruta, category: giftcards) @available(OSX 10.16, *) @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { var window: NSWindow! func applicationDidFinishLaunching(_ aNotification: Notification) { logger.log(logged Message)
3
0
1.5k
Jun ’20
Retrieving Logs from a Customer's Device
We tried to adopt OSLog in past years, but it was really cumbersome to retrieve the logs from customers. Doing a sysdiagnose is a really cumbersome task for most non-technical users to perform. Additionally they contain WAY more information than we need and are generally very large. This is true for macOS and iOS apps. Are there any new facilities for retrieving just the logs for a given subsystem that we could trigger with code, for instance in a help menu?
Replies
9
Boosts
0
Views
10k
Activity
Mar ’21
Get my application log on device programmatically
In our app, we need to provide a feature for user to send application logs to us in case they run into unexpected errors. If we use OSLog feature to log our app's error/warning state, is there a way to programmatically to collect our app log from within our app so that we can provide a feature for user to send us the archived log files within our app?
Replies
3
Boosts
0
Views
1.6k
Activity
Mar ’21
Will OSLogStore work on iOS without the com.apple.private.logging.admin entitlement?
It seems that OSLogStore allows accessing logs on both macOS (AppKit), macOS (Catalyst) and iOS. Currently it works on both mac variants, but it fails with an entitlement error on iOS. Sample Code: func getLogEntries() throws -> [OSLogEntryLog] { // FB8269189: OSLogStore does not work iOS. let logStore = try OSLogStore(scope: .currentProcessIdentifier) let oneHourAgo = logStore.position(date: Date().addingTimeInterval(-3600)) #if os(macOS) let allEntries = try logStore.getEntries(at: oneHourAgo) #else // FB8518476: The Swift shims for for the entries enumerator are missing. let allEntries = try Array(logStore.__entriesEnumerator(position: oneHourAgo, predicate: nil)) #endif // FB8518539: Using NSPredicate to filter the subsystem doesn't seem to work. return allEntries .compactMap { $0 as? OSLogEntryLog } .filter { $0.subsystem == subsystem } } When running on the iOS Simulator, the following error is thrown: Error Domain=OSLogErrorDomain Code=9 Client lacks entitlement to perform operation UserInfo={NSLoca
Replies
3
Boosts
0
Views
2.6k
Activity
Sep ’20
How can i attach the logs to an api call
How to extract the logs generated using logs api from device so I can send to a remote server? Are APIs available to read and compress log data from device?
Replies
3
Boosts
0
Views
1.4k
Activity
Jun ’20
New logging in Swift, how do I remotely get these logs?
The new logging system looks nice, but the video didn't discuss how to get those logs from production devices. It only covered getting them during testing. If a customer contacts support from inside my app, I need to get a copy of the logs from that app/user. I currently am writing my logs to a text file, and then attaching that when they contact support. I realize that isn't ideal from a performance perspective. import os let logger = Logger(subsystem: com.example.Fruta, category: giftcards) logger.log(Started a task)
Replies
1
Boosts
0
Views
2.4k
Activity
Jun ’20
Logger instances best practice
If an instance of Logger is created with the same subsystem and identifier in another part of the app, will they conflict in Bad Ways? 2 Should a global Logger be passed from parent objects to child objects (like a dependency injection), or is creating new instances of Logger for many objects ok?
Replies
1
Boosts
0
Views
535
Activity
Jun ’20
Runtime error using example code for logging In XC12
When trying to add the example code from WWDC 2020 to my project I get dyld: lazy symbol binding failed: Symbol not found: _$s2os6LoggerVMa ... Expected in: /usr/lib/swift/libswiftos.dylib @available(OSX 10.16, *) let logger = Logger(subsystem: com.example.Fruta, category: giftcards) @available(OSX 10.16, *) @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { var window: NSWindow! func applicationDidFinishLaunching(_ aNotification: Notification) { logger.log(logged Message)
Replies
3
Boosts
0
Views
1.5k
Activity
Jun ’20
Send Logs to Developers from Customer Devices
How can a Customer send me his Logs without connecting to a Mac?
Replies
1
Boosts
0
Views
316
Activity
Jun ’20