SlideShare uma empresa Scribd logo
1 de 49
Baixar para ler offline
Deep “geek” diving into the
iPhone OS and Frameworks


          Tim Burks
360iDev               March 3, 2009
?!?       Tips for digging deep



360iDev, March 3, 2009                 tim@neontology.com
Silicon Valley iPhone
                         Developer’s Meetup
                         •   3rd Monday of the month

                         •   TIPS group, Palo Alto

                         •   Demos, technical, business talks

                         •   meetup.com/sviphone



360iDev, March 3, 2009                               tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
Nu Who’s Who
                   Jeff Buck (itfrombit)                           Jason Sallis (jsallis)
                   OpenGL, macros (with Issac Trotts)              TextMate bundle, nuke


                     Patrick Thomson (importantshock)
                     Nu, YAML, applications
                                                                    Dean Mao (deanmao)
                   Grayson Hansard (grayson)                        NuSAX

                   Markdown, nug (Nu->ObjC header file generator)


     Adam Solove, Jonathan Yeddidia, Stephen White,
     Elizabeth Kellner, Matt Rice,...

360iDev, March 3, 2009                                                                 tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
I Jailbroke my iPhone



360iDev, March 3, 2009                  tim@neontology.com
What is it doing?


1. “pwning” disables signature checks in the iPhone
   bootloader.
2. A custom “IPSW” (iPhone Software image) disables
   kernel restrictions on user processes.
360iDev, March 3, 2009                          tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
Essentials




360iDev, March 3, 2009                tim@neontology.com
Out of the box,
                                                           every iPhone’s root
                         % ssh 192.168.0.13 -l root
                                                           password is “alpine.”
                         The authenticity of host '192.168.0.13 (192.168.0.13)'
                         can't be established.
                                                          After you’ve installed
                         RSA key fingerprint is af:94:ba:80:55:a9:0d:
                                                            OpenSSH, Change
                         19:63:47:97:df:f0:6f:b6:31.
                         Are you sure you want to continue connecting (yes/no)?
                                                              yours ASAP!
                         yes
                         Warning: Permanently added '192.168.0.13' (RSA) to the
                         list of known hosts.
                         root@192.168.0.13's password:
                         iPhone:~ root# passwd
                         Changing password for root.
                         New password:
                         Retype new password:
                         iPhone:~ root# apt-get install vim
                         ...

                         iPhone:~ root# apt-get install gdb
                         ...

                         iPhone:~ root# apt-get install rsync
                         ...




360iDev, March 3, 2009                                               tim@neontology.com
#rsync -avz -e ssh / me@my-machine:/myiphone




360iDev, March 3, 2009              tim@neontology.com
[/myiphone] tim% cat ./private/var/stash/share.GYYNXs/sandbox/SandboxTemplate.sb




360iDev, March 3, 2009                                              tim@neontology.com
[/myiphone] tim% find . -name quot;*.dbquot;
./Library/Application Support/BTServer/pincode_defaults.db
./private/var/Keychains/keychain-2.db
./private/var/mobile/Applications/ED85406C-B7D7-427A-9865-70AF5FFDDD6C/Documents/667316288.db
./private/var/mobile/Library/CallHistory/call_history.db
./private/var/mobile/Library/Notes/notes.db
./private/var/mobile/Library/SMS/sms.db
./private/var/mobile/Library/Voicemail/voicemail.db
./private/var/mobile/Library/WebKit/Databases/Databases.db
./private/var/mobile/Library/WebKit/Databases/http_mail.google.com_0/0000000000000001.db
./System/Library/PrivateFrameworks/AppSupport.framework/calldata.db

[/myiphone] tim% find . -name quot;*.sqlitedbquot;
./private/var/mobile/Library/AddressBook/AddressBook.sqlitedb
./private/var/mobile/Library/AddressBook/AddressBookImages.sqlitedb
./private/var/mobile/Library/Caches/MapTiles/MapTiles.sqlitedb
./private/var/mobile/Library/Calendar/Calendar.sqlitedb
./private/var/root/Library/AddressBook/AddressBook.sqlitedb
./private/var/root/Library/Calendar/Calendar.sqlitedb




360iDev, March 3, 2009                                                           tim@neontology.com
[/myiphone] tim% sqlite3 ./private/var/mobile/Library/CallHistory/call_history.db
SQLite version 3.5.9
Enter quot;.helpquot; for instructions
sqlite> .dump
BEGIN TRANSACTION;
CREATE TABLE _SqliteDatabaseProperties (key TEXT, value TEXT, UNIQUE(key));
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('call_history_limit','100');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('timer_last','60');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('timer_outgoing','88020');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('timer_incoming','76320');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('timer_all','164340');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('timer_lifetime','164340');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('timer_last_reset','0');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('data_up_last','0.5859375');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('data_down_last','1.380859375');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('data_up_all','207434.788086272');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('data_down_all','1946836.91406457');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('data_up_lifetime','207434.788086272');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('data_down_lifetime','1946836.91406457');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('data_last_reset','0');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('_ClientVersion','3');
INSERT INTO quot;_SqliteDatabasePropertiesquot;
VALUES('_UniqueIdentifier','C1253CD2-8310-4E04-9463-7CCF6FB8D49A');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('__CPRecordSequenceNumber','1634');
CREATE TABLE call (ROWID INTEGER PRIMARY KEY AUTOINCREMENT, address TEXT, date INTEGER,
duration INTEGER, flags INTEGER, id INTEGER);
INSERT INTO quot;callquot; VALUES(1404,'6505551212',1233452885,60,5,638);
INSERT INTO quot;callquot; VALUES(1405,'8006332152',1233518067,60,5,638);



 360iDev, March 3, 2009                                                      tim@neontology.com
[/myiphone] tim% sqlite3 ./private/var/mobile/Library/Notes/notes.db
SQLite version 3.5.9
Enter quot;.helpquot; for instructions
sqlite> .dump
BEGIN TRANSACTION;
CREATE TABLE _SqliteDatabaseProperties (key TEXT, value TEXT, UNIQUE(key));
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('_ClientVersion','3');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('_UniqueIdentifier','CAFDFC2D-87D7-4F8A-
AC8F-C2C6561D842E');
INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('__CPRecordSequenceNumber','65');
CREATE TABLE note_bodies (note_id INTEGER, data, UNIQUE(note_id));
INSERT INTO quot;note_bodiesquot; VALUES(1,'Shopping<div> </div><div><div>Bike seat</
div><div>Quick release (2)</div><div><br class=quot;webkit-block-placeholderquot;></
div><div>Lightbulbs</div><div>7 frame hNgers</div><div>2wire hangers</div><div>2 screw
pairs</div><div><br class=quot;webkit-block-placeholderquot;></div><div>Hand broom</
div><div>Stainless steel spray ZEP</div><div><br class=quot;webkit-block-placeholderquot;></
div></div>');
INSERT INTO quot;note_bodiesquot; VALUES(3,'Whirlpool et20nkxan04 door shelf bracket');




 360iDev, March 3, 2009                                                  tim@neontology.com
Finding things
               • find
               • grep
               • nm
               • strings
               • otool

360iDev, March 3, 2009                    tim@neontology.com
[/myiphone] tim% cd System/Library/PrivateFrameworks

[System/Library/PrivateFrameworks] tim% find . -exec grep Battery {} ;
Binary file ./BluetoothManager.framework/BluetoothManager matches
Binary file ./CoreTelephony.framework/CoreTelephony matches
Binary file ./CoreTelephony.framework/Support/CommCenter matches
Binary file ./IAP.framework/IAP matches
Binary file ./IAP.framework/Support/iapd matches
Binary file ./MobileBluetooth.framework/MobileBluetooth matches
Binary file ./SpringBoardServices.framework/SpringBoardServices matches
grep: ./WebKit.framework/Frameworks: No such file or directory

[System/Library/PrivateFrameworks] tim% cd CoreTelephony.framework/

[Library/PrivateFrameworks/CoreTelephony.framework] tim% ls
CoreTelephony English.lproj Info.plist   Support

[Library/PrivateFrameworks/CoreTelephony.framework] tim% strings CoreTelephony | grep Battery
kCTIndicatorsBatteryCapacity
kCTIndicatorsBatteryCapacityNotification

[Library/PrivateFrameworks/CoreTelephony.framework] tim% nm CoreTelephony | grep Battery
31be15c4 T _CTGetBatteryCapacity
31be83a4 T __CTGetBatteryCapacity
31be14fc T __CTIndicatorsHandleBatteryCapacityNotification
31bee99a T __CTServerConnectionGetBatteryCapacity
39bdcae4 S _kCTIndicatorsBatteryCapacity
39bdcae8 S _kCTIndicatorsBatteryCapacityNotification




360iDev, March 3, 2009                                                           tim@neontology.com
otool
Display load commands with
  otool -l <file>

Display shared library dependencies with
  otool -L <file>

Dissassemble with
  otool -tV <file>

Display Objective-C tables with
  otool -o <file>

“man otool” for more.




360iDev, March 3, 2009                     tim@neontology.com
_CTGetBatteryCapacity:
31be15c4            b5f0   push   {r4, r5, r6, r7, lr}
31be15c6            af03   add    r7, sp, #12
31be15c8            b084   sub    sp, #16
31be15ca            2300   mov    r3, #0
31be15cc            9302   str    r3, [sp, #8]
31be15ce        feb7f7ff   bl     _CTTelephonyCenterGetDefault
31be15d2            1c06   mov    r6, r0          (add r6, r0, #0)
31be15d4            3608   add    r6, #8
31be15d6            1c05   mov    r5, r0          (add r5, r0, #0)
31be15d8            1c30   mov    r0, r6          (add r0, r6, #0)
31be15da        eb5af017   blx    0x31bf8c90      ; symbol stub for: _pthread_mutex_lock
31be15de            466b   mov    r3, sp
31be15e0            4668   mov    r0, sp
31be15e2            6b69   ldr    r1, [r5, #52]
31be15e4            aa02   add    r2, sp, #8
31be15e6            330f   add    r3, #15
31be15e8        f9d7f00d   bl     __CTServerConnectionGetBatteryCapacity
31be15ec            9c01   ldr    r4, [sp, #4]
31be15ee            1c30   mov    r0, r6          (add r0, r6, #0)
31be15f0        eb56f017   blx    0x31bf8ca0      ; symbol stub for: _pthread_mutex_unlock
31be15f4            2c00   cmp    r4, #0
31be15f6            d002   beq    0x31be15fe
31be15f8            1c28   mov    r0, r5          (add r0, r5, #0)
31be15fa        fdc9f7ff   bl     __CTTelephonyCenterReEstablishServerConnection
31be15fe            9802   ldr    r0, [sp, #8]
31be1600            b004   add    sp, #16
31be1602            bdf0   pop    {r4, r5, r6, r7, pc}




360iDev, March 3, 2009                                                          tim@neontology.com
Learn Assembly with gcc
tim% man gcc
GCC(1)                                   GNU                                GCC(1)

NAME
        gcc - GNU project C and C++ compiler

SYNOPSIS
       gcc [-c|-S|-E] [-std=standard]
           [-g] [-pg] [-Olevel]
           [-Wwarn...] [-pedantic]
           [-Idir...] [-Ldir...]
           [-Dmacro[=defn]...] [-Umacro]
           [-foption...] [-mmachine-option...]
           [-o outfile] infile...

...

        -S    Stop after the stage of compilation proper; do not assemble. The
              output is in the form of an assembler code file for each non-
              assembler input file specified.

              By default, the assembler file name for a source file is made by
              replacing the suffix .c, .i, etc., with .s.




360iDev, March 3, 2009                                                               tim@neontology.com
tim% cat sample.c

     int multiply_add(int a, int b, int c) {
       return a*b + c;
     }

     tim% gcc sample.c -S

     tim% cat sample.s
          .text
     .globl _multiply_add
     _multiply_add:
          pushl    %ebp
          movl     %esp, %ebp
          subl     $8, %esp
          movl     8(%ebp), %eax
          imull    12(%ebp), %eax
          addl     16(%ebp), %eax
          leave
          ret
          .subsections_via_symbols

     tim% gcc sample.c -S -arch armv6
     gcc-4.0: installation problem, cannot exec '/usr/bin/arm-apple-darwin9-gcc-4.0.1':
     No such file or directory




360iDev, March 3, 2009                                                            tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
tim% /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 sample.c -S -arch armv6

tim% cat sample.s
     .text
     .align 2
     .globl _multiply_add
_multiply_add:
     @ args = 0, pretend = 0, frame = 12
     @ frame_needed = 1, uses_anonymous_args = 0
     stmfd     sp!, {r7, lr}
     add r7, sp, #0
     sub sp, sp, #12
     str r0, [sp, #8]
     str r1, [sp, #4]
                                                    int multiply_add(int a, int b, int c) {
     str r2, [sp, #0]
                                                      return a*b + c;
     ldr r2, [sp, #8]
                                                    }
     ldr r3, [sp, #4]
     mul r2, r3, r2
     ldr r3, [sp, #0]
     add r3, r2, r3
     mov r0, r3
     sub sp, r7, #0
     ldmfd     sp!, {r7, pc}




360iDev, March 3, 2009                                                               tim@neontology.com
tim% /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 sample.c -S -arch armv6 -O

 tim% cat sample.s
      .text
      .align 2
      .globl _multiply_add
 _multiply_add:
      @ args = 0, pretend = 0, frame = 0
                                                         int multiply_add(int a, int b, int c) {
      @ frame_needed = 0, uses_anonymous_args = 0
                                                           return a*b + c;
      @ link register save eliminated.
      @ lr needed for prologue                           }
      mla r0, r1, r0, r2
      bx   lr
      .subsections_via_symbols




                             - ARM System Developer's Guide, Sloss, Symes, Wright, & Rayfield




360iDev, March 3, 2009                                                                tim@neontology.com
Dynamically load functions with libdl
#include <dlfcn.h>

...

// Dynamically load library with this:
void *handle = dlopen(quot;/System/Library/PrivateFrameworks/CoreTelephony.framework/CoreTelephonyquot;,
                      RTLD_LOCAL | RTLD_LAZY);
// or this:
[[NSBundle bundleWithPath:@”/System/Library/PrivateFrameworks/CoreTelephony.framework”] load];

...

// Lookup desired function with this:
int (*myGetBatteryCapacity)() = dlsym(handle, ”CTGetBatteryCapacity”);
// or this:
int (*myGetBatteryCapacity)() = dlsym(RTLD_DEFAULT, ”CTGetBatteryCapacity”);


...

// Call imported function
int capacity = myGetBatteryCapacity ? myGetBatteryCapacity() : -1;




360iDev, March 3, 2009                                                           tim@neontology.com
otool and Objective-C



360iDev, March 3, 2009            tim@neontology.com
[Oxygen:Library/Frameworks/CoreLocation.framework] tim% otool -o CoreLocation
CoreLocation:
          Contents of (__DATA,__objc_classlist) section
39579d98 0x3957914c
           isa 0x39579188
    superclass 0x3823a6f8
         cache 0x301a7f08
        vtable 0x380bb234
          data 0x39579160 (struct class_ro_t *)
                     flags 0x0
            instanceStart 4
              instanceSize 8
                ivarLayout 0x0
                      name 0x31581290 CLLocation
               baseMethods 0x39579220 (struct method_list_t *)
             entsize 12
                count 18
                 name 0x3158108c getDistanceFrom:
                types 0x31580f30 d12@0:4r@8
                  imp 0x3157de60
                 name 0x31580de0 course
                types 0x31580f3c d8@0:4
                  imp 0x3157de34
                 name 0x31580df0 speed
                types 0x31580f3c d8@0:4
                  imp 0x3157de08
                 name 0x31580df8 heading
                types 0x31580f3c d8@0:4
                  imp 0x3157dddc
                 name 0x31580e00 clientLocation
                types 0x31580f44 {?=i{?=dd}ddddddd}8@0:4
                  imp 0x3157dda0




 360iDev, March 3, 2009                                                         tim@neontology.com
% cd /usr/include/objc/
     [Xenon-3:/usr/include/objc] tim% ls
     List.h       malloc.h         objc-load.h
     Object.h     message.h        objc-runtime.h
     Protocol.h   objc-api.h       objc-sync.h
     error.h      objc-auto.h      objc.h
     hashtable.h objc-class.h      runtime.h
     hashtable2.h objc-exception.h zone.h

     [Xenon-3:/usr/include/objc] tim% grep IMP *
     ...
     objc.h:typedef id       (*IMP)(id, SEL, ...);




360iDev, March 3, 2009                               tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
iPhone:~ root# nush
Nu Shell.
Cannot read termcap database;
using dumb terminal settings.

% (load quot;CoreLocationquot;)
t

% (puts ((CLLocation instanceMethodNames) description))
(
    altitude,
    clientLocation,
    coordinate,
    quot;copyWithZone:quot;,
    course,
    dealloc,
    description,
    quot;encodeWithCoder:quot;,
    quot;getDistanceFrom:quot;,
    heading,
    horizontalAccuracy,
    quot;initWithClientLocation:quot;,
    quot;initWithCoder:quot;,
    quot;initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:timestamp:quot;,
    quot;initWithLatitude:longitude:quot;,
    speed,
    timestamp,
    verticalAccuracy
)
()




360iDev, March 3, 2009                                                              tim@neontology.com
% (CLLocationManager instanceMethodWithName:quot;supportInfoquot;)
<NuMethod:31b570>

% ((CLLocationManager instanceMethodWithName:quot;supportInfoquot;) signature)
quot;c@:quot;

% ((CLLocation alloc) init)
<CLLocation:31bd50>

% (((CLLocation alloc) init) description)
Bus error

iPhone:~ root# nush
Nu Shell.
Cannot read termcap database;
using dumb terminal settings.

% ((CLLocation alloc) init)
NuUndefinedSymbol: undefined symbol: CLLocation

% (load quot;CoreLocationquot;)
t

% ((CLLocation alloc) init)
<CLLocation:31bd50>

% (class CLLocation (- description is quot;your housequot;))
()

% (((CLLocation alloc) init) description)
quot;your housequot;




360iDev, March 3, 2009                                                   tim@neontology.com
iPhone:~ root# cat battery.nu
#!/bin/nush

(set NSUTF8StringEncoding 4)

(set b (NSBundle bundleWithPath:quot;/System/Library/PrivateFrameworks/CoreTelephony.frameworkquot;))
(b load)

(set capacity (NuBridgedFunction functionWithName:quot;CTGetBatteryCapacityquot; signature:quot;iquot;))
(set sleep (NuBridgedFunction functionWithName:quot;sleepquot; signature:quot;iiquot;))

(function append-to-file (filename text)
    (unless ((NSFileManager defaultManager) fileExistsAtPath:filename)
        ((NSFileManager defaultManager) createFileAtPath:filename contents:nil attributes:nil))
    (set handle (NSFileHandle fileHandleForWritingAtPath:filename))
    (handle seekToEndOfFile)
    (handle writeData:((+ text quot;nquot;) dataUsingEncoding:NSUTF8StringEncoding))
    (handle closeFile))

(while YES
  (set c (capacity))
  (if (eq c 0) (set c (capacity))) ;; sometimes we have to retry to get a nonzero value
  (set measurement (+ ((NSDate date) description) quot;,quot; c))
  (append-to-file quot;/var/root/battery.logquot; measurement)
                                                                  iPhone:~ root# tail battery.log
  (sleep 120))
                                                                  2009-03-01 23:22:49 -0800,78
                                                                  2009-03-01 23:24:49 -0800,77
                                                                  2009-03-01 23:26:49 -0800,77
                                                                  2009-03-02 00:13:04 -0800,75
                                                                  2009-03-02 00:28:44 -0800,75
                                                                  2009-03-02 00:30:44 -0800,74
                                                                  2009-03-02 00:32:44 -0800,72
                                                                  2009-03-02 00:34:44 -0800,71
                                                                  2009-03-02 00:45:40 -0800,71
                                                                  2009-03-02 00:47:40 -0800,70




360iDev, March 3, 2009                                                                tim@neontology.com
launchd
# cat /Library/LaunchDaemons/com.tootsweet.battery.plist
<?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?>
<!DOCTYPE plist PUBLIC quot;-//Apple//DTD PLIST 1.0//ENquot; quot;http://www.apple.com/DTDs/PropertyList-1.0.dtdquot;>
<plist version=quot;1.0quot;>
<dict>
     <key>Label</key>
     <string>com.tootsweet.battery</string>
     <key>Nice</key>
     <integer>20</integer>
     <key>ProgramArguments</key>
     <array>
          <string>/var/root/battery.nu</string>
     </array>
     <key>RunAtLoad</key>
     <true/>
     <key>KeepAlive</key>
     <true/>
</dict>
</plist>




360iDev, March 3, 2009                                                                tim@neontology.com
Build Property Lists with Nu (Mac OS)
tim% nush
Nu Shell.

% (set plist (NSObject readFromPropertyList:quot;com.tootsweet.battery.plistquot;))
<NSCFDictionary:24eeb0>

% (puts (plist description))
{
    KeepAlive = 1;
    Label = quot;com.tootsweet.batteryquot;;
    Nice = 20;
    ProgramArguments =     (
        quot;/var/root/battery.nuquot;
    );
    RunAtLoad = 1;
}
()

% (set newlist (dict Label:quot;com.tootsweet.batteryquot; Nice:20 ProgramArguments:(array quot;/var/root/
battery.nuquot;) KeepAlive:1 RunAtLoad:1))
<NSCFDictionary:247700>

% (newlist writeToPropertyList:quot;another.plistquot;)
1
% (set newlist (dict Label:quot;com.tootsweet.batteryquot; Nice:20 ProgramArguments:(array quot;/var/root/
battery.nuquot;) KeepAlive:(NSNumber numberWithBool:1) RunAtLoad:(NSNumber numberWithBool:1)))
<NSCFDictionary:2411c0>
% (newlist writeToPropertyList:quot;yetanother.plistquot;)
1




360iDev, March 3, 2009                                                                tim@neontology.com
tim% cat another.plist
<?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?>
<!DOCTYPE plist PUBLIC quot;-//Apple//DTD PLIST 1.0//ENquot; quot;http://www.apple.com/DTDs/PropertyList-1.0.dtdquot;>
<plist version=quot;1.0quot;>
<dict>
     <key>KeepAlive</key>
     <integer>1</integer>
     <key>Label</key>
     <string>com.tootsweet.battery</string>
     <key>Nice</key>
     <integer>20</integer>
     <key>ProgramArguments</key>
     <array>
          <string>/var/root/battery.nu</string>
     </array>
                                    tim% cat com.tootsweet.battery.plist
     <key>RunAtLoad</key>
                                    <?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?>
     <integer>1</integer>
                                    <!DOCTYPE plist PUBLIC quot;-//Apple//DTD PLIST 1.0//ENquot; quot;http://www.apple.
</dict>
                                    <plist version=quot;1.0quot;>
</plist>
                                    <dict>
                                         <key>Label</key>
                                         <string>com.tootsweet.battery</string>
                                         <key>Nice</key>
                                         <integer>20</integer>
                                         <key>ProgramArguments</key>
                                         <array>
                                              <string>/var/root/battery.nu</string>
                                         </array>
                                         <key>RunAtLoad</key>
                                         <true/>
                                         <key>KeepAlive</key>
                                         <true/>
                                    </dict>
                                    </plist>




 360iDev, March 3, 2009                                                                 tim@neontology.com
% (set newlist (dict Label:quot;com.tootsweet.batteryquot; Nice:20 ProgramArguments:(array quot;/var/root/
 battery.nuquot;) KeepAlive:(NSNumber numberWithBool:1) RunAtLoad:(NSNumber numberWithBool:1)))
 <NSCFDictionary:2411c0>

 % (newlist writeToPropertyList:quot;yetanother.plistquot;)
 1




                         ...
                         <plist version=quot;1.0quot;>
                         <dict>
                              <key>KeepAlive</key>
                              <true/>
                              <key>Label</key>
                              <string>com.tootsweet.battery</string>
                              <key>Nice</key>
                              <integer>20</integer>
                              <key>ProgramArguments</key>
                              <array>
                                   <string>/var/root/battery.nu</string>
                              </array>
                              <key>RunAtLoad</key>
                              <true/>
                         </dict>
                         </plist>




360iDev, March 3, 2009                                                                tim@neontology.com
Open Radar




360iDev, March 3, 2009                tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
360iDev, March 3, 2009   tim@neontology.com
Thanks for Listening!




360iDev, March 3, 2009          tim@neontology.com

Mais conteúdo relacionado

Semelhante a Deep Geek Diving into the iPhone OS and Framework

Advanced App Building - Tips, Tricks & Lessons Learned
Advanced App Building - Tips, Tricks & Lessons LearnedAdvanced App Building - Tips, Tricks & Lessons Learned
Advanced App Building - Tips, Tricks & Lessons LearnedJay Graves
 
Если нашлась одна ошибка — есть и другие. Один способ выявить «наследуемые» у...
Если нашлась одна ошибка — есть и другие. Один способ выявить «наследуемые» у...Если нашлась одна ошибка — есть и другие. Один способ выявить «наследуемые» у...
Если нашлась одна ошибка — есть и другие. Один способ выявить «наследуемые» у...Positive Hack Days
 
How we integrate & deploy Mobile Apps with Travis CI part 2
How we integrate & deploy Mobile Apps with Travis CI part 2How we integrate & deploy Mobile Apps with Travis CI part 2
How we integrate & deploy Mobile Apps with Travis CI part 2Marcio Klepacz
 
Questioning the status quo
Questioning the status quoQuestioning the status quo
Questioning the status quoIvano Pagano
 
(De)serial Killers - BSides Las Vegas & AppSec IL 2018
(De)serial Killers - BSides Las Vegas & AppSec IL 2018(De)serial Killers - BSides Las Vegas & AppSec IL 2018
(De)serial Killers - BSides Las Vegas & AppSec IL 2018Checkmarx
 
(De)serial Killers - BSides Las Vegas & AppSec IL 2018
(De)serial Killers - BSides Las Vegas & AppSec IL 2018(De)serial Killers - BSides Las Vegas & AppSec IL 2018
(De)serial Killers - BSides Las Vegas & AppSec IL 2018Dor Tumarkin
 
(In) Security graph database in real world
(In) Security graph database in real world (In) Security graph database in real world
(In) Security graph database in real world Miguel Hernández Boza
 
How we integrate & deploy Mobile Apps with Travis CI
How we integrate & deploy Mobile Apps with Travis CIHow we integrate & deploy Mobile Apps with Travis CI
How we integrate & deploy Mobile Apps with Travis CIMarcio Klepacz
 
Static code analysis with sonar qube
Static code analysis with sonar qubeStatic code analysis with sonar qube
Static code analysis with sonar qubeHayi Nukman
 
Why Rust? by Edd Barrett (codeHarbour December 2019)
Why Rust? by Edd Barrett (codeHarbour December 2019)Why Rust? by Edd Barrett (codeHarbour December 2019)
Why Rust? by Edd Barrett (codeHarbour December 2019)Alex Cachia
 
Putting Rugged Into your DevOps Toolchain
Putting Rugged Into your DevOps ToolchainPutting Rugged Into your DevOps Toolchain
Putting Rugged Into your DevOps ToolchainJames Wickett
 
Free The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainFree The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainKen Collins
 
Passwords & security
Passwords & securityPasswords & security
Passwords & securityPer Thorsheim
 
Hey man, can I get a clue?
Hey man, can I get a clue?Hey man, can I get a clue?
Hey man, can I get a clue?Voxeo Corp
 
Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013
Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013
Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013Amazon Web Services
 
snapshot ではじめる ローカライズ検証
snapshot ではじめる ローカライズ検証snapshot ではじめる ローカライズ検証
snapshot ではじめる ローカライズ検証moko ist
 
Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...
Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...
Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...OWASP Kyiv
 
Recent Trends in Cyber Security
Recent Trends in Cyber SecurityRecent Trends in Cyber Security
Recent Trends in Cyber SecurityAyoma Wijethunga
 
CPU vulnerabilities - where are we now?
CPU vulnerabilities - where are we now?CPU vulnerabilities - where are we now?
CPU vulnerabilities - where are we now?DefCamp
 

Semelhante a Deep Geek Diving into the iPhone OS and Framework (20)

Advanced App Building - Tips, Tricks & Lessons Learned
Advanced App Building - Tips, Tricks & Lessons LearnedAdvanced App Building - Tips, Tricks & Lessons Learned
Advanced App Building - Tips, Tricks & Lessons Learned
 
Если нашлась одна ошибка — есть и другие. Один способ выявить «наследуемые» у...
Если нашлась одна ошибка — есть и другие. Один способ выявить «наследуемые» у...Если нашлась одна ошибка — есть и другие. Один способ выявить «наследуемые» у...
Если нашлась одна ошибка — есть и другие. Один способ выявить «наследуемые» у...
 
How we integrate & deploy Mobile Apps with Travis CI part 2
How we integrate & deploy Mobile Apps with Travis CI part 2How we integrate & deploy Mobile Apps with Travis CI part 2
How we integrate & deploy Mobile Apps with Travis CI part 2
 
SecurityPI - Hardening your IoT endpoints in Home.
SecurityPI - Hardening your IoT endpoints in Home. SecurityPI - Hardening your IoT endpoints in Home.
SecurityPI - Hardening your IoT endpoints in Home.
 
Questioning the status quo
Questioning the status quoQuestioning the status quo
Questioning the status quo
 
(De)serial Killers - BSides Las Vegas & AppSec IL 2018
(De)serial Killers - BSides Las Vegas & AppSec IL 2018(De)serial Killers - BSides Las Vegas & AppSec IL 2018
(De)serial Killers - BSides Las Vegas & AppSec IL 2018
 
(De)serial Killers - BSides Las Vegas & AppSec IL 2018
(De)serial Killers - BSides Las Vegas & AppSec IL 2018(De)serial Killers - BSides Las Vegas & AppSec IL 2018
(De)serial Killers - BSides Las Vegas & AppSec IL 2018
 
(In) Security graph database in real world
(In) Security graph database in real world (In) Security graph database in real world
(In) Security graph database in real world
 
How we integrate & deploy Mobile Apps with Travis CI
How we integrate & deploy Mobile Apps with Travis CIHow we integrate & deploy Mobile Apps with Travis CI
How we integrate & deploy Mobile Apps with Travis CI
 
Static code analysis with sonar qube
Static code analysis with sonar qubeStatic code analysis with sonar qube
Static code analysis with sonar qube
 
Why Rust? by Edd Barrett (codeHarbour December 2019)
Why Rust? by Edd Barrett (codeHarbour December 2019)Why Rust? by Edd Barrett (codeHarbour December 2019)
Why Rust? by Edd Barrett (codeHarbour December 2019)
 
Putting Rugged Into your DevOps Toolchain
Putting Rugged Into your DevOps ToolchainPutting Rugged Into your DevOps Toolchain
Putting Rugged Into your DevOps Toolchain
 
Free The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainFree The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own Domain
 
Passwords & security
Passwords & securityPasswords & security
Passwords & security
 
Hey man, can I get a clue?
Hey man, can I get a clue?Hey man, can I get a clue?
Hey man, can I get a clue?
 
Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013
Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013
Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013
 
snapshot ではじめる ローカライズ検証
snapshot ではじめる ローカライズ検証snapshot ではじめる ローカライズ検証
snapshot ではじめる ローカライズ検証
 
Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...
Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...
Anastasia Vixentael - Don't Waste Time on Learning Cryptography: Better Use I...
 
Recent Trends in Cyber Security
Recent Trends in Cyber SecurityRecent Trends in Cyber Security
Recent Trends in Cyber Security
 
CPU vulnerabilities - where are we now?
CPU vulnerabilities - where are we now?CPU vulnerabilities - where are we now?
CPU vulnerabilities - where are we now?
 

Mais de John Wilker

Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11John Wilker
 
Introtoduction to cocos2d
Introtoduction to  cocos2dIntrotoduction to  cocos2d
Introtoduction to cocos2dJohn Wilker
 
Getting Started with OpenGL ES
Getting Started with OpenGL ESGetting Started with OpenGL ES
Getting Started with OpenGL ESJohn Wilker
 
User Input in a multi-touch, accelerometer, location aware world.
User Input in a multi-touch, accelerometer, location aware world.User Input in a multi-touch, accelerometer, location aware world.
User Input in a multi-touch, accelerometer, location aware world.John Wilker
 
Physics Solutions for Innovative Game Design
Physics Solutions for Innovative Game DesignPhysics Solutions for Innovative Game Design
Physics Solutions for Innovative Game DesignJohn Wilker
 
Getting Oriented with MapKit: Everything you need to get started with the new...
Getting Oriented with MapKit: Everything you need to get started with the new...Getting Oriented with MapKit: Everything you need to get started with the new...
Getting Oriented with MapKit: Everything you need to get started with the new...John Wilker
 
Getting Started with iPhone Game Development
Getting Started with iPhone Game DevelopmentGetting Started with iPhone Game Development
Getting Started with iPhone Game DevelopmentJohn Wilker
 
Internationalizing Your Apps
Internationalizing Your AppsInternationalizing Your Apps
Internationalizing Your AppsJohn Wilker
 
Optimizing Data Caching for iPhone Application Responsiveness
Optimizing Data Caching for iPhone Application ResponsivenessOptimizing Data Caching for iPhone Application Responsiveness
Optimizing Data Caching for iPhone Application ResponsivenessJohn Wilker
 
I Phone On Rails
I Phone On RailsI Phone On Rails
I Phone On RailsJohn Wilker
 
Integrating Push Notifications in your iPhone application with iLime
Integrating Push Notifications in your iPhone application with iLimeIntegrating Push Notifications in your iPhone application with iLime
Integrating Push Notifications in your iPhone application with iLimeJohn Wilker
 
Starting Core Animation
Starting Core AnimationStarting Core Animation
Starting Core AnimationJohn Wilker
 
P2P Multiplayer Gaming
P2P Multiplayer GamingP2P Multiplayer Gaming
P2P Multiplayer GamingJohn Wilker
 
Using Concurrency To Improve Responsiveness
Using Concurrency To Improve ResponsivenessUsing Concurrency To Improve Responsiveness
Using Concurrency To Improve ResponsivenessJohn Wilker
 
Leaving Interface Builder Behind
Leaving Interface Builder BehindLeaving Interface Builder Behind
Leaving Interface Builder BehindJohn Wilker
 
Mobile WebKit Development and jQTouch
Mobile WebKit Development and jQTouchMobile WebKit Development and jQTouch
Mobile WebKit Development and jQTouchJohn Wilker
 
Accelerometer and OpenGL
Accelerometer and OpenGLAccelerometer and OpenGL
Accelerometer and OpenGLJohn Wilker
 
NSNotificationCenter vs. AppDelegate
NSNotificationCenter vs. AppDelegateNSNotificationCenter vs. AppDelegate
NSNotificationCenter vs. AppDelegateJohn Wilker
 
From Flash to iPhone
From Flash to iPhoneFrom Flash to iPhone
From Flash to iPhoneJohn Wilker
 

Mais de John Wilker (20)

Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11
 
Introtoduction to cocos2d
Introtoduction to  cocos2dIntrotoduction to  cocos2d
Introtoduction to cocos2d
 
Getting Started with OpenGL ES
Getting Started with OpenGL ESGetting Started with OpenGL ES
Getting Started with OpenGL ES
 
User Input in a multi-touch, accelerometer, location aware world.
User Input in a multi-touch, accelerometer, location aware world.User Input in a multi-touch, accelerometer, location aware world.
User Input in a multi-touch, accelerometer, location aware world.
 
Physics Solutions for Innovative Game Design
Physics Solutions for Innovative Game DesignPhysics Solutions for Innovative Game Design
Physics Solutions for Innovative Game Design
 
Getting Oriented with MapKit: Everything you need to get started with the new...
Getting Oriented with MapKit: Everything you need to get started with the new...Getting Oriented with MapKit: Everything you need to get started with the new...
Getting Oriented with MapKit: Everything you need to get started with the new...
 
Getting Started with iPhone Game Development
Getting Started with iPhone Game DevelopmentGetting Started with iPhone Game Development
Getting Started with iPhone Game Development
 
Internationalizing Your Apps
Internationalizing Your AppsInternationalizing Your Apps
Internationalizing Your Apps
 
Optimizing Data Caching for iPhone Application Responsiveness
Optimizing Data Caching for iPhone Application ResponsivenessOptimizing Data Caching for iPhone Application Responsiveness
Optimizing Data Caching for iPhone Application Responsiveness
 
I Phone On Rails
I Phone On RailsI Phone On Rails
I Phone On Rails
 
Integrating Push Notifications in your iPhone application with iLime
Integrating Push Notifications in your iPhone application with iLimeIntegrating Push Notifications in your iPhone application with iLime
Integrating Push Notifications in your iPhone application with iLime
 
Starting Core Animation
Starting Core AnimationStarting Core Animation
Starting Core Animation
 
P2P Multiplayer Gaming
P2P Multiplayer GamingP2P Multiplayer Gaming
P2P Multiplayer Gaming
 
Using Concurrency To Improve Responsiveness
Using Concurrency To Improve ResponsivenessUsing Concurrency To Improve Responsiveness
Using Concurrency To Improve Responsiveness
 
Leaving Interface Builder Behind
Leaving Interface Builder BehindLeaving Interface Builder Behind
Leaving Interface Builder Behind
 
Mobile WebKit Development and jQTouch
Mobile WebKit Development and jQTouchMobile WebKit Development and jQTouch
Mobile WebKit Development and jQTouch
 
Accelerometer and OpenGL
Accelerometer and OpenGLAccelerometer and OpenGL
Accelerometer and OpenGL
 
NSNotificationCenter vs. AppDelegate
NSNotificationCenter vs. AppDelegateNSNotificationCenter vs. AppDelegate
NSNotificationCenter vs. AppDelegate
 
Using SQLite
Using SQLiteUsing SQLite
Using SQLite
 
From Flash to iPhone
From Flash to iPhoneFrom Flash to iPhone
From Flash to iPhone
 

Último

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Último (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

Deep Geek Diving into the iPhone OS and Framework

  • 1. Deep “geek” diving into the iPhone OS and Frameworks Tim Burks 360iDev March 3, 2009
  • 2. ?!? Tips for digging deep 360iDev, March 3, 2009 tim@neontology.com
  • 3. Silicon Valley iPhone Developer’s Meetup • 3rd Monday of the month • TIPS group, Palo Alto • Demos, technical, business talks • meetup.com/sviphone 360iDev, March 3, 2009 tim@neontology.com
  • 4. 360iDev, March 3, 2009 tim@neontology.com
  • 5. 360iDev, March 3, 2009 tim@neontology.com
  • 6. 360iDev, March 3, 2009 tim@neontology.com
  • 7. 360iDev, March 3, 2009 tim@neontology.com
  • 8. 360iDev, March 3, 2009 tim@neontology.com
  • 9. Nu Who’s Who Jeff Buck (itfrombit) Jason Sallis (jsallis) OpenGL, macros (with Issac Trotts) TextMate bundle, nuke Patrick Thomson (importantshock) Nu, YAML, applications Dean Mao (deanmao) Grayson Hansard (grayson) NuSAX Markdown, nug (Nu->ObjC header file generator) Adam Solove, Jonathan Yeddidia, Stephen White, Elizabeth Kellner, Matt Rice,... 360iDev, March 3, 2009 tim@neontology.com
  • 10. 360iDev, March 3, 2009 tim@neontology.com
  • 11. 360iDev, March 3, 2009 tim@neontology.com
  • 12. 360iDev, March 3, 2009 tim@neontology.com
  • 13. 360iDev, March 3, 2009 tim@neontology.com
  • 14. I Jailbroke my iPhone 360iDev, March 3, 2009 tim@neontology.com
  • 15. What is it doing? 1. “pwning” disables signature checks in the iPhone bootloader. 2. A custom “IPSW” (iPhone Software image) disables kernel restrictions on user processes. 360iDev, March 3, 2009 tim@neontology.com
  • 16. 360iDev, March 3, 2009 tim@neontology.com
  • 17. Essentials 360iDev, March 3, 2009 tim@neontology.com
  • 18. Out of the box, every iPhone’s root % ssh 192.168.0.13 -l root password is “alpine.” The authenticity of host '192.168.0.13 (192.168.0.13)' can't be established. After you’ve installed RSA key fingerprint is af:94:ba:80:55:a9:0d: OpenSSH, Change 19:63:47:97:df:f0:6f:b6:31. Are you sure you want to continue connecting (yes/no)? yours ASAP! yes Warning: Permanently added '192.168.0.13' (RSA) to the list of known hosts. root@192.168.0.13's password: iPhone:~ root# passwd Changing password for root. New password: Retype new password: iPhone:~ root# apt-get install vim ... iPhone:~ root# apt-get install gdb ... iPhone:~ root# apt-get install rsync ... 360iDev, March 3, 2009 tim@neontology.com
  • 19. #rsync -avz -e ssh / me@my-machine:/myiphone 360iDev, March 3, 2009 tim@neontology.com
  • 20. [/myiphone] tim% cat ./private/var/stash/share.GYYNXs/sandbox/SandboxTemplate.sb 360iDev, March 3, 2009 tim@neontology.com
  • 21. [/myiphone] tim% find . -name quot;*.dbquot; ./Library/Application Support/BTServer/pincode_defaults.db ./private/var/Keychains/keychain-2.db ./private/var/mobile/Applications/ED85406C-B7D7-427A-9865-70AF5FFDDD6C/Documents/667316288.db ./private/var/mobile/Library/CallHistory/call_history.db ./private/var/mobile/Library/Notes/notes.db ./private/var/mobile/Library/SMS/sms.db ./private/var/mobile/Library/Voicemail/voicemail.db ./private/var/mobile/Library/WebKit/Databases/Databases.db ./private/var/mobile/Library/WebKit/Databases/http_mail.google.com_0/0000000000000001.db ./System/Library/PrivateFrameworks/AppSupport.framework/calldata.db [/myiphone] tim% find . -name quot;*.sqlitedbquot; ./private/var/mobile/Library/AddressBook/AddressBook.sqlitedb ./private/var/mobile/Library/AddressBook/AddressBookImages.sqlitedb ./private/var/mobile/Library/Caches/MapTiles/MapTiles.sqlitedb ./private/var/mobile/Library/Calendar/Calendar.sqlitedb ./private/var/root/Library/AddressBook/AddressBook.sqlitedb ./private/var/root/Library/Calendar/Calendar.sqlitedb 360iDev, March 3, 2009 tim@neontology.com
  • 22. [/myiphone] tim% sqlite3 ./private/var/mobile/Library/CallHistory/call_history.db SQLite version 3.5.9 Enter quot;.helpquot; for instructions sqlite> .dump BEGIN TRANSACTION; CREATE TABLE _SqliteDatabaseProperties (key TEXT, value TEXT, UNIQUE(key)); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('call_history_limit','100'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('timer_last','60'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('timer_outgoing','88020'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('timer_incoming','76320'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('timer_all','164340'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('timer_lifetime','164340'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('timer_last_reset','0'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('data_up_last','0.5859375'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('data_down_last','1.380859375'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('data_up_all','207434.788086272'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('data_down_all','1946836.91406457'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('data_up_lifetime','207434.788086272'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('data_down_lifetime','1946836.91406457'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('data_last_reset','0'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('_ClientVersion','3'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('_UniqueIdentifier','C1253CD2-8310-4E04-9463-7CCF6FB8D49A'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('__CPRecordSequenceNumber','1634'); CREATE TABLE call (ROWID INTEGER PRIMARY KEY AUTOINCREMENT, address TEXT, date INTEGER, duration INTEGER, flags INTEGER, id INTEGER); INSERT INTO quot;callquot; VALUES(1404,'6505551212',1233452885,60,5,638); INSERT INTO quot;callquot; VALUES(1405,'8006332152',1233518067,60,5,638); 360iDev, March 3, 2009 tim@neontology.com
  • 23. [/myiphone] tim% sqlite3 ./private/var/mobile/Library/Notes/notes.db SQLite version 3.5.9 Enter quot;.helpquot; for instructions sqlite> .dump BEGIN TRANSACTION; CREATE TABLE _SqliteDatabaseProperties (key TEXT, value TEXT, UNIQUE(key)); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('_ClientVersion','3'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('_UniqueIdentifier','CAFDFC2D-87D7-4F8A- AC8F-C2C6561D842E'); INSERT INTO quot;_SqliteDatabasePropertiesquot; VALUES('__CPRecordSequenceNumber','65'); CREATE TABLE note_bodies (note_id INTEGER, data, UNIQUE(note_id)); INSERT INTO quot;note_bodiesquot; VALUES(1,'Shopping<div> </div><div><div>Bike seat</ div><div>Quick release (2)</div><div><br class=quot;webkit-block-placeholderquot;></ div><div>Lightbulbs</div><div>7 frame hNgers</div><div>2wire hangers</div><div>2 screw pairs</div><div><br class=quot;webkit-block-placeholderquot;></div><div>Hand broom</ div><div>Stainless steel spray ZEP</div><div><br class=quot;webkit-block-placeholderquot;></ div></div>'); INSERT INTO quot;note_bodiesquot; VALUES(3,'Whirlpool et20nkxan04 door shelf bracket'); 360iDev, March 3, 2009 tim@neontology.com
  • 24. Finding things • find • grep • nm • strings • otool 360iDev, March 3, 2009 tim@neontology.com
  • 25. [/myiphone] tim% cd System/Library/PrivateFrameworks [System/Library/PrivateFrameworks] tim% find . -exec grep Battery {} ; Binary file ./BluetoothManager.framework/BluetoothManager matches Binary file ./CoreTelephony.framework/CoreTelephony matches Binary file ./CoreTelephony.framework/Support/CommCenter matches Binary file ./IAP.framework/IAP matches Binary file ./IAP.framework/Support/iapd matches Binary file ./MobileBluetooth.framework/MobileBluetooth matches Binary file ./SpringBoardServices.framework/SpringBoardServices matches grep: ./WebKit.framework/Frameworks: No such file or directory [System/Library/PrivateFrameworks] tim% cd CoreTelephony.framework/ [Library/PrivateFrameworks/CoreTelephony.framework] tim% ls CoreTelephony English.lproj Info.plist Support [Library/PrivateFrameworks/CoreTelephony.framework] tim% strings CoreTelephony | grep Battery kCTIndicatorsBatteryCapacity kCTIndicatorsBatteryCapacityNotification [Library/PrivateFrameworks/CoreTelephony.framework] tim% nm CoreTelephony | grep Battery 31be15c4 T _CTGetBatteryCapacity 31be83a4 T __CTGetBatteryCapacity 31be14fc T __CTIndicatorsHandleBatteryCapacityNotification 31bee99a T __CTServerConnectionGetBatteryCapacity 39bdcae4 S _kCTIndicatorsBatteryCapacity 39bdcae8 S _kCTIndicatorsBatteryCapacityNotification 360iDev, March 3, 2009 tim@neontology.com
  • 26. otool Display load commands with otool -l <file> Display shared library dependencies with otool -L <file> Dissassemble with otool -tV <file> Display Objective-C tables with otool -o <file> “man otool” for more. 360iDev, March 3, 2009 tim@neontology.com
  • 27. _CTGetBatteryCapacity: 31be15c4 b5f0 push {r4, r5, r6, r7, lr} 31be15c6 af03 add r7, sp, #12 31be15c8 b084 sub sp, #16 31be15ca 2300 mov r3, #0 31be15cc 9302 str r3, [sp, #8] 31be15ce feb7f7ff bl _CTTelephonyCenterGetDefault 31be15d2 1c06 mov r6, r0 (add r6, r0, #0) 31be15d4 3608 add r6, #8 31be15d6 1c05 mov r5, r0 (add r5, r0, #0) 31be15d8 1c30 mov r0, r6 (add r0, r6, #0) 31be15da eb5af017 blx 0x31bf8c90 ; symbol stub for: _pthread_mutex_lock 31be15de 466b mov r3, sp 31be15e0 4668 mov r0, sp 31be15e2 6b69 ldr r1, [r5, #52] 31be15e4 aa02 add r2, sp, #8 31be15e6 330f add r3, #15 31be15e8 f9d7f00d bl __CTServerConnectionGetBatteryCapacity 31be15ec 9c01 ldr r4, [sp, #4] 31be15ee 1c30 mov r0, r6 (add r0, r6, #0) 31be15f0 eb56f017 blx 0x31bf8ca0 ; symbol stub for: _pthread_mutex_unlock 31be15f4 2c00 cmp r4, #0 31be15f6 d002 beq 0x31be15fe 31be15f8 1c28 mov r0, r5 (add r0, r5, #0) 31be15fa fdc9f7ff bl __CTTelephonyCenterReEstablishServerConnection 31be15fe 9802 ldr r0, [sp, #8] 31be1600 b004 add sp, #16 31be1602 bdf0 pop {r4, r5, r6, r7, pc} 360iDev, March 3, 2009 tim@neontology.com
  • 28. Learn Assembly with gcc tim% man gcc GCC(1) GNU GCC(1) NAME gcc - GNU project C and C++ compiler SYNOPSIS gcc [-c|-S|-E] [-std=standard] [-g] [-pg] [-Olevel] [-Wwarn...] [-pedantic] [-Idir...] [-Ldir...] [-Dmacro[=defn]...] [-Umacro] [-foption...] [-mmachine-option...] [-o outfile] infile... ... -S Stop after the stage of compilation proper; do not assemble. The output is in the form of an assembler code file for each non- assembler input file specified. By default, the assembler file name for a source file is made by replacing the suffix .c, .i, etc., with .s. 360iDev, March 3, 2009 tim@neontology.com
  • 29. tim% cat sample.c int multiply_add(int a, int b, int c) { return a*b + c; } tim% gcc sample.c -S tim% cat sample.s .text .globl _multiply_add _multiply_add: pushl %ebp movl %esp, %ebp subl $8, %esp movl 8(%ebp), %eax imull 12(%ebp), %eax addl 16(%ebp), %eax leave ret .subsections_via_symbols tim% gcc sample.c -S -arch armv6 gcc-4.0: installation problem, cannot exec '/usr/bin/arm-apple-darwin9-gcc-4.0.1': No such file or directory 360iDev, March 3, 2009 tim@neontology.com
  • 30. 360iDev, March 3, 2009 tim@neontology.com
  • 31. tim% /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 sample.c -S -arch armv6 tim% cat sample.s .text .align 2 .globl _multiply_add _multiply_add: @ args = 0, pretend = 0, frame = 12 @ frame_needed = 1, uses_anonymous_args = 0 stmfd sp!, {r7, lr} add r7, sp, #0 sub sp, sp, #12 str r0, [sp, #8] str r1, [sp, #4] int multiply_add(int a, int b, int c) { str r2, [sp, #0] return a*b + c; ldr r2, [sp, #8] } ldr r3, [sp, #4] mul r2, r3, r2 ldr r3, [sp, #0] add r3, r2, r3 mov r0, r3 sub sp, r7, #0 ldmfd sp!, {r7, pc} 360iDev, March 3, 2009 tim@neontology.com
  • 32. tim% /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 sample.c -S -arch armv6 -O tim% cat sample.s .text .align 2 .globl _multiply_add _multiply_add: @ args = 0, pretend = 0, frame = 0 int multiply_add(int a, int b, int c) { @ frame_needed = 0, uses_anonymous_args = 0 return a*b + c; @ link register save eliminated. @ lr needed for prologue } mla r0, r1, r0, r2 bx lr .subsections_via_symbols - ARM System Developer's Guide, Sloss, Symes, Wright, & Rayfield 360iDev, March 3, 2009 tim@neontology.com
  • 33. Dynamically load functions with libdl #include <dlfcn.h> ... // Dynamically load library with this: void *handle = dlopen(quot;/System/Library/PrivateFrameworks/CoreTelephony.framework/CoreTelephonyquot;, RTLD_LOCAL | RTLD_LAZY); // or this: [[NSBundle bundleWithPath:@”/System/Library/PrivateFrameworks/CoreTelephony.framework”] load]; ... // Lookup desired function with this: int (*myGetBatteryCapacity)() = dlsym(handle, ”CTGetBatteryCapacity”); // or this: int (*myGetBatteryCapacity)() = dlsym(RTLD_DEFAULT, ”CTGetBatteryCapacity”); ... // Call imported function int capacity = myGetBatteryCapacity ? myGetBatteryCapacity() : -1; 360iDev, March 3, 2009 tim@neontology.com
  • 34. otool and Objective-C 360iDev, March 3, 2009 tim@neontology.com
  • 35. [Oxygen:Library/Frameworks/CoreLocation.framework] tim% otool -o CoreLocation CoreLocation: Contents of (__DATA,__objc_classlist) section 39579d98 0x3957914c isa 0x39579188 superclass 0x3823a6f8 cache 0x301a7f08 vtable 0x380bb234 data 0x39579160 (struct class_ro_t *) flags 0x0 instanceStart 4 instanceSize 8 ivarLayout 0x0 name 0x31581290 CLLocation baseMethods 0x39579220 (struct method_list_t *) entsize 12 count 18 name 0x3158108c getDistanceFrom: types 0x31580f30 d12@0:4r@8 imp 0x3157de60 name 0x31580de0 course types 0x31580f3c d8@0:4 imp 0x3157de34 name 0x31580df0 speed types 0x31580f3c d8@0:4 imp 0x3157de08 name 0x31580df8 heading types 0x31580f3c d8@0:4 imp 0x3157dddc name 0x31580e00 clientLocation types 0x31580f44 {?=i{?=dd}ddddddd}8@0:4 imp 0x3157dda0 360iDev, March 3, 2009 tim@neontology.com
  • 36. % cd /usr/include/objc/ [Xenon-3:/usr/include/objc] tim% ls List.h malloc.h objc-load.h Object.h message.h objc-runtime.h Protocol.h objc-api.h objc-sync.h error.h objc-auto.h objc.h hashtable.h objc-class.h runtime.h hashtable2.h objc-exception.h zone.h [Xenon-3:/usr/include/objc] tim% grep IMP * ... objc.h:typedef id (*IMP)(id, SEL, ...); 360iDev, March 3, 2009 tim@neontology.com
  • 37. 360iDev, March 3, 2009 tim@neontology.com
  • 38. iPhone:~ root# nush Nu Shell. Cannot read termcap database; using dumb terminal settings. % (load quot;CoreLocationquot;) t % (puts ((CLLocation instanceMethodNames) description)) ( altitude, clientLocation, coordinate, quot;copyWithZone:quot;, course, dealloc, description, quot;encodeWithCoder:quot;, quot;getDistanceFrom:quot;, heading, horizontalAccuracy, quot;initWithClientLocation:quot;, quot;initWithCoder:quot;, quot;initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:timestamp:quot;, quot;initWithLatitude:longitude:quot;, speed, timestamp, verticalAccuracy ) () 360iDev, March 3, 2009 tim@neontology.com
  • 39. % (CLLocationManager instanceMethodWithName:quot;supportInfoquot;) <NuMethod:31b570> % ((CLLocationManager instanceMethodWithName:quot;supportInfoquot;) signature) quot;c@:quot; % ((CLLocation alloc) init) <CLLocation:31bd50> % (((CLLocation alloc) init) description) Bus error iPhone:~ root# nush Nu Shell. Cannot read termcap database; using dumb terminal settings. % ((CLLocation alloc) init) NuUndefinedSymbol: undefined symbol: CLLocation % (load quot;CoreLocationquot;) t % ((CLLocation alloc) init) <CLLocation:31bd50> % (class CLLocation (- description is quot;your housequot;)) () % (((CLLocation alloc) init) description) quot;your housequot; 360iDev, March 3, 2009 tim@neontology.com
  • 40. iPhone:~ root# cat battery.nu #!/bin/nush (set NSUTF8StringEncoding 4) (set b (NSBundle bundleWithPath:quot;/System/Library/PrivateFrameworks/CoreTelephony.frameworkquot;)) (b load) (set capacity (NuBridgedFunction functionWithName:quot;CTGetBatteryCapacityquot; signature:quot;iquot;)) (set sleep (NuBridgedFunction functionWithName:quot;sleepquot; signature:quot;iiquot;)) (function append-to-file (filename text) (unless ((NSFileManager defaultManager) fileExistsAtPath:filename) ((NSFileManager defaultManager) createFileAtPath:filename contents:nil attributes:nil)) (set handle (NSFileHandle fileHandleForWritingAtPath:filename)) (handle seekToEndOfFile) (handle writeData:((+ text quot;nquot;) dataUsingEncoding:NSUTF8StringEncoding)) (handle closeFile)) (while YES (set c (capacity)) (if (eq c 0) (set c (capacity))) ;; sometimes we have to retry to get a nonzero value (set measurement (+ ((NSDate date) description) quot;,quot; c)) (append-to-file quot;/var/root/battery.logquot; measurement) iPhone:~ root# tail battery.log (sleep 120)) 2009-03-01 23:22:49 -0800,78 2009-03-01 23:24:49 -0800,77 2009-03-01 23:26:49 -0800,77 2009-03-02 00:13:04 -0800,75 2009-03-02 00:28:44 -0800,75 2009-03-02 00:30:44 -0800,74 2009-03-02 00:32:44 -0800,72 2009-03-02 00:34:44 -0800,71 2009-03-02 00:45:40 -0800,71 2009-03-02 00:47:40 -0800,70 360iDev, March 3, 2009 tim@neontology.com
  • 41. launchd # cat /Library/LaunchDaemons/com.tootsweet.battery.plist <?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?> <!DOCTYPE plist PUBLIC quot;-//Apple//DTD PLIST 1.0//ENquot; quot;http://www.apple.com/DTDs/PropertyList-1.0.dtdquot;> <plist version=quot;1.0quot;> <dict> <key>Label</key> <string>com.tootsweet.battery</string> <key>Nice</key> <integer>20</integer> <key>ProgramArguments</key> <array> <string>/var/root/battery.nu</string> </array> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> </dict> </plist> 360iDev, March 3, 2009 tim@neontology.com
  • 42. Build Property Lists with Nu (Mac OS) tim% nush Nu Shell. % (set plist (NSObject readFromPropertyList:quot;com.tootsweet.battery.plistquot;)) <NSCFDictionary:24eeb0> % (puts (plist description)) { KeepAlive = 1; Label = quot;com.tootsweet.batteryquot;; Nice = 20; ProgramArguments = ( quot;/var/root/battery.nuquot; ); RunAtLoad = 1; } () % (set newlist (dict Label:quot;com.tootsweet.batteryquot; Nice:20 ProgramArguments:(array quot;/var/root/ battery.nuquot;) KeepAlive:1 RunAtLoad:1)) <NSCFDictionary:247700> % (newlist writeToPropertyList:quot;another.plistquot;) 1 % (set newlist (dict Label:quot;com.tootsweet.batteryquot; Nice:20 ProgramArguments:(array quot;/var/root/ battery.nuquot;) KeepAlive:(NSNumber numberWithBool:1) RunAtLoad:(NSNumber numberWithBool:1))) <NSCFDictionary:2411c0> % (newlist writeToPropertyList:quot;yetanother.plistquot;) 1 360iDev, March 3, 2009 tim@neontology.com
  • 43. tim% cat another.plist <?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?> <!DOCTYPE plist PUBLIC quot;-//Apple//DTD PLIST 1.0//ENquot; quot;http://www.apple.com/DTDs/PropertyList-1.0.dtdquot;> <plist version=quot;1.0quot;> <dict> <key>KeepAlive</key> <integer>1</integer> <key>Label</key> <string>com.tootsweet.battery</string> <key>Nice</key> <integer>20</integer> <key>ProgramArguments</key> <array> <string>/var/root/battery.nu</string> </array> tim% cat com.tootsweet.battery.plist <key>RunAtLoad</key> <?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?> <integer>1</integer> <!DOCTYPE plist PUBLIC quot;-//Apple//DTD PLIST 1.0//ENquot; quot;http://www.apple. </dict> <plist version=quot;1.0quot;> </plist> <dict> <key>Label</key> <string>com.tootsweet.battery</string> <key>Nice</key> <integer>20</integer> <key>ProgramArguments</key> <array> <string>/var/root/battery.nu</string> </array> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> </dict> </plist> 360iDev, March 3, 2009 tim@neontology.com
  • 44. % (set newlist (dict Label:quot;com.tootsweet.batteryquot; Nice:20 ProgramArguments:(array quot;/var/root/ battery.nuquot;) KeepAlive:(NSNumber numberWithBool:1) RunAtLoad:(NSNumber numberWithBool:1))) <NSCFDictionary:2411c0> % (newlist writeToPropertyList:quot;yetanother.plistquot;) 1 ... <plist version=quot;1.0quot;> <dict> <key>KeepAlive</key> <true/> <key>Label</key> <string>com.tootsweet.battery</string> <key>Nice</key> <integer>20</integer> <key>ProgramArguments</key> <array> <string>/var/root/battery.nu</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> 360iDev, March 3, 2009 tim@neontology.com
  • 45. Open Radar 360iDev, March 3, 2009 tim@neontology.com
  • 46. 360iDev, March 3, 2009 tim@neontology.com
  • 47. 360iDev, March 3, 2009 tim@neontology.com
  • 48. 360iDev, March 3, 2009 tim@neontology.com
  • 49. Thanks for Listening! 360iDev, March 3, 2009 tim@neontology.com