Monday, January 15, 2024
HomeiOS Developmentios - os_log debug is seen for exterior developer when distributing a...

ios – os_log debug is seen for exterior developer when distributing a framework


Setup:

  • Construct job generates Frameworks in Launch configuration
  • Frameworks are packaged into an XCFramework
  • XCFramework is distributed to an exterior developer who integrates it with their app.

Downside: The exterior developer can see the logs originating from my framework in plain textual content when operating the app in iOS Simulator.

Pattern code

            personal static let log = OSLog(subsystem: Constants.loggingSubsystem, class: String(describing: FrameworkName.self))
...
...
            os_log("Community response: %@", log: Self.log, sort: .debug, String(describing: response))
            os_log("Community response knowledge: %{personal}@",
                   log: Self.log,
                   sort: .debug,
                   String(knowledge: knowledge, encoding: .utf8)!)

Anticipated output: nothing, as each of the calls are set to be debug, so they need to not produce any output within the Launch construct.

A minimum of, the 2nd name shouldn’t present the community response knowledge in plain textual content.

Noticed output: Community response & knowledge are printed in plain textual content for the exterior developer.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments