diff --git a/Assets/Appirater/Test.meta b/Assets/Appirater/Demo.meta similarity index 100% rename from Assets/Appirater/Test.meta rename to Assets/Appirater/Demo.meta diff --git a/Assets/Appirater/Test/AppiraterTestScene.unity b/Assets/Appirater/Demo/AppiraterDemotScene.unity similarity index 100% rename from Assets/Appirater/Test/AppiraterTestScene.unity rename to Assets/Appirater/Demo/AppiraterDemotScene.unity diff --git a/Assets/Appirater/Test/AppiraterTestScene.unity.meta b/Assets/Appirater/Demo/AppiraterDemotScene.unity.meta similarity index 100% rename from Assets/Appirater/Test/AppiraterTestScene.unity.meta rename to Assets/Appirater/Demo/AppiraterDemotScene.unity.meta diff --git a/Assets/Appirater/Test/MainController.cs b/Assets/Appirater/Demo/MainController.cs similarity index 100% rename from Assets/Appirater/Test/MainController.cs rename to Assets/Appirater/Demo/MainController.cs diff --git a/Assets/Appirater/Test/MainController.cs.meta b/Assets/Appirater/Demo/MainController.cs.meta similarity index 100% rename from Assets/Appirater/Test/MainController.cs.meta rename to Assets/Appirater/Demo/MainController.cs.meta diff --git a/Assets/Appirater/NativeLocale/Editor/PostProcess.cs b/Assets/Appirater/NativeLocale/Editor/PostProcess.cs index 4fe5392..6ebd262 100644 --- a/Assets/Appirater/NativeLocale/Editor/PostProcess.cs +++ b/Assets/Appirater/NativeLocale/Editor/PostProcess.cs @@ -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) { @@ -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()}) {