Пример #1
0
        private static void AddFabricFrameworkSearchPath(string projPath)
        {
            PBXProject project = new PBXProject();
            project.ReadFromString(File.ReadAllText(projPath));
            string target = project.TargetGuidByName("Unity-iPhone");

            Utils.Log ("Adding Framework Search Paths to Xcode project");
            project.AddBuildProperty(target, "FRAMEWORK_SEARCH_PATHS", "$(SRCROOT)/Frameworks/" + fabricPluginsPath);

            File.WriteAllText(projPath, project.WriteToString());
        }
		private static void PrepareProject (string buildPath)
		{
			Settings settings = Settings.Instance;
			
			if (string.IsNullOrEmpty(settings.Organization.ApiKey) || string.IsNullOrEmpty(settings.Organization.BuildSecret)) {
				Utils.Error ("Unable to find API Key or Build Secret. Fabric was not added to the player.");
				return;
			}
			
			string projPath = Path.Combine (buildPath, "Unity-iPhone.xcodeproj/project.pbxproj");
			PBXProject project = new PBXProject();
			project.ReadFromString(File.ReadAllText(projPath));		
			string target = project.TargetGuidByName("Unity-iPhone");
			
			Utils.Log ("Adding Framework Search Paths to Xcode project");
			project.AddBuildProperty(target, "FRAMEWORK_SEARCH_PATHS",
			                         "$(inherited) $(PROJECT_DIR)/Frameworks/" + fabricPluginsPath);
			
			File.WriteAllText(projPath, project.WriteToString());
			
			AddFabricRunScriptBuildPhase(projPath);
		}
Пример #3
0
        private static void PrepareProject(string buildPath)
        {
            string projPath = Path.Combine (buildPath, "Unity-iPhone.xcodeproj/project.pbxproj");
            PBXProject project = new PBXProject ();
            project.ReadFromString (File.ReadAllText(projPath));
            string target = project.TargetGuidByName ("Unity-iPhone");

            AddPlatformFrameworksToProject (platformFrameworks, project, target);
            AddFrameworksToProject (frameworks, buildPath, project, target);
            AddLibsToProject (libs, project, target, buildPath);

            File.WriteAllText (projPath, project.WriteToString());
        }
		private static void PrepareProject (string buildPath)
		{
			string projPath = Path.Combine (buildPath, "Unity-iPhone.xcodeproj/project.pbxproj");
			PBXProject project = new PBXProject();
			project.ReadFromString (File.ReadAllText(projPath));		
			string target = project.TargetGuidByName ("Unity-iPhone");
			
			AddPlatformFrameworksToProject (platformFrameworks, project, target);		
			AddFrameworksToProject (frameworks, buildPath, project, target);		
			AddPlatformLibsToProject (platformLibs, project, target);
			AddLibsToProject (libs, project, target, buildPath);

			Fabric.Internal.Editor.Utils.Log ("Setting Debug Information Format to DWARF with dSYM File in Xcode project.");
			project.SetBuildProperty (target, "DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym");
			
			File.WriteAllText (projPath, project.WriteToString());
			
			if (!Enabled ()) {
				Fabric.Internal.Editor.Utils.Log ("{0} disabled. Crashlytics will not be initialized on app launch.", Name);
			}
		}