Accessing & Using the MobileWiFi.framework

For anybody who stumbles upon this question, here’s my library to access 802.11 networks. Although Apple claims to deny any applications that use private frameworks, there are several closed-sourced WiFi applications on the AppStore. Use at your own risk. This library works with iPhone SDK 3.1.2. SOLStumbler.h SOLStumbler.m Use: SOLStumbler *networksManager = [[SOLStumbler alloc] init]; … Read more

MPMediaItems raw song data

you can obtain the media item’s data in such way: -(void)mediaItemToData { // Implement in your project the media item picker MPMediaItem *curItem = musicPlayer.nowPlayingItem; NSURL *url = [curItem valueForProperty: MPMediaItemPropertyAssetURL]; AVURLAsset *songAsset = [AVURLAsset URLAssetWithURL: url options:nil]; AVAssetExportSession *exporter = [[AVAssetExportSession alloc] initWithAsset: songAsset presetName: AVAssetExportPresetPassthrough]; exporter.outputFileType = @”public.mpeg-4″; NSString *exportFile = [[self myDocumentsDirectory] … Read more

How to extract orientation information from videos?

Since most Cameras store their rotation/orientation within the exif-metadata, i would suggest using exifttool and the a ruby wrapper gem called mini_exiftool which is actively maintained. Install exiftool: apt-get exiftool || brew install exiftool || port install exiftool or use what ever package manager is available Install mini_exiftool: gem install mini_exiftool Try it: irb> require … Read more

How to solve “Application failed codesign verification” when uploading to iTunes Connect?

I found the solution to this problem after deeply looking at the log file. Although I created my own Distribution Profile and assigned to the CODE SIGNING IDENTITY the correct value for the developer certificate, it didn’t work giving me an error: “Application failed codesign verification”. The problem is at the following line: Authority=iPhone Developer: … Read more

Best way to check if an iPhone app is running for the first time

I like to use NSUserDefaults to store an indication of the the first run. NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; if (![defaults objectForKey:@”firstRun”]) [defaults setObject:[NSDate date] forKey:@”firstRun”]; [[NSUserDefaults standardUserDefaults] synchronize]; You can then test for it later… NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; if([defaults objectForKey:@”firstRun”]) { // do something or not… }

How can an iPhone access another non-iPhone device over wireless or Bluetooth?

The only way to communicate with other Bluetooth devices via the External Accessory framework in iPhone OS 3.0 is if they are in the Made for iPod accessory program. Even though they communicate through standard Bluetooth connections, accessories need special hardware in order to process the data stream coming from the iPhone / iPod touch. … Read more