How to Hide the source code in Xcode?

I am writing an app using AppleScriptObjC in Xcode 7.3.1, and while making the archive I see the source code is still inside the package, is there a way to hide it or transform it completely to binary code? Thanks

Re: How to Hide the source code in Xcode?

Re: How to Hide the source code in Xcode?

Are you sure you're looking at the latest build?

You can check what's happening. In the Navigator panel, click on the last icon, the Report Navigator. Find the latest Build report. You should then see a list of build stages with green ticks. Find the one that compiles your code. Select it, and then click in he icon that appears to its right to expand it. This will show the OSACompile command issued as part of the build process. In it, you should see -x -- that means execute-only.

Re: How to Hide the source code in Xcode?

Re: How to Hide the source code in Xcode?

Hi Shane,is Xcode able to hide the script files completely or the only thing it can do is keep the files visible and make them uneditable? is it also possible to exclude some scripts from beeing compiled? I want to use some files to store data so I could edit them later without the need to recompile the app, they are basically setting files

Re: How to Hide the source code in Xcode?

kamel3d wrote:

is Xcode able to hide the script files completely or the only thing it can do is keep the files visible and make them uneditable?

It's a requirement from the AppleScriptObjC.framework that is used. It's because of the AppleScript files not being compiled into the executable (see:<appname>.app/Contents/MacOS/<appname>). The first thing that is done after opening the process instance (before launching the application instance) is that the AppleScriptObjC.frameworks tries to load all AppleScript files in the script folder from the application bundle. Because of this workflow the files has to be stored in that particular folder and reachable for the framework.

kamel3d wrote:

is it also possible to exclude some scripts from beeing compiled? I want to use some files to store data so I could edit them later without the need to recompile the app, they are basically setting files

If they are settings you should store them outside the application in the preferences of application support folder. You could use a default file and when at launch this file is missing you copy this file to the preference of application support folder.