示例#1
0
 private void ResolvePlistKey(bool isEnabled, string name, string value, ISN_XcodeRequirements requirements)
 {
     if (isEnabled)
     {
         var plistKey = new ISD_PlistKey();
         plistKey.Name = name;
         plistKey.StringValue = value;
         plistKey.Type = ISD_PlistKeyType.String;
         requirements.AddInfoPlistKey(plistKey);
     }
     else
     {
         ISD_API.RemoveInfoPlistKey(name);
     }
 }
        protected override void RemoveXcodePlistKey(ISD_PlistKey key)
        {
            if (key.Name.Equals("LSApplicationQueriesSchemes"))
            {
                var existingKey = ISD_API.GetInfoPlistKey("LSApplicationQueriesSchemes");
                if (existingKey == null)
                {
                    return;
                }

                List <ISD_PlistKey> keysToRemove = new List <ISD_PlistKey>();
                foreach (var testeChild in key.Children)
                {
                    var existingChild = existingKey.GetChildByStringValue(testeChild.StringValue);
                    if (existingChild != null)
                    {
                        keysToRemove.Add(existingChild);
                    }
                }

                if (keysToRemove.Count == existingKey.Children.Count)
                {
                    ISD_API.RemoveInfoPlistKey(existingKey);
                }
                else
                {
                    foreach (var removeKey in keysToRemove)
                    {
                        existingKey.RemoveChild(removeKey);
                    }
                }
            }
            else
            {
                base.RemoveXcodePlistKey(key);
            }
        }
示例#3
0
 protected virtual void RemoveXcodePlistKey(ISD_PlistKey key)
 {
     ISD_API.RemoveInfoPlistKey(key);
 }