GKSession between different apps - iphone

I'm new to iPhone programming, and I have a question about Bluetooth I can't find an answer to. I'm planning on having a number of different apps, and I want users to be able to chat with each other no matter which one they are using. I know GKSessions make Bluetooth a lot easier, but I can't find out if you can use it between different apps.
I used Wei-Meng Lee's program ( http://www.devx.com/wireless/Article/43502/1954 ), and successfully tested between different devices. I put the code into two different apps, but when the apps were built on two different devices, they both started their search protocols but couldn't find each other.
It seems like the documentation assumes the GKSessions are between the same app. Does anyone know anything about it?

when using two different apps, mayb u are using different session ids. I tried the Wei Meng Lee's code in two different apps. I too had the same problem. But it got solved when i set the session id of both the devices to 'nil'.

This is a great idea, I am also very interested in finding a way to do this. Maybe the WiTap application by apple (http://developer.apple.com/library/ios/#samplecode/WiTap/Introduction/Intro.html) could be modified to get the same result?

Tested with xcode 4.4, just create a GKSession with same SessionID, two apps can talk to each other.

Related

SWIFT: Controlling a view on another users device

This is a simple question on a (probably) complicated topic.
I'm in the process of trying to build an app in which multiple users are invited into a session by a single user.
If they accept, I would like the session admin/host's device to control the views on the devices of all the users in that session.
I have searched high and low, Google, StackOverflow, Treehouse etc. but whenever I suggest multiple users or type the question as I have here I get responses that demonstrate how to make an app capable of supporting multiple users on one device, or similar.
The question is simply: is what I want to do possible? Is it safe? Does anyone have a resource that would get me started in learning about how to code this scenario.
Thanks in advance,
Kyle.
Easy as pie - you use PubNub for exactly that.
demo similar to your problem:
https://www.pubnub.com/developers/demos/codoodler/
(That demo is in-browser, but it's equally easy to do inside an app - assuming you're an experienced app developer of course!)
more demos:
https://www.pubnub.com/developers/demos/
I can tell you're new at mobile development. Do understand that:
A) In general programming is extremely difficult. Programming mobiles in particular has a lot of fussy knowledge needed as well as broad general engineering skills.
B) We really live in the "age of BAAS" - "platforms" such as PubNub, FireBase, Parse, Realm, Couchbase and so on. (These days you can't really be an "app programmer" .... you can't get a job "programming an iPhone". You get a job doing Firebase development, happening to be on iPhone - you know?)
I believe Apple has documentation on this very topic:
https://developer.apple.com/reference/multipeerconnectivity
The trickier part will be how do you send back and forth data that allows the host to "control" the views of the other devices. If by "control" you want to let the host control things that are outside of your app (like a screen share) I don't believe that will be possible.

How to implement Bayeux Protocol in iOS Application

I am doing a interactive iPad app where there will be a scenario when my app will be opening in multiple iPad devices at the same time,and they can join a group photo share, where one user selects a photo of his choice and that selection will be seen live by other users in their devices too who are joined to same group.
I have just got to know that this kind of behaviour can be achived through Bayeux Protocol using Javascript,Dojo for Web application. So, is there any framework that can achieve this feature in iOS platforms or is anyone know how to integrate Bayeux Protocol in xcode.
I have no idea about it, so any help and suggestions will be appreciated so that i can atleast get started with this feature.
Forget about Bayeux Protocol and implementation details.
For stuff like that, such as connecting people that use the same app on similar device, and share their actions and so on, I think that considering GameKit (even if you application is not a game, as you still connect people that will use the application on different devices at the same time, and actions of one user will be refered on other user's devices) might be a good option.
See for example the GKPeerPickerViewController to connect users to each others, the GKTank example and so on.

connect non iPhone Device using bluetooth in iPhone to display data

Is it possible to connect non iPhone device (like Blood sugar monitoring) with the iPhone to display its data.
So my First Question is:
1.Is it possible
2.If yes can you provide some links for development or Example codes.
Thanks for any kind of help in advance...
You can get the answer of your question here
P.S. The link is same as it is on the comment of the answer.. But since I didnt noticed the comment and was searching for the long time. So for the ones who havent seen Brads comment in the question. I have passed the link in answer.
Thanks
Do you want code or an application? Search for Bump on the AppStore. If you want code, I'd suggest looking at the GameKit framework however I don't know if you can use that to talk to other devices or not...
I would imagine it's definitely possible. A protocol like Bluetooth or WIFI would be device-agnostic. I guess it would depend on the device that you want to interface with your iPhone. Do you have a device in mind?

iPhone :Can we add more than One application in a Single application

I do have an Idea to integrate with my application. I want to create multiple application within a single one application.
Like
and application containing Weather application as well as image processing application + camera based application.
I want to know Is this thing possible with iphone application?
Please suggest me is this possible with iPhone app development and is it allowed by apple or not.
thanks for your suggestion in advance.
Consider these things as features. Weather information is a feature, image processing is another and camera in another. You can create any number of features in your app. If that is what you have meant by application then that is technically possible and seems also OK with Apple. This is not 3 different applications, rather it's one application with three different features. No matter how many features you have, iOS will treat that as a single application(a single app bundle with a single executable file).
But if are asking whether there is any way to combine separate applications(separate projects, separate app bundles with separate executables) then that is not possible.
Note: Personally I think adding completely different features in a single app is not a good idea.
Go to App Store and search for this app, App Tool Box - All in One. It's exactly the same structure as you mentioned in your post. And it only costs $0.99.
Sure, you can do it. I don't think Apple has anything against an app that does more than one thing. As long as none of those things breaks any of their rules.

which features do you look forward to the most in iPhone SDK 3?

Which of the new features are you looking forward to the most in iPhone SDK 3.0?
Is it one of the main advertised six new things, or something smaller? Something in the "1,000 new APIs", perhaps?
Phone to phone communication via bluetooth seems like it will terribly useful for some apps I am writing. No longer do you have to input all the data you want to store yourself, you can share some of it with other iPhone users.
not really a feature, but the best thing about developing the iPhone SDK further is the great frameworks that arise. there are some really, really great frameworks out there already (like the Three20 project) which will become even better with the new 3.0 SDK.
my real excitement will take over once they let us run background processes. maybe in 4.0?
Video! The ability to write decent tools for mobile video uploads is a big draw.
MapKit by far will bring the biggest change sweeping across the app space.
My personal favorite is that we can finally easily track upload progress of large files (like images).
I really, really want to see fixes in the camera API so that it isn't either broken (2.2.1) or forcing a switch to portrait (3.0).
Apart from that, the most useful features to me are:
push notifications. Great for making an app more sticky - you can let the user know that something of interest to them has happened.
CoreData - I've been using a third-party SQL layer, but it's a little buggy and no longer supported.
Peer-peer bluetooth, as the poster above said, is also useful for local data exchange.
And the least useful? Cut and paste. I actually want to disable it in my app (to discourage people from copying content) - and it doesn't look as though you can (yet).
Bluetooth phone-to-phone communication with GameKit will enable a host of currently impossible applications. Multiplayer games with no WiFi network needed and data exchange between two phones are obvious use-cases.
I'd also like to see - not currently included in the betas - a decent camera API that allowed us to customize the appearance of the capture screen, and as another poster said, have it work properly in landscape and portrait mode.