<p>Using <a href="http://pyobjc.sourceforge.net/" rel="noreferrer">PyObjC</a>, you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?</p>

[{'answer_id': 43331, 'author': 'Dave Verwer', 'author_id': 4496, 'author_profile': 'https://Stackoverflow.com/users/4496', 'pm_score': 6, 'selected': True, 'text': "<p>Not currently, currently the only languages available to access the iPhone SDK are C/C++, Objective C and Swift.</p>\n\n<p>There is no technical reason why this could not change in the future but I wouldn't hold your breath for this happening in the short term.</p>\n\n<p>That said, Objective-C and Swift really are not too scary...</p>\n\n<blockquote>\n  <h1>2016 edit</h1>\n  \n  <p>Javascript with NativeScript framework is available to use now.</p>\n</blockquote>\n"}, {'answer_id': 43358, 'author': 'gavrie', 'author_id': 2794, 'author_profile': 'https://Stackoverflow.com/users/2794', 'pm_score': 6, 'selected': False, 'text': '<p>You can use PyObjC on the iPhone as well, due to the excellent work by Jay Freeman (saurik). See <a href="http://www.saurik.com/id/5" rel="noreferrer">iPhone Applications in Python</a>.</p>\n\n<p>Note that this requires a jailbroken iPhone at the moment.</p>\n'}, {'answer_id': 145071, 'author': 'schwa', 'author_id': 23113, 'author_profile': 'https://Stackoverflow.com/users/23113', 'pm_score': 2, 'selected': False, 'text': "<p>The iPhone SDK agreement is also rather vague  about whether you're even allowed to run scripting languages (outside of a WebView's Javascript). My reading is that it is OK - as long as none of the scripts you execute are downloaded from the network (so pre-installed and user-edited scripts seem to be OK).</p>\n\n<p>IANAL etc etc.</p>\n"}, {'answer_id': 739098, 'author': 'Zifre', 'author_id': 83871, 'author_profile': 'https://Stackoverflow.com/users/83871', 'pm_score': 0, 'selected': False, 'text': '<p>You can do this with PyObjC, with a jailbroken phone of course. But if you want to get it into the App Store, they will not allow it because it "interprets code." However, you may be able to use <a href="http://code.google.com/p/shedskin/" rel="nofollow noreferrer">Shed Skin</a>, although I\'m not aware of anyone doing this. I can\'t think of any good reason to do this though, as you lose dynamic typing, and might as well use ObjC.</p>\n'}, {'answer_id': 2005197, 'author': 'Mike', 'author_id': 139685, 'author_profile': 'https://Stackoverflow.com/users/139685', 'pm_score': -1, 'selected': False, 'text': '<p>The only significant "external" language for iPhone development that I\'m aware of with semi-significant support in terms of frameworks and compatibility is <a href="http://monotouch.net/" rel="nofollow noreferrer">MonoTouch</a>, a C#/.NET environment for developing on the iPhone.</p>\n'}, {'answer_id': 2167033, 'author': 'Asim Jalis', 'author_id': 262343, 'author_profile': 'https://Stackoverflow.com/users/262343', 'pm_score': 5, 'selected': False, 'text': '<p>Yes you can. You write your code in tinypy (which is restricted Python), then use tinypy to convert it to C++, and finally compile this with XCode into a native iPhone app. Phil Hassey has published a game called Elephants! using this approach. Here are more details,</p>\n\n<p><a href="http://www.philhassey.com/blog/2009/12/23/elephants-is-free-on-the-app-store/" rel="noreferrer">http://www.philhassey.com/blog/2009/12/23/elephants-is-free-on-the-app-store/</a></p>\n'}, {'answer_id': 2637228, 'author': 'Gordon Christie', 'author_id': 206913, 'author_profile': 'https://Stackoverflow.com/users/206913', 'pm_score': 4, 'selected': False, 'text': '<p>An update to the iOS Developer Agreement means that you can use whatever you like, as long as you meet the developer guidelines. Section 3.3.1, which restricted what developers could use for iOS development, has been entirely removed.</p>\n\n<p>Source: <a href="http://daringfireball.net/2010/09/app_store_guidelines" rel="noreferrer">http://daringfireball.net/2010/09/app_store_guidelines</a></p>\n'}, {'answer_id': 2768536, 'author': 'Michael McCracken', 'author_id': 332751, 'author_profile': 'https://Stackoverflow.com/users/332751', 'pm_score': 1, 'selected': False, 'text': '<p>Technically, as long as the interpreted code ISN\'T downloaded (excluding JavaScript), the app may be approved. Rhomobiles "Rhodes" framework does just that, bundling mobile Ruby, a lightweight version of Rails, and your app for distribution via the app-store. Because both the interpreter and the interpreted code are packaged into the final application - Apple doesn\'t find it objectionable. </p>\n\n<p><a href="http://rhomobile.com/products/rhodes/" rel="nofollow noreferrer">http://rhomobile.com/products/rhodes/</a></p>\n\n<p>Even after the latest apple press release - rhodes apps (mobile ruby) are still viable on the app-store. I\'d find it hard to believe that tinyPy or pyObjC wouldn\'t find a place if there is a willing developer community.</p>\n'}, {'answer_id': 3684714, 'author': 'jkp', 'author_id': 912, 'author_profile': 'https://Stackoverflow.com/users/912', 'pm_score': 5, 'selected': False, 'text': '<p>It seems this is now something developers are allowed to do: the iOS Developer Agreement was changed yesterday and appears to have been ammended in a such a way as to make embedding a Python interpretter in your application legal:</p>\n\n<p><strong>SECTION 3.3.2 — INTERPRETERS</strong></p>\n\n<p><strong>Old:</strong></p>\n\n<blockquote>\n  <p>3.3.2 An Application may not itself install or launch other executable\n  code by any means, including without\n  limitation through the use of a\n  plug-in architecture, calling other\n  frameworks, other APIs or otherwise.\n  Unless otherwise approved by Apple in\n  writing, no interpreted code may be\n  downloaded or used in an Application\n  except for code that is interpreted\n  and run by Apple’s Documented APIs and\n  built-in interpreter(s).\n  Notwithstanding the foregoing, with\n  Apple’s prior written consent, an\n  Application may use embedded\n  interpreted code in a limited way if\n  such use is solely for providing minor\n  features or functionality that are\n  consistent with the intended and\n  advertised purpose of the Application.</p>\n</blockquote>\n\n<p><strong>New:</strong></p>\n\n<blockquote>\n  <p>3.3.2 An Application may not download or install executable code.\n  Interpreted code may only be used in\n  an Application if all scripts, code\n  and interpreters are packaged in the\n  Application and not downloaded. The\n  only exception to the foregoing is\n  scripts and code downloaded and run by\n  Apple’s built-in WebKit framework.</p>\n</blockquote>\n'}, {'answer_id': 11069342, 'author': 'John M.', 'author_id': 1461471, 'author_profile': 'https://Stackoverflow.com/users/1461471', 'pm_score': -1, 'selected': False, 'text': '<p>I think it was not possible earlier but I recently heard about PyMob, which seems interesting because the apps are written in Python and the final outputs are native source codes in various platforms (Obj-C for iOS, Java for Android etc). This is certainly quite unique. <a href="http://pyzia.com/technology.html" rel="nofollow">This</a> webpage explains it in more detail.</p>\n\n<p>I haven\'t given it a shot yet, but will take a look soon.</p>\n'}, {'answer_id': 11448458, 'author': 'Filipe Correia', 'author_id': 684253, 'author_profile': 'https://Stackoverflow.com/users/684253', 'pm_score': 4, 'selected': False, 'text': '<p>Yes, nowadays you can develop apps for iOS in Python. </p>\n\n<p>There are two frameworks that you may want to checkout: <a href="http://kivy.org/" rel="nofollow noreferrer">Kivy</a> and <a href="http://pyzia.com/technology.html" rel="nofollow noreferrer">PyMob</a>.</p>\n\n<p>Please consider the answers to <a href="https://stackoverflow.com/questions/10664196/is-it-possible-to-use-python-to-write-cross-platform-apps-for-both-ios-and-andro">this question</a> too, as they are more up-to-date than this one.</p>\n'}, {'answer_id': 18601032, 'author': 'cclauss', 'author_id': 2420341, 'author_profile': 'https://Stackoverflow.com/users/2420341', 'pm_score': 3, 'selected': False, 'text': '<p><a href="http://omz-software.com/pythonista" rel="nofollow noreferrer">Pythonista</a> has an Export to Xcode feature that allows you to export your Python scripts as Xcode projects that build standalone iOS apps.</p>\n\n<p><a href="https://github.com/ColdGrub1384/Pyto" rel="nofollow noreferrer">https://github.com/ColdGrub1384/Pyto</a> is also worth looking into.</p>\n'}, {'answer_id': 54600195, 'author': 'michael', 'author_id': 998490, 'author_profile': 'https://Stackoverflow.com/users/998490', 'pm_score': 2, 'selected': False, 'text': '<p><a href="https://pybee.org" rel="nofollow noreferrer">BeeWare</a> is an open source framework for authoring native iOS &amp; Android apps.</p>\n'}, {'answer_id': 57226775, 'author': 'Rakeeb Hossain', 'author_id': 9206602, 'author_profile': 'https://Stackoverflow.com/users/9206602', 'pm_score': 2, 'selected': False, 'text': '<p><strong>2019 Update:</strong></p>\n\n<p>While Python-iOS development is relatively immature and likely will prevent (afaik) your app from having native UI and functionality that could be achieved in an Apple-supported development language, Apple now seems to allow embedding Python interpreters in Native Swift/Obj-C apps.</p>\n\n<p>This supports importing Python libraries and running Python scripts (even with supplied command-line arguments) directly from your Native Swift/Obj-C code.</p>\n\n<p>My company is actually wrapping our infrastructure (originally written in Python) in a native iOS application! It works very well and communication between the parts can be easily achieved via a client-server model.</p>\n\n<p>Here is a nice library by Beeware with a cookiecutter template if you want to try and run Python scripts in your iOS app: <a href="https://github.com/beeware/Python-Apple-support/tree/3.6" rel="nofollow noreferrer">https://github.com/beeware/Python-Apple-support/tree/3.6</a>.</p>\n'}]
['https://Stackoverflow.com/questions/43315', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2183/']