The General Theory of RIAtivity

Pondering the New Fabric of the Web — Rich Internet Applications (RIAs)

Archive for May 2009

MPMoviePlayerController Streaming Breaks Under Authentication

without comments

So my colleague and I have been stuck on an issue for about three weeks which we finally gave up on. The application we’ve been developing requires streaming of an MP4 file from a Microsoft Office SharePoint Server (MOSS) 2007 server. The video file can only be accessed by authenticated users. Several other parts of our app authenticate just fine to the MOSS instance using NTLM authentication using NSURLConnection and NSURLDownload in our Objective-C code. However, once we try to access a video file, even if we’re already authenticated to the server and there is a valid identity in the iPhone Credential Cache, the app fails at the QuickTime player screen with an error to the effect of “the movie could not be played.”

For comparison and to rule out our own code, we tried to access the video URL directly from iPhone Safari — Safari will prompt for the user credentials when challenged by the MOSS instance, however entering the correct credentials and proceeding leads to the same error.

Upon consulting with relatively more experienced iPhone SDK folks here in the Seattle area and a few, very sparse, comments online, it appears Apple’s MPMoviePlayerController doesn’t work when a credential challenge is received. The consensus, although conjecture, seems to be that the MPMoviePlayerController is based on a Core Foundation (CF) Network class which is pretty low lever networking without much intelligence for handling authentication challenges. One of the gurus we chatted with recommended we write our own class, but unfortunately we don’t have the time to dig into the packet level and write our own class so we came up with a server-side workaround that provided sufficient security.

So beware authenticating to play a video/stream with MPMoviePlayerController — if you discover an answer or solution that we’ve missed, however, please let me know.

Written by riactant

25-May-2009 at 19:57

Retrieving Deleted Text Messages from your iPhone

with 20 comments

[Updated 09-09-2009]

If you want to try retrieving deleted text messages from your iPhone check out out the free Windows utility I wrote here.

Tinselman_Banner

[Updated 05-03-2009]

I figured I’d post this as a follow-up to my previous post a few years back mainly because I regularly get questioned on the topic of how to retrieve deleted text messages. Furthermore, I wanted to post a method which didn’t require JailBreaking a phone or that was overly technical. So here you go, a pretty straighforward method for accessing text messages from your iPhone which may have been deleted but might still be available in the iPhone’s SMS database.

ASSUMPTIONS: I assume you are running Windows of some flavor and have synched/backed up your iPhone using iTunes on said machine.

1. Download and install TextPad
2. Open TextPad.
3. Select Search > Find in Files…
4. Complete the “Find in Files” dialog as you see in the following screenshot. Make sure you’ve checked the Search subfolders checkbox or else this won’t work. Note: this was taken from a Windows 7 machine. The path value for the “In Folder” field should be the same for Windows Vista (of course, your username will appear instead of “mike” in the path. For pre-Windows Vista your path will be under c:\Documents and Settings\[username]\Application Data\Apple Computer\MobileSync\Backup\
capture

5. Click Find.
6. In the TextPad search results pane you should see at least one search result found (even though multiple results may have been returned, they all will point to the same SMS DB file per backup folder). Below is a screenshot of what might appear (your filename will likely be different):
capture1
7. Double-click on one of the search results and the SQLite file will open in the upper pane. Much of it will look like garbage, but there’s alot of human readable info in the file, particularly your text messages. Enjoy!

Written by riactant

2-May-2009 at 20:20

Posted in iPhone, iPhone Security

Tagged with , ,