Cycript Tricks

From iPhone Development Wiki
Revision as of 01:12, 2 November 2009 by Kimcha (talk | contribs) (Created page with '=== Printing Ivars === Often just typing *varName works: cy# *controller {isa:"PrefsRootController",_contentView:"<UIView: 0x10bd70; frame = (0 0; 320 460); autoresize = W+H; …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Printing Ivars

Often just typing *varName works:

cy# *controller
{isa:"PrefsRootController",_contentView:"<UIView: 0x10bd70; frame = (0 0; 320 460); autoresize = W+H; layer = <CALayer: 0x150120>>",_navBar:"<UINavigationBar: 0x150d40; frame = (0 0; 320 44); autoresize = W; layer = <CALayer: 0x150e00>>",_controllers:["<PrefsListController 0x1525e0: title Settings, view <UIPreferencesTable: 0x1529d0; frame = (0 0; 320 416); clipsToBounds = YES; autoresize = H; layer = <CALayer: 0x152c00>>>"],_title:"Settings",_idStr:"com.apple.preferences.settings",_size:{width:320,height:416},_navBarRightButtonTitle:null,_navBarRightButtonStyle:0,_navBarRightButtonDirty:0,_tasks:"{(\n)}",_deallocating:0,_hasTelephony:1,_togglingAirplaneMode:0,_airplaneMode:"Airplane Mode\t\tID:Airplane Mode 0x15b600",_airplaneSheet:null,_airplaneSheetTarget:null,_airplaneSheetAction:null,_numberOfInstalledApps:61}
cy# 


Sometimes it doesnt...

cy# *UIApp
{message:"hasProperty callback returned true for a property that doesn't exist.",name:"ReferenceError"}

then you can do:

cy# a = []; for (i in *UIApp) a.push(i); a
["isa","_delegate","_touchMap","_exclusiveTouchWindows","_event","_touchesEvent","_motionEvent","_topLevelNibObjects","_orientation","_networkResourcesCurrentlyLoadingCount","_hideNetworkActivityIndicatorTimer","_editAlertView","_applicationFlags","_controller","_window","_isLocked","_settingTimeZone","_busyControllers"]