The warning makes the user VERY NERVOUS and frankly appears slapdash and unprofessional. The blank gray field below it does nothing to inspire confidence. This makes for a very bad user experience.

When one launches an app or an application (created with anything else), presumably one has already vetted its provenance. Launch an application and one should see the application, not a disturbing warning. Lots of applications use "dynamic content". An application should just work. Sorry to get on a soap box here (well maybe not that sorry). It just seems that if Wolfram wants Mathematica to have the functionality to make real stand alone applications, then what we build should actually look like real applications.

Question 1: Can one suppress this unfortunate message programmatically from within the CDF document or its Manipulate[]?

When using Mathematica, one can place a notebook and probably a CDF in a trusted directory (see the above link), which avoids the display of this message. It just seems to defeat the purpose of a CDF and its great potential as a distribution platform to expect a user who does not have Mathematica to go to the trouble to figure out how to do that or even to have to do it.

Question 2: Can one even specify a trusted directory in the CDF Player?

Question 3: Does a CDF really need an installation program that would create a trusted directory and how could I do that?

Premiere support had no solution to this. I still have a little bit of hope that someone here might.

Related post Understanding CDF, especially point 6, listing some of the functionality that could issue the security warning, and the planned institute of trusted paths (nonexistent yet).
–
István ZacharJun 29 '12 at 16:37

2

As an enthusiastic user of CDF, I would like to echo jagra's complaint, and opine that the current treatment of security issues in CDF (need for fullscreen:'true' hack, gray box, frightening warning message, Enable Dynamics button, opaque rules for avoiding all this) may be a fatal blow for a technology that is trying to become a widespread standard for computable documents on the web. It is a pity.
–
abwatsonJul 10 '12 at 20:17

4 Answers
4

As Phil has mentioned it will often be possible to change your code so that the warning isn't triggered in the first place. If possible, that would be the way to go, I think. If your code is too long or complex to change or it necessarily need one of the "unsafe" functions you would just need to tell the users to copy it to one of the directories that the CDF-Player trusts. I don't know whether that is documented, but a simple test showed that at least if you put the cdf to what the CDF-Player will show for $AddOnsDirectory no warning is shown. I would guess that $UserAddOnsDirectory would also work and probably some others of those that are part of the trusted directory path you know from Mathematica. There are corresponding directories defined also in the CDF-Player, but be aware that they are different from those that are defined in Mathematica.

If unsure what these directories are, you can create a CDF which shows them like this:

If you open that cdf in the CDF-Player and press the button, it will show the corresponding directories for the computer/setup it is run on/with.
You could also include such a Button with an additional explanation and "installation instruction" into the CDFs you give away...

Q1. You will note that the Wolfram CDF examples do not invoke this security warning when opened on computers. This is because they have been created with a higher level of signing (I think that is the terminology they use). So the answer is yes the message can be suppressed providing you have access to CDF Pro or whatever the thing is that can make these higher signing level CDFs.

Q2 and Q3 I think are redundant given the answer to Q1 (but stand corrected). With the base free product you get what you get. If you go Pro (or whatever the product is that overcomes these problems) the problems are not an issue.

In my case, I removed statements like Clear[] and it stopped this warning with dynamic CDFs. Unfortunately there is no magic list that I am aware of. Simplify the CDF to the bare minimum. Surprisingly, my CDF files use string conversions and piecewise functions with no problem at all regarding this unsafe dynamic content warning.

I tested a notebook that gives the same error message and found that if I deleted the grayed out cell where a graph had been displayed and closed the notebook, that when I reopened the notebook, the message did not pop up. A simple recalculation restored the graph.

I don't believe one can do that within a CDF
–
JagraJun 29 '12 at 17:58

@Jagra, the first line of the last answer in the link in the OP, states the same thing as my answer. If the dynamic output is not present when the cdf is loaded, the message will not occur. So, clear that cell before deploying the document.
–
Fred KlineJun 29 '12 at 18:35

This question is like the question at 5200. Mike Honeychurch's answer shows how to make the error message appear in the post so the user can run the notebook. The Notebook Security tutorial in Mathematica Help says that a notebook will produce the Unsafe Dynamics message if (among other things) it uses conversion between expressions and strings or options control (among others). That tutorial may give you a clue about your specific problem.
–
SixWingedSeraphJul 9 '12 at 20:55

Mathematica is a registered trademark of Wolfram Research, Inc. While the mark is used herein with the limited permission of Wolfram Research, Stack Exchange and this site disclaim all affiliation therewith.