iphone Xcode project files encrypt - iphone

I need to send the project files to my client for running it on thier xcode to see the work in progress. Is there any way to encrypt the source files ?
I have one option by sending .app file from simulator debug location and ask them to put it on the same path . But i need to send the code with encryption , is that possible ?
Thanks in Advance.
Raj

You can encrypt the files via any number of mechanisms, but if you want the client to be able to build and run the code, that's not going to be practical, as they'd have to decrypt it.
If you want to do this without exposing the source code to the client, build a static library, distribute that static library which links along with a template main.m into your final executable, set it up as a framework to link into the sample app you send them. This way, they don't get the sources to the app, but they can still build it and see what's going on.
On a side note, if you don't trust your client, why did you take the job in the first place?

Related

How to present static file results that are generated at different time to client in play 2?

I am writing a web service using play 2.0 in scala.
After getting client's configuration parameters, then the web service will take a while to generate some files. (Note: some files can be short, some other files can take long).
I figured out how to get client's configurations and trigger my computation,
now I need to present the generated files to client side at the end of the session.
So questions are:
How to present the files to client?
I'm thinking about returning a static folder link to client, so that they can go into the folder to
see further what files are there, and so when clicking on the files, the details of the files can be shown, either jpg or text.
But how?
How to not to block client during the generation of the files?
For example, client can still click on the files that are available at that moment.
Then here comes the third question:
How to let the client side know that the long-time computation file is available and listed in the folder?
I'm pretty new to web application, thanks for any suggestion, advice, or little examples are greatly appreciated too!
I would create a web interface to show the created files to your clients and create a background job to for the long computation process. You can create a wait page where a javascript check if the file is created.

Is there a way to run a script on iOS?

I need to define a processing rule for web data in iOS and thought it would be a good idea to pull the processing rule as a script file from my server and execute it on the iOS device, since the web API I'm interacting with might change URLs or response syntax and I need to be able to fix such issues fast and cannot rely on pushing an update (takes forever).
I wanted to do it with a small JS file that is pulled from my server every once and a while, but unfortunately iOS doesn't include the JavaScriptCore framework.
Are there other options?
Apple developer agreement will not let you run a downloaded, interpreted script, on the device.
Your best bet is probably downloading a data structure (potentially in JSON format) and parse that and take some predefined actions in your client code based on that, rather than trying to execute the downloaded code directly.
You can let a UIWebView run a Javascript snippet, or you could use another scripting language like LUA (don't forget to add LUA for this). The real problem is: You are not allowed to download code from a webserver or somewhere else. Everything must either be already on the device, or calculated at runtime.
Depending on the information that you want, you could use an XML file that includes the new URLs and parse it, but I don't know if this fits your need.
You can compile JavaScriptCore into your app, evidently, and have it approved by Apple. However, as Mehrdad notes, any scripts run in the app must already be in the app at the time the app is reviewed.

Non class files with Java Web Start

How do you distribute other files needed by your application that aren't in a jar file? For example, the application at http://www.javabeginner.com/java-swing/java-swing-shuffle-game . The download contains Shuffle.jar, Shuffle.bat, Score.dat, and an images folder with 3 images in it. I can see possibly putting the images directly in Shuffle.jar, but you wouldn't want to put Score.dat in the jar file because it changes. Is there somewhere you could identify this type of file in the jnlp?
The non-java files should be stored as resources. For files that change, you store the original or template file also as a resource in your jar. When the program starts, you have it check the local system to see if that file exists. If not, it creates the local file by copying the template file from the JAR resource. If the file already exists, then it is used as is.
To save files to the local system, even when running in the sandbox (unsigned), you can use the PersistenceService (javadoc / example). If your java application is signed, then you can use the regular File apis to write the file to the local machine, such as in a ".yourgame" subfolder under the user's home folder.
You can put all those files (except the scores file) in your jar file and load the contents using resource loading.
I've just deleted and restarted my reply twice now, changing my answer each time; this is confusing and needs a bit more clarification.
Are you SURE that application is supposed to be a Web Start app? On the site you linked to, it doesn't appear to be. Are you trying to take an application that was not designed as a Web Start application and change it into one that can be Web Start?
If it's not a Web Start app as your tag implies, then this question is open ended. You can distribute it 100 different ways.
If you are indeed trying to convert it into a Web Start app, you can start by packaging the images into the jar and that will alleviate your first headache if you just read them from there instead of from a File(). If it's going to be Web Start, then you need to decide how you want to keep scores. You have to decide what the scoring system is like before you can decide on how to go about it; will all the scores be kept on the web site hosting the Web Start app? Will that part still be local? If you want to get access to the local file system, you need to sign the jar, then you can extract the score.dat to the file system and do whatever you want with it if the end user accepts.
You need to figure out what you want to do before you can do it, or at least clear it up for us if you already know more than we know you know.

Compile OpenSSH for use in iphone application

I am trying to create an application to take advantage of OpenSSH to create an sFtp client for the iphone. I know that it is possible to create ssh clients for iPhone (iSSH, TouchTerm, etc) and I also assume they are using openssh as a base.
Would I just need to create a static library?
I think this question has already been asked. Short answer: you can drop the source files into your project and compile them with the application, or you could probably link to a static library (if it's OK with their license--it's not OK with LGPL, for instance, but I think it should be OK with OpenSSH). Hope that helps.

Add files to the app on the run

I was wondering if I could add the files to the app resources from an external url. As in suppose I see a url which has a nice image. Can I download that from the website and add it as a resource and use it locally for later use ? I am sure there is way But Need some guidance on how to approach the problem and The set of Classes that could be used with explanantion.
Thanks,
You can't change anything in your app bundle after it has been signed. If you did, you'd make the signature invalid, and the iPhone would refuse to run your app. Your best bet is to add the files to the Documents or tmp folder. There really isn't much of a reason to have stuff in your own bundle - is there a reason you have to have those images there?