Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Python for iOS programming [duplicate]

I am developing and iOS app and would like to know if it is possible to use python scripts in Xcode to develop my app.

I am comfortable with objective C and I am not aiming to create my entire app using python. Most of the code will still be in objective-C. The algo that I am using is very computationally intense; and so I thought using python (along with numpy and scipy) would speed things up.

I have heard that PyObjC 'may' be useful, but I have found threads on stackoverflow stating that PyObjC is not compatible with XCode 4.

Also, is there any other better suited alternative to perform computationally heavy tasks in iOS.

Thank you for answering, in advance.

like image 974
Satyam Merja Avatar asked Feb 10 '13 04:02

Satyam Merja


People also ask

Can you use Python to code iOS?

iOS does not have Python pre-installed, so you'll have to embed a copy of Python within your app. Additionally, iOS apps can't run arbitrary secondary processes, so you'll have to run the Python interpreter inside your app's process. That's quite possible, but it involves a good understanding of the Python runtime.

Can I code Python in Xcode?

"How to use Xcode IDE for Python development Open Xcode and start with creating a new project: From the templates, choose Cross-platform > External Build System Give it a name. You can update Organizatin Name and Identifier if you want. Make sure you enter a correct path for Python bin.

Can you make iOS games in Python?

To create an IOS game you should use swift the programming language for IOS from Apple™ that is similar to Python™ or you could use the software Pythonista for IOS, Pythonista is a complete development environment for writing Python™ scripts on your iPad or iPhone, then you must have a Mac and the $99 dev license to ...


1 Answers

I tried to install PyObjC and I finally got it running after five hours of reading stackoverflow and docs. For me this link worked like a charm: https://github.com/gregneagle/Xcode4CocoaPythonTemplates (without GUI, also see this answer). See this link for an example of using PyObjC with iOS.

like image 179
Sitses Avatar answered Oct 03 '22 19:10

Sitses