We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4725 - [Patch] Add NSLog support for iOS
Summary: [Patch] Add NSLog support for iOS
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: All iOS (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-18 02:42 UTC by Ethan Lee
Modified: 2019-07-19 02:35 UTC (History)
0 users

See Also:


Attachments
Add NSLog support for iOS (2.45 KB, patch)
2019-07-18 02:42 UTC, Ethan Lee
Details | Diff
[v2] Add NSLog support for iOS (2.31 KB, patch)
2019-07-18 03:22 UTC, Ethan Lee
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ethan Lee 2019-07-18 02:42:26 UTC
Created attachment 3884 [details]
Add NSLog support for iOS

Attached is an untested patch to add SDL_NSLog to the UIKit backend. This is basically copypasting the hack to use NSLog on Cocoa, with some documentation to make that clear. In a perfect world we'd add this to something like src/core/apple/SDL_nslog.m or something, but raise your hand if you want to add that to every project generator...
Comment 1 Ethan Lee 2019-07-18 03:22:11 UTC
Created attachment 3885 [details]
[v2] Add NSLog support for iOS

Turns out it's been defined in uikit.m this whole time... removed the duplicate, but added the same comment and safeguard for duplicate symbols.
Comment 2 Sam Lantinga 2019-07-19 02:35:14 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/05dddfb66b85