Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
nicloay committed Nov 30, 2017
1 parent ebf1140 commit 5e799b1
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
File renamed without changes.
File renamed without changes.
14 changes: 5 additions & 9 deletions Assets/Appirater/NativeLocale/Editor/PostProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

public class PostProcess: MonoBehaviour
{
private const string PluginHome = "Appirater/iOS";
private const string SoreKitFramework = "StoreKit.framework";

[PostProcessBuildAttribute(9999)]
public static void OnPostProcessBuild(BuildTarget target, string path)
{
Expand All @@ -17,23 +20,16 @@ public static void OnPostProcessBuild(BuildTarget target, string path)

private static void OnIOSBuild(BuildTarget target, string path)
{
NativeLocale.AddLocalizedStringsIOS(path, Path.Combine(Application.dataPath, "Appirater/iOS"));
NativeLocale.AddLocalizedStringsIOS(path, Path.Combine(Application.dataPath, PluginHome));
AddStoreKitFramework(path);
}

private const string SoreKitFramework = "StoreKit.framework";

private static void AddStoreKitFramework(string projectPath)
{

string projPath = projectPath + "/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject proj = new PBXProject();
proj.ReadFromFile(projPath);

// if (!proj.ContainsFramework(proj.ProjectGuid(), SoreKitFramework))
// {
// proj.AddFrameworkToProject(proj.ProjectGuid(), SoreKitFramework, false);
// }


foreach (string targetName in new string[] {PBXProject.GetUnityTargetName(), PBXProject.GetUnityTestTargetName()})
{
Expand Down

0 comments on commit 5e799b1

Please sign in to comment.