Latest 0.1.1
Homepage https://github.com/lcaldoncelli/CocoaDialClient
License MIT
Platforms ios 8.0
Dependencies CocoaAsyncSocket, XMLDictionary
Authors

Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Basic ViewController usage Example:

//  ViewController.m
#import "ViewController.h"

@interface ViewController ()
@end

CocoaDialClient *dialClient;

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    dialClient = [[CocoaDialClient alloc] initWithDelegate:self];
    [dialClient findServers];
}

- (void)dialServerListUpdated:(NSArray *)servers
{
    NSLog(@"dialServerListUpdated");
    CocoaDialServerObject* last = nil;
    for (CocoaDialServerObject* result in servers){
        NSLog(@"%@ %@ %@ %@",result.location, result.hostAddress, result.usn, result.uuid);
        last = result;
    }

    if (last != nil) {
        [dialClient launchApplication:@"Netflix" atServer:last withParameters:@"cmd=launchLive&acc=7831770&channel=LCH345"];
        [dialClient getApplicationData:@"Netflix" atServer:last completionHandler:^(NSDictionary * _Nullable data, NSError * _Nullable connectionError) {
            NSLog(@"Netflix data received:n%@", data);
        }];

    }
}
@end
//  ViewController.h
#import <UIKit/UIKit.h>
#import <CocoaDialClient.h>
@interface ViewController : UIViewController<CocoaDialClientDelegate>
- (void)dialServerListUpdated:(NSArray *)servers;
@end

Requirements

Installation

CocoaDialClient is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'CocoaDialClient'

Author

Lucas Caldoncelli Rodrigues, [email protected]

License

CocoaDialClient is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "CocoaDialClient",
    "version": "0.1.1",
    "summary": "CocoaDialClient is a basic implementation of DIAL protocol for servers discovery.",
    "description": "CocoaDialClient is a basic implementation of DIAL (DIscover And Launch http://www.dial-multiscreen.org/) protocol for servers discovery.",
    "homepage": "https://github.com/lcaldoncelli/CocoaDialClient",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Lucas Caldoncelli Rodrigues": "[email protected]"
    },
    "source": {
        "git": "https://github.com/lcaldoncelli/CocoaDialClient.git",
        "tag": "0.1.1"
    },
    "social_media_url": "https://twitter.com/lcaldoncelli",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "CocoaDialClient/Classes/**/*",
    "dependencies": {
        "CocoaAsyncSocket": [
            "~> 7.6.3"
        ],
        "XMLDictionary": [
            "~> 1.4"
        ]
    }
}

Pin It on Pinterest

Share This