VungleSettings.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #if UNITY_IPHONE
  2. using UnityEngine;
  3. using UnityEditor;
  4. using UnityEditor.iOS.Xcode;
  5. using System.IO;
  6. namespace IronSource.Editor
  7. {
  8. public class VungleSettings : IAdapterSettings
  9. {
  10. public void updateProject (BuildTarget buildTarget, string projectPath)
  11. {
  12. Debug.Log ("IronSource - Update project for Vungle");
  13. PBXProject project = new PBXProject ();
  14. project.ReadFromString (File.ReadAllText (projectPath));
  15. string targetId = project.TargetGuidByName (PBXProject.GetUnityTargetName ());
  16. // Required System Frameworks
  17. project.AddFrameworkToProject (targetId, "AudioToolbox.framework", false);
  18. project.AddFrameworkToProject (targetId, "MediaPlayer.framework", false);
  19. project.AddFrameworkToProject (targetId, "UIKit.framework", false);
  20. project.AddFileToBuild (targetId, project.AddFile ("usr/lib/libz.tbd", "Frameworks/libz.tbd", PBXSourceTree.Sdk));
  21. project.AddFileToBuild (targetId, project.AddFile ("usr/lib/libsqlite3.tbd", "Frameworks/libsqlite3.tbd", PBXSourceTree.Sdk));
  22. // Custom Link Flag
  23. project.AddBuildProperty (targetId, "OTHER_LDFLAGS", "-ObjC");
  24. File.WriteAllText (projectPath, project.WriteToString ());
  25. }
  26. public void updateProjectPlist (BuildTarget buildTarget, string plistPath)
  27. {
  28. Debug.Log ("IronSource - Update plist for Vungle");
  29. }
  30. }
  31. }
  32. #endif