Ejemplo n.º 1
0
        //Network Extensions
        void ApplyNetworkExtensionsCapability(NetworkExtensionsCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.NetworkExtensions.iOS", true);
            _pbxproj.AddSystemFramework("NetworkExtension.framework", LinkType.Required);
            //update entitlements file
            var entitlementChanges = new PListDictionary();
            var groups             = new PListArray();

            if (capability.AppProxy)
            {
                groups.Add("app-proxy-provider");
            }

            if (capability.ContentFilter)
            {
                groups.Add("content-filter-provider");
            }

            if (capability.PacketTunnel)
            {
                groups.Add("packet-tunnel-provider");
            }

            if (capability.DNSProxy)
            {
                groups.Add("dns-proxy");
            }

            entitlementChanges.Add("com.apple.developer.networking.networkextension", groups);
            ApplyEntitlementsChanges(entitlementChanges, true);
        }
Ejemplo n.º 2
0
        public override PListDictionary Serialize()
        {
            var dic = new PListDictionary();

            dic.Add(NAME_KEY, Name);
            return(dic);
        }
Ejemplo n.º 3
0
        public override IPListElement Serialize()
        {
            var dic = new PListDictionary();

            dic.Add(ENTRIES_KEY, Serialize(_entries));
            return(dic);
        }
Ejemplo n.º 4
0
        public override IPListElement Serialize()
        {
            var dic = new PListDictionary();

            dic.Add(SYSTEM_FRAMEWORKS_KEY, Serialize(_frameworks));
            return(dic);
        }
Ejemplo n.º 5
0
        //Game Controllers
        void ApplyGameControllersCapability(GameControllersCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.GameControllers.appletvos", true);
            _pbxproj.AddSystemFramework("GameController.framework", LinkType.Required);
            //update info.plist
            var changes = new PListDictionary();

            changes.Add("GCSupportsControllerUserInteraction", true);
            ApplyInfoPlistChanges(changes);

            if (capability.GameControllers != null && capability.GameControllers.Length > 0)
            {
                var controllerChanges = new PListDictionary();
                var controllers       = new PListArray();

                foreach (var c in capability.GameControllers)
                {
                    var dic = new PListDictionary();
                    dic.Add("ProfileName", c.ToString());
                    controllers.Add(dic);
                }

                controllerChanges.Add("GCSupportedGameControllers", controllers);
                ApplyInfoPlistChanges(controllerChanges, true);
            }
        }
Ejemplo n.º 6
0
        //Push Notifications
        void ApplyPushNotificationsCapability(PushNotificationsCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.Push", true);
            //update entitlements file
            var entitlementChanges = new PListDictionary();

            entitlementChanges.Add("aps-environment", "development");
            ApplyEntitlementsChanges(entitlementChanges, true);
        }
Ejemplo n.º 7
0
        //Siri
        void ApplySiriCapability(SiriCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.Siri", true);
            //update entitlements file
            var entitlementChanges = new PListDictionary();

            entitlementChanges.Add("com.apple.developer.siri", true);
            ApplyEntitlementsChanges(entitlementChanges, true);
        }
Ejemplo n.º 8
0
        void ApplyMultipathCapability(MultipathCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.Multipath", true);
            //update entitlements file
            var entitlementChanges = new PListDictionary();

            entitlementChanges.Add("com.apple.developer.networking.multipath", true);
            ApplyEntitlementsChanges(entitlementChanges, true);
        }
Ejemplo n.º 9
0
        //Data Protection
        void ApplyDataProtectionapability(DataProtectionapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.DataProtection", true);
            //update entitlements file
            var entitlementChanges = new PListDictionary();

            entitlementChanges.Add("com.apple.developer.default-data-protection", "NSFileProtectionComplete");
            ApplyEntitlementsChanges(entitlementChanges, true);
        }
Ejemplo n.º 10
0
        //Wireless Accessory Configuration
        void ApplyWirelessAccessoryConfigurationCapability(WirelessAccessoryConfigurationCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.WAC", true);
            _pbxproj.AddSystemFramework("ExternalAccessory.framework", LinkType.Required);
            //update entitlements file
            var entitlementChanges = new PListDictionary();

            entitlementChanges.Add("com.apple.external-accessory.wireless-configuration", true);
            ApplyEntitlementsChanges(entitlementChanges, true);
        }
Ejemplo n.º 11
0
        public override PListDictionary Serialize()
        {
            var dic = new PListDictionary();

            if (MerchantIds.Count > 0)
            {
                dic.Add(MERCHANT_IDS_KEY, new PListArray(MerchantIds));
            }

            return(dic);
        }
Ejemplo n.º 12
0
        //HomeKit
        void ApplyHomeKitCapability(HomeKitCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.HomeKit", true);
            _pbxproj.AddSystemFramework("HomeKit.framework", LinkType.Required);
            //update entitlements file
            var entitlementChanges = new PListDictionary();

            entitlementChanges.Add("com.apple.developer.homekit", true);
            ApplyEntitlementsChanges(entitlementChanges, true);
        }
        public override PListDictionary Serialize()
        {
            var dic = new PListDictionary();

            if (AssociatedDomains.Count > 0)
            {
                dic.Add(ASSOCIATED_DOMAINS_KEY, new PListArray(AssociatedDomains));
            }

            return(dic);
        }
Ejemplo n.º 14
0
        void ApplyHotspotConfigurationCapability(HotspotConfigurationCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.HotspotConfiguration", true);
            _pbxproj.AddSystemFramework("NetworkExtension.framework", LinkType.Required);
            //update entitlements file
            var entitlementChanges = new PListDictionary();

            entitlementChanges.Add("com.apple.developer.networking.HotspotConfiguration", true);
            ApplyEntitlementsChanges(entitlementChanges, true);
        }
Ejemplo n.º 15
0
        //Inter-App Audio
        void ApplyInterAppAudioCapability(InterAppAudioCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.InterAppAudio", true);
            _pbxproj.AddSystemFramework("AudioToolbox.framework", LinkType.Required);
            //update entitlements file
            var entitlementChanges = new PListDictionary();

            entitlementChanges.Add("inter-app-audio", true);
            ApplyEntitlementsChanges(entitlementChanges, true);
        }
Ejemplo n.º 16
0
        public IPListElement Copy()
        {
            var copy = new PListDictionary();

            foreach (var kvp in this)
            {
                copy.Add(kvp.Key, kvp.Value.Copy());
            }

            return(copy);
        }
Ejemplo n.º 17
0
        public override PListDictionary Serialize()
        {
            var dic = new PListDictionary();

            if (AppGroups.Count > 0)
            {
                dic.Add(APP_GROUPS_KEY, new PListArray(AppGroups));
            }

            return(dic);
        }
Ejemplo n.º 18
0
        public override PListDictionary Serialize()
        {
            var dic = new PListDictionary();

            if (KeychainGroups.Count > 0)
            {
                dic.Add(KEYCHAIN_GROUPS_KEY, new PListArray(KeychainGroups));
            }

            return(dic);
        }
Ejemplo n.º 19
0
        //Wallet
        void ApplyWalletCapability(WalletCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.Wallet", true);
            _pbxproj.AddSystemFramework("PassKit.framework", LinkType.Required);
            //update entitlements file
            var entitlementChanges = new PListDictionary();

            entitlementChanges.Add("com.apple.developer.pass-type-identifiers", new PListArray("$(TeamIdentifierPrefix)*"));
            ApplyEntitlementsChanges(entitlementChanges, true);
        }
Ejemplo n.º 20
0
        //Game Center
        void ApplyGameCenterCapability(GameCenterCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.GameCenter.iOS", true);
            _pbxproj.AddSystemFramework("GameKit.framework", LinkType.Required);
            //update info.plist
            var changes = new PListDictionary();

            changes.Add("UIRequiredDeviceCapabilities", new PListArray("gamekit"));
            ApplyInfoPlistChanges(changes);
        }
Ejemplo n.º 21
0
        void ApplyNFCTagReadingCapability(NFCTagReadingCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.NearFieldCommunicationTagReading", true);
            //update entitlements file
            var entitlementChanges = new PListDictionary();
            var formats            = new PListArray();

            formats.Add("NDEF");
            entitlementChanges.Add("com.apple.developer.nfc.readersession.formats", formats);
            ApplyEntitlementsChanges(entitlementChanges, true);
        }
Ejemplo n.º 22
0
        //Personal VPN
        void ApplyPersonalVPNCapability(PersonalVPNCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.VPNLite", true);
            _pbxproj.AddSystemFramework("NetworkExtension.framework", LinkType.Required);
            //update entitlements file
            var entitlementChanges = new PListDictionary();
            var groups             = new PListArray();

            groups.Add("allow-vpn");
            entitlementChanges.Add("com.apple.developer.networking.vpn.api", groups);
            ApplyEntitlementsChanges(entitlementChanges, true);
        }
Ejemplo n.º 23
0
        public PListDictionary Serialize()
        {
            var dic = new PListDictionary();

            dic.Add(ACTIVE_CONFIGURATION_KEY, _activeConfiguration);
            var configs = new PListDictionary();

            foreach (var kvp in _configurations)
            {
                var entries = new PListArray();

                foreach (var e in kvp.Value)
                {
                    entries.Add(e);
                }

                configs.Add(kvp.Key, entries);
            }

            dic.Add(CONFIGURATIONS_KEY, configs);
            return(dic);
        }
Ejemplo n.º 24
0
        public override IPListElement Serialize()
        {
            var dic = new PListDictionary();

            dic.AddIfNotEmpty(TEAM_ID_KEY, TeamId);

            if (!AutomaticProvisioning)
            {
                dic.Add(AUTO_PROVISIONING_KEY, AutomaticProvisioning);
            }

            return(dic);
        }
Ejemplo n.º 25
0
        public override PListDictionary Serialize()
        {
            var dic = new PListDictionary();

            dic.AddIfTrue(ALLOW_SUBSET_OF_PASS_TYPES_KEY, AllowSubsetOfPassTypes);

            if (PassTypeSubsets.Count > 0)
            {
                dic.Add(PASS_TYPE_SUBSETS_KEY, new PListArray(PassTypeSubsets));
            }

            return(dic);
        }
Ejemplo n.º 26
0
        //HealthKit
        void ApplyHealthKitCapability(HealthKitCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.HealthKit", true);
            _pbxproj.AddSystemFramework("HealthKit.framework", LinkType.Required);
            //update info.plist
            var changes = new PListDictionary();

            changes.Add("UIRequiredDeviceCapabilities", new PListArray("healthkit"));
            ApplyInfoPlistChanges(changes);
            //update entitlements file
            var entitlementChanges = new PListDictionary();

            entitlementChanges.Add("com.apple.developer.healthkit", true);
            ApplyEntitlementsChanges(entitlementChanges, true);
        }
Ejemplo n.º 27
0
        public override PListDictionary Serialize()
        {
            var dic = new PListDictionary();

            dic.AddIfTrue(KEY_VALUE_STORAGE_KEY, KeyValueStorage);
            dic.AddIfTrue(ICLOUD_DOCUMENTS_KEY, iCloudDocuments);
            dic.AddIfTrue(CLOUDKIT_KEY, CloudKit);
            dic.AddIfTrue(USE_CUSTOM_CONTAINERS_KEY, UseCustomContainers);

            if (CustomContainers.Count > 0)
            {
                dic.Add(CUSTOM_CONTAINERS_KEY, new PListArray(CustomContainers));
            }

            return(dic);
        }
Ejemplo n.º 28
0
        //App Groups
        void ApplyAppGroupsCapability(AppGroupsCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.ApplicationGroups.iOS", true);
            //update entitlements file
            var entitlementChanges = new PListDictionary();
            var groups             = new PListArray();

            entitlementChanges.Add("com.apple.security.application-groups", groups);

            foreach (var item in capability.AppGroups)
            {
                groups.Add(item);
            }

            ApplyEntitlementsChanges(entitlementChanges, true);
        }
Ejemplo n.º 29
0
        //Associated Domains
        void ApplyAssociatedDomainsCapability(AssociatedDomainsCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.SafariKeychain", true);
            //update entitlements file
            var entitlementChanges = new PListDictionary();
            var domains            = new PListArray();

            entitlementChanges.Add("com.apple.developer.associated-domains", domains);

            foreach (var item in capability.AssociatedDomains)
            {
                domains.Add(item);
            }

            ApplyEntitlementsChanges(entitlementChanges, true);
        }
Ejemplo n.º 30
0
        //Apple Pay (In App Payments)
        void ApplyApplePayCapability(ApplePayCapability capability)
        {
            //update pbxproject
            _pbxproj.EnableSystemCapability("com.apple.ApplePay", true);
            //update entitlements file
            var entitlementChanges = new PListDictionary();
            var groups             = new PListArray();

            entitlementChanges.Add("com.apple.developer.in-app-payments", groups);

            foreach (var item in capability.MerchantIds)
            {
                groups.Add(item);
            }

            ApplyEntitlementsChanges(entitlementChanges, true);
        }