Hello, sorry for the late response. Here is the link to the sample project.
Thanks
Post
Replies
Boosts
Views
Activity
Confirming Xcode 15.4 solved it
I have the same issue. I need to detect when the user dismisses the Store sheet.
%{public}s works indeed. Thank you for the guidance. I'll see how to tailor it so as to log just non-sensitive data.
But that defeats the whole point of autolayout. I've tested and indeed for a UIStackView with complex layout happening inside intrinsicContentSize is always returned as (-1;-1). I guess this is a issue with UIKit itself.
Okay, so your version is working. Thanks again for the detailed examples (which I should've provided in the first place!)
I have a hunch why the old os_log is not outputting anything is related to how the unified logging system is handling privacy. Let's say in your example, if I am to put:
logger.log("Hello Cruel \(planet)!")
When running without Xcode, it will output Hello Cruel to the Console. I'd have to add Hello Cruel \(planet, privacy: .public) for the full message to appear.
I assume, when using os_log with format specifiers (%s) and CvarArg, it treats the whole message as private, and that's why it's not outputting anything when run without Xcode. I don't know if there's a way to specify public for the os_log approach. One downside of using Logger is that it's bound to iOS 14, but we're supporting older versions.
Cheers
Okay. I must have missed the OOP side of logging. Could you please swap in the following and see if it still works?
func test() {
let oslog = OSLog(subsystem: "com.example.apple-samplecode.Test727380", category: "app")
os_log("%s", log: oslog, type: .info, "Hello Cruel World!")
}
In the meantime, I'll try it out like in your example. Thanks for it.
Do you know whether the subsystem needs to match the app bundle ID? Is
I had already done the above steps. Still the same behaviour, unfortunately.
Okay, for me what fixed it is, sign out and back into iCloud on the Mac. Then in the options of iCloud Drive in preferences, besides the checkmarks for Documents and Desktop, and various apps, there was a pleonastic entry called iCloud Drive. Ticking that made everything sync and work again.
Having said that, I think Apple should remove that inner tick mark and assume the user wants to use iCloud Drive if they ticked the root level iCloud Drive check mark within the iCloud settings. Otherwise that leads users to confusion!
Hey. You can go into the Scheme Editor of the test scheme under Options, and change App Region/Language to one you prefer, and that will be independent of your current device language.
Hope this helps.
Solved it. Strange as it is, but the solution that worked for me involved 2 steps (apart from what I wrote above):
create an AVAudioEngine and setup voice processing on its input node.
When the AVPlayer loads, override the output port.
Code:
let audioSession = AVAudioSession.sharedInstance()
try audioSession.setCategory(.playAndRecord,
mode: .videoChat,
options: [.defaultToSpeaker,
.allowAirPlay,
.allowBluetooth])
try audioSession.setActive(true)
let engine = AVAudioEngine()
try engine.inputNode.setVoiceProcessingEnabled(true)
let playerItem = AVPlayerItem(url: ...)
let player = AVPlayer(playerItem: playerItem)
var observer: NSKeyValueObservation? = nil
observer = playerItem.observe(\.status, options: [.new, .old], changeHandler: { (playerItem, change) in
if playerItem.status == .readyToPlay {
try? audioSession.overrideOutputAudioPort(.speaker)
}
}
player.play()