Skip to content

Commit

Permalink
XcodeTweaks 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Chuquimia committed Aug 8, 2024
0 parents commit c3d31cb
Show file tree
Hide file tree
Showing 55 changed files with 3,560 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
xcuserdata/

Binary file added Marketing/screenshot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Marketing/screenshot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Marketing/screenshot3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Marketing/screenshot4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<img src="https://raw.githubusercontent.com/maxchuquimia/XcodeTweaks/master/XcodeTweaks/Assets.xcassets/AppIcon.appiconset/icon256.png" width="128" />

# XcodeTweaks

Make Xcode instantly build again when it says “Build again to continue” - and other similar fixes that we shouldn't have to care about.

<img src="https://raw.githubusercontent.com/maxchuquimia/XcodeTweaks/master/Marketing/screenshot1.png" />

## Features

| When XcodeTweaks detects the error... | Xcode Tweaks will instantly... |
| --- | --- |
| Build again to continue | Build, Test or Launch your project again |
| contains multiple references with the same GUID | Resolve Package Versions, then Build, Test or Launch your project again |
| received multiple target ended messages for target ID | Clean, then Build, Test or Launch your project again |
| targetID 423 not found in activeTargets | Clean, then Build, Test or Launch your project again |
| CodeSign failed with a nonzero exit code | Clean, then Build, Test or Launch your project again |
734 changes: 734 additions & 0 deletions XcodeTweaks.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"originHash" : "8fb780438da688f142bc811db8c2de2d318174a2dfca1503ee916f5c4e6398f5",
"pins" : [
{
"identity" : "cockle",
"kind" : "remoteSourceControl",
"location" : "https://github.com/maxchuquimia/cockle",
"state" : {
"revision" : "6dc73dc3b74467b7b5281bb0cd9a364cf90b0b40",
"version" : "0.0.6"
}
},
{
"identity" : "cryptoswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/krzyzanowskim/CryptoSwift.git",
"state" : {
"revision" : "e2bc81be54d71d566a52ca17c3983d141c30aa70",
"version" : "1.3.3"
}
},
{
"identity" : "gzipswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/1024jp/GzipSwift",
"state" : {
"revision" : "7a7f17761c76a932662ab77028a4329f67d645a4",
"version" : "5.2.0"
}
},
{
"identity" : "pathkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kylef/PathKit.git",
"state" : {
"revision" : "3bfd2737b700b9a36565a8c94f4ad2b050a5e574",
"version" : "1.0.1"
}
},
{
"identity" : "spectre",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kylef/Spectre.git",
"state" : {
"revision" : "26cc5e9ae0947092c7139ef7ba612e34646086c7",
"version" : "0.10.1"
}
},
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser",
"state" : {
"revision" : "0fbc8848e389af3bb55c182bc19ca9d5dc2f255b",
"version" : "1.4.0"
}
},
{
"identity" : "swiftapplescript",
"kind" : "remoteSourceControl",
"location" : "https://github.com/maxchuquimia/SwiftAppleScript.git",
"state" : {
"revision" : "6d682a702ed06c5c6b5f09fd564cde5361b48708",
"version" : "0.0.1"
}
},
{
"identity" : "xclogparser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/MobileNativeFoundation/XCLogParser",
"state" : {
"revision" : "62b4d62fd4ae5e2d22bd29f7423b327149bc0ecd",
"version" : "0.2.39"
}
}
],
"version" : 3
}
60 changes: 60 additions & 0 deletions XcodeTweaks/App/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
//
// AppDelegate.swift
// XcodeTweaks
//
// Created by Max Chuquimia on 22/6/2024.
//

import Foundation
import AppKit
import SwiftUI

final class AppDelegate: NSObject, NSApplicationDelegate {

private var window: NSWindow?
private var settingsWindow: NSWindow?

func applicationDidFinishLaunching(_ aNotification: Notification) {
showMainWindow()
}

func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
true
}

func showMainWindow() {
if window == nil {
window = NSWindow(
contentRect: NSRect(x: 0, y: 0, width: 650, height: 400),
styleMask: [.titled, .miniaturizable, .resizable, .fullSizeContentView],
backing: .buffered,
defer: false
)
window?.title = "XcodeTweaks"
window?.center()
window?.setFrameAutosaveName("Main Window")
window?.contentView = NSHostingView(rootView: MainWindowView())
}

window?.makeKeyAndOrderFront(nil)
}

@IBAction func showSettings(sender: AnyObject?) {
if settingsWindow == nil {
settingsWindow = NSWindow(
contentRect: NSRect(x: 0, y: 0, width: 450, height: 450),
styleMask: [.titled, .closable, .resizable, .fullSizeContentView],
backing: .buffered,
defer: false
)

settingsWindow?.title = "XcodeTweaks Settings"
settingsWindow?.center()
settingsWindow?.setFrameAutosaveName("Settings Window")
settingsWindow?.contentView = NSHostingView(rootView: SettingsWindowView())
}

settingsWindow?.makeKeyAndOrderFront(self)
}

}
38 changes: 38 additions & 0 deletions XcodeTweaks/App/Extensions/FileManager.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// FileManager.swift
// XcodeTweaks
//
// Created by Max Chuquimia on 23/6/2024.
//

import Foundation

extension FileManager {

func filesCreatedAfter(date: Date, in directoryURL: URL, type extension: String? = nil) -> [URL] {
do {
let fileURLs = try contentsOfDirectory(
at: directoryURL,
includingPropertiesForKeys: [.creationDateKey],
options: .skipsHiddenFiles
)

return fileURLs
.filter { fileURL in
if let e = `extension` {
guard fileURL.pathExtension == e else { return false }
}

if let creationDate = try? fileURL.resourceValues(forKeys: [.creationDateKey]).creationDate {
return creationDate > date
}

return false
}
} catch {
print("Error getting contents of directory: \(error)")
return []
}
}

}
17 changes: 17 additions & 0 deletions XcodeTweaks/App/Extensions/NSRunningApplication.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// NSRunningApplication.swift
// XcodeTweaks
//
// Created by Max Chuquimia on 22/6/2024.
//

import Foundation
import AppKit

extension NSRunningApplication {

static var xcode: NSRunningApplication? {
NSRunningApplication.runningApplications(withBundleIdentifier: "com.apple.dt.Xcode").first
}

}
17 changes: 17 additions & 0 deletions XcodeTweaks/App/Extensions/Optional.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// Optional.swift
// XcodeTweaks
//
// Created by Max Chuquimia on 23/6/2024.
//

import Foundation

extension Optional {

func get() throws -> Wrapped {
guard let value = self else { throw "Unable to unwrap value" }
return value
}

}
16 changes: 16 additions & 0 deletions XcodeTweaks/App/Extensions/String.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// String.swift
// XcodeTweaks
//
// Created by Max Chuquimia on 23/6/2024.
//

import Foundation

extension String: LocalizedError {

public var errorDescription: String? {
self
}

}
Loading

0 comments on commit c3d31cb

Please sign in to comment.