Пример #1
0
 public void Merge(CapabilitiesChanges other)
 {
     foreach (var kvp in other._capabilities)
     {
         _capabilities[kvp.Key] = kvp.Value;
     }
 }
Пример #2
0
 public XcodeChangeFile()
 {
     IsDirty          = false;
     SavePath         = "";
     Platform         = BuildPlatform.iOS;
     Frameworks       = new FrameworkChanges();
     FilesAndFolders  = new FilesAndFolderChanges();
     Scripts          = new ScriptChanges();
     BuildSettings    = new BuildSettingsChanges();
     InfoPlistChanges = new PListDictionary();
     Signing          = new SigningChanges();
     Capabilities     = new CapabilitiesChanges();
 }
Пример #3
0
        void LoadCapabilities(PListDictionary dic)
        {
            if (dic == null)
            {
                return;
            }

            try
            {
                Capabilities = new CapabilitiesChanges(dic);
            }
            catch (System.Exception e)
            {
                Debug.LogWarning("EgoXproject: Corrupt capabilities section in " + SavePath + " : " + e.Message);
            }
        }
Пример #4
0
        bool ApplyCapabilityChanges(CapabilitiesChanges changes)
        {
            var active = changes.ActiveCapabilities();

            try
            {
                foreach (var systemCapability in active)
                {
                    BaseCapability capability = changes.Capability(systemCapability);

                    switch (systemCapability)
                    {
                    case SystemCapability.PushNotifications:
                        ApplyPushNotificationsCapability(capability as PushNotificationsCapability);
                        break;

                    case SystemCapability.AssociatedDomains:
                        ApplyAssociatedDomainsCapability(capability as AssociatedDomainsCapability);
                        break;

                    case SystemCapability.DataProtection:
                        ApplyDataProtectionapability(capability as DataProtectionapability);
                        break;

                    case SystemCapability.HealthKit:
                        ApplyHealthKitCapability(capability as HealthKitCapability);
                        break;

                    case SystemCapability.HomeKit:
                        ApplyHomeKitCapability(capability as HomeKitCapability);
                        break;

                    case SystemCapability.iCloud:
                        ApplyICloudCapability(capability as ICloudCapability);
                        break;

                    case SystemCapability.ApplePay:
                        ApplyApplePayCapability(capability as ApplePayCapability);
                        break;

                    case SystemCapability.NetworkExtensions:
                        ApplyNetworkExtensionsCapability(capability as NetworkExtensionsCapability);
                        break;

                    case SystemCapability.PersonalVPN:
                        ApplyPersonalVPNCapability(capability as PersonalVPNCapability);
                        break;

                    case SystemCapability.Wallet:
                        ApplyWalletCapability(capability as WalletCapability);
                        break;

                    case SystemCapability.Siri:
                        ApplySiriCapability(capability as SiriCapability);
                        break;

                    case SystemCapability.WirelessAccessoryConfiguration:
                        ApplyWirelessAccessoryConfigurationCapability(capability as WirelessAccessoryConfigurationCapability);
                        break;

                    case SystemCapability.AppGroups:
                        ApplyAppGroupsCapability(capability as AppGroupsCapability);
                        break;

                    case SystemCapability.InterAppAudio:
                        ApplyInterAppAudioCapability(capability as InterAppAudioCapability);
                        break;

                    case SystemCapability.KeychainSharing:
                        ApplyKeychainSharingCapability(capability as KeychainSharingCapability);
                        break;

                    case SystemCapability.GameCenter:
                        ApplyGameCenterCapability(capability as GameCenterCapability);
                        break;

                    case SystemCapability.InAppPurchase:
                        ApplyInAppPurchaseCapability(capability as InAppPurchaseCapability);
                        break;

                    case SystemCapability.Maps:
                        ApplyMapsCapability(capability as MapsCapability);
                        break;

                    case SystemCapability.BackgroundModes:
                        ApplyBackgroundModesCapability(capability as BackgroundModesCapability);
                        break;

                    case SystemCapability.HotspotConfiguration:
                        ApplyHotspotConfigurationCapability(capability as HotspotConfigurationCapability);
                        break;

                    case SystemCapability.Multipath:
                        ApplyMultipathCapability(capability as MultipathCapability);
                        break;

                    case SystemCapability.NFCTagReading:
                        ApplyNFCTagReadingCapability(capability as NFCTagReadingCapability);
                        break;

                    case SystemCapability.GameControllers:
                        ApplyGameControllersCapability(capability as GameControllersCapability);
                        break;

                    default:
                        throw new System.ArgumentOutOfRangeException();
                    }
                }

                if (!_pbxproj.Save())
                {
                    Debug.LogError("EgoXproject: Failed to save PBXProject file");
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
            catch (System.Exception e)
            {
                Debug.LogError("EgoXproject: Error loading capabilities: " + e.Message);
                return(false);
            }
        }