Results tagged “iphone” from muse

The possibleTitles property of UIBarButtonItem is pretty useful if you need to change the title and also animate the changes. I was trying to animate both the back button and the title of the right barbutton at the same time, but the back button wouldn't disappear properly (i.e. not animated) until I set the possibleTitles of the right barbutton.

First create the button. Do this in viewDidLoad.

self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:self action:@selector(toggleEditing)] autorelease];
self.navigationItem.rightBarButtonItem.possibleTitles = [NSSet setWithObjects:@"Edit", @"Done", nil];

To change the title just set the title property. Very easy. Both changes will be animated.

- (void)toggleEditing {
	if (!self.editing) {
		self.navigationItem.rightBarButtonItem.title = @"Done";
		[self.navigationItem setHidesBackButton:YES animated:YES];
	} else {
		self.navigationItem.rightBarButtonItem.title = @"Edit";
		[self.navigationItem setHidesBackButton:NO animated:YES];
	}
}

This works in OS 3.0.

2G iPhone updating to iPhone OS 3.0

|

It's confirmed that if you have a 2G iPhone that is unlocked with BootNeuter (running firmware 2.2.1), you can safely update to OS 3.0 using iTunes (yes just press that Update button).

For detailed and step-by-step instructions see here

Clear Crash Logs of iPhone

|

This afternoon I noticed, for the first time, that I have 757 crash logs on the iPhone I use for development, great. Here is a very simple way to delete all of them in 2 steps:

  • Disconnect the iPhone from your computer. Quit XCode, too.
  • The path to crash logs for iPhone (and iPod Touch) is: /Users/user/Library/Logs/CrashReporter/MobileDevice. To clear all crash logs, simply deleted everything inside that folder.

iPhone Color Profile

|

For a quick and easy way to preview what the colors would look like on iPhone in Photoshop, set the color profile to Apple RGB.

This method requires: jailbreaked iPhone 2.x, Cydia, Term-vt100, OpenSSH

Install MobileInstallation Patch from Cydia via “http://www.iphone.org.hk/apt/”, the patch is under section “Tweaks”. If you currently have the hackulo.us MobileInstallation, you ALSO need to install the patch. Don’t worry, you can install appulous apps with this patch.

  • In XCode, go to Project > Edit Project Settings.
  • Set Base SDK to "Device - iPhone OS 2.0"
  • Under Code Signing Identity, set Any iPhone OS Device to "Don't Code Sign"
  • Delete the value of Code Signing Resource Rules Path
  • Delete all previous build files.
  • Go to Project > Set Active SDK > Device - iPhone OS 2.0
  • Go to Project > Set Active Build Configuration > Release
  • Build. NOT Build and Go.
  • Copy MyApp.app to iPhone under /Applications using ssh or whatever method you prefer.

Now open Terminal on iPhone and execute the following code

su -
chmod +x MyApp.app
ldid -S MyApp.app/MyApp
killall SpringBoard //restart the SpringBoard

Run MyApp by touching the icon on SpringBoard.

Update: With the MobileInstallation Patch mentioned above, iPhone 2.2 seems unable to install/upgrade app by itself, you have to use iTunes (8.x) to uninstall an app first, then install/upgrade it.

Today I finally decided to go through all that hassles again to upgrade my outdated iPhone from 1.0.2 to 1.1.4. Basically I just followed this guide, but I did have a problem when I tried to restore(upgrade) to 1.1.4 after virginized it.

First I tried to restore on a MBP, which was running Leopard. And unfortunately it failed, gave me error 1603 and 50. I tried restart, change USB port, reset iSync history, let iTunes download the firmware, but nothing worked. So I switched to a mac pro running mac os x, and everything just worked like charm.

After upgrading to 1.1.4, what appeared on my iphone screen was an iTunes icon and a USB cable, I don't know if this has happened to others but it doesn't matter anyway. I still got the correct IMEI #, and I put a T-mobile sim card in iPhone just in case. Opened up Ziphone(version 3.0), click "Unlock, Jailbreak & Active", wait for several minutes, voila!

To disable EDGE: replace APN field with DISABLED.

My solution for the error "Package download failed":

  • Go to Sources, delete Conceited Software and Ste Packaging.
  • Install Community Sources under Sources. If the error occurs, tap Clear Queue then Install.
  • Now you should be able to install.
  • You should also install an app called BossTool, and move your apps.

Changing root/mobile passwords:

  • Open Installer
  • Go to Sources > Edit > Add source http://i.unlock.no, and refresh.
  • Install: Unlocking Tools > Ziphone Ibrickr fix.
  • Reboot.
  • Use iNdependence or iBrickr to change passwords.

If Terminal (Term-vt100) is not working properly, read this. If that fails to solve your problem, follow the steps below.

  • Add iphone.lenlolabs.com to your Installer sources, and install version 207.
  • Then install BSD Subsystem 2.x SU Replacement in under Tweaks, in order to login as root using su.

Note: I assume you did not use the method described here, if you did.....:

  • Download this .zip file: lib.zip
  • Extract the content, ssh to your iphone, copy the two files into /usr/lib/, overwrite if prompted. If fails to overwrite, delete the original ones.
  • Then go back and install the proper version of Terminal.

Good luck.