Hi I am experiencing the same issue with a QLPreview - writing works on Simulator does not on Device.
Did you find a solutions?
Thanks
Post
Replies
Boosts
Views
Activity
Thanks to the helpful explanation in this article https://lapcatsoftware.com/articles/2023/10/5.html
I understood the cryptic references in the XCode 15 release Notes and answered this myself.
To return to XCode 14 and earlier world in which NSLog works you have to do this:
Select the relevant product in the the Scheme dropdown (e.g. "[AppName] Watchkit App", or "[AppName]" for iOS app
Select "Edit Scheme..."
Select "Run" in list on the left
Select "Arguments" tab
Click ">" next to "Environment Variables" to show a (probably empty) list.
Click "+"
In "Name" column, double click the space and enter: IDELogRedirectionPolicy
In "Value" column double click the space and enter: oslogToStdio
Ensure the checkbox is selected
Click Close button.
You have to repeat these steps for each iOS, WatchOS product as each has its own Run Scheme.
Now NSLogs will print to the Debug Console again.
I have no idea about other side effects as I don't need more sophisticated logging.
Works fine when connected by Network too.
I too am encountering this issue just since updating to XCode 15.0.1. I am using NSLog to report data from an actual Apple Watch device running in debug mode, coded in Objective-C. The watch is now connected directly as a standalone device (which is great and has solved the usual connection issues). But now no NSLogs appear ever, not from any process. Just a blank console. I only need NSLog to report variable values, track when functions are called while debugging my WatchOS app. After decades of "just using it", NSLog appears to have just switched-off! Any advice to see debug logging greatly appreciated. Right now I have to put in breakpoints and inspect which is very slow.
Not sure if this is an XCode 15 issue, or the new way of connecting Apple Watch devices via network (which I like a LOT)
Thanks
Swift String has a var .addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) amongst other options for allowedCharacters which can tidy-up strings used to creat URLs.
The docs mention "Calling this method on strings that are already percent-encoded will cause percent characters in a percent-encoded sequence to be percent-encoded twice", but there is also a .removingPercentEncoding var to manage that
simply add
.buttonStyle(BorderlessButtonStyle())
to all the buttons in an HStack etc or on a list row and they will only fire individually and only when individually tapped.
I have noticed the same issue but cannot find documentation on this. I have previously exported Workout Data using RunGap and these files show the full resolution of the heart rate data, but the very same workouts on my iPhone older than 3 months now have only abbreviated heart rate data available when you do a query. At some point the iPhone appears to have cleared-out the HKSamples associated with workouts older than a certain time, and which were available in the past when I did those rungap exports which is very frustrating. If anyone knows how to restore these missing data I would be grateful to know how.