-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58c73b6
commit f0981c6
Showing
6 changed files
with
37 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using UnityEditor; | ||
using UnityEditor.Callbacks; | ||
using UnityEditor.iOS.Xcode; | ||
using UnityEditor.iOS.Xcode.Extensions; | ||
|
||
namespace mParticle { | ||
public class BuildPostProcessor | ||
{ | ||
[PostProcessBuild] | ||
public static void OnPostProcessBuild(BuildTarget target, string path) | ||
{ | ||
if (target == BuildTarget.iOS) | ||
{ | ||
// Get project into C# | ||
var projectPath = PBXProject.GetPBXProjectPath(path); | ||
var project = new PBXProject(); | ||
project.ReadFromFile(projectPath); | ||
|
||
// Fix Xcode build settings | ||
var projectGUID = project.ProjectGuid(); | ||
project.SetBuildProperty(projectGUID, "VALIDATE_WORKSPACE", "YES"); | ||
project.SetBuildProperty(projectGUID, "GCC_ENABLE_OBJC_EXCEPTIONS", "YES"); | ||
|
||
// Embed mParticle framework | ||
var mainTargetGUID = project.GetUnityMainTargetGuid(); | ||
var frameworkFileGUID = project.FindFileGuidByProjectPath("Frameworks/Plugins/iOS/mParticle_Apple_SDK.framework"); | ||
project.AddFileToEmbedFrameworks(mainTargetGUID, frameworkFileGUID); | ||
|
||
// Overwrite | ||
project.WriteToFile(projectPath); | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters