Reputation: 4282
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.
The parser receives a wrong file format. In its Decode() method, it expects data that begins with:
public const string PBX_HEADER_TOKEN = "// !$*UTF8*$!\n";
like this:
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/ Begin PBXBuildFile section /
011C65182C1C4E78903D645B / libxml2.dylib / = {isa = PBXBuildFile; fileRef = 318C8AB7C5D04BBFA6BA701D / libxml2.dylib /; };
but instead, it receives a string with the project.pbxproj contents, in the correct xml format. like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>archiveVersion</key>
<string>1</string>
<key>classes</key>
<dict/>
<key>objectVersion</key>
<string>46</string>
<key>objects</key>
<dict>
Is anybody else experiencing this? I found these questions to be related, but none of them answers the real issue.
FacebookSDK for Unity iOS Mach-O linker error - undefined symbols _iosLogin,
http://forum.unity3d.com/threads/mach-o-linker-error-with-facebook-sdk.239085/
Any ideas on how to solve it?
Upvotes: 2
Views: 841
Reputation: 1731
You can force FB to make its changes the project.pbxproj
file later, when the file is back in the original PBX format:
By changing the line [PostProcessBuild(100)]
to [PostProcessBuild(99999999)]
in file FacebookPostprocess.cs
.
Upvotes: 1
Reputation: 1
I have the same problem. After I installed another plugin that modifies the project.pbxproj file the data coming in the PBXParser is in xml1 format. I found somewhere that it is easy to modify the json like format, but hard to save it in a format that Xcode can understand. The standard process is to save it in xml1 format. Xcode can understand the xml1 format, so this is not a problem. So my workaround is as follow:
This isn't very clean, but worked for me. Better option will be to convert the xml to json for the PBXParser...
Upvotes: 0