-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSystemApplication.swift
More file actions
70 lines (59 loc) · 1.53 KB
/
SystemApplication.swift
File metadata and controls
70 lines (59 loc) · 1.53 KB
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
//
// SystemApplication.swift
// AppExplorer
//
// Created by Cardasis, Jonathan (J.) on 7/13/16.
// Copyright © 2016 Cardasis, Jonathan (J.). All rights reserved.
//
import UIKit
enum SystemApplicationType{
case system
case user
}
class SystemApplication: NSObject {
var bundleID: String?
var name: String? //Springboard display name
var version: String?
var executableName: String? //Name of internal payload executable
var type: SystemApplicationType?
var signerIdentity: String?
var applicationPath: URL?
var backgroundModes: [String]?
var icon: UIImage?
override init(){
super.init()
}
init(bundleID: String){
super.init()
self.bundleID = bundleID
}
/*
Mapping function.
Pass nil for any parameter not given
*/
func map(bundleID: String?,
name: String?,
version: String?,
executableName: String?,
type: String?,
signerIdentity: String?,
applicationPath: URL?,
backgroundModes: [String]?,
icon: UIImage?
){
self.bundleID = bundleID
self.name = name
self.version = version
self.executableName = executableName
if type == "System"{
self.type = .system
}
else{
self.type = .user
}
self.signerIdentity = signerIdentity
self.applicationPath = applicationPath
self.backgroundModes = backgroundModes
self.icon = icon
}
}