Beispiel #1
0
        internal PBXNativeTargetData CreateNewTarget(string name, string ext, string type)
        {
            // create build configurations
            var releaseBuildConfig = XCBuildConfigurationData.Create("Release");

            buildConfigs.AddEntry(releaseBuildConfig);

            var debugBuildConfig = XCBuildConfigurationData.Create("Debug");

            buildConfigs.AddEntry(debugBuildConfig);

            var buildConfigList = XCConfigurationListData.Create();

            configs.AddEntry(buildConfigList);
            buildConfigList.buildConfigs.AddGUID(releaseBuildConfig.guid);
            buildConfigList.buildConfigs.AddGUID(debugBuildConfig.guid);

            // create build file reference
            string fullName       = name + ext;
            var    productFileRef = AddFile(fullName, "Products/" + fullName, PBXSourceTree.Build);
            var    newTarget      = PBXNativeTargetData.Create(name, productFileRef, type, buildConfigList.guid);

            nativeTargets.AddEntry(newTarget);
            project.project.targets.Add(newTarget.guid);

            return(newTarget);
        }
        internal PBXNativeTargetData CreateNewTarget(string name, string ext, string type)
        {
            // create build configurations
            var releaseBuildConfig = XCBuildConfigurationData.Create("Release");
            releaseBuildConfig.SetProperty("FRAMEWORK_SEARCH_PATHS","$(inherited) $(PROJECT_DIR)/Frameworks/GetSocial/Plugins/iOS");
            buildConfigs.AddEntry(releaseBuildConfig);

            var releaseForRunningBuildConfig = XCBuildConfigurationData.Create("ReleaseForRunning");
            releaseForRunningBuildConfig.SetProperty("FRAMEWORK_SEARCH_PATHS","$(inherited) $(PROJECT_DIR)/Frameworks/GetSocial/Plugins/iOS");
            buildConfigs.AddEntry(releaseForRunningBuildConfig);

            var releaseForProfilingBuildConfig = XCBuildConfigurationData.Create("ReleaseForProfiling");
            releaseForProfilingBuildConfig.SetProperty("FRAMEWORK_SEARCH_PATHS","$(inherited) $(PROJECT_DIR)/Frameworks/GetSocial/Plugins/iOS");
            buildConfigs.AddEntry(releaseForProfilingBuildConfig);

            var debugBuildConfig = XCBuildConfigurationData.Create("Debug");
            debugBuildConfig.SetProperty("FRAMEWORK_SEARCH_PATHS","$(inherited) $(PROJECT_DIR)/Frameworks/GetSocial/Plugins/iOS");
            buildConfigs.AddEntry(debugBuildConfig);

            var buildConfigList = XCConfigurationListData.Create();
            configs.AddEntry(buildConfigList);
            buildConfigList.buildConfigs.AddGUID(releaseBuildConfig.guid);
            buildConfigList.buildConfigs.AddGUID(releaseForRunningBuildConfig.guid);
            buildConfigList.buildConfigs.AddGUID(releaseForProfilingBuildConfig.guid);
            buildConfigList.buildConfigs.AddGUID(debugBuildConfig.guid);

            // create build file reference
            string fullName = name + ext;
            var productFileRef = AddFile(fullName, "Products/" + fullName, PBXSourceTree.Build);
            var newTarget = PBXNativeTargetData.Create(name, productFileRef, type, buildConfigList.guid);
            nativeTargets.AddEntry(newTarget);
            project.project.targets.Add(newTarget.guid);

            return newTarget;
        }