title: Setting up a VPN Configuration Profile on iOS 7
body: <p>I had a configuration profile that I had set up on iOS 6, so that when a certain URL is hit, the VPN kicks in.</p>
  
  <p>I was doing this using the following configuration profile keys:</p>
  
  <pre><code>&lt;key&gt;OnDemandEnabled&lt;/key&gt;
  &lt;integer&gt;1&lt;/integer&gt;
  &lt;key&gt;OnDemandMatchDomainsAlways&lt;/key&gt;
  &lt;array&gt;
      &lt;string&gt;my_homepage.com&lt;/string&gt;
  &lt;/array&gt;
  </code></pre>
  
  <p>On iOS 6, this appears to work fine. However, in iOS 7, it looks like OnDemandMatchDomainAlways has been deprecated in favor of the OnDemandRules key, and the default behavior of "OnDemandMatchDomainAlways" is to behave like "OnDemandMatchDomainsOnRetry".
  So now, i am trying to get my previous setup to work on iOS 7, by using the OnDemandRules key, as follows:</p>
  
  <pre><code>&lt;key&gt;OnDemandRules&lt;/key&gt;
  &lt;array&gt;
      &lt;dict&gt;
          &lt;key&gt;Action&lt;/key&gt;
          &lt;string&gt;Connect&lt;/string&gt;
          &lt;key&gt;DNSDomainMatch&lt;/key&gt;
          &lt;array&gt;
              &lt;string&gt;my_homepage.com&lt;/string&gt;
          &lt;/array&gt;
      &lt;/dict&gt;
  &lt;/array&gt;
  </code></pre>
  
  <p>I also tried setting it up using this method:</p>
  
  <pre><code>&lt;key&gt;OnDemandRules&lt;/key&gt;
      &lt;array&gt;
          &lt;dict&gt;
                      &lt;key&gt;Action&lt;/key&gt;
              &lt;string&gt;EvaluateConnection&lt;/string&gt;
              &lt;key&gt;ActionParameters&lt;/key&gt;
              &lt;array&gt;
                  &lt;dict&gt;
                      &lt;key&gt;Domains&lt;/key&gt;
                      &lt;array&gt;
                          &lt;string&gt;url-that-redirects-if-vpn-off.com&lt;/string&gt;
                      &lt;/array&gt;
                      &lt;key&gt;DomainAction&lt;/key&gt;
                      &lt;string&gt;ConnectIfNeeded&lt;/string&gt;
              &lt;/dict&gt;
          &lt;/array&gt;
      &lt;/dict&gt;
  &lt;/array&gt;
  </code></pre>
  
  <p>However, none of these methods seems to work. Does anyone know how to set up an iOS VPN profile so that the VPN OnDemand feature works on iOS 7 the same way it did on iOS6?</p>
  
  <p>Thanks in advance,</p>