Example #1
0
        public static IEnumerable <IPhoneSimulatorTarget> GetSimulatorTargets()
        {
            foreach (var v in IPhoneFramework.GetInstalledSdkVersions(true))
            {
                var settings = GetSdkSettings(v, true);

                if (v < IPhoneSdkVersion.V3_2)
                {
                    yield return(new IPhoneSimulatorTarget(TargetDevice.IPhone, v));

                    continue;
                }
                if (v == IPhoneSdkVersion.V3_2)
                {
                    yield return(new IPhoneSimulatorTarget(TargetDevice.IPad, v));

                    continue;
                }

                if (settings.DeviceFamilies.HasFlag(TargetDevice.IPhone))
                {
                    yield return(new IPhoneSimulatorTarget(TargetDevice.IPhone, v));
                }
                if (settings.DeviceFamilies.HasFlag(TargetDevice.IPad))
                {
                    yield return(new IPhoneSimulatorTarget(TargetDevice.IPad, v));
                }
            }
        }
Example #2
0
        public static IPhoneSdkVersion GetDefault(bool sim)
        {
            var v = IPhoneFramework.GetInstalledSdkVersions(sim);

            return(v.Count > 0? v[v.Count - 1] : UseDefault);
        }