1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #if UNITY_IPHONE
- using UnityEngine;
- using UnityEditor;
- using UnityEditor.iOS.Xcode;
- using System.IO;
- namespace IronSource.Editor
- {
- public class AdMobSettings : IAdapterSettings
- {
- public void updateProject (BuildTarget buildTarget, string projectPath)
- {
- Debug.Log ("IronSource - Update project for AdMob");
- PBXProject project = new PBXProject ();
- project.ReadFromString (File.ReadAllText (projectPath));
- string targetId = project.TargetGuidByName (PBXProject.GetUnityTargetName ());
- // Required System Frameworks
- project.AddFrameworkToProject (targetId, "AudioToolbox.framework", false);
- project.AddFrameworkToProject (targetId, "EventKit.framework", false);
- project.AddFrameworkToProject (targetId, "EventKitUI.framework", false);
- project.AddFrameworkToProject (targetId, "MediaPlayer.framework", false);
- project.AddFrameworkToProject (targetId, "MessageUI.framework", false);
- project.AddFileToBuild (targetId, project.AddFile ("usr/lib/libz.1.2.5.tbd", "Frameworks/libz.1.2.5.tbd", PBXSourceTree.Sdk));
- // Custom Link Flag
- project.AddBuildProperty (targetId, "OTHER_LDFLAGS", "-ObjC");
- File.WriteAllText (projectPath, project.WriteToString ());
- }
- public void updateProjectPlist (BuildTarget buildTarget, string plistPath)
- {
- Debug.Log ("IronSource - Update plist for AdMob");
- }
- }
- }
- #endif
|