Problem to see the device in CocoaServer


#1

Hello, i have finished the application and i start both on device and on mac, but on the device tell me that the Data Sent to server, and on the CocoaServer application the table remain blank, what is the problem?..i try to running also your solution file and the problem is the same…


#2

I had the same problem and found that changing handleRegister in CocoaServerAppDelegate.m

from

to

solved the problem.

HTH


#3

Don’t work i can’t see the device on CocoaServer, and give me a warning when i change the line you sad:

"NSTableView may not respond to documentView.

how i can do?


#4

Some problem for me.

In CocoaServerAppDelegate.m I modified the method HTTPConnection:didReceiveRequest:

from

to

Seems the NSURL absoluteString method returns a string containing the URL while the relativeString method returns just the URI thats what we need.


#5

The solution that worked for me was the

if ([[requestURL relativeString] isEqualToString:@"/register"])

I did not try the part about reloadData


#6

After I changed the code to
if ([[requestURL relativeString] isEqualToString:@"/register"])

I tried the
[[tableView documentView] reloadData]

But still, it does not show any rows on the table.

I use Xcode 4.2.1
MaxOSX 10.7.2
iPhoneSimulator 5.0.

Thank you.


#7

I also had a problem getting the tableView in CocoaServer to refresh.

In my case, the problem was that I didn’t have the tableview delegate and dataSource correctly set to the App Delegate.


#8

had same problems, changing to relativeString fixed the first. (absoluteString seems to return the full URL)

for the not showing up in table view problem, i also had not set the delegate and datasource connections. ctrl-click on tableview brings these connections up if you were like me and ctrl-dragged to the header file.


#9

Instead of:

you should use:

This will strip the URL of its scheme component and (:) separator, leaving just the resource specifier (which is what you are comparing against)