wordpress-mobile / WordPress-iOS-Shared

Shared components used in building the WordPress iOS apps and other library components
GNU General Public License v2.0
18 stars 22 forks source link

Add a `WordPressLoggingDelegate` implementation that logs to console #335

Closed mokagio closed 1 year ago

mokagio commented 1 year ago

When working on the WordPress Authenticator demo app for Google SignIn testing, I got a message about WordPressLoggingDelegate not being implemented. I put together this simpler implementation to prints to the console to satisfy the requirement. I think it might be useful during development or debugging and worth shipping together with the protocol.


mokagio commented 1 year ago

Thank you for the NSLog suggestion @crazytonyli. It does provide more info indeed, at no extra cost:

2023-01-30 14:37:07.251471+1100 AuthenticatorDemo[47512:28088466] 📃 – Verbose: Received Social Login Oauth response.

vs

📃 – Verbose: Received Social Login Oauth response.

Implemented in wordpress-mobile/WordPress-iOS-Shared@cd428c3 (#335)

mokagio commented 1 year ago

By the way @crazytonyli, I wanted to run the tests locally to see if my changes compiled but I got the following error from Fastlane:

xcodebuild: error: The workspace named "WordPressShared" does not contain a scheme named "WordPressShared". The "-list" option can be used to find the names of the schemes in the workspace.

I wonder if you get a similar behavior on your end, but I suspect there must be something wrong on my side as CI wouldn't be green otherwise.

crazytonyli commented 1 year ago

@mokagio It's likely caused by the left over xcworkspace or xcodeproj file, which were deleted after adding SPM support. If those files are still there, the xcodebuild command would pick them up as the project to build, instead of the Package.swift.

mokagio commented 1 year ago

Spot on. I should have realized 🤦‍♂️ Thanks @crazytonyli !