mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-07-04 11:13:35 +00:00
Split out libraries into SPM packages (#298)
This commit is contained in:
@ -0,0 +1,21 @@
|
||||
import Foundation
|
||||
|
||||
struct ApplicationDirectoryController {
|
||||
}
|
||||
|
||||
extension ApplicationDirectoryController {
|
||||
|
||||
var isInApplicationsDirectory: Bool {
|
||||
let bundlePath = Bundle.main.bundlePath
|
||||
for directory in NSSearchPathForDirectoriesInDomains(.allApplicationsDirectory, .allDomainsMask, true) {
|
||||
if bundlePath.hasPrefix(directory) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
if bundlePath.contains("/Library/Developer/Xcode") {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user