title: How can I fix Facebook PostProcessBuild PBXParser for Facebook SDK 6.x in Unity 4.6.1 and XCode 6.1.1
body: <p>When building for iOS, Facebook's PostProcessBuild method, OnPostProcessBuild, tries to parse some data to do some things, like adding the Facebook libraries to the final XCode project. </p>
  
  <p>The parser receives a wrong file format. In its Decode() method, it expects data that begins with:</p>
  
  <pre><code>public const string PBX_HEADER_TOKEN = "// !$*UTF8*$!\n";
  </code></pre>
  
  <p>like this:</p>
  
  <pre><code>// !$*UTF8*$!
  {
      archiveVersion = 1;
      classes = {
      };
      objectVersion = 46;
      objects = {
  
  / Begin PBXBuildFile section /
          011C65182C1C4E78903D645B / libxml2.dylib / = {isa = PBXBuildFile; fileRef = 318C8AB7C5D04BBFA6BA701D / libxml2.dylib /; };
  </code></pre>
  
  <p>but instead, it receives a string with the project.pbxproj contents, in the correct xml format. like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
  &lt;plist version="1.0"&gt;
  &lt;dict&gt;
      &lt;key&gt;archiveVersion&lt;/key&gt;
      &lt;string&gt;1&lt;/string&gt;
      &lt;key&gt;classes&lt;/key&gt;
      &lt;dict/&gt;
      &lt;key&gt;objectVersion&lt;/key&gt;
      &lt;string&gt;46&lt;/string&gt;
      &lt;key&gt;objects&lt;/key&gt;
      &lt;dict&gt;
  </code></pre>
  
  <p>Is anybody else experiencing this? 
  I found these questions to be related, but none of them answers the real issue.</p>
  
  <p><a href="https://stackoverflow.com/questions/20104990/facebooksdk-for-unity-ios-mach-o-linker-error-undefined-symbols-ioslogin">FacebookSDK for Unity iOS Mach-O linker error - undefined symbols _iosLogin,</a></p>
  
  <p><a href="http://forum.unity3d.com/threads/mach-o-linker-error-with-facebook-sdk.239085/" rel="nofollow noreferrer">http://forum.unity3d.com/threads/mach-o-linker-error-with-facebook-sdk.239085/</a></p>
  
  <p>Any ideas on how to solve it?</p>