-
Notifications
You must be signed in to change notification settings - Fork 87
/
Copy pathR.generated.swift
447 lines (377 loc) · 18.9 KB
/
R.generated.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
//
// This is a generated file, do not edit!
// Generated by R.swift, see https://github.com/mac-cain13/R.swift
//
import Foundation
import Rswift
import UIKit
/// This `R` struct is generated and contains references to static resources.
struct R: Rswift.Validatable {
fileprivate static let applicationLocale = hostingBundle.preferredLocalizations.first.flatMap { Locale(identifier: $0) } ?? Locale.current
fileprivate static let hostingBundle = Bundle(for: R.Class.self)
/// Find first language and bundle for which the table exists
fileprivate static func localeBundle(tableName: String, preferredLanguages: [String]) -> (Foundation.Locale, Foundation.Bundle)? {
// Filter preferredLanguages to localizations, use first locale
var languages = preferredLanguages
.map { Locale(identifier: $0) }
.prefix(1)
.flatMap { locale -> [String] in
if hostingBundle.localizations.contains(locale.identifier) {
if let language = locale.languageCode, hostingBundle.localizations.contains(language) {
return [locale.identifier, language]
} else {
return [locale.identifier]
}
} else if let language = locale.languageCode, hostingBundle.localizations.contains(language) {
return [language]
} else {
return []
}
}
// If there's no languages, use development language as backstop
if languages.isEmpty {
if let developmentLocalization = hostingBundle.developmentLocalization {
languages = [developmentLocalization]
}
} else {
// Insert Base as second item (between locale identifier and languageCode)
languages.insert("Base", at: 1)
// Add development language as backstop
if let developmentLocalization = hostingBundle.developmentLocalization {
languages.append(developmentLocalization)
}
}
// Find first language for which table exists
// Note: key might not exist in chosen language (in that case, key will be shown)
for language in languages {
if let lproj = hostingBundle.url(forResource: language, withExtension: "lproj"),
let lbundle = Bundle(url: lproj)
{
let strings = lbundle.url(forResource: tableName, withExtension: "strings")
let stringsdict = lbundle.url(forResource: tableName, withExtension: "stringsdict")
if strings != nil || stringsdict != nil {
return (Locale(identifier: language), lbundle)
}
}
}
// If table is available in main bundle, don't look for localized resources
let strings = hostingBundle.url(forResource: tableName, withExtension: "strings", subdirectory: nil, localization: nil)
let stringsdict = hostingBundle.url(forResource: tableName, withExtension: "stringsdict", subdirectory: nil, localization: nil)
if strings != nil || stringsdict != nil {
return (applicationLocale, hostingBundle)
}
// If table is not found for requested languages, key will be shown
return nil
}
/// Load string from Info.plist file
fileprivate static func infoPlistString(path: [String], key: String) -> String? {
var dict = hostingBundle.infoDictionary
for step in path {
guard let obj = dict?[step] as? [String: Any] else { return nil }
dict = obj
}
return dict?[key] as? String
}
static func validate() throws {
try intern.validate()
}
/// This `R.color` struct is generated, and contains static references to 2 colors.
struct color {
/// Color `AccentColor`.
static let accentColor = Rswift.ColorResource(bundle: R.hostingBundle, name: "AccentColor")
/// Color `LaunchScreenBackgroundColor`.
static let launchScreenBackgroundColor = Rswift.ColorResource(bundle: R.hostingBundle, name: "LaunchScreenBackgroundColor")
#if os(iOS) || os(tvOS)
/// `UIColor(named: "AccentColor", bundle: ..., traitCollection: ...)`
@available(tvOS 11.0, *)
@available(iOS 11.0, *)
static func accentColor(compatibleWith traitCollection: UIKit.UITraitCollection? = nil) -> UIKit.UIColor? {
return UIKit.UIColor(resource: R.color.accentColor, compatibleWith: traitCollection)
}
#endif
#if os(iOS) || os(tvOS)
/// `UIColor(named: "LaunchScreenBackgroundColor", bundle: ..., traitCollection: ...)`
@available(tvOS 11.0, *)
@available(iOS 11.0, *)
static func launchScreenBackgroundColor(compatibleWith traitCollection: UIKit.UITraitCollection? = nil) -> UIKit.UIColor? {
return UIKit.UIColor(resource: R.color.launchScreenBackgroundColor, compatibleWith: traitCollection)
}
#endif
#if os(watchOS)
/// `UIColor(named: "AccentColor", bundle: ..., traitCollection: ...)`
@available(watchOSApplicationExtension 4.0, *)
static func accentColor(_: Void = ()) -> UIKit.UIColor? {
return UIKit.UIColor(named: R.color.accentColor.name)
}
#endif
#if os(watchOS)
/// `UIColor(named: "LaunchScreenBackgroundColor", bundle: ..., traitCollection: ...)`
@available(watchOSApplicationExtension 4.0, *)
static func launchScreenBackgroundColor(_: Void = ()) -> UIKit.UIColor? {
return UIKit.UIColor(named: R.color.launchScreenBackgroundColor.name)
}
#endif
fileprivate init() {}
}
/// This `R.entitlements` struct is generated, and contains static references to 7 properties.
struct entitlements {
static let comAppleDeveloperSiri = true
static let comAppleSecurityAppSandbox = true
static let comAppleSecurityNetworkClient = true
static let comAppleSecurityPersonalInformationAddressbook = true
static let comAppleSecurityPersonalInformationCalendars = true
static let comAppleSecurityPersonalInformationLocation = true
struct comAppleSecurityApplicationGroups {
static let groupComVinhnxClendar = infoPlistString(path: ["com.apple.security.application-groups"], key: "group.com.vinhnx.Clendar") ?? "group.com.vinhnx.Clendar"
fileprivate init() {}
}
fileprivate init() {}
}
/// This `R.file` struct is generated, and contains static references to 13 files.
struct file {
/// Resource file `InfoPlist.xcstrings`.
static let infoPlistXcstrings = Rswift.FileResource(bundle: R.hostingBundle, name: "InfoPlist", pathExtension: "xcstrings")
/// Resource file `Localizable.xcstrings`.
static let localizableXcstrings = Rswift.FileResource(bundle: R.hostingBundle, name: "Localizable", pathExtension: "xcstrings")
/// Resource file `Settings.bundle`.
static let settingsBundle = Rswift.FileResource(bundle: R.hostingBundle, name: "Settings", pathExtension: "bundle")
/// Resource file `icon1_120.png`.
static let icon1_120Png = Rswift.FileResource(bundle: R.hostingBundle, name: "icon1_120", pathExtension: "png")
/// Resource file `icon1_180.png`.
static let icon1_180Png = Rswift.FileResource(bundle: R.hostingBundle, name: "icon1_180", pathExtension: "png")
/// Resource file `icon2_120.png`.
static let icon2_120Png = Rswift.FileResource(bundle: R.hostingBundle, name: "icon2_120", pathExtension: "png")
/// Resource file `icon2_180.png`.
static let icon2_180Png = Rswift.FileResource(bundle: R.hostingBundle, name: "icon2_180", pathExtension: "png")
/// Resource file `icon3_120.png`.
static let icon3_120Png = Rswift.FileResource(bundle: R.hostingBundle, name: "icon3_120", pathExtension: "png")
/// Resource file `icon3_180.png`.
static let icon3_180Png = Rswift.FileResource(bundle: R.hostingBundle, name: "icon3_180", pathExtension: "png")
/// Resource file `icon4_120.png`.
static let icon4_120Png = Rswift.FileResource(bundle: R.hostingBundle, name: "icon4_120", pathExtension: "png")
/// Resource file `icon4_180.png`.
static let icon4_180Png = Rswift.FileResource(bundle: R.hostingBundle, name: "icon4_180", pathExtension: "png")
/// Resource file `original_120.png`.
static let original_120Png = Rswift.FileResource(bundle: R.hostingBundle, name: "original_120", pathExtension: "png")
/// Resource file `original_180.png`.
static let original_180Png = Rswift.FileResource(bundle: R.hostingBundle, name: "original_180", pathExtension: "png")
/// `bundle.url(forResource: "InfoPlist", withExtension: "xcstrings")`
static func infoPlistXcstrings(_: Void = ()) -> Foundation.URL? {
let fileResource = R.file.infoPlistXcstrings
return fileResource.bundle.url(forResource: fileResource)
}
/// `bundle.url(forResource: "Localizable", withExtension: "xcstrings")`
static func localizableXcstrings(_: Void = ()) -> Foundation.URL? {
let fileResource = R.file.localizableXcstrings
return fileResource.bundle.url(forResource: fileResource)
}
/// `bundle.url(forResource: "Settings", withExtension: "bundle")`
static func settingsBundle(_: Void = ()) -> Foundation.URL? {
let fileResource = R.file.settingsBundle
return fileResource.bundle.url(forResource: fileResource)
}
/// `bundle.url(forResource: "icon1_120", withExtension: "png")`
static func icon1_120Png(_: Void = ()) -> Foundation.URL? {
let fileResource = R.file.icon1_120Png
return fileResource.bundle.url(forResource: fileResource)
}
/// `bundle.url(forResource: "icon1_180", withExtension: "png")`
static func icon1_180Png(_: Void = ()) -> Foundation.URL? {
let fileResource = R.file.icon1_180Png
return fileResource.bundle.url(forResource: fileResource)
}
/// `bundle.url(forResource: "icon2_120", withExtension: "png")`
static func icon2_120Png(_: Void = ()) -> Foundation.URL? {
let fileResource = R.file.icon2_120Png
return fileResource.bundle.url(forResource: fileResource)
}
/// `bundle.url(forResource: "icon2_180", withExtension: "png")`
static func icon2_180Png(_: Void = ()) -> Foundation.URL? {
let fileResource = R.file.icon2_180Png
return fileResource.bundle.url(forResource: fileResource)
}
/// `bundle.url(forResource: "icon3_120", withExtension: "png")`
static func icon3_120Png(_: Void = ()) -> Foundation.URL? {
let fileResource = R.file.icon3_120Png
return fileResource.bundle.url(forResource: fileResource)
}
/// `bundle.url(forResource: "icon3_180", withExtension: "png")`
static func icon3_180Png(_: Void = ()) -> Foundation.URL? {
let fileResource = R.file.icon3_180Png
return fileResource.bundle.url(forResource: fileResource)
}
/// `bundle.url(forResource: "icon4_120", withExtension: "png")`
static func icon4_120Png(_: Void = ()) -> Foundation.URL? {
let fileResource = R.file.icon4_120Png
return fileResource.bundle.url(forResource: fileResource)
}
/// `bundle.url(forResource: "icon4_180", withExtension: "png")`
static func icon4_180Png(_: Void = ()) -> Foundation.URL? {
let fileResource = R.file.icon4_180Png
return fileResource.bundle.url(forResource: fileResource)
}
/// `bundle.url(forResource: "original_120", withExtension: "png")`
static func original_120Png(_: Void = ()) -> Foundation.URL? {
let fileResource = R.file.original_120Png
return fileResource.bundle.url(forResource: fileResource)
}
/// `bundle.url(forResource: "original_180", withExtension: "png")`
static func original_180Png(_: Void = ()) -> Foundation.URL? {
let fileResource = R.file.original_180Png
return fileResource.bundle.url(forResource: fileResource)
}
fileprivate init() {}
}
/// This `R.image` struct is generated, and contains static references to 11 images.
struct image {
/// Image `icon1_120`.
static let icon1_120 = Rswift.ImageResource(bundle: R.hostingBundle, name: "icon1_120")
/// Image `icon1_180`.
static let icon1_180 = Rswift.ImageResource(bundle: R.hostingBundle, name: "icon1_180")
/// Image `icon2_120`.
static let icon2_120 = Rswift.ImageResource(bundle: R.hostingBundle, name: "icon2_120")
/// Image `icon2_180`.
static let icon2_180 = Rswift.ImageResource(bundle: R.hostingBundle, name: "icon2_180")
/// Image `icon3_120`.
static let icon3_120 = Rswift.ImageResource(bundle: R.hostingBundle, name: "icon3_120")
/// Image `icon3_180`.
static let icon3_180 = Rswift.ImageResource(bundle: R.hostingBundle, name: "icon3_180")
/// Image `icon4_120`.
static let icon4_120 = Rswift.ImageResource(bundle: R.hostingBundle, name: "icon4_120")
/// Image `icon4_180`.
static let icon4_180 = Rswift.ImageResource(bundle: R.hostingBundle, name: "icon4_180")
/// Image `original_120`.
static let original_120 = Rswift.ImageResource(bundle: R.hostingBundle, name: "original_120")
/// Image `original_180`.
static let original_180 = Rswift.ImageResource(bundle: R.hostingBundle, name: "original_180")
/// Image `spotlight_icon`.
static let spotlight_icon = Rswift.ImageResource(bundle: R.hostingBundle, name: "spotlight_icon")
#if os(iOS) || os(tvOS)
/// `UIImage(named: "icon1_120", bundle: ..., traitCollection: ...)`
static func icon1_120(compatibleWith traitCollection: UIKit.UITraitCollection? = nil) -> UIKit.UIImage? {
return UIKit.UIImage(resource: R.image.icon1_120, compatibleWith: traitCollection)
}
#endif
#if os(iOS) || os(tvOS)
/// `UIImage(named: "icon1_180", bundle: ..., traitCollection: ...)`
static func icon1_180(compatibleWith traitCollection: UIKit.UITraitCollection? = nil) -> UIKit.UIImage? {
return UIKit.UIImage(resource: R.image.icon1_180, compatibleWith: traitCollection)
}
#endif
#if os(iOS) || os(tvOS)
/// `UIImage(named: "icon2_120", bundle: ..., traitCollection: ...)`
static func icon2_120(compatibleWith traitCollection: UIKit.UITraitCollection? = nil) -> UIKit.UIImage? {
return UIKit.UIImage(resource: R.image.icon2_120, compatibleWith: traitCollection)
}
#endif
#if os(iOS) || os(tvOS)
/// `UIImage(named: "icon2_180", bundle: ..., traitCollection: ...)`
static func icon2_180(compatibleWith traitCollection: UIKit.UITraitCollection? = nil) -> UIKit.UIImage? {
return UIKit.UIImage(resource: R.image.icon2_180, compatibleWith: traitCollection)
}
#endif
#if os(iOS) || os(tvOS)
/// `UIImage(named: "icon3_120", bundle: ..., traitCollection: ...)`
static func icon3_120(compatibleWith traitCollection: UIKit.UITraitCollection? = nil) -> UIKit.UIImage? {
return UIKit.UIImage(resource: R.image.icon3_120, compatibleWith: traitCollection)
}
#endif
#if os(iOS) || os(tvOS)
/// `UIImage(named: "icon3_180", bundle: ..., traitCollection: ...)`
static func icon3_180(compatibleWith traitCollection: UIKit.UITraitCollection? = nil) -> UIKit.UIImage? {
return UIKit.UIImage(resource: R.image.icon3_180, compatibleWith: traitCollection)
}
#endif
#if os(iOS) || os(tvOS)
/// `UIImage(named: "icon4_120", bundle: ..., traitCollection: ...)`
static func icon4_120(compatibleWith traitCollection: UIKit.UITraitCollection? = nil) -> UIKit.UIImage? {
return UIKit.UIImage(resource: R.image.icon4_120, compatibleWith: traitCollection)
}
#endif
#if os(iOS) || os(tvOS)
/// `UIImage(named: "icon4_180", bundle: ..., traitCollection: ...)`
static func icon4_180(compatibleWith traitCollection: UIKit.UITraitCollection? = nil) -> UIKit.UIImage? {
return UIKit.UIImage(resource: R.image.icon4_180, compatibleWith: traitCollection)
}
#endif
#if os(iOS) || os(tvOS)
/// `UIImage(named: "original_120", bundle: ..., traitCollection: ...)`
static func original_120(compatibleWith traitCollection: UIKit.UITraitCollection? = nil) -> UIKit.UIImage? {
return UIKit.UIImage(resource: R.image.original_120, compatibleWith: traitCollection)
}
#endif
#if os(iOS) || os(tvOS)
/// `UIImage(named: "original_180", bundle: ..., traitCollection: ...)`
static func original_180(compatibleWith traitCollection: UIKit.UITraitCollection? = nil) -> UIKit.UIImage? {
return UIKit.UIImage(resource: R.image.original_180, compatibleWith: traitCollection)
}
#endif
#if os(iOS) || os(tvOS)
/// `UIImage(named: "spotlight_icon", bundle: ..., traitCollection: ...)`
static func spotlight_icon(compatibleWith traitCollection: UIKit.UITraitCollection? = nil) -> UIKit.UIImage? {
return UIKit.UIImage(resource: R.image.spotlight_icon, compatibleWith: traitCollection)
}
#endif
fileprivate init() {}
}
/// This `R.info` struct is generated, and contains static references to 2 properties.
struct info {
struct nsUserActivityTypes {
static let comVinhnxClendarSiriShortcutAddEvent = infoPlistString(path: ["NSUserActivityTypes"], key: "com.vinhnx.Clendar.SiriShortcut.addEvent") ?? "com.vinhnx.Clendar.SiriShortcut.addEvent"
static let comVinhnxClendarSiriShortcutOpenSettings = infoPlistString(path: ["NSUserActivityTypes"], key: "com.vinhnx.Clendar.SiriShortcut.openSettings") ?? "com.vinhnx.Clendar.SiriShortcut.openSettings"
static let comVinhnxClendarSiriShortcutOpenShortcuts = infoPlistString(path: ["NSUserActivityTypes"], key: "com.vinhnx.Clendar.SiriShortcut.openShortcuts") ?? "com.vinhnx.Clendar.SiriShortcut.openShortcuts"
static let configurationIntent = infoPlistString(path: ["NSUserActivityTypes"], key: "ConfigurationIntent") ?? "ConfigurationIntent"
fileprivate init() {}
}
struct uiApplicationSceneManifest {
static let _key = "UIApplicationSceneManifest"
static let uiApplicationSupportsMultipleScenes = true
struct uiSceneConfigurations {
static let _key = "UISceneConfigurations"
fileprivate init() {}
}
fileprivate init() {}
}
fileprivate init() {}
}
/// This `R.nib` struct is generated, and contains static references to 1 nibs.
struct nib {
/// Nib `AppIconItemCell`.
static let appIconItemCell = _R.nib._AppIconItemCell()
#if os(iOS) || os(tvOS)
/// `UINib(name: "AppIconItemCell", in: bundle)`
@available(*, deprecated, message: "Use UINib(resource: R.nib.appIconItemCell) instead")
static func appIconItemCell(_: Void = ()) -> UIKit.UINib {
return UIKit.UINib(resource: R.nib.appIconItemCell)
}
#endif
static func appIconItemCell(owner ownerOrNil: AnyObject?, options optionsOrNil: [UINib.OptionsKey : Any]? = nil) -> AppIconItemCell? {
return R.nib.appIconItemCell.instantiate(withOwner: ownerOrNil, options: optionsOrNil)[0] as? AppIconItemCell
}
fileprivate init() {}
}
fileprivate struct intern: Rswift.Validatable {
fileprivate static func validate() throws {
// There are no resources to validate
}
fileprivate init() {}
}
fileprivate class Class {}
fileprivate init() {}
}
struct _R {
#if os(iOS) || os(tvOS)
struct nib {
struct _AppIconItemCell: Rswift.NibResourceType {
let bundle = R.hostingBundle
let name = "AppIconItemCell"
func firstView(owner ownerOrNil: AnyObject?, options optionsOrNil: [UINib.OptionsKey : Any]? = nil) -> AppIconItemCell? {
return instantiate(withOwner: ownerOrNil, options: optionsOrNil)[0] as? AppIconItemCell
}
fileprivate init() {}
}
fileprivate init() {}
}
#endif
fileprivate init() {}
}