arabenseifer / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

Properly connecting to an Chrome cast device #482

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. First you need to download my file called "SettingsController.swift". I have 
added as an attachment.
Then if you downloaded it have a look at my block of code that has to do with 
Google Cast. If you see something that makes this error happen, please let me 
know. Because I honestly don't know if this a Xcode or a Google Cast bug.. or 
is the most common error.. Humans

For creating this I used Google Cast reference at Github 
https://github.com/googlecast/CastHelloText-ios & 
https://github.com/googlecast/CastVideos-ios

2.Ok you have moved my file or code to your test area and we start the 
emulator, it wil look for active Chrome Cast devices in the network. If found 
the cast button wil appear. When you press the cast button it wil go to 
"chooseDevice()" function and wil present a UIAlertController with the 
device(s) in your network and then you can select an device you want to cast to.

3. If you clicked on an device it wil go to this function and make an 
connection with the Cast"connectToDevice()" section.

4. When it's connected it should go to the next function called 
"deviceManagerDidConnect". So I get an message "Connected".. after 5 seconds I 
get an error message "Error Domain=com.google.GCKError Code=2. Network 
connection timeout". When I rebuild the project I get an different outcome.. 
after the "deviceManagerDidConnect" It is now going to 
"didConnectToCastApplication" function and that didn't happen the first time. 
Is this a bug or am I doing something wrong? 

What is the expected output? What do you see instead?
What I expect is that it is going to "deviceManagerDidConnect" and after that 
it is going to "didConnectToCastApplication" function. After that all works I 
want to cast a WKWebView.. I know that not (yet) supported. So I want to cast 
an URL I gave in an Textfield.

What version of the product are you using? On what operating system?
GoogleCastSDK-2.5.1-Release, OS X Yosemite 10.10.1
Xcode Version 6.1.1 (6A2008a)

Please provide any additional information below.
For other problems I encountered. I made an stack overflow post, you can find 
it here.
http://stackoverflow.com/questions/27423261/connecting-disconnecting-to-from-an-
chromecast-device-with-swift/27779052?noredirect=1#comment44043128_27779052 

I have posted this problem on stack overflow to.
http://stackoverflow.com/questions/27841273/how-to-properly-connect-to-google-ca
st-device-and-cast-an-url-with-an-custom-rec

Original issue reported on code.google.com by meanmach...@gmail.com on 8 Jan 2015 at 1:29

Attachments:

GoogleCodeExporter commented 9 years ago
This is a common issue in X code simulator for 6.1.1. Please refer to the apple 
documentation for the same here: 
https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Cha
pters/xc6_release_notes.html#//apple_ref/doc/uid/TP40001051-CH4-DontLinkElementI
D_15

Original comment by na...@google.com on 8 Jan 2015 at 7:32