Closed FrontierApp closed 7 years ago
Should be the same as in iOS, although I haven't personally tried. Add the framework using CocoaPods and follow along using the documentation.
Thanks for your reply. I have tried it with pod. However, I got the message that it does not support osx. Can you please update the podspec?
https://github.com/CocoaPods/Specs/blob/master/Specs/3/8/f/CocoaUPnP/1.1.0/CocoaUPnP.podspec.json
Thanks!
In addition, when I try integrating it into my macOS app, I got the following error:
(void)addNotificationObservers { NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc addObserver:self selector:@selector(invalidateAllTimers) name:UIApplicationDidEnterBackgroundNotification object:nil];
[nc addObserver:self selector:@selector(renewAllTimers) name:UIApplicationDidBecomeActiveNotification object:nil]; }
Use of undeclared identifier 'UIApplicationDidEnterBackgroundNotification' Use of undeclared identifier 'UIApplicationDidBecomeActiveNotification'
They both depend on iOS. Thanks.
You'd need to find a similar notification for macOS. Otherwise your app will keep searching for new UPnP devices all the time. That may or may not be what you want.
Thanks for your reply!
Hopefully it can support macOS via pod some day.
On Sep 29, 2017, at 09:48, Paul Williamson notifications@github.com<mailto:notifications@github.com> wrote:
Should be the same as in iOS, although I haven't personally tried. Add the framework using CocoaPods and follow along using the documentation.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/arcam/CocoaUPnP/issues/42#issuecomment-333131166, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AeB_hq81ELqRCKlIOjcl0Jn1HOOaLk_oks5snPU3gaJpZM4Poos2.
Feel free to create a Pull Request
How do use it in a macOS app? Thanks!