mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-11 02:51:11 +00:00
Logs instead of prints
This commit is contained in:
1 parent
6e33998fb6
commit
ca722b8894
7 files changed
+16
-18
No files matched your search
@@ -12,7 +12,7 @@ class AudioManager {
|
||||
|
||||
static func playSound() {
|
||||
guard let soundURL = Bundle.main.url(forResource: "timeIsNow", withExtension: "mp3") else {
|
||||
print("Sound file not found")
|
||||
log("Sound file not found")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class AudioManager {
|
||||
audioPlayer = try AVAudioPlayer(contentsOf: soundURL)
|
||||
audioPlayer?.play()
|
||||
} catch {
|
||||
print("Error playing sound: \(error.localizedDescription)")
|
||||
log("Error playing sound: \(error.localizedDescription)")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ func getActiveNetworkInterface() -> String? {
|
||||
do {
|
||||
try process.run()
|
||||
} catch {
|
||||
print("Failed to run process: \(error)")
|
||||
log("Failed to run process: \(error)")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ class IPv6DeviceScanner {
|
||||
do {
|
||||
try process.run()
|
||||
} catch {
|
||||
print("Failed to run ping6: \(error)")
|
||||
log("Failed to run ping6: \(error)")
|
||||
completion([])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ struct SettingsView: View {
|
||||
let url = try URL(resolvingBookmarkData: saveFolderPath, options: [], relativeTo: nil, bookmarkDataIsStale: &isStale)
|
||||
return url.lastPathComponent // Returns the folder path as a string
|
||||
} catch {
|
||||
print("Failed to resolve bookmark: \(error)")
|
||||
log("Failed to resolve bookmark: \(error)")
|
||||
}
|
||||
}
|
||||
return nil // No saved folder
|
||||
@@ -63,15 +63,13 @@ struct SettingsView: View {
|
||||
|
||||
if panel.runModal() == .OK, let url = panel.urls.first {
|
||||
do {
|
||||
print("Selected folder: \(url)")
|
||||
log("Selected folder: \(url)")
|
||||
|
||||
let bookmarkData = try url.bookmarkData(options: .withSecurityScope, includingResourceValuesForKeys: nil, relativeTo: nil)
|
||||
|
||||
print(bookmarkData)
|
||||
|
||||
UserDefaults.standard.set(bookmarkData, forKey: UserDefaultsKeys.saveFolderBookmark.rawValue)
|
||||
} catch {
|
||||
print("Failed to save security-scoped bookmark: \(error)")
|
||||
log("Failed to save security-scoped bookmark: \(error)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,12 +110,12 @@ struct LargeAppIconView<Content: View>: View {
|
||||
.padding(.top, 50)
|
||||
.onTapGesture {
|
||||
taps += 1
|
||||
print("Clicked \(taps) times")
|
||||
log("Clicked \(taps) times")
|
||||
|
||||
if taps == 5 {
|
||||
|
||||
sendLoggingString()
|
||||
print("Copied log to clipboard")
|
||||
log("Copied log to clipboard")
|
||||
|
||||
taps = 0
|
||||
}
|
||||
@@ -147,7 +147,7 @@ func sendLoggingString() {
|
||||
|
||||
func sendEmailWithAttachment(fileURL: URL, recipients: [String], subject: String) {
|
||||
guard let emailService = NSSharingService(named: .composeEmail) else {
|
||||
print("No email service available")
|
||||
log("No email service available")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -533,11 +533,11 @@ public class SaveFilesManager {
|
||||
return url
|
||||
}
|
||||
} else {
|
||||
print("Bookmark is stale, using default downloads folder.")
|
||||
log("Bookmark is stale, using default downloads folder.")
|
||||
}
|
||||
|
||||
} catch {
|
||||
print("Failed to resolve bookmark: \(error), using default downloads folder.")
|
||||
log("Failed to resolve bookmark: \(error), using default downloads folder.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -707,7 +707,7 @@
|
||||
buildSettings = {
|
||||
CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = "${SHARED_BUILD}";
|
||||
@@ -739,7 +739,7 @@
|
||||
buildSettings = {
|
||||
CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = "${SHARED_BUILD}";
|
||||
@@ -899,7 +899,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = NearDrop/NearDrop.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = "${SHARED_BUILD}";
|
||||
@@ -938,7 +938,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = NearDrop/NearDrop.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = "${SHARED_BUILD}";
|
||||
|
||||
Reference in new issue
Block a user