mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-11 02:51:11 +00:00
Fix compilation for iOS
This commit is contained in:
1 parent
d2fc94df75
commit
273b7459d8
14 files changed
+367
-27
No files matched your search
@@ -5,7 +5,6 @@
|
||||
// Created by Grishka on 08.04.2023.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import CommonCrypto
|
||||
import CryptoKit
|
||||
import Foundation
|
||||
@@ -14,6 +13,12 @@ import System
|
||||
import BigInt
|
||||
import SwiftECC
|
||||
|
||||
#if os(macOS)
|
||||
import AppKit
|
||||
#else
|
||||
import UIKit
|
||||
#endif
|
||||
|
||||
class InboundNearbyConnection: NearbyConnection {
|
||||
|
||||
private var filesToBeReceived: [Int64: InternalFileInfo] = [:]
|
||||
@@ -148,7 +153,9 @@ class InboundNearbyConnection: NearbyConnection {
|
||||
else if (frame.payloadChunk.flags & 1) == 1 {
|
||||
try fileInfo.fileHandle?.close()
|
||||
filesToBeReceived[id]!.fileHandle = nil
|
||||
#if os(macOS)
|
||||
fileInfo.progress?.unpublish()
|
||||
#endif
|
||||
SaveFilesManager.shared.registerFileFinishedDownloading(fileInfo.destinationURL)
|
||||
|
||||
filesToBeReceived.removeValue(forKey: id)
|
||||
@@ -166,15 +173,27 @@ class InboundNearbyConnection: NearbyConnection {
|
||||
if let urlStr = String(data: payload, encoding: .utf8) {
|
||||
|
||||
if isPlainTextTransfer {
|
||||
// paste to clipboard
|
||||
#if os(macOS)
|
||||
// macOS clipboard
|
||||
let pasteboard = NSPasteboard.general
|
||||
pasteboard.clearContents()
|
||||
pasteboard.setString(urlStr, forType: .string)
|
||||
|
||||
NearbyConnectionManager.shared.mainAppDelegate?.showCopiedToClipboardAlert()
|
||||
}
|
||||
else if let url = URL(string: urlStr) {
|
||||
|
||||
#elseif os(iOS)
|
||||
// iOS clipboard
|
||||
UIPasteboard.general.string = urlStr
|
||||
|
||||
// Optionally show an alert (requires a way to present it)
|
||||
// For example, post a notification or use a delegate to show a toast or alert
|
||||
#endif
|
||||
} else if let url = URL(string: urlStr) {
|
||||
#if os(macOS)
|
||||
NSWorkspace.shared.open(url)
|
||||
#elseif os(iOS)
|
||||
UIApplication.shared.open(url, options: [:], completionHandler: nil)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,7 +207,9 @@ class InboundNearbyConnection: NearbyConnection {
|
||||
fileInfo.progress?.completedUnitCount = filesToBeReceived[id]!.bytesTransferred
|
||||
try fileInfo.fileHandle?.close()
|
||||
filesToBeReceived[id]!.fileHandle = nil
|
||||
#if os(macOS)
|
||||
fileInfo.progress?.unpublish()
|
||||
#endif
|
||||
filesToBeReceived.removeValue(forKey: id)
|
||||
SaveFilesManager.shared.registerFileFinishedDownloading(fileInfo.destinationURL)
|
||||
|
||||
@@ -477,7 +498,9 @@ class InboundNearbyConnection: NearbyConnection {
|
||||
progress.totalUnitCount = file.meta.size
|
||||
progress.kind = .file
|
||||
progress.isPausable = false
|
||||
#if os(macOS)
|
||||
progress.publish()
|
||||
#endif
|
||||
filesToBeReceived[id]!.progress = progress
|
||||
filesToBeReceived[id]!.created = true
|
||||
}
|
||||
@@ -518,9 +541,11 @@ class InboundNearbyConnection: NearbyConnection {
|
||||
private func deletePartiallyReceivedFiles() {
|
||||
for (_, file) in filesToBeReceived {
|
||||
|
||||
#if os(macOS)
|
||||
if let progress = file.progress {
|
||||
progress.unpublish()
|
||||
}
|
||||
#endif
|
||||
|
||||
guard file.created else { continue }
|
||||
do {
|
||||
|
||||
@@ -9,6 +9,9 @@ import Foundation
|
||||
import Network
|
||||
import System
|
||||
|
||||
#if os(iOS)
|
||||
import UIKit
|
||||
#endif
|
||||
|
||||
public class NearbyConnectionManager: NSObject, NetServiceDelegate, InboundNearbyConnectionDelegate, OutboundNearbyConnectionDelegate {
|
||||
|
||||
@@ -90,20 +93,29 @@ public class NearbyConnectionManager: NSObject, NetServiceDelegate, InboundNearb
|
||||
]
|
||||
|
||||
let name = Data(nameBytes).urlSafeBase64EncodedString()
|
||||
let endpointInfo = EndpointInfo(name: Host.current().localizedName!, deviceType: .computer)
|
||||
|
||||
let port = Int32(tcpListener.port!.rawValue)
|
||||
|
||||
mdnsServices = serviceTypes.map { serviceType in
|
||||
let service = NetService(domain: "", type: serviceType, name: name, port: port)
|
||||
service.delegate = self
|
||||
service.setTXTRecord(NetService.data(fromTXTRecord: [
|
||||
"n": endpointInfo.serialize().urlSafeBase64EncodedString().data(using: .utf8)!,
|
||||
"n": getEndpointInfo().serialize().urlSafeBase64EncodedString().data(using: .utf8)!,
|
||||
]))
|
||||
service.publish()
|
||||
return service
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func getEndpointInfo() -> EndpointInfo {
|
||||
#if os(macOS)
|
||||
let endpointInfo = EndpointInfo(name: Host.current().localizedName!, deviceType: .computer)
|
||||
#else
|
||||
let endpointInfo = EndpointInfo(name: UIDevice.current.name, deviceType: .phone)
|
||||
#endif
|
||||
|
||||
return endpointInfo
|
||||
}
|
||||
|
||||
|
||||
func obtainUserConsent(for transfer: TransferMetadata, from device: RemoteDeviceInfo, connection _: InboundNearbyConnection) {
|
||||
|
||||
@@ -165,14 +165,16 @@ class OutboundNearbyConnection: NearbyConnection {
|
||||
|
||||
|
||||
private func sendConnectionRequest() throws {
|
||||
|
||||
let endpointInfo = NearbyConnectionManager.shared.getEndpointInfo()
|
||||
|
||||
var frame = Location_Nearby_Connections_OfflineFrame()
|
||||
frame.version = .v1
|
||||
frame.v1 = Location_Nearby_Connections_V1Frame()
|
||||
frame.v1.type = .connectionRequest
|
||||
frame.v1.connectionRequest = Location_Nearby_Connections_ConnectionRequestFrame()
|
||||
frame.v1.connectionRequest.endpointID = String(bytes: NearbyConnectionManager.shared.endpointID, encoding: .ascii)!
|
||||
frame.v1.connectionRequest.endpointName = Host.current().localizedName!
|
||||
let endpointInfo = EndpointInfo(name: Host.current().localizedName!, deviceType: .computer)
|
||||
frame.v1.connectionRequest.endpointName = endpointInfo.name
|
||||
frame.v1.connectionRequest.endpointInfo = endpointInfo.serialize()
|
||||
frame.v1.connectionRequest.mediums = [.wifiLan]
|
||||
try sendFrameAsync(frame.serializedData())
|
||||
|
||||
File renamed without changes.
@@ -6,8 +6,10 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import AppKit
|
||||
import ImageIO
|
||||
#if os(macOS)
|
||||
import AppKit
|
||||
#endif
|
||||
|
||||
public class SaveFilesManager {
|
||||
|
||||
@@ -88,11 +90,15 @@ public class SaveFilesManager {
|
||||
progress.totalUnitCount = 10
|
||||
progress.kind = .file
|
||||
progress.isPausable = false
|
||||
#if os(macOS)
|
||||
progress.publish()
|
||||
#endif
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
||||
progress.completedUnitCount = 10
|
||||
#if os(macOS)
|
||||
progress.unpublish()
|
||||
#endif
|
||||
}
|
||||
|
||||
try fileManager.removeItem(at: file)
|
||||
@@ -110,10 +116,12 @@ public class SaveFilesManager {
|
||||
|
||||
if !filesFinishedDownloadingSinceLastRun.isEmpty && !isFileTransferRestricted() {
|
||||
|
||||
#if os(macOS)
|
||||
if UserDefaults.standard.bool(forKey: UserDefaultsKeys.openFinderAfterReceiving.rawValue) {
|
||||
log("Opening \(filesFinishedDownloadingSinceLastRun.count) file(s) in Finder.")
|
||||
NSWorkspace.shared.activateFileViewerSelecting(filesFinishedDownloadingSinceLastRun)
|
||||
}
|
||||
#endif
|
||||
|
||||
// Clear the list of finished files
|
||||
filesFinishedDownloadingSinceLastRun.removeAll()
|
||||
@@ -143,6 +151,8 @@ public class SaveFilesManager {
|
||||
if let bookmarkData = UserDefaults.standard.data(forKey: UserDefaultsKeys.saveFolderBookmark.rawValue) {
|
||||
var isStale = false
|
||||
|
||||
// Not supported on iOS
|
||||
#if os(macOS)
|
||||
do {
|
||||
let url = try URL(resolvingBookmarkData: bookmarkData, options: .withSecurityScope, relativeTo: nil, bookmarkDataIsStale: &isStale)
|
||||
|
||||
@@ -160,6 +170,7 @@ public class SaveFilesManager {
|
||||
} catch {
|
||||
log("Failed to resolve bookmark: \(error), using default downloads folder.")
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
do {
|
||||
|
||||
@@ -6,12 +6,21 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
#if os(macOS)
|
||||
import IOKit
|
||||
import IOKit.pwr_mgt
|
||||
#elseif os(iOS)
|
||||
import UIKit
|
||||
#endif
|
||||
|
||||
class SleepManager {
|
||||
public static let shared = SleepManager()
|
||||
|
||||
#if os(macOS)
|
||||
private var assertionID: IOPMAssertionID = 0
|
||||
#endif
|
||||
|
||||
private var timer: Timer?
|
||||
|
||||
private init() {
|
||||
@@ -24,28 +33,35 @@ class SleepManager {
|
||||
}
|
||||
|
||||
private func disableSleep() {
|
||||
if assertionID != 0 {
|
||||
return
|
||||
}
|
||||
#if os(macOS)
|
||||
if assertionID != 0 { return }
|
||||
|
||||
log("[SleepManager] Enabling Wakelock")
|
||||
|
||||
|
||||
IOPMAssertionCreateWithName(
|
||||
kIOPMAssertionTypePreventUserIdleDisplaySleep as CFString,
|
||||
IOPMAssertionLevel(kIOPMAssertionLevelOn),
|
||||
"QuickDrop Data Transfer" as CFString,
|
||||
&assertionID
|
||||
)
|
||||
#elseif os(iOS)
|
||||
log("[SleepManager] Keeping screen awake (iOS)")
|
||||
UIApplication.shared.isIdleTimerDisabled = true
|
||||
#endif
|
||||
}
|
||||
|
||||
private func enableSleep() {
|
||||
if assertionID == 0 {
|
||||
return
|
||||
}
|
||||
#if os(macOS)
|
||||
if assertionID == 0 { return }
|
||||
|
||||
log("[SleepManager] Disabling Wakelock")
|
||||
|
||||
IOPMAssertionRelease(assertionID)
|
||||
assertionID = 0
|
||||
#elseif os(iOS)
|
||||
log("[SleepManager] Allowing screen to sleep (iOS)")
|
||||
UIApplication.shared.isIdleTimerDisabled = false
|
||||
#endif
|
||||
}
|
||||
|
||||
private func updateSleepState() {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 60;
|
||||
objectVersion = 70;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
@@ -55,6 +55,25 @@
|
||||
EB5C37D82E377ACF0052EFD7 /* SwiftECC in Frameworks */ = {isa = PBXBuildFile; productRef = EB5C37D72E377ACF0052EFD7 /* SwiftECC */; };
|
||||
EB5C37DA2E377AD60052EFD7 /* SwiftProtobuf in Frameworks */ = {isa = PBXBuildFile; productRef = EB5C37D92E377AD60052EFD7 /* SwiftProtobuf */; };
|
||||
EB5C37DC2E377AD60052EFD7 /* SwiftECC in Frameworks */ = {isa = PBXBuildFile; productRef = EB5C37DB2E377AD60052EFD7 /* SwiftECC */; };
|
||||
EB5C37EE2E377C3F0052EFD7 /* SwiftProtobuf in Frameworks */ = {isa = PBXBuildFile; productRef = EB5C37ED2E377C3F0052EFD7 /* SwiftProtobuf */; };
|
||||
EB5C37F02E377C3F0052EFD7 /* SwiftECC in Frameworks */ = {isa = PBXBuildFile; productRef = EB5C37EF2E377C3F0052EFD7 /* SwiftECC */; };
|
||||
EB5C37F12E377CE70052EFD7 /* ukey.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69DA9A2829E18CB500A442DA /* ukey.pb.swift */; };
|
||||
EB5C37F22E377CE70052EFD7 /* NearbyConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 698DFAE529E2F91A0064F247 /* NearbyConnection.swift */; };
|
||||
EB5C37F32E377CE70052EFD7 /* SaveFilesManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB5C36E62E3544FB0052EFD7 /* SaveFilesManager.swift */; };
|
||||
EB5C37F42E377CE70052EFD7 /* NearbyConnectionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69DA9A1E29E0C0B300A442DA /* NearbyConnectionManager.swift */; };
|
||||
EB5C37F52E377CE70052EFD7 /* securemessage.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69DA9A2D29E18CB500A442DA /* securemessage.pb.swift */; };
|
||||
EB5C37F62E377CE70052EFD7 /* device_to_device_messages.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69DA9A2A29E18CB500A442DA /* device_to_device_messages.pb.swift */; };
|
||||
EB5C37F72E377CE70052EFD7 /* ConnectionFailureTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB6E743D2DD5C76F00331466 /* ConnectionFailureTracker.swift */; };
|
||||
EB5C37F82E377CE70052EFD7 /* SleepManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB2B41E32DC63AC80070FC39 /* SleepManager.swift */; };
|
||||
EB5C37F92E377CE70052EFD7 /* securegcm.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69DA9A2C29E18CB500A442DA /* securegcm.pb.swift */; };
|
||||
EB5C37FA2E377CE70052EFD7 /* Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB2F9BFA2DA04B67004010A2 /* Helpers.swift */; };
|
||||
EB5C37FB2E377CE70052EFD7 /* InboundNearbyConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69DA9A2229E17F0400A442DA /* InboundNearbyConnection.swift */; };
|
||||
EB5C37FC2E377CE70052EFD7 /* OutboundNearbyConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 691F53BD2ABF03820089FD92 /* OutboundNearbyConnection.swift */; };
|
||||
EB5C37FD2E377CE70052EFD7 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB7CD1442D6FB0C100CB0CB5 /* Logger.swift */; };
|
||||
EB5C37FE2E377CE70052EFD7 /* offline_wire_formats.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69DA9A2B29E18CB500A442DA /* offline_wire_formats.pb.swift */; };
|
||||
EB5C37FF2E377CE70052EFD7 /* wire_format.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69DA9A2929E18CB500A442DA /* wire_format.pb.swift */; };
|
||||
EB5C38002E377CE70052EFD7 /* DataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB5C36E82E3546100052EFD7 /* DataModel.swift */; };
|
||||
EB5C38012E377DE60052EFD7 /* Localized.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB96ED8E2D7F8103004B3FF1 /* Localized.swift */; };
|
||||
EB6F62D72D91F4AF00534EC2 /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB6F62D62D91F4AC00534EC2 /* SettingsView.swift */; };
|
||||
EB7CD1452D6FB0C300CB0CB5 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB7CD1442D6FB0C100CB0CB5 /* Logger.swift */; };
|
||||
EB7CD1462D6FB0E800CB0CB5 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB7CD1442D6FB0C100CB0CB5 /* Logger.swift */; };
|
||||
@@ -181,6 +200,7 @@
|
||||
EB5C36E32E34EC0E0052EFD7 /* License.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = License.txt; sourceTree = "<group>"; };
|
||||
EB5C36E62E3544FB0052EFD7 /* SaveFilesManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SaveFilesManager.swift; sourceTree = "<group>"; };
|
||||
EB5C36E82E3546100052EFD7 /* DataModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataModel.swift; sourceTree = "<group>"; };
|
||||
EB5C37E22E377C2E0052EFD7 /* QuickDropiOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = QuickDropiOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EB6E743D2DD5C76F00331466 /* ConnectionFailureTracker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionFailureTracker.swift; sourceTree = "<group>"; };
|
||||
EB6F62D62D91F4AC00534EC2 /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
|
||||
EB7CD1442D6FB0C100CB0CB5 /* Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = "<group>"; };
|
||||
@@ -204,6 +224,10 @@
|
||||
EBD2A2162D2860BE00BCB8E2 /* WelcomeScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeScreen.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
||||
EB5C37E32E377C2E0052EFD7 /* QuickDropiOS */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = QuickDropiOS; sourceTree = "<group>"; };
|
||||
/* End PBXFileSystemSynchronizedRootGroup section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
699DEB9E2AB0573200115D22 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
@@ -224,6 +248,15 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EB5C37DF2E377C2E0052EFD7 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EB5C37F02E377C3F0052EFD7 /* SwiftECC in Frameworks */,
|
||||
EB5C37EE2E377C3F0052EFD7 /* SwiftProtobuf in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
@@ -254,6 +287,7 @@
|
||||
69DA9A1029E0BF5100A442DA /* QuickDrop */,
|
||||
699DEBA22AB0573200115D22 /* ShareExtension */,
|
||||
69DCF4822AB70D0600CBE2CC /* NearbyShare */,
|
||||
EB5C37E32E377C2E0052EFD7 /* QuickDropiOS */,
|
||||
698DFAEC29E353220064F247 /* Frameworks */,
|
||||
69DA9A0F29E0BF5100A442DA /* Products */,
|
||||
EBC05C8B2E33B59E00EECC18 /* Resources */,
|
||||
@@ -265,6 +299,7 @@
|
||||
children = (
|
||||
69DA9A0E29E0BF5100A442DA /* QuickDrop.app */,
|
||||
699DEBA12AB0573200115D22 /* QuickDropShareExtension.appex */,
|
||||
EB5C37E22E377C2E0052EFD7 /* QuickDropiOS.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -323,6 +358,7 @@
|
||||
EB5C371C2E3669010052EFD7 /* Util */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EB96ED8E2D7F8103004B3FF1 /* Localized.swift */,
|
||||
EB2B41E32DC63AC80070FC39 /* SleepManager.swift */,
|
||||
EB7CD1442D6FB0C100CB0CB5 /* Logger.swift */,
|
||||
EB5C36E62E3544FB0052EFD7 /* SaveFilesManager.swift */,
|
||||
@@ -390,7 +426,6 @@
|
||||
children = (
|
||||
EB36435F2D73A29F009CDFF8 /* AudioManager.swift */,
|
||||
EBC05C5A2E33936C00EECC18 /* ErrorAlertHandler.swift */,
|
||||
EB96ED8E2D7F8103004B3FF1 /* Localized.swift */,
|
||||
);
|
||||
path = Util;
|
||||
sourceTree = "<group>";
|
||||
@@ -482,6 +517,30 @@
|
||||
productReference = 69DA9A0E29E0BF5100A442DA /* QuickDrop.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
EB5C37E12E377C2E0052EFD7 /* QuickDropiOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = EB5C37EA2E377C310052EFD7 /* Build configuration list for PBXNativeTarget "QuickDropiOS" */;
|
||||
buildPhases = (
|
||||
EB5C37DE2E377C2E0052EFD7 /* Sources */,
|
||||
EB5C37DF2E377C2E0052EFD7 /* Frameworks */,
|
||||
EB5C37E02E377C2E0052EFD7 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
fileSystemSynchronizedGroups = (
|
||||
EB5C37E32E377C2E0052EFD7 /* QuickDropiOS */,
|
||||
);
|
||||
name = QuickDropiOS;
|
||||
packageProductDependencies = (
|
||||
EB5C37ED2E377C3F0052EFD7 /* SwiftProtobuf */,
|
||||
EB5C37EF2E377C3F0052EFD7 /* SwiftECC */,
|
||||
);
|
||||
productName = QuickDropiOS;
|
||||
productReference = EB5C37E22E377C2E0052EFD7 /* QuickDropiOS.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
@@ -489,8 +548,8 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = 1;
|
||||
LastSwiftUpdateCheck = 1430;
|
||||
LastUpgradeCheck = 1620;
|
||||
LastSwiftUpdateCheck = 1640;
|
||||
LastUpgradeCheck = 1640;
|
||||
TargetAttributes = {
|
||||
699DEBA02AB0573200115D22 = {
|
||||
CreatedOnToolsVersion = 14.3.1;
|
||||
@@ -499,6 +558,9 @@
|
||||
CreatedOnToolsVersion = 14.3;
|
||||
LastSwiftMigration = 1430;
|
||||
};
|
||||
EB5C37E12E377C2E0052EFD7 = {
|
||||
CreatedOnToolsVersion = 16.4;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 69DA9A0929E0BF5100A442DA /* Build configuration list for PBXProject "QuickDrop" */;
|
||||
@@ -537,6 +599,7 @@
|
||||
targets = (
|
||||
69DA9A0D29E0BF5100A442DA /* QuickDrop */,
|
||||
699DEBA02AB0573200115D22 /* QuickDropShareExtension */,
|
||||
EB5C37E12E377C2E0052EFD7 /* QuickDropiOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -566,6 +629,13 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EB5C37E02E377C2E0052EFD7 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
@@ -646,6 +716,30 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EB5C37DE2E377C2E0052EFD7 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EB5C37F12E377CE70052EFD7 /* ukey.pb.swift in Sources */,
|
||||
EB5C37F22E377CE70052EFD7 /* NearbyConnection.swift in Sources */,
|
||||
EB5C37F32E377CE70052EFD7 /* SaveFilesManager.swift in Sources */,
|
||||
EB5C37F42E377CE70052EFD7 /* NearbyConnectionManager.swift in Sources */,
|
||||
EB5C37F52E377CE70052EFD7 /* securemessage.pb.swift in Sources */,
|
||||
EB5C37F62E377CE70052EFD7 /* device_to_device_messages.pb.swift in Sources */,
|
||||
EB5C37F72E377CE70052EFD7 /* ConnectionFailureTracker.swift in Sources */,
|
||||
EB5C37F82E377CE70052EFD7 /* SleepManager.swift in Sources */,
|
||||
EB5C38012E377DE60052EFD7 /* Localized.swift in Sources */,
|
||||
EB5C37F92E377CE70052EFD7 /* securegcm.pb.swift in Sources */,
|
||||
EB5C37FA2E377CE70052EFD7 /* Helpers.swift in Sources */,
|
||||
EB5C37FB2E377CE70052EFD7 /* InboundNearbyConnection.swift in Sources */,
|
||||
EB5C37FC2E377CE70052EFD7 /* OutboundNearbyConnection.swift in Sources */,
|
||||
EB5C37FD2E377CE70052EFD7 /* Logger.swift in Sources */,
|
||||
EB5C37FE2E377CE70052EFD7 /* offline_wire_formats.pb.swift in Sources */,
|
||||
EB5C37FF2E377CE70052EFD7 /* wire_format.pb.swift in Sources */,
|
||||
EB5C38002E377CE70052EFD7 /* DataModel.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
@@ -679,7 +773,6 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = "${SHARED_BUILD}";
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 92SDAWLN76;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = ShareExtension/Info.plist;
|
||||
@@ -712,7 +805,6 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = "${SHARED_BUILD}";
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 92SDAWLN76;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = ShareExtension/Info.plist;
|
||||
@@ -772,6 +864,7 @@
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DEVELOPMENT_TEAM = 92SDAWLN76;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
@@ -840,6 +933,7 @@
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = 92SDAWLN76;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||
@@ -877,7 +971,6 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = "${SHARED_BUILD}";
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 92SDAWLN76;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = QuickDrop/Info.plist;
|
||||
@@ -918,7 +1011,6 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = "${SHARED_BUILD}";
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 92SDAWLN76;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = QuickDrop/Info.plist;
|
||||
@@ -945,6 +1037,76 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
EB5C37EB2E377C310052EFD7 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 18.5;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.0;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.leonboettger.neardrop;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
EB5C37EC2E377C310052EFD7 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 18.5;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.0;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.leonboettger.neardrop;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
@@ -975,6 +1137,15 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
EB5C37EA2E377C310052EFD7 /* Build configuration list for PBXNativeTarget "QuickDropiOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
EB5C37EB2E377C310052EFD7 /* Debug */,
|
||||
EB5C37EC2E377C310052EFD7 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
|
||||
/* Begin XCRemoteSwiftPackageReference section */
|
||||
@@ -1030,6 +1201,16 @@
|
||||
package = 69DA9A3429E1994C00A442DA /* XCRemoteSwiftPackageReference "SwiftECC" */;
|
||||
productName = SwiftECC;
|
||||
};
|
||||
EB5C37ED2E377C3F0052EFD7 /* SwiftProtobuf */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 69DA9A2429E189EF00A442DA /* XCRemoteSwiftPackageReference "swift-protobuf" */;
|
||||
productName = SwiftProtobuf;
|
||||
};
|
||||
EB5C37EF2E377C3F0052EFD7 /* SwiftECC */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 69DA9A3429E1994C00A442DA /* XCRemoteSwiftPackageReference "SwiftECC" */;
|
||||
productName = SwiftECC;
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
};
|
||||
rootObject = 69DA9A0629E0BF5100A442DA /* Project object */;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1620"
|
||||
LastUpgradeVersion = "1640"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1620"
|
||||
LastUpgradeVersion = "1640"
|
||||
wasCreatedForAppExtension = "YES"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "tinted"
|
||||
}
|
||||
],
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// ContentView.swift
|
||||
// QuickDropiOS
|
||||
//
|
||||
// Created by Leon Böttger on 28.07.25.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ContentView: View {
|
||||
var body: some View {
|
||||
VStack {
|
||||
Image(systemName: "globe")
|
||||
.imageScale(.large)
|
||||
.foregroundStyle(.tint)
|
||||
Text("Hello, world!")
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ContentView()
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// QuickDropiOSApp.swift
|
||||
// QuickDropiOS
|
||||
//
|
||||
// Created by Leon Böttger on 28.07.25.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
struct QuickDropiOSApp: App {
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user