Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

siakus

macrumors newbie
Original poster
May 2, 2006
12
0
I have built an Xcode application project and i don't want the users to see the package content of my .app file by choosing "show package content" from the contextual menu. Is there any way to hide this menu? or Do you have another solution?
thanks.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Create a legacy CFM app with all resources and so on compiled into a single giant file?

Other than that there is no way.
 

siakus

macrumors newbie
Original poster
May 2, 2006
12
0
i am new with the xcode thing.
What is a CFM App? How could i create a CFM app with all ressources? Do you know any related web site?
thanks.
 

Krevnik

macrumors 601
Sep 8, 2003
4,101
1,312
CFM is the old format used since System 7.1 (whenever PPC support was first introduced), and then abandoned in OS X. OS X will still read CFM PPC apps, but you can't produce a Universal Binary using CFM, and Apple's tools can't be used to create a CFM app on OS X.

Oh, and there is the whole issue that you then have to use the old resources stored in the resource fork, meaning you have to call into the Carbon APIs, you can't use Interface Builder, and localization is by and far, MUCH more time-consuming.

Yeah... uhm... I wouldn't use CFM. You essentially will bind the life-span of the app to that of PPC Macs, and forcing Intel systems to run in emulation just to use the app.

Other than that... there is no way to hide the contents of your bundle from the world. The real question is: What the in the world are you attempting to hide from the end user that you would need to do this?
 

HiRez

macrumors 603
Jan 6, 2004
6,265
2,629
Western US
Maybe encrypt your resource data, maybe in a zip file format or something, using Java or Python libraries to get it out (or use your own proprietary data file format). Sounds like a major PITA to me though. Another possibility is to perhaps use CoreData and have it store the resources as binary data in a database (not sure if that's actually secure though, or could be made to be). It might help if you at least told us the kind of data you're trying to hide (text, image, password key, etc.).
 

Krevnik

macrumors 601
Sep 8, 2003
4,101
1,312
Agreed, depending on the data being hidden, there is a good chance there is a better way to do it, or a better location for it. Just because you might be able to lock out the UI option, doesn't mean it is a good way to lock data away without encryption (which is a PITA if you want to do that to your nibs or the like).
 

GeeYouEye

macrumors 68000
Dec 9, 2001
1,669
10
State of Denial
^ Not necessarily... you could put the NIB decryption in main.m before letting NSApplication run. Still, I imagine most users might not be too happy about that if it means a longer startup time.
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,566
siakus said:
I have built an Xcode application project and i don't want the users to see the package content of my .app file by choosing "show package content" from the contextual menu. Is there any way to hide this menu? or Do you have another solution?
thanks.

Why would you want to do that?

Since Apple and everyone else ships applications where the user can choose to see the package contents, could you please explain what makes your application so outstandingly different that the user shouldn't be able to do that with your application?
 

siakus

macrumors newbie
Original poster
May 2, 2006
12
0
In fact i just don't want users to check and modify my nib files. And i have an applescript there also that i want to hide. For the script i put it in a objective C code, so that's fine. but i have no solution for the nib files.
And i have seen some applications on the mac where you can't use the "show package" function. Foe example Microsoft Office Applications.
 

savar

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
siakus said:
In fact i just don't want users to check and modify my nib files. And i have an applescript there also that i want to hide. For the script i put it in a objective C code, so that's fine. but i have no solution for the nib files.
And i have seen some applications on the mac where you can't use the "show package" function. Foe example Microsoft Office Applications.

Well, I doubt that your nib files are highly-classified trade secrets, so I don't see what's wrong with users modifying them, but there's no reason why you couldn't simply zip up the files, unzip them at runtime, then delete the unzipped files when you're done. It's obnoxious, but if you really want to its possible.

The only apps that can't have their package contents shown are apps that are not packages. These apps are outdated and you shouldn't be developing an app like that.
 

caveman_uk

Guest
Feb 17, 2003
2,390
1
Hitchin, Herts, UK
siakus said:
In fact i just don't want users to check and modify my nib files.
Why would they want to do that? Does it really matter? Why don't you spend more time worrying about stuff the user really cares about (like features, ease of use etc) than daft obfuscation that just makes your program more complicated than it needs to be for very little real gain.
And i have an applescript there also that i want to hide. For the script i put it in a objective C code, so that's fine.
If I wanted to find your applescript I could find it as a literal string in your binary with a hex editor (or the 'strings' command line program ). What you going to do now? Encrypt it in the binary?:rolleyes:

Trust me, there's very little you can hide in an objective-C program. The class headers can be worked out using class-dump and someone could find all those secret files you access using fseventer. Throw in input managers, class posing and the other delights of the objective-C runtime and you're pretty much wasting your time trying to hide stuff without spending a lot of time doing it properly.
 

siakus

macrumors newbie
Original poster
May 2, 2006
12
0
Ok thanks guys. I think i will drop that case, i understand it doesn't really matter.
 

Soulstorm

macrumors 68000
Feb 1, 2005
1,887
1
As far as the Applescript file is concerned, you can hide it this way:

Compile it as a run-only application. You will still be able to load it with the "load script" command.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.