Cross iPhone communication using mono touch - iphone

Does mono touch allow you to do cross iPhone communication? (iPhones in the same room)
If so, what's the API?

Use the MonoTouch.GameKit API to communicate with other nearby iPhones. It is available in MonoTouch 1.1.1 (released on October 8th).
Here is an introduction to GameKit programming:
http://developer.apple.com/iPhone/library/documentation/NetworkingInternet/Conceptual/GameKit_Guide/Introduction/Introduction.html

I would start here (MonoTouch API) and also reference this (MonoTouch Assemblies) which lists System.dll and includes the System.Net.Sockets namespace so some communication seems possible although I don't believe any of the interaction will be built for you. You might however be able to utilize and recompile some existing communication libraries using .NET against MonoTouch for distribution on the iPhone.

This is not a MonoTouch problem, it is a Cocoa Touch problem. Using MonoTouch really requires that you still learn Cocoa Touch as well.
What you want to use is the GameKit framework that is a zero-config local networks over bluetooth. There are no GameKit bindings for MonoTouch yet, so you must look into:
Learn the internals of MonoTouch.
Learn the internals of Objetive-C.
Use what you learned to write C# to Objective-C bindings for the GameKit framework.
As you might imagine, a faster solution is to skip MonoTouch for this use case, and go directly to Cocoa Touch where everything is already in place. Brace yourself and spend a few days learning Objective-C.

Related

Vision based Augmented Reality Objective-C library

I'm looking for an Objective-C library / or just help in building a vision-based augmented reality application that does not rely on visual markers.
Qualcomm's is perfect, but only on Android (iOS is coming, but not soon enough). Any body know any other similar libraries?
QCAR for iOS has recently been released into public beta.
The only one I'm aware of is String, and I've become aware of that only via this iPhone + Kinect AR video (YouTube link) that recently did the rounds. So I've no direct experience of using it and no opinion on it, but I nevertheless think it qualifies as an answer to your question. It's commercial, but I think Qualcomm's is too.
Benjamin Loulier created a VRToolKit sample application for the iPhone that is based on the ARToolKitPlus framework. This sample uses the framework to track specific markers within the environment and allows you to overlay objects on them. I've seen some even more impressive demonstrations of this framework for using the camera to augment reality.
However, the ARToolKit framework (the parent of ARToolKitPlus) is by default available under the GPL license, which generally makes it incompatible with the App Store (and with commercial applications in general). You can purchase a commercial-use license for this framework from ARToolworks, if you need to use this within a non-GPL application.
Additionally, you might look into OpenCV for recognizing and tracking features in the environment. I've heard reports of people getting fairly decent performance out of it on iOS devices, even for more complex operations.
I've done some limited work myself in processing the video from the iPhone camera using the GPU, but nothing like what ARToolKit or OpenCV provides.
Have you looked at Aurasma http://www.aurasma.com/? They let you build custom apps with their system, which might suit your needs.

What is this sparrow framework in iphone development?

I am new in iphone development .I recently heard about a sparrow framework which is used to create games for iphone but i could not get more knowledge about this framework.Is it an apple framework ? Do it provide some special features to iphone game developement?
It's an open-source project, therefore it doesn't belong to Apple. I basically use the OpenGL library and provide you a very easy to use abstraction of it. So it doesn't provide any features, but makes the development simple games much easier. Give it a try!
The nicest thing about Sparrow's API is that it is very similar to Adobe Flash. So if you have programmed Flash games before, it will be very easy to learn Sparrow. I have already published two games with Sparrow, and it was very nice to work with.

ConnectionKit & iPhone SDK

I'm still getting my feet wet with the iPhone SDK, but I'm wondering if it would be possible to get the ConnectionKit framework working for an iPhone app. I know it was developed for the desktop OS, so I'm not sure what sort of dependencies it has and whether or not it could be shoehorned into the iPhone OS.
In my case, I would like to use its FTP functionality, though having access to this entire framework could prove useful for future projects as well.
Any ideas or experience trying this?
In case it helps, here's the official ConnectionKit site: http://opensource.utr-software.com/connection/
The site was a little light on documentation.
The big question is what Cocoa classes it depends on. Since it is doesn't include any UI code, it should be based on Foundation classes. Foundation in Cocoa Touch is similar to, but not exactly the same as on OS X. Just check out what classes it uses.
The other obstacle is building the framework as a static library. Since the iPhone does not support frameworks/dynamic libraries, you have to build a static library to use it in your code.
That should help get you started.
There are two primary issues. One is static library and other is NSHost class that is supported by cocoa - but not cocoa touch. First one is doable - but the second one is doable if and only if you are familiar with Mac OS networking internals.

Can you develop native iPhone apps in Ruby?

Hi I'm looking into iPhone development, and Objective-C is not be my preferred language. As far as I can see at this moment Ruby cannot be used to talk to Cocoa Touch at the moment on the iPhone.
So my question is, am I wrong? Can I use Ruby on the iPhone to develop Cocoa Touch applications. And what is the future looking like for Ruby on the iPhone?
Now you can with RubyMotion
In the iPhone OS, mprotect() will fail if you try to use it to mark writable sections of memory as executable. This breaks bridges like RubyCocoa (and probably MacRuby) that use libffi to create Objective-C method handlers at runtime. I believe that this is by design because it was not always the case.
Ultimately, this is more a matter of platform politics than technology, but a technical workaround for this exists. Instead of generating custom method handlers at runtime, precompile a pool of reconfigurable ones that are assigned as needed, essentially making the bridging process entirely data-driven. As far as I know, this is not yet being done in RubyCocoa or MacRuby.
Another significant thing to consider is that the compiled Ruby and RubyCocoa runtimes can be significantly larger than compiled Objective-C apps. If these libraries were available on the iPhone, this wouldn't be an issue, but for now, even if you had RubyCocoa working, you might not want to use it for apps that you distribute.
No, you are correct. Currently, and most likely for the foreseeable future, Ruby will not be an option, at least for AppStore applications. There's no reason you couldn't do this on a Jailbroken phone, but Apple is pretty wed to Objective C for official development.
You are better off as a programmer knowing a number of different languages - think of Objective-C as a good learning opportunity.
I've found that things you learn in other languages often make you a better programmer overall, and give you new insights into other languages you already know.
rhomobile is an option to run ruby code on the iPhone, but it's essentially web app development. A web server runs locally on the iPhone and your ruby code renders to standard client side web technologies (html/css/javascript).
http://rhomobile.com/
Actually, the ruby cocoa bridge isn't awkward at all; things work remarkably smoothly, right down to connecting outlets in IB etc. The resulting code is down right beautiful.
As for iPhone development, if you want an official AppStore application, you're out of luck unfortunately. Apple dictated that iPhone is Obj-C/Cocoa Touch, and there's a clause in the SDK license saying that one of the things they will reject an app for is having a language interpreter/JIT compiler, so you couldn't add a ruby interpreter in your app yourself.
Off topic, but hilariously, this is why Flash for the iPhone is Adobe blowing smoke. They couldn't get a swf player onto the AppStore even if they wanted to, per Apple's license.
Uh, Rhodes (Rhomobile) does allow you to do native apps on the iPhone and all other smartphones. Yes, we do leverage doing rendering via the WebUIView control. But we allow all device capabilities and synchronized local data.
You might want to take a look at shinycocos. It is a child project of cocos2d-iphone, an Objective-C game programming framework for iPhone.
I haven't yet played with it, but from the git README I infer that it bundles Ruby 1.9.1 into your app.
I installed the ruby package from Cydia on my iPod Touch 1G jailbroken on 3.1.3:
Seems to work.
Now as for cocoa-touch that is a whole different story I would assume.
Take a look at http://www.appcelerator.com/products/titanium-mobile/
"Native iPhone and Android apps built with Web technologies."
Sounds good isn't it ? ;-)
No you can not create iOS native app in Ruby.
There is only two options for native apps for mac and iOS:-
Objective C and Swift Programming Language
Tutorials:-
Apple's official tutorial on Objective C
Apple's official tutorial on Swift Programing Language
If you are familiar with Ruby and only want to create iOS apps by Ruby. Ruby Motion, can be a cross-platform option for you, but it is not free.
Cross-Platforms
RubyMotion
Xamarin required .net skills
appcelerator HTML,XML,CSS,JS skills required
phonegap HTML,XML,CSS,JS skills required
I imagine it won't work right now, but I'd imagine that you'll eventually be able to use MacRuby to build iphone apps. Apple are putting a lot of work into it
Here's a link to an ADC article describing how to build normal cocoa apps
You don't have to use Objective-C to write iPhone apps. If you use QuickConnectiPhone, http://sourceforge.net/projects/quickconnect/, you can write it completely in JavaScript, CSS, and HTML and still have an installable application not a web app.
If you know ruby you are probably working with JavaScript already.
To see how to install it, run it, and other ideas go to tetontech.wordpress.com
There's an open-source Ruby-Cocoa bridge you might try to get working. But I gather that there's a bit of an impedance mismatch between Ruby and ObjC that makes it a bit awkward to use.
The Ruby Cocoa bridge probably will not work. Most of the bridges for dynamic languages need to generate executable thunks (either manually or with libffi). More limited bridges (for more static languages) may not have such issues.
In either event, bringing up a bridge is probably going to require becoming more familiar with the Objective C runtime than one would just learning how to write Cocoa Touch apps, which probably defeats the point of doing it in the first place.
Currently isnt true, Apple change their policies, take a look at ShinyCocos, is a ruby bindings for the Cocos2D-iphone game framework.
https://github.com/funkaster/shinycocos
One possible solution would be to create an application wrapping for example the rice library (google it) which includes a ruby-vm. I reckon you would be able to create c++ wrappers that you could expose to ruby, thus making an environment for iphone development with ruby. This probably requires a lot of work though ^^

what language are the apps for the iphone created with?

what language is it similar to? cause i was looking at the dev page on apple for the iphone and it doesnt look like anything that i'm used to or know.
iPhone applications are created using objective-C as the primary language. You can also use C/C++ in the applications, but the Cocoa Touch API uses objective-C.
Also, if you have never programmed on the Mac before it will take some getting used to. Apple uses the MVC (Model View Controller) design pattern extensively in their programming model.
Here is a good site with several iPhone apps with source code:
http://appsamuck.com/
If you need a crash course in objective-C check out this link:
http://cocoadevcentral.com/d/learn_objectivec/
It's Objective-C.
Here's Apple's Programming Guide Introduction
As others have pointed out, the answer is Objective-C. For current production-ready languages, that's it. In the not-yet production ready category, it looks like the Mono folks are able to cross-compile C# to native code for deployment on the iPhone using the Apple toolchain. Much of the CocoaTouch API is not yet exposed to Mono, but it's a start.
Objective-C
Objective-C