Exemplo n.º 1
0
        /// <summary>
        /// Adds asset copy step.
        /// </summary>
        /// <param name="asset">A reference to the asset that will be copied.</param>
        /// <param name="xCodePath">The Xcode project related path of where to copy the file. Will copy in the project root by default.</param>
        public static void AddFile(Object asset, string xCodePath = "")
        {
            var file = new XCodeAsset();

            file.Asset     = asset;
            file.XCodePath = xCodePath;

            AddFile(file);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds asset copy step.
        /// </summary>
        /// <param name="asset">Asset model to copy.</param>
        public static void AddFile(XCodeAsset asset)
        {
            foreach (var assetFile in XCodeProjectSettings.Instance.Files)
            {
                if (assetFile.Asset.Equals(asset.Asset))
                {
                    XCodeProjectSettings.Instance.Files.Remove(assetFile);
                    break;
                }
            }

            XCodeProjectSettings.Instance.Files.Add(asset);
        }