I'm trying to use calabash with MonoTouch. Calabash is provided via a
.framework which I link in via additional mtouch options in the mono
project.
mtouch options:
-gcc_flags "-force_load /path/to/calabash.framework/calabash -framework
CFNetwork -framework CoreGraphics -lstdc++"
This builds fine and when I run the app in the simulator I can see the
calabash server being started twice. The second time if fails because the
post is not available for listening.
2012-09-20 09:13:08.294 MonoForIPhone[16188:c07] Creating the server:
<LPHTTPServer: 0x9c13160>
2012-09-20 09:13:08.295 MonoForIPhone[16188:c07] simroot:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk
2012-09-20 09:13:08.296 MonoForIPhone[16188:c07] Started LPHTTP server on
port 37265`
2012-09-20 09:13:08.457 MonoForIPhone[16188:2007] Creating the server:
<LPHTTPServer: 0x9c56ba0>
2012-09-20 09:13:08.458 MonoForIPhone[16188:2007] simroot:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk
2012-09-20 09:13:08.459 MonoForIPhone[16188:2007] Error starting LPHTTP
Server: Error Domain=NSPOSIXErrorDomain Code=48 "Address already in use"
UserInfo=0x9e57450 {NSLocalizedFailureReason=Error in bind() function,
NSLocalizedDescription=Address already in use}
I can telnet to that port 37265 so I know that something is listening but
the calabash client times out waiting for a response. If I try a http get on
the server (it's a http server) it waits too.
I spoke to the Karl who made calabash
<https://groups.google.com/d/topic/calabash-ios/niKErc7ABUM/discussion>
and he thought the double starting of the framework wasn't ideal as it's a
static initialiser
<https://github.com/calabash/calabash-ios-server/blob/master/calabash/Classes/FranklyServer/LPI.mm>
.
What I would like to know is if the double initialisation is a problem
caused by how mono works, how I've configured the project, calabash or some
fourth factor?
Thanks,
Ryan
--
View this message in context:
http://monotouch.2284126.n4.nabble.com/Monotouch-and-calabash-double-static-instantiation-tp4657118.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch