Exemplo n.º 1
0
 public static void RemoveCapability(ISD_CapabilityType capability)
 {
     foreach (var cap in ISD_Settings.Instance.Capabilities)
     {
         if (cap.CapabilityType == capability)
         {
             ISD_Settings.Instance.Capabilities.Remove(cap);
             break;
         }
     }
 }
Exemplo n.º 2
0
        //--------------------------------------
        // Capabilities
        //--------------------------------------



        public static void AddCapability(ISD_CapabilityType capability, string entitlementsFilePath = "", bool addOptionalFramework = false)
        {
            ISD_Capability c = new ISD_Capability();

            c.CapabilityType       = capability;
            c.EntitlementsFilePath = entitlementsFilePath;
            c.AddOptionalFramework = addOptionalFramework;


            AddCapability(c);
        }
Exemplo n.º 3
0
        public static void Capabilities()
        {
            SA_EditorGUILayout.Header("Capabilities");

            SA_EditorGUILayout.ReorderablList(ISD_Settings.Instance.Capabilities,
                                              (ISD_Capability c) => {
                return(c.CapabilityType.ToString());
            },
                                              (ISD_Capability c) => {
                switch (c.CapabilityType)
                {
                case ISD_CapabilityType.PushNotifications:
                    var settings         = ISD_Settings.Instance.PushNotificationsCapabilitySettings;
                    settings.Development = SA_EditorGUILayout.ToggleFiled("Development", settings.Development, SA_StyledToggle.ToggleType.YesNo);
                    break;

                case ISD_CapabilityType.Cloud:
                    var cloudSettings             = ISD_Settings.Instance.iCloudCapabilitySettings;
                    cloudSettings.KeyValueStorage = SA_EditorGUILayout.ToggleFiled("Key-value storage", cloudSettings.KeyValueStorage, SA_StyledToggle.ToggleType.EnabledDisabled);
                    cloudSettings.iCloudDocument  = SA_EditorGUILayout.ToggleFiled("iCloud Documents", cloudSettings.iCloudDocument, SA_StyledToggle.ToggleType.EnabledDisabled);

                    break;

                default:
                    EditorGUILayout.BeginHorizontal();
                    EditorGUILayout.LabelField("Entitlements File Path");
                    c.EntitlementsFilePath = EditorGUILayout.TextField(c.EntitlementsFilePath);
                    EditorGUILayout.EndHorizontal();

                    c.AddOptionalFramework = SA_EditorGUILayout.ToggleFiled("Add Optional Framework", c.AddOptionalFramework, SA_StyledToggle.ToggleType.YesNo);
                    break;
                }
            }
                                              );


            EditorGUILayout.BeginHorizontal();
            s_newCap = (ISD_CapabilityType)EditorGUILayout.EnumPopup(s_newCap);
            if (GUILayout.Button("Add Capability", GUILayout.Height(20)))
            {
                ISD_Capability c = new ISD_Capability();
                c.CapabilityType = s_newCap;
                ISD_Settings.Instance.Capabilities.Add(c);
            }
            EditorGUILayout.EndHorizontal();
        }
Exemplo n.º 4
0
        public static PBXCapabilityType ToPBXCapability(ISD_CapabilityType capability)
        {
            switch (capability)
            {
            case ISD_CapabilityType.Cloud:
                return(PBXCapabilityType.iCloud);

            case ISD_CapabilityType.PushNotifications:
                return(PBXCapabilityType.PushNotifications);

            case ISD_CapabilityType.GameCenter:
                return(PBXCapabilityType.GameCenter);

            case ISD_CapabilityType.Wallet:
                return(PBXCapabilityType.Wallet);

            case ISD_CapabilityType.Siri:
                return(PBXCapabilityType.Siri);

            case ISD_CapabilityType.ApplePay:
                return(PBXCapabilityType.ApplePay);

            case ISD_CapabilityType.InAppPurchase:
                return(PBXCapabilityType.InAppPurchase);

            case ISD_CapabilityType.Maps:
                return(PBXCapabilityType.Maps);

            case ISD_CapabilityType.PersonalVPN:
                return(PBXCapabilityType.PersonalVPN);

            case ISD_CapabilityType.BackgroundModes:
                return(PBXCapabilityType.BackgroundModes);

            case ISD_CapabilityType.KeychainSharing:
                return(PBXCapabilityType.KeychainSharing);

            case ISD_CapabilityType.InterAppAudio:
                return(PBXCapabilityType.InterAppAudio);

            case ISD_CapabilityType.AssociatedDomains:
                return(PBXCapabilityType.AssociatedDomains);

            case ISD_CapabilityType.AppGroups:
                return(PBXCapabilityType.AppGroups);

            case ISD_CapabilityType.DataProtection:
                return(PBXCapabilityType.DataProtection);

            case ISD_CapabilityType.HomeKit:
                return(PBXCapabilityType.HomeKit);

            case ISD_CapabilityType.HealthKit:
                return(PBXCapabilityType.HealthKit);


            case ISD_CapabilityType.WirelessAccessoryConfiguration:
                return(PBXCapabilityType.WirelessAccessoryConfiguration);

            default:
                return(PBXCapabilityType.iCloud);
            }
        }