mirror of
				https://github.com/maxgoedjen/secretive.git
				synced 2025-10-31 15:30:57 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			535 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			535 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
| 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
 | |
|     }
 | |
| 
 | |
| }
 |