Just to suggest the obvious, have you cleaned the build folder?
I get that sort of error on a client project when running UI tests after the second time.
Post
Replies
Boosts
Views
Activity
You might want to look at this stackoverflow question
https://stackoverflow.com/questions/19687033/pods-resources-sh-permission-denied-in-ios-project
That would seem to be a convenience initializer
You should probably look at this stackoverflow question
https://stackoverflow.com/questions/63869139/xcode-error-trying-to-subclass-uicontextmenuconfiguration
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.
My home computer suddenly fixed itself too.
Do you mean inside the app that you want to trigger the click in?
Or another app?
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.
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)
}
I appreciate the help.
I'll do some more detailed testing.
This sort of thing usually ends up being something silly.
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
The best I managed with it being presented full screen is to set the right navigation item to be a close button and set the navigation controller toolbar as hidden in viewDidLoad.
This leaves a blank toolbar, but that at least gets rid of the share button.
Looking at the screen using xcode's view inspector, it looks like it might be creating a toolbar since I see two toolbars stacked on one another, a blank one and the one with the share button.
I also set the toolbar to hidden in willLayoutSubviews
That works on a compact screen, aka portrait on a phone, but in landscape the share button becomes a second button to the left of my close button.
I just spotted the landscape issue and am still looking into it.
One additional horrible hack is to check the right bar button items list to see if it has more items than you expect, and if so, drop the first one.
In my case I was expecting one, so I set it to be just the last item in the list.
I have the advantage of not needing my app to go to the store, so I don't know if this combination of things would be allowed in store apps.
Your app needs to update the control state, enable/disable, based on its control state.
I have this function that handles a change in the player state
/// updates the media player controls to reflect the new player status
/// - Parameter status: player status flags
func updateUI(status: PlayerStatus) {
ModuleData.singleton.mediaCommandCenter.playCommand.isEnabled = status.intersects(with: .play)
ModuleData.singleton.mediaCommandCenter.stopCommand.isEnabled = status.intersects(with: .stop)
ModuleData.singleton.mediaCommandCenter.pauseCommand.isEnabled = status.intersects(with: .pause)
ModuleData.singleton.mediaCommandCenter.nextTrackCommand.isEnabled = status.intersects(with: .skipForward)
ModuleData.singleton.mediaCommandCenter.togglePlayPauseCommand.isEnabled = status.intersects(with: [.stop, .play, .pause])
ModuleData.singleton.mediaCommandCenter.previousTrackCommand.isEnabled = status.intersects(with: .skipBackward)
ModuleData.singleton.mediaCommandCenter.skipForwardCommand.isEnabled = status.intersects(with: .skipBackwardTime)
ModuleData.singleton.mediaCommandCenter.skipBackwardCommand.isEnabled = status.intersects(with: .skipBackwardTime)
ModuleData.singleton.mediaCommandCenter.seekForwardCommand.isEnabled = status.intersects(with: .seekForward)
ModuleData.singleton.mediaCommandCenter.seekBackwardCommand.isEnabled = status.intersects(with: .seekBackward)
}
The status values are a bit mask enum with various controls enabled/disabled.
It is my understanding that .task executes asynchronously, so it most likely isn't done when sheet executes.
Never mind, I just realized you have a state value that should logically mean the content is present.