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

Summary: [Patch] Add NSLog support for iOS
Product: SDL Reporter: Ethan Lee <flibitijibibo>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: iOS (All)   
Attachments: Add NSLog support for iOS
[v2] Add NSLog support for iOS

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