4

I want to make a native iOS app. It will be written mostly in Objective-C. But I need to invoke some python scripts. I have been researching on this for hours.

Questions:

1: I found this post(Running python/ruby script on iPhone? From the iPhone OS 4 Terms --- 3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited)). But it has been 2 year. Is there any changes to this agreement?

2: If it is possible to invoke a python script in an iOS app, can someone explain it to me with some code samples?

5
  • 1
    It's probably going to be pretty complicated and kludgy. If the scripts are small enough you might be able to just rewrite them in Objective-C. Commented Oct 5, 2012 at 17:59
  • @NathanVillaescusa Thank you Nathan. The script is not complicated and I think I can rewrite it in Objective-C. But I really want to know how to run python scripts in an iOS app. Commented Oct 5, 2012 at 18:06
  • 1
    read this, may be this one you looking for stackoverflow.com/questions/8862085/… Commented Oct 5, 2012 at 18:47
  • @subh.singh I know we can run python on a Mac. Thanks anyway. Commented Oct 5, 2012 at 19:17
  • The answer is basically a link for this question, so I propose to close this as a duplicate. Commented Aug 25, 2022 at 13:48

1 Answer 1

5

You will need to embed an interpreter into your app. I believe this is the thread you are looking for. Embedding Python in an iPhone app

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.