Post

Replies

Boosts

Views

Activity

Reply to String inerpolation issue using swift 5...
Worth a thought for sure... static func relogSavedLogMessages() { reloggingSavedLogs = true let _savedLogMessages = Array(savedLogMessage) savedLogMessage = [] for message in _savedLogMessages { logMessage(level: .info, functionName: #function, category: Constants.logging.music, formattedMessage: "Relogging - %@", parameters: message) } reloggingSavedLogs = false if crashNeedsToBeLogged { /// log the crash crashNeedsToBeLogged = false BaseLoggingSupport.logMessage(level: .crash, functionName: #function, category: Constants.logging.music, formattedMessage: "App Crash Detected") BaseUISupport.postErrorMessage("App Crash Detected", obj: nil, error: nil, errorType: .red) } } BaseLoggingSupport.logMessage is essentially a wrapper around the OSLog functionality. I had starting the app before the api last changed and decided to ensure I would only have to adjust one location if it changed again. I'm seeing the current time in the text such as relogSavedLogMessage() - Relogging - 03/01/2022 12:57:53 - countOfFetch(table:Predicate:) - Success 72 The logging time stamp for when the relogging shows after it as 03/01 125753
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’22
Reply to String inerpolation issue using swift 5...
This is the exact code being used. this is the where I'm getting the time stamp, message is a text string let messageToLog = "\(BaseTimeSupport.formatDateTime(.now)) - \(message)" this is the time stamp formatter static func formatDateTime(_ date: Date, usingFormat: String = "MM/dd/yyyy HH:mm:ss") -> String { let dateFormatter = DateFormatter() dateFormatter.locale = .current dateFormatter.dateFormat = usingFormat dateFormatter.calendar = Calendar(identifier: .gregorian) return dateFormatter.string(from: date) }
Topic: Programming Languages SubTopic: Swift Tags:
Feb ’22
Reply to XCUIElement click event outside of testing framework
I don't think you can access another app due to sandboxing and other security measures. It might be easier to just call the event handler yourself, but you can trigger an event on a control. https://stackoverflow.com/questions/4028734/how-to-programmatically-fake-a-touch-event-to-a-uibutton That is a little old, but it should work, depending on the type of control involved. There isn't a single way to simulate events though because of differences in the controls.
Topic: App & System Services SubTopic: General Tags:
Jan ’22
Reply to String inerpolation issue using swift 5...
Worth a thought for sure... static func relogSavedLogMessages() { reloggingSavedLogs = true let _savedLogMessages = Array(savedLogMessage) savedLogMessage = [] for message in _savedLogMessages { logMessage(level: .info, functionName: #function, category: Constants.logging.music, formattedMessage: "Relogging - %@", parameters: message) } reloggingSavedLogs = false if crashNeedsToBeLogged { /// log the crash crashNeedsToBeLogged = false BaseLoggingSupport.logMessage(level: .crash, functionName: #function, category: Constants.logging.music, formattedMessage: "App Crash Detected") BaseUISupport.postErrorMessage("App Crash Detected", obj: nil, error: nil, errorType: .red) } } BaseLoggingSupport.logMessage is essentially a wrapper around the OSLog functionality. I had starting the app before the api last changed and decided to ensure I would only have to adjust one location if it changed again. I'm seeing the current time in the text such as relogSavedLogMessage() - Relogging - 03/01/2022 12:57:53 - countOfFetch(table:Predicate:) - Success 72 The logging time stamp for when the relogging shows after it as 03/01 125753
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to String inerpolation issue using swift 5...
I appreciate the help. I'll do some more detailed testing. This sort of thing usually ends up being something silly.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to String inerpolation issue using swift 5...
This is the exact code being used. this is the where I'm getting the time stamp, message is a text string let messageToLog = "\(BaseTimeSupport.formatDateTime(.now)) - \(message)" this is the time stamp formatter static func formatDateTime(_ date: Date, usingFormat: String = "MM/dd/yyyy HH:mm:ss") -> String { let dateFormatter = DateFormatter() dateFormatter.locale = .current dateFormatter.dateFormat = usingFormat dateFormatter.calendar = Calendar(identifier: .gregorian) return dateFormatter.string(from: date) }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to XCUIElement click event outside of testing framework
I don't think you can access another app due to sandboxing and other security measures. It might be easier to just call the event handler yourself, but you can trigger an event on a control. https://stackoverflow.com/questions/4028734/how-to-programmatically-fake-a-touch-event-to-a-uibutton That is a little old, but it should work, depending on the type of control involved. There isn't a single way to simulate events though because of differences in the controls.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to XCUIElement click event outside of testing framework
Do you mean inside the app that you want to trigger the click in? Or another app?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to xcode preferences components tab blank...
My home computer suddenly fixed itself too.
Replies
Boosts
Views
Activity
Dec ’21
Reply to xcode preferences components tab blank...
My work computer was just updated yesterday and the preference page lists no simulators for download. The simulators available to add are only ones I had previously downloaded.
Replies
Boosts
Views
Activity
Dec ’21