[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] New Apple and MS stores. Pygame support?



Well Apple flip-flopped in the summer so now their guidelines seem to suggest you could "theoretically" develop an iOS app in python.But as always, expect Apple to change their minds on a dime and be very selective about what their vague guidelines actually mean.
 
“… Based on their [our developers] input, today we are making some important changes to our iOS Developer Program license in sections 3.3.1, 3.3.2 and 3.3.9 to relax some restrictions we put in place earlier this year.

In particular, we are relaxing all restrictions on the development tools used to create iOS apps, as long as the resulting apps do not download any code. This should give developers the flexibility they want, while preserving the security we need.”

3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs.

3.3.2 — An Application may not download or install executable code. Interpreted code may only be used in an Application if all scripts, code and interpreters are packaged in the Application and
not downloaded. The only exception to the foregoing is scripts and code downloaded and run by Apple's built-in WebKit framework.

-Devon

On Tue, Oct 26, 2010 at 12:53 AM, Bill Coderre <bcbc@xxxxxxx> wrote:
OK, so based on my own reading of the guidelines, and based ONLY on the languages of implementation, here's what I think is the case:

For iOS apps (iPhone, iPod Touch, iPad): The app you submit to Apple must have been written in Objective-C and use the standard iOS APIs. Note that you could write your app in Python, then use a hypothetical Python-to-ObjC converter, and that MIGHT be acceptable. There are apps in the store right now that contain Lua, and some that were originally written in Adobe Flash (yick) and then converted. BUT, I don't know of any way to convert Python to Objective-C. It'd be a pretty massive undertaking, and since the iPhone is not exactly a speedy CPU, if the resultant app was too slow (which is more than possible), Apple would not accept it into the store.

But Apple just announced a new "Mac App Store," which has very different requirements. First off, apps MAY be written (and shipped) in Python, as long as it is 100% compatible with the Python that is installed as part of Mac OS X 10.6.latest. (Unfortunately, Apple has just announced that they are "deprecating" Java, so no App-store apps using Java will be accepted.)

Note that on neither platform may you download code over the internet and run it, or allow the user to type in code, and then run it. (It's a security issue, because Apple will digitally sign your code, and if the checksum fails, you're busted.)

This means that you have to have a single "bundle-style" application program that launches when you double-click it. To Unix geeks, a "bundle-style application" is a directory with the extension ".app", and the directory contains various files and directories in a defined structure. (The executable has to be in a certain spot, the text and graphics in certain other spots, and any add-on libraries (PyGame) have to be either hard-compiled in, or linked as "framework" libraries in yet another certain location.)

The take-away, though, is that for Mac "apps," only thing you can rely on is Python being installed. Not X-Windows, not PyGame, not even non-standard fonts. Everything other than Python, you have to wrap up and put inside your bundle. And if you can wrap it up, you can use it.

I don't know of any app that has been done in that format, but it's not impossible to do. Making a "hello world" python app meet these criteria wound probably take an hour. Adding PyGame might be a few evening project, or it might require a custom wrapper (many days of C coding), I don't know.

Note also, and this is most important: This "Mac App Store" is NOT going to be the ONLY way to distribute apps. It is a NEW way, and stuff that's in the store will certainly get a lot of attention, so if you were to get an app in there, it's pretty likely you'd have a lot of new friends, or paying customers. But all the existing ways of distributing apps are still allowed.

Also: The Mac App Store is very tightly controlled by Apple, and by Apple's lawyers, and there are like 100 more criteria specified, so if you're interested, you need to research carefully. If you want to submit to the store, you have to sign a pretty beefy license agreement, and pay $99/year for the "provisioning profiles" (digital signature certificates). And, of course, if Apple catches you trying to hack their system, you can be certain that your apps will be removed, and your license will be revoked.

The deal on pricing is simple: You pick the price, and you get paid 70% of it. Apple keeps 30%, and Apple handles the billing and pays the host-side bandwidth. (If your app is free, Apple still pays for the hosting.)



On Oct 25, 2010, at 7:34 PM, Noel Garwick wrote:
> Do any of the py2java apps support pygame? Is that possible?
>
> I'm still new to all this so Im not sure how/if modules are supported in these conversion programs.
>
> On Oct 25, 2010, at 7:36 PM, Dan Ross <dan@xxxxxxxxxxxxxxxxxx> wrote:
>
>> I don't think so, no. I was just curious if you had tried since. I haven't
>> heard of anyone doing it either.
>>
>> Personally, I wouldn't know where to start...
>>
>>
>> On Mon, 25 Oct 2010 16:34:32 -0700 (PDT), Keith Nemitz <musenik@xxxxxxxxx>
>> wrote:
>>> No. I don't even know of any pygame iOS apps. Was it even possible
>> before
>>> Apple changed the rules about interpreted code?
>>>
>>>
>>>
>>> --- On Mon, 10/25/10, Dan Ross <dan@xxxxxxxxxxxxxxxxxx> wrote:
>>>
>>>> From: Dan Ross <dan@xxxxxxxxxxxxxxxxxx>
>>>> Subject: Re: [pygame] New Apple and MS stores. Pygame support?
>>>> To: pygame-users@xxxxxxxx
>>>> Date: Monday, October 25, 2010, 4:28 PM
>>>> I'm awfully curious about this as
>>>> well.
>>>>
>>>> Keith-
>>>>
>>>> Have you made any pygame games for an iOS device?
>>>>
>>>> Dan
>>>>
>>>> On Mon, 25 Oct 2010 14:48:01 -0700 (PDT), Keith Nemitz
>>>> <musenik@xxxxxxxxx>
>>>> wrote:
>>>>> With Apple announcing a new Mac App Store, and MS
>>>> announcing a new Games
>>>>> Marketplace, I wonder how that will affect my Pygame
>>>> tool chain.
>>>>>
>>>>> Will py2app need changes, so I can insert Apple
>>>> Certificates into the
>>>> app?
>>>>>
>>>>>
>>>>> Will py2exe need updates to survive the Windows 7
>>>> compatibility test?
>>>>>
>>>>> Inquiring mind wants to know...
>>>>>
>>>>> :-)
>>>>>
>>>>> Keith Nemitz
>>>>> www.mousechief.com
>>>>