Problem building from script with Facebook

Hi guys,

I’m trying to get my project going with Continuous Integration so I wrote an editor script for it that goes like this:

static void PerformMacIOSBuild ()
{
	System.IO.Directory.CreateDirectory("build");
	EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTarget.iPhone);
	string res = BuildPipeline.BuildPlayer(SCENES, "build/iPhone", BuildTarget.iPhone, BuildOptions.None);
	if (res.Length > 0) {
		throw new System.Exception("BuildPlayer failure: " + res);
	}
}

The problem is that, during the BuildPlayer call, when it is running the Post build steps for the Facebook SDK, I get the following error:

UriFormatException: Invalid URI: The format of the URI could not be determined: build/iPhone/.

With this callstack:

Would anyone know what the problem is?

Thanks in advance,

Cesar

Same here.

Plugin was working one month ago, and recently a lot of new error occur.

I also had to import manually the FacebookSDK.a to fix some error but nothing is better :

ld: warning: directory not found for option '-L"/Users/xxxxxxxxxxxxx/Desktop/project_Xcode/Libraries"'
Undefined symbols for architecture armv7:
  "_iosGetDeepLink", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_iosFeedRequest", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_iosFBSettingsPublishInstall", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_iosFBAppEventsSetLimitEventUsage", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_iosAppRequest", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_iosFBAppEventsLogPurchase", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_OBJC_CLASS_$_PHPublisherIAPTrackingRequest", referenced from:
      objc-class-ref in PHUnityIntegration.o
  "_iosInit", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_iosFBAppEventsLogEvent", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_OBJC_CLASS_$_PHPublisherMetadataRequest", referenced from:
      objc-class-ref in PHUnityIntegration.o
  "_OBJC_CLASS_$_PHPushProvider", referenced from:
      objc-class-ref in PHUnityIntegration.o
  "_OBJC_CLASS_$_CBAnalytics", referenced from:
      objc-class-ref in ChartBoostBinding.o
  "_iosLogin", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_OBJC_CLASS_$_PHPublisherOpenRequest", referenced from:
      objc-class-ref in PHUnityIntegration.o
  "_iosSetShareDialogMode", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_OBJC_CLASS_$_PHPublisherContentRequest", referenced from:
      objc-class-ref in PHUnityIntegration.o
  "_iosLogout", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_OBJC_CLASS_$_PHAPIRequest", referenced from:
      objc-class-ref in PHUnityIntegration.o
  "_OBJC_CLASS_$_Chartboost", referenced from:
      objc-class-ref in ChartBoostBinding.o
      objc-class-ref in ChartBoostManager.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

same here:/

I have the exact same issue. Did you guys made any progress ?
I’m going to rewrite the postprocess script myself I think…

Hi! I solved this issue.
You should either use absolute path in second parameter of BuildPlayer (/Users/username/Workdir/Project)
or add this line:
path = System.IO.Path.GetFullPath(path);
in the beggining of OnPostProcessBuild function in FacebookPostprocess.cs

3 Likes

Hi,

I still have this issue :

KeyNotFoundException: The given key was not present in the dictionary. System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (.TKey key) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150) UnityEditor.XCodeEditor.XCProject…ctor (System.String filePath) (at Assets/Facebook/Editor/iOS/third_party/XCodeEditor-for-Unity/XCProject.cs:95) UnityEditor.FacebookEditor.XCodePostProcess.OnPostProcessBuild (BuildTarget target, System.String path) (at Assets/Facebook/Editor/FacebookPostprocess.cs:25) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

AND

KeyNotFoundException: The given key was not present in the dictionary. System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (.TKey key) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150) Everyplay.XCodeEditor.XCProject…ctor (System.String filePath) (at Assets/Editor/Everyplay/XCodeEditor/XCProject.cs:93) EveryplayPostprocessor.ProcessXCodeProject (System.String path) (at Assets/Editor/Everyplay/Scripts/EveryplayPostprocessor.cs:124) EveryplayPostprocessor.PostProcessBuild_iOS (System.String path, System.String clientId) (at Assets/Editor/Everyplay/Scripts/EveryplayPostprocessor.cs:76) EveryplayPostprocessor.OnPostProcessBuild (BuildTarget target, System.String path) (at Assets/Editor/Everyplay/Scripts/EveryplayPostprocessor.cs:24) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

I’m losing my mind … 1 week on it :cry:

Thanks a lot for your help !!

(I’m using Chartboost 5.0, Facebook 6.0 and Everyplay)

Thanks !