static string[] GetBackgroundModes(NSBundle bundle) { var backgroundModes = bundle.ObjectForInfoDictionary("UIBackgroundModes"); if (backgroundModes == null) { return new string[0]; } return NSArray.StringArrayFromHandle(backgroundModes.Handle); }
static string[] GetBackgroundModes(NSBundle bundle) { var backgroundModes = bundle.ObjectForInfoDictionary("UIBackgroundModes"); if (backgroundModes == null) { return(new string[0]); } return(NSArray.StringArrayFromHandle(backgroundModes.Handle)); }
static void ThrowIfNoDescription(NSBundle bundle, string key) { if (!UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { return; } var backgroundModes = bundle.ObjectForInfoDictionary(key); if (backgroundModes == null) { throw new InvalidOperationException(string.Format("You must provide a value for {0} in Info.plist to use location services", key)); } }
public UserAgent(NSBundle bundle) { var appVersion = bundle.ObjectForInfoDictionary("CFBundleShortVersionString")?.ToString() ?? "unknown"; HeaderValue = string.Format(ValueFormat, appVersion); }
private static string StringForInfoDictionary(this NSBundle bundle, Main.DictionaryKey key) { return(bundle.ObjectForInfoDictionary(key.ToString()).ToString() ?? string.Empty); }