fpillet/NSLogger

No output in desktop app when logging from iOS 14

rzolin opened this issue ยท 9 comments

The same build running on iPhone X with iOS 14 and iPhone 6S iOS 12. The desktop app shows only output for iOS 12. I've upgraded to latest Desktop app - no change. And I am using the latest (no version set) cocoapod.
I was thinking about some permissions or other iPhone settings that could affect it, but couldn't find it. Right now it's not a major issue for the development, but something you need to be aware

Have you tried using the latest master branch here? Thanks for letting me know anyway!

Just in case you were wondering here is the reason why ๐Ÿ™‚ https://developer.apple.com/videos/play/wwdc2020/10110/

TL;DR: Apple is now blocking local network calls if you don't ask user's permission first.

@iGranDav definitely pointed us in the right direction. Two steps:

  1. Add the NSLocalNetworkUsageDescription key-value pair to your Info.plist file.
    a. The value type should be a string.
  2. Add the NSBonjourServices key-value pair to your Info.plist file.
    a. The value type should be an array.
    b. By adding _nslogger._tcp as an entry in the array, I was able to get NSLogger to display logs once again.

Geez. Now I need to add Info.plist checks so as to warn developers that they need to add proper keys in order for NSLogger to work !

Thanks a lot for the workaround @dskuza ! ๐Ÿ‘

Note that for NSLogger to work correctly in all cases, you also need _nslogger-ssl._tcp in the Bonjour services list. Add the whole following block to your Info.plist:

	<key>NSBonjourServices</key>
	<array>
		<string>_nslogger._tcp</string>
		<string>_nslogger-ssl._tcp</string>
	</array>
	<key>NSLocalNetworkUsageDescription</key>
	<string>Access to the local network for development builds</string>

Saved my day. thank you.

Thanks everyone, ran into this as well, and just filed a PR to include this info in the README #311

Saved my day, thanks!!

0xced commented

#311 is merged, the information is now in the README.

Thanks @KrauseFx! ๐Ÿš€