title: How to enable Key chain access group in Xamarin.Forms PCL project for ios
body: <p>I am working with xamarin PCL, <a href="https://github.com/xamarin/xamarin-forms-samples/tree/master/WebServices/TodoAzureAuthADB2CClientFlow" rel="nofollow noreferrer">AD B2C Client flow project</a>
  When debugging on the iphone ios 12., catching the error message is :</p>
  
  <blockquote>
    <p>ex = {Microsoft.Identity.Client.MsalClientException: The application
    does not have keychain access groups enabled in the
    Entitlements.plist. As a result, there was a failure to save to the
    iOS keychain. The keychain access group
    'xxxxxxxxxx.com.microsoft.adalcache</p>
  </blockquote>
  
  <p>Note: xxxxxxxxxx is my apple Team ID</p>
  
  <p>VS 2017 setup to Automatic provisioning </p>
  
  <p>I have enabled keychain and try to save the token in in the cache</p>
  
  <p>I have Keychain enabled and have added Key chain group like com.companyname.YYYYY in Entitlement.plist</p>
  
  <p>i have added in info.plist is:</p>
  
  <pre><code>CFBundleIdentifier:
  com.companyname.YYYYY
  
  CFBundleName:
  YYYYY
  
  
  CFBundleURLName:
    com.companyname.YYYYY
  
   CFBundleURLSchemes:
  msal[APPLICATION ID]
  </code></pre>
  
  <p>It not save the token in the cache throwing an error.</p>
  
  <p>But it works when i change like this....</p>
  
  <p>Key chain group like <code>xxxxxxxxxx.com.microsoft.adalcache</code> in <code>Entitlement.plist</code></p>
  
  <p>In <code>info.plist</code> is:</p>
  
  <pre><code>CFBundleIdentifier:
  xxxxxxxxxx.com.microsoft.adalcache
  
  
  CFBundleURLName:
  xxxxxxxxxx.com.microsoft.adalcache
  </code></pre>
  
  <p>but this setup if i use in second xamarin project it might over wright the first project on the iphone</p>
  
  <p>Please explain me what i have done wrong or is there any different way to do.</p>
  
  <p>Thanks </p>