nariakiiwatani / ofxNDI

NewTek NDI SDK Wrapper for openFrameworks.
https://ndi.tv/
MIT License
103 stars 19 forks source link

iOS sender not work? #23

Closed robinzhx closed 4 years ago

robinzhx commented 4 years ago

I am a newbie of the iOS Swift developer so I really appreciate the great work you made here!

I was testing the iOS sender with Mac receiver example. While the camera has been turned on but it doesn't seems to broadcast to the network. I test the NDI HX camera app to connect the example mac receiver, and it works really well!

So question is the iOS sender. I did notice that official NDI app ask the privacy inquiry of Local Network Usage, while the example app from 3 years ago probably not do. I tried to add a row of Privacy - Local Network Usage Description into .plist but it looks like takes not effect...

Any idea to fix it? Thanks!

2bbb commented 4 years ago

if you use iOS14~, let's try to add

<array>
    <string>_ndi._tcp</string>
</array>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<dict>
    <key>NSAllowsLocalNetworking</key>
    <true/>
</dict>
</plist>

to Info.plist and run.

robinzhx commented 4 years ago

@2bbb Thank you so much for fast reply! Yes I am using iOS 14. so I just tried to add a row of NSAllowsLocalNetworking into .plist but it still doesn't ask the network access. I am not sure the meanning of _ndi._tcp so I put it in the way like this, Screen Shot 2020-10-24 at 6 48 53 PM

and in pure code it is like this Screen Shot 2020-10-24 at 6 49 31 PM

except the extra <key><.key> it is similar, but it looks like still not work. so I tried this, removed all the extra parent key Screen Shot 2020-10-24 at 6 51 05 PM

but it is still work... not sure if I made any mistake...

robinzhx commented 4 years ago

Oh just realize I made a dumb mistake should have added NSAppTransportSecurity Screen Shot 2020-10-24 at 6 57 07 PM let me tried if it works..

Edit: still not work. I think should try to add _ndi._tcp as array somewhere?

robinzhx commented 4 years ago

Hi @2bbb Really sorry to bother you again... Even I added NSAppTransportSecurity and NSAllowsLocalNetworking it is still not broadcast, and it does not ask permission to access local network too.. I am not sure if it is related to _ndi._tcp and where should I add it..?

Thanks a lot!

EDIT: I got it worked! Thanks a lot for 2bbb's help! It needs to added as Bonjour server and it will work!

2bbb commented 4 years ago

@robinzhx

oh... sorry. I forgot to paste key for place to add... but it's great what you got works!!