• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Storing strings in code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Storing strings in code


  • Subject: Storing strings in code
  • From: Leo <email@hidden>
  • Date: Wed, 08 Aug 2012 15:58:22 -0400

As I recently learned, plain strings are stored "as is" in the executable and can be discovered - if opening it in a text editor, for example.

That is, if I have a string @"myString" inside the code, it can be read in plain text inside the executable.

I have a couple of string I don't want to be discovered (related to demo period handling).

Is there an easy way to store them in an encoded way?

I tried to define them as C strings (const char) but it doesn't make a difference.


So far I just break them into characters in AppleScript Editor, add @ in front of each with find-replace, and then store them as an array which receives the -componentsJoinedByString: method.

Is there an easier way?

Thanks,
Leo
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Storing strings in code
      • From: Rick Mann <email@hidden>
  • Prev by Date: Re: +underPageBackgroundColor
  • Next by Date: How make iPhone HOT (yes, increase the temperature)??
  • Previous by thread: Cocoaheads Lake Forest meets tonight (Wednesday) night - continuing a reading group on Matt Neuburg's Programming iOS 5, 2nd edition
  • Next by thread: Re: Storing strings in code
  • Index(es):
    • Date
    • Thread