public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
    {
        if (target == BuildTarget.iPhone)
        {
            string plugInFolderPath = System.IO.Path.Combine(Application.dataPath, PLUG_IN_FOLDER_RELATIVE_PATH);
            string destinationPath  = System.IO.Path.Combine(pathToBuiltProject, PLUG_IN_FOLDER_RELATIVE_PATH);

            List <ProjectItemInformation> items = new List <ProjectItemInformation>();

            FileOperateHelper.CopyFolder(plugInFolderPath, destinationPath);

            items.AddRange(XcodeUtility.GetItemsFromDirectory(destinationPath, CLASS_FOLDER_NAME, true));
            items.Add(new FrameworkFileInformation()
            {
                FrameworkType = FrameworkType.StoreKit, FileType = ProjectFileType.Framework
            });
            XcodeModifyHelper.ModifyXcodeProject(items, pathToBuiltProject);
            XcodeModifyHelper.AddEntityToInfoPlist(pathToBuiltProject, "UIViewControllerBasedStatusBarAppearance", false);
            AddStoreHelperCode(pathToBuiltProject);

            XcodeModifyHelper.AddEntityToInfoPlist(pathToBuiltProject, "CFBundleDevelopmentRegion", "zh_CN");
            //AddPlugInFiles(xcodeProjectClassGroupPath, pathToBuiltProject);
            //AddStoreKitFramework(pathToBuiltProject);
            //AddStoreHelperCode(pathToBuiltProject);
        }
    }
示例#2
0
    private static List <ProjectItemInformation> GetNdFrameworks(string projectPath)
    {
        string frameworkPath = System.IO.Path.Combine(Application.dataPath, ND_FRAMEWORK_RELATIVE_PATH);

        string destinationPath = System.IO.Path.Combine(projectPath, ND_FRAMEWORK_RELATIVE_PATH);

        FileOperateHelper.CopyFolder(frameworkPath, destinationPath);

        string parentGroup = "Frameworks";

        return(XcodeUtility.GetItemsFromDirectory(destinationPath, parentGroup, true));
    }
示例#3
0
    public static List <ProjectItemInformation> GetNdResource(string projectPath)
    {
        string resourcePath = System.IO.Path.Combine(Application.dataPath, ND_RESOURCE_BUNDLE_RELATIVE_PATH);

        string destinationPath = System.IO.Path.Combine(projectPath, ND_RESOURCE_BUNDLE_RELATIVE_PATH);

        FileOperateHelper.CopyFolder(resourcePath, destinationPath);

        string parentGroup = "Resources";

        return(XcodeUtility.GetItemsFromDirectory(destinationPath, parentGroup, true));
    }
示例#4
0
    private static List <ProjectItemInformation> GetNativeCode(string projectPath)
    {
        string nativePath = System.IO.Path.Combine(Application.dataPath, ND_NATIVE_SOURCE_FOLDER_PATH);

        string destinationPath = System.IO.Path.Combine(projectPath, ND_NATIVE_SOURCE_FOLDER_PATH);

        FileOperateHelper.CopyFolder(nativePath, destinationPath);

        string parentGroup = "Classes";

        return(XcodeUtility.GetItemsFromDirectory(destinationPath, parentGroup, true));
    }