Objective-C send an alert when user performs action - objective-c

I am writing an OS X application to prank a friend of mine at work. When he uses my app to place a fake order for coffee, and I need it to send a message to me letting me know that he placed an order. I looked at sending an email to myself stating he placed an order, but I didn't really want him to see it, and Apple doesn't like sending messages in the background. What would you suggest?
I am willing to share the app if anyone else likes to have fun at work :-)
Dev System: OS X 10.10 Xcode 6 Beta 3
Target System: OS X 10.9

Is he running the iOS 8 beta? If not then there's no server infrastructure provided and everything that involves posting (via email or to social media) requires explicit user consent.
The easiest thing then? Probably the Yo API. It's zero-character communications so as you'd imagine there's not a lot to it. Sign up, get your API key, then issue a single URL request when he hits the button. You'll get the 'Yo'.

Related

Connecting to iMessage functionality with iOS8

I am making an iPhone app and need to be able to minimally see when a message comes in, when I myself look at it, and when I answer it. I need to see when this happens on the message app that is within the iPhone iOS. I have been looking around for a solution on this and have not been able to find one.
Is this possible to access this data on the iPhone or is it completely closed off?
There is no Messages SDK available currently (as of iOS 8.1) that would allow a developer to interact with (or receive) messages.
The most you can do is to share content through MFMessageComposeViewController.
Be aware other search results suggesting you can use CoreTelephony - you app will be rejected by Apple because CT is a private framework.

J2ME system notification / play sound when phone is locked

Good day all,
I have a java based phone (samsung star 2 5260) and it's three weeks that I'm trying to come up with a solution to receive notification on received emails.
The phone configures a periodic check for a minimum of 30 minutes, but I need a much more frequent control (five minutes maximum).
I have tried countless solutions, and I've come up with the closest one, being a custom mujmail midlet that supports my gmail mailbox over imap, deployed thanks to the netbeans editor.
Point is, I've modified mujmail's polling to run on the background, but audio does not play when the phone is locked, so even if the midlet checks and receives emails, it's unable to notify me. The application minimizes and keeps on running, but it's unable to tell me that new mail has arrived.
I've even tried sending an sms when there's new mail, but was unable to sign the application (looks like ktoolbar produces 1024 bit certificates, and thawte, verisign, etc. will only produce 2048 bit certs since a few years.), and so it'll always ask authorization, which renders this approach useless.
So I'm desperate to find an alternative.
And I was hoping that we can in some way emulate the 'system alert' that the phone uses when it's locked and you receive an sms (audio cue).
Is this a j2me functionality, or is it specific to the samsung sdk?
Does anybody have an idea of how to access this functionality from inside a midlet?
Is there a way to create a midlet in the trusted third party domain without signing it?
I know j2me is an old subject, but hopefully someone here is still knowledgeable about it.
Thanks in advance.
Looks like you're expecting too much from JavaME.
If it's possible to do what you want, you can be certain that it requires signing.
Basically you have to sign your MIDlet with a certificate that is supported on your phone. Most developers go for Thawte or Verisign, because their certificates are supported on the most devices.
If you're only interested in getting this to run on your own phone, it's possible you can find a much cheaper provider, like e.g. Samsung themselves. But I admit I don't know.
In any case, there's no way around signing, when you want to do things like this with JavaME.
(Well.... there's a tiny slim chance that your phone lets you set permissions, like "Never ask" in the MIDlet properties on the phone after installation, but only a tiny slim chance).
Even after signing your MIDlet, it still won't be able to wake up the phone. JavaME is a sandbox. If the user puts the phone to sleep, then JavaME can't wake it up. (At least not without special API's, which I don't think exists).
If it was me, I'd investigate this approach:
Implement PushRegistry timer to launch the MIDlet ever 5 minutes. This should theoretically launch the MIDlet despite the phone sleeping. (But not if it's turned off).
Then attempt if you can play an alarm sound here.
If you can't, then I'd look into sending an SMS to myself.

get iOS 7 udid without access to a computer?

I need to ask my clients to send me the udid of their iOS devices in order to add them to an adhoc distribution profile. The main problem is that they are used to iOS but not much to computers. Anyway, it would be a pain for me to explain them how to install iTunes (or even Xcode) to get the udid. Most of the tutorials which describe the iTunes process are in english, I don't want to loose time to translate one of them. And even if I do it, I fear that they will not appreciate loosing their time following it. Any suggestion ?
I use a web online tool at http://www.easy-udid.com to get my customers UDID, I think it's the easiest way for them.
Also you can use service http://udid.io
It is easier because you don't need to ask your clients to write your email address. You just send them link “http://get.udid.io/?mail=your#mail.com” and they will need only 5 taps to send UDID on "your#mail.com"

Turn iPhone into a server programmatically?

I want to make my iPhone app display on a Mac's screen, kind of like AirPlay does with other machines. The only way I have heard to do this is, although I do not like it, turn the iPhone into a server. Unfortunately, I cannot figure out how to do so. I also wanted to set it up in such a way that my Mac automatically detects it. I have seen a similar setup in the game Chopper 2. My Mac app will have a simple timer that fires every few seconds to look for the iPhone, in the same way that Chopper 2's "Find iPhone" button does.
Is there a simple way to turn the iPhone into a server, or start a "session" like Game Center does?
One last thing: I know it is somehow possible, because another app I have actually gives my iPhone a web address at the click of a button. It is called the Dicenomicon, if you want proof.
First there is no easy way to redirect your display to Mac, even if you made it a server of some kind.
Second, to discover or publish customized services on WLAN, you may want to refer to the samples on Bonjour:
CocoaHTTPServer: a simple TCP/HTTP server.
WiTap: an app that discovers and connects to services of the same kind on WLAN by Bonjour.
I'm not really sure what you mean by "server", because there is no way to share the screen of an iPhone using the official SDK, although this is possible by jailbreaking.
It would be possible, however, to send data back and forth between the Mac and iPhone, and display the data on the iPhone, on a Mac. Using that data, you could try to recreate the interface on the Mac. All of this could be accomplished using sockets. A class that might help with that would be cocoaAsyncSocket, which makes network programming a lot easier.
The auto-discovery of iPhones on the local network is achievable with Bonjour. Without getting into too many details, NSNetService would allow you to publish a service for your app from an iPhone, and NSNetServiceBrowser would allow you to find that service on the local network from the Mac. From the NSNetServiceBrowser, you could establish a socket connection with the iPhone.
Good luck!
You might want to take a look at the GameKit APIs, I know they do something similar between two iOS devices.
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/Introduction/Introduction.html

Is it possible to access text message information through iPhone SDK

I am developing an application where in i want to alert the user if he receives a message from a contact.
I have been struggling for the same yet haven't found any solution to this.
I also wanted to know if the sdk 3.0 allows access to the call history..
There is no access to SMS messages from the application sandbox, and there is no access to call logs from the application sandbox. You can file a feature request with Apple, but I doubt you will see changes to this any time soon. You will not be able to provide any functionality in your app that depends on this information.
Similar question here regarding call history:
Reading call history in iPhone OS
Short answer is, not possible. I do not believe this has changed in 3.0.