CloudDeploy a Manipulate with dependent functions

The quick fix is to use Manipulate's SaveDefinitions, making it responsible for storing dependencies:

f = Sin[x];
CloudDeploy[
 Manipulate[Plot[f, {x, 0, t}], {t, 1, 15}, SaveDefinitions -> True]
]

I don't know if that is expected, maybe Documentation sticks to the wording precisely here. So it happens because f is not needed to evaluate Manipulate (it is needed to display it):

InputForm @ Manipulate[Plot[f, {x, 0, t}], {t, 1, 15}]

in contrary to e.g. InputForm @ Grid[f].

On the other hand it does not make much sense since CloudDeploy does not Hold its arguments which means expr is evaluated before sending, which means no additional definition will ever be needed if we stick to the wording...

So maybe it is worth reporting?


Compare also:

CloudDeploy[Delayed[f]]

CloudDeploy[Dynamic[f]]

Another "Wolfram approved" and working solution can be modeled from examples in the Wolfram demonstrations project like this: http://demonstrations.wolfram.com/TheVigenereCipher/. The trick is to use "Initialization" with a delayed assignment ( :> ). Also note the "sintest" URL at the end of the CloudDeploy function. It should help manage all of the CloudObject's you will likely be generating.

Try:

CloudDeploy[
  Manipulate[Plot[f, {x, 0, t}], {t, 1, 15}, 
  Initialization :> (f = Sin[x])], "sintest"]