Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view NSString defined in a given iOS ipa file

I remember I have done this before, but forgot the command.

e.g.

I have a NSString defined in source, e.g.

NSString * s = @"secret";

I remember I can view the content using the strings command, but I forgot the exact command to view it,

e.g.

strings my.ipa | grep "secret"

does not work. Anyone have idea?

like image 255
Ryan Avatar asked Sep 04 '12 09:09

Ryan


1 Answers

I'm not sure it's possible directly with strings on an ipa, but you can do the following:

  1. Rename your .ipa file to have the .zip extension. ipa's are simply renamed zips.
  2. Extract (it should create a directory named Payload)
  3. cd into the Payload/<app-name>.app
  4. You should have a file named <app-name> in the current directory.
  5. Call strings <app-name> | grep secret.
like image 88
user1071136 Avatar answered Oct 31 '22 11:10

user1071136