mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-25 15:56:02 +00:00
fix: relaunching of iOS app would stop advertising
This commit is contained in:
1 parent
9d71ed35b7
commit
7d6d0f3482
6 files changed
+66
-14
No files matched your search
@@ -24,14 +24,8 @@ final class LogManager {
|
||||
|
||||
/// Private initializer
|
||||
private init() {
|
||||
|
||||
#if os(macOS)
|
||||
// Use the App Group container
|
||||
let directory = getAppGroupDirectory()
|
||||
#else
|
||||
// On iOS, use the library directory, to not let the logs appear in the files app
|
||||
let directory = FileManager.default.urls(for: .libraryDirectory, in: .userDomainMask).first
|
||||
#endif
|
||||
|
||||
// Create file name from date
|
||||
let formatter = DateFormatter()
|
||||
@@ -133,7 +127,7 @@ public func log(_ text: String) {
|
||||
|
||||
|
||||
/// Returns the shared App Group directory
|
||||
fileprivate func getAppGroupDirectory() -> URL? {
|
||||
func getAppGroupDirectory() -> URL? {
|
||||
let groupIdentifier = "group.com.leonboettger.neardrop"
|
||||
return FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: groupIdentifier)
|
||||
}
|
||||
Reference in new issue
Block a user