NSLogger icon indicating copy to clipboard operation
NSLogger copied to clipboard

No output in desktop app when logging from iOS 14

Open rzolin opened this issue 4 years ago • 6 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

rzolin avatar Jul 22 '20 17:07 rzolin

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

fpillet avatar Jul 23 '20 05:07 fpillet

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 avatar Sep 09 '20 14:09 iGranDav

@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.

dskuza avatar Sep 09 '20 22:09 dskuza

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 ! 👍

fpillet avatar Sep 20 '20 21:09 fpillet

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>

fpillet avatar Sep 20 '20 22:09 fpillet

Saved my day. thank you.

niltsh avatar May 21 '21 14:05 niltsh

Thanks everyone, ran into this as well, and just filed a PR to include this info in the README https://github.com/fpillet/NSLogger/pull/311

KrauseFx avatar Oct 26 '22 08:10 KrauseFx

Saved my day, thanks!!

JohnnyTseng avatar Nov 28 '22 04:11 JohnnyTseng