4

I am planning to implement iOS game where certains assets - textures, shaders, etc. are downloaded at runtime when user buys specific in-app purchases . Its well known fact about Apple prohibiting downloading & emitting iOS app code at runtime:

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.

Does this restriction also include Open GL shaders, i.e. can shaders code be downloaded at runtime?

Oleg
  • 121
  • 1
  • 1
  • 4
  • 2
    You could always ship everything with the "free" version of your App and unlock certain features only after the user purchased one of the InAppPurchases. – alex Mar 06 '12 at 09:31
  • Alex is right. And it's easier to implement everything this way. – Rok Jarc Mar 06 '12 at 09:42
  • +1 to Alex. Think about this situation: user purchases the content, but downloading fails (with some technical reason for example). I'm sure that first thinп he will do - open Appstore and downrate your game :) – brigadir Mar 06 '12 at 10:27
  • guys, I am talking about some farm where management (add/disable/remove) of contents is most comfortable when done centrally from server. – Oleg Mar 06 '12 at 10:39
  • 1
    Textures should be no problem, that's just a bitmap ... But why do you want to download shaders instead of implementing them in code and shipping them? I can't imagine you are going to implement new shaders by the day ... – TheEye Mar 06 '12 at 10:46
  • 4
    I'm voting to close this question as off-topic because **it is about licensing or legal issues**, not programming or software development. [See here](http://meta.stackoverflow.com/a/274964/1402846) for details, and the [help/on-topic] for more. – Kevin Brown-Silva Jun 10 '15 at 23:32

1 Answers1

2

Alex and co are correct. Section 2.4 of the agreement states that you may not use the In-App Purchase API to "add any additional executable code" to the app - only data is permitted. They explicitly state that the functionality must be embedded within the app and unlocked by the purchase.

I can see why it would be desirable to add shaders as part of new content though; maybe you should contact Apple directly for a ruling to be certain?

gavinb
  • 19,278
  • 3
  • 45
  • 60