0

Is there a way to pass a program a string and get it to execute the code. For instance, could I have an NSString with this in it:

int a =0; NSLog(@"a = %i", a);

.. and it would execute the code.

The reason for my question is that I'd like to be able to practice coding on my iPad. I was hoping there would be a website wher you could enter objective-C and it would execute, within the browser, but I can't find such a site. My other option is some sort of screen sharing solution with my main mac, but that would be no good in low bandwidth situations.

cannyboy
  • 24,180
  • 40
  • 146
  • 252
  • possible duplicate of [Evaluating strings in Objective-C](http://stackoverflow.com/questions/8297043/evaluating-strings-in-objective-c) – JeremyP Jan 13 '12 at 16:41

3 Answers3

3

Objective-C is a compiled language, which means you need to compile the code to execute it (the good thing is that you compile it where you have plenty of resources and not on iPad).

So, basically, the answer is no.

Michael Krelin - hacker
  • 138,757
  • 24
  • 193
  • 173
1

Not sure if I understood your question but even if you aren't in a developer program or you don't have a developer licence, there is a way to try code on device. I think this is what you are looking for (click here).

Community
  • 1
  • 1
Lolloz89
  • 2,809
  • 2
  • 26
  • 41
0

iPad, iPhone, or any device having iOS cannot be used for software development as it does not provide any support for it.

Ali3n
  • 1,244
  • 6
  • 10