From fbe41991b718169522802ae07169407f988a7f22 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sun, 6 Oct 2019 10:54:24 +0100 Subject: [PATCH 01/42] Fixes not being able to change to timelapse on a7iii due to setShootMode erroring if re-setting to current value --- .../Sony/Camera/SonyCamera.swift | 74 +++++++++++++------ 1 file changed, 50 insertions(+), 24 deletions(-) diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift index e457cd0..6b3f550 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift @@ -312,18 +312,18 @@ extension SonyCameraDevice: Camera { return } - switchCameraToRequiredFunctionFor(function) { [weak self] (error) in + switchCameraToRequiredFunctionFor(function) { [weak self] (fnError) in - guard let this = self, error == nil else { - callback(error) + guard let this = self, fnError == nil else { + callback(fnError) return } switch function.function { case .takePicture, .startContinuousShooting, .startBulbCapture: - camera.setShootMode(.photo, completion: { [weak this] (error) in - + this.setToShootModeIfRequired(camera: camera, shootMode: .photo) { [weak this] (error) in + switch function.function { case .startContinuousShooting: this?.setShutterSpeedAwayFromBulbIfRequired(camera: camera, { (_) in @@ -383,31 +383,23 @@ extension SonyCameraDevice: Camera { }) }) } - }) + } case .startIntervalStillRecording: - this.setShutterSpeedAwayFromBulbIfRequired(camera: camera, { (_) in - camera.setShootMode(.interval, completion: { (error) in - callback(error) - }) + this.setShutterSpeedAwayFromBulbIfRequired(camera: camera, { [weak this] (_) in + this?.setToShootModeIfRequired(camera: camera, shootMode: .interval, callback) }) case .startAudioRecording: - this.setShutterSpeedAwayFromBulbIfRequired(camera: camera, { (_) in - camera.setShootMode(.audio, completion: { (error) in - callback(error) - }) + this.setShutterSpeedAwayFromBulbIfRequired(camera: camera, { [weak this] (_) in + this?.setToShootModeIfRequired(camera: camera, shootMode: .audio, callback) }) case .startVideoRecording: - this.setShutterSpeedAwayFromBulbIfRequired(camera: camera, { (_) in - camera.setShootMode(.video, completion: { (error) in - callback(error) - }) + this.setShutterSpeedAwayFromBulbIfRequired(camera: camera, { [weak this] (_) in + this?.setToShootModeIfRequired(camera: camera, shootMode: .video, callback) }) case .startLoopRecording: - this.setShutterSpeedAwayFromBulbIfRequired(camera: camera, { (_) in - camera.setShootMode(.loop, completion: { (error) in - callback(error) - }) + this.setShutterSpeedAwayFromBulbIfRequired(camera: camera, { [weak this] (_) in + this?.setToShootModeIfRequired(camera: camera, shootMode: .loop, callback) }) default: callback(nil) @@ -415,16 +407,50 @@ extension SonyCameraDevice: Camera { } } + private func setToShootModeIfRequired(camera: CameraClient, shootMode: ShootingMode, _ completion: @escaping ((Error?) -> Void)) { + + // Last shoot mode should be up to date so do a quick check if we're already in the correct shoot mode + guard lastShootMode != shootMode else { + completion(nil) + return + } + + // Some cameras throw error if we try and set shoot mode to it's current value, so let's do a last-ditch attempt to check current shoot mode before changing + camera.getShootMode { (result) in + switch result { + case .success(let currentMode): + guard currentMode != shootMode else { + completion(nil) + return + } + camera.setShootMode(shootMode, completion: { [weak self] (error) in + completion(error) + guard error == nil else { + return + } + self?.lastShootMode = shootMode + }) + case .failure(_): + camera.setShootMode(shootMode, completion: { [weak self] (error) in + completion(error) + guard error == nil else { + return + } + self?.lastShootMode = shootMode + }) + } + } + } + private func setShutterSpeedAwayFromBulbIfRequired(camera: CameraClient, _ callback: @escaping ((Error?) -> Void)) { // We need to do this otherwise the camera can get stuck in continuous shooting mode! // If the shutter speed is BULB then we need to set it to something else! guard self.lastShutterSpeed?.isBulb == true else { - callback(nil) - return } + // Get available shutter speeds camera.getAvailableShutterSpeeds({ (shutterSpeedResults) in switch shutterSpeedResults { From e3c8b79650e0e9bfb7443fead49d2efc5c694abc Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sun, 6 Oct 2019 15:54:41 +0100 Subject: [PATCH 02/42] Adds bulbShootingUrl to event capture! --- .../Sony/API/CameraClient.swift | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift b/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift index 8bb3d9f..81ea0e3 100644 --- a/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift +++ b/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift @@ -296,12 +296,24 @@ fileprivate extension CameraEvent { var _audioRecording: (current: String, available: [String])? var _windNoiseReduction: (current: String, available: [String])? var _bulbCapturingTime: TimeInterval? + var _bulbShootingURL: URL? result.forEach { (eventElement) in if let dictionaryElement = eventElement as? [AnyHashable : Any], let type = dictionaryElement["type"] as? String { switch type { + case "bulbShooting": + guard let urlArrays = dictionaryElement["bulbShootingUrl"] as? [[AnyHashable : Any]] else { + return + } + guard let urlString = urlArrays.compactMap({ (dict) -> String? in + dict["postviewUrl"] as? String + }).first else { + return + } + _bulbShootingURL = URL(string: urlString) + break case "availableApiList": _apiList = dictionaryElement["names"] as? [String] case "cameraStatus": @@ -606,8 +618,7 @@ fileprivate extension CameraEvent { audioRecording = _audioRecording windNoiseReduction = _windNoiseReduction bulbCapturingTime = _bulbCapturingTime - //TODO: Add this in! - bulbShootingUrl = nil + bulbShootingUrl = _bulbShootingURL } } From dd016e4b8a5f425401576b89b09b2ce8ef090b10 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sun, 6 Oct 2019 16:13:05 +0100 Subject: [PATCH 03/42] Adds new camera models! --- .../Sony/Camera/SonyCamera+Model.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift index b4fd255..1b8fa12 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift @@ -17,6 +17,7 @@ extension SonyCameraDevice { case a7r = "ILCE-7R" case a7rii = "ILCE-7RM2" case a7riii = "ILCE-7RM3" + case a7riv = "ILCE-7RM4" case a7s = "ILCE-7S" case a7sii = "ILCE-7SM2" case a7siii = "ILCE-7SM3" @@ -24,8 +25,11 @@ extension SonyCameraDevice { case a5000 = "ILCE-5000" case a5100 = "ILCE-5100" case a6000 = "ILCE-6000" + case a6100 = "ILCE-6100" case a6300 = "ILCE-6300" + case a6400 = "ILCE-6400" case a6500 = "ILCE-6500" + case a6600 = "ILCE-6600" case cyberShot_HX60 = "DSC-HX60" case cyberShot_HX60V = "DSC-HX60V" case cyberShot_HX80 = "DSC-HX80" @@ -68,6 +72,7 @@ extension SonyCameraDevice { case .a7r: return "ɑ7R" case .a7rii: return "ɑ7R II" case .a7riii: return "ɑ7R III" + case .a7riv: return "ɑ7R IV" case .a7s: return "ɑ7S" case .a7sii: return "ɑ7S II" case .a7siii: return "ɑ7S III" @@ -75,8 +80,11 @@ extension SonyCameraDevice { case .a5000: return "ɑ5000" case .a5100: return "ɑ5100" case .a6000: return "ɑ6000" + case .a6100: return "ɑ6100" case .a6300: return "ɑ6300" + case .a6400: return "ɑ6400" case .a6500: return "ɑ6500" + case .a6600: return "ɑ6600" case .cyberShot_HX60: return "Cyber-Shot HX60" case .cyberShot_HX60V: return "Cyber-Shot HX60V" case .cyberShot_HX80: return "Cyber-Shot HX80" @@ -333,6 +341,8 @@ extension SonyCameraDevice { return "3.00" case .a7iii, .a7riii: return "3.00" + case .a6600, .a6400: + return "2.00" case .a6300: return "2.01" case .a5000: From a2d20fcf3e7ad624752f903c82be3b20330cc448 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sat, 19 Oct 2019 12:20:30 +0100 Subject: [PATCH 04/42] Updates ThunderRequest commit --- ThunderRequest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ThunderRequest b/ThunderRequest index 3b13c58..2523ae9 160000 --- a/ThunderRequest +++ b/ThunderRequest @@ -1 +1 @@ -Subproject commit 3b13c58379614661f15991de6f972e3c42fe8441 +Subproject commit 2523ae9c5dfb74222289b27544764b96b30f8a10 From b9ada3689c91266fd08f9c9d653aab5c9d18a0c4 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Thu, 21 Nov 2019 18:56:36 +0000 Subject: [PATCH 05/42] Fixes image urls for simulated camera --- Rocc/Helpers/SimulatedCamera.swift | 53 +++++++++++++++--------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/Rocc/Helpers/SimulatedCamera.swift b/Rocc/Helpers/SimulatedCamera.swift index eaada05..0e15a14 100644 --- a/Rocc/Helpers/SimulatedCamera.swift +++ b/Rocc/Helpers/SimulatedCamera.swift @@ -49,33 +49,32 @@ extension File { static func dummy(date: Date = Date(), image: Int) -> File { let imageUrls: [String] = [ - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44045288_10205020816115765_8491817313958363136_o.jpg?_nc_cat=106&_nc_ht=scontent-lht6-1.xx&oh=aa827b2d112cf75fc080a114cc6e2111&oe=5CAD1495", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/43951277_10205020817475799_1108877701613092864_o.jpg?_nc_cat=108&_nc_ht=scontent-lht6-1.xx&oh=f945dbf7d98ff96ec8b79420ccd96e8e&oe=5CA1418A", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/43950872_10205020815595752_4593994433954840576_o.jpg?_nc_cat=111&_nc_ht=scontent-lht6-1.xx&oh=5e95e82f1dcfdeaf9703d92271a11876&oe=5CAE3F49", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44028187_10205020839276344_6822412080608444416_o.jpg?_nc_cat=102&_nc_ht=scontent-lht6-1.xx&oh=75b404651427be974f026d358b215561&oe=5C6721FD", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44091308_10205020826996037_485456601528926208_o.jpg?_nc_cat=106&_nc_ht=scontent-lht6-1.xx&oh=47b2e6265ba81862cc04114b51e99785&oe=5C9CEBD7", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44070700_10205020824675979_3158584147081953280_o.jpg?_nc_cat=103&_nc_ht=scontent-lht6-1.xx&oh=0bb093c82f9daf21b49d0b8b7f5f87b6&oe=5C69BD1C", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44062992_10205020823915960_5566386604706103296_o.jpg?_nc_cat=102&_nc_ht=scontent-lht6-1.xx&oh=ab2adaea6bb27b905cbd04bc88675211&oe=5CAF333C", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44023485_10205020821515900_1649964678064898048_o.jpg?_nc_cat=106&_nc_ht=scontent-lht6-1.xx&oh=2c424cf5874dad4235748e2dea06475f&oe=5C63C33C", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44023818_10205020820395872_1540489921649704960_o.jpg?_nc_cat=111&_nc_ht=scontent-lht6-1.xx&oh=64237f21cbdf98c0ad54ac8715b830a8&oe=5C9635A0", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/43952978_10205020819395847_1951748682512596992_o.jpg?_nc_cat=101&_nc_ht=scontent-lht6-1.xx&oh=f78aae8489e1077df6cc3266d3c9ccc7&oe=5CA1232C", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/43952276_10205020818115815_98364814186774528_o.jpg?_nc_cat=106&_nc_ht=scontent-lht6-1.xx&oh=c4dee9f352a34f1e7ad9b2deaf501784&oe=5CAFA3DB", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/43950002_10205020816555776_4810511663855828992_o.jpg?_nc_cat=111&_nc_ht=scontent-lht6-1.xx&oh=f42a92648d41016b2faacdb99ed290ed&oe=5CA7D378", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44022896_10205020815995762_6125466268607709184_o.jpg?_nc_cat=105&_nc_ht=scontent-lht6-1.xx&oh=06690071f0491df3bed00404b4ed4804&oe=5C991E74", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/43951941_10205020815115740_33392133775818752_o.jpg?_nc_cat=105&_nc_ht=scontent-lht6-1.xx&oh=53d47ad3ef1b90f837b48b8234ba1cfb&oe=5CA14DB2", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44037802_10205020814995737_274281400411095040_o.jpg?_nc_cat=109&_nc_ht=scontent-lht6-1.xx&oh=3210f5b051c21004aa297ec02a5169bf&oe=5C65A8E8", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44025050_10205020814195717_8521023804535734272_o.jpg?_nc_cat=107&_nc_ht=scontent-lht6-1.xx&oh=0168dbc2717a88b9e1c68476fd858144&oe=5C691255", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44166137_10205020811755656_6680655795945734144_o.jpg?_nc_cat=100&_nc_ht=scontent-lht6-1.xx&oh=49b136ec2c83b9d1d8a0e5c3b72dfaac&oe=5CA725D6", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44032459_10205020808315570_5469471131528331264_o.jpg?_nc_cat=111&_nc_ht=scontent-lht6-1.xx&oh=c3fae3b3b731fe98a36bbe09358d5e11&oe=5CA56D19", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44023944_10205020808195567_7274851361567539200_o.jpg?_nc_cat=102&_nc_ht=scontent-lht6-1.xx&oh=b6e306129912f6cf557a3c3b4beb2246&oe=5CB088B8", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44028963_10205020807875559_663651414500704256_o.jpg?_nc_cat=100&_nc_ht=scontent-lht6-1.xx&oh=491bfb2e8553f078ec3fcecb6fefd51e&oe=5CA6CF77", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44077180_10205020807475549_6486553158548979712_o.jpg?_nc_cat=101&_nc_ht=scontent-lht6-1.xx&oh=a9e9815ddd1be1ff06b17d850cf55561&oe=5C9A2DCD", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44027774_10205020806955536_5337969364752662528_o.jpg?_nc_cat=107&_nc_ht=scontent-lht6-1.xx&oh=6b63472242657e017db0ae3ccb131e39&oe=5C9FD62A", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/43952377_10205020806595527_3181607508250722304_o.jpg?_nc_cat=101&_nc_ht=scontent-lht6-1.xx&oh=0dec0fb6f44a1a42349dc70fb669839d&oe=5CB03DA2", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44056825_10205020805115490_2152903248187490304_o.jpg?_nc_cat=101&_nc_ht=scontent-lht6-1.xx&oh=4cf2cdd7ee96e5931578811fe01bb4c8&oe=5C674634", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/43952177_10205020804435473_1461334065226448896_o.jpg?_nc_cat=110&_nc_ht=scontent-lht6-1.xx&oh=fa88bda3a10e64da52f50b88af3d21fc&oe=5C671237", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/43950742_10205020801795407_3857080102974128128_o.jpg?_nc_cat=107&_nc_ht=scontent-lht6-1.xx&oh=5d32f7adf9c3d83ff96def1c2e15a445&oe=5C65D719", - "https://scontent-lht6-1.xx.fbcdn.net/v/t1.0-9/44063085_10205020800915385_7307852352671711232_o.jpg?_nc_cat=111&_nc_ht=scontent-lht6-1.xx&oh=cd443d54257a363973231d008b32c3c4&oe=5C65A3BF" + "https://user-images.githubusercontent.com/9033831/69366783-f0057400-0c8e-11ea-9ba6-110b184daf43.jpg", + "https://user-images.githubusercontent.com/9033831/69366786-f09e0a80-0c8e-11ea-95bb-c347c7910881.jpg", + "https://user-images.githubusercontent.com/9033831/69366787-f09e0a80-0c8e-11ea-92b1-f6e63109bde0.jpg", + "https://user-images.githubusercontent.com/9033831/69366788-f09e0a80-0c8e-11ea-8fa0-3f086154110d.jpg", + "https://user-images.githubusercontent.com/9033831/69366789-f136a100-0c8e-11ea-9190-6ea3262b5068.jpg", + "https://user-images.githubusercontent.com/9033831/69366790-f136a100-0c8e-11ea-8eca-d8b25b4ef194.jpg", + "https://user-images.githubusercontent.com/9033831/69366791-f136a100-0c8e-11ea-9592-3e234a08407e.jpg", + "https://user-images.githubusercontent.com/9033831/69366792-f136a100-0c8e-11ea-93e7-36659e4e9120.jpg", + "https://user-images.githubusercontent.com/9033831/69366794-f136a100-0c8e-11ea-9b8c-0d02bd466615.jpg", + "https://user-images.githubusercontent.com/9033831/69366795-f1cf3780-0c8e-11ea-8933-8e12d0cd507d.jpg", + "https://user-images.githubusercontent.com/9033831/69366796-f1cf3780-0c8e-11ea-866d-4157889cb9dd.jpg", + "https://user-images.githubusercontent.com/9033831/69366797-f1cf3780-0c8e-11ea-9057-88cf68158615.jpg", + "https://user-images.githubusercontent.com/9033831/69366800-f1cf3780-0c8e-11ea-9160-48f37c330641.jpg", + "https://user-images.githubusercontent.com/9033831/69366801-f1cf3780-0c8e-11ea-93c9-3b69d5b92039.jpg", + "https://user-images.githubusercontent.com/9033831/69366802-f267ce00-0c8e-11ea-86cb-7ea3facbf4f8.jpg", + "https://user-images.githubusercontent.com/9033831/69366803-f267ce00-0c8e-11ea-92ab-1b2f1aff1834.jpg", + "https://user-images.githubusercontent.com/9033831/69366805-f267ce00-0c8e-11ea-936a-9d50cc8dce21.jpg", + "https://user-images.githubusercontent.com/9033831/69366806-f267ce00-0c8e-11ea-93af-ee86d680a625.jpg", + "https://user-images.githubusercontent.com/9033831/69366807-f3006480-0c8e-11ea-8871-e89d7b890adb.jpg", + "https://user-images.githubusercontent.com/9033831/69366809-f3006480-0c8e-11ea-8f3f-8f3b9f1769e9.jpg", + "https://user-images.githubusercontent.com/9033831/69366811-f3006480-0c8e-11ea-9a9f-0d6018d9689a.jpg", + "https://user-images.githubusercontent.com/9033831/69366812-f3006480-0c8e-11ea-9896-33b82df37aa0.jpg", + "https://user-images.githubusercontent.com/9033831/69366813-f3006480-0c8e-11ea-9c9d-acf4f285c0ca.jpg", + "https://user-images.githubusercontent.com/9033831/69366814-f398fb00-0c8e-11ea-8328-6177325958c5.jpg", + "https://user-images.githubusercontent.com/9033831/69366815-f398fb00-0c8e-11ea-8313-1aed95f64171.jpg", + "https://user-images.githubusercontent.com/9033831/69366817-f398fb00-0c8e-11ea-88df-e7f6f9698366.jpg" ] let index = image % imageUrls.count From daefa38a2a3afb83e45b87a204d879d61396be83 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Thu, 21 Nov 2019 21:56:49 +0000 Subject: [PATCH 06/42] Adds bulb shutter speed to available values --- Rocc/Helpers/SimulatedCamera.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Rocc/Helpers/SimulatedCamera.swift b/Rocc/Helpers/SimulatedCamera.swift index 0e15a14..3ab4b91 100644 --- a/Rocc/Helpers/SimulatedCamera.swift +++ b/Rocc/Helpers/SimulatedCamera.swift @@ -221,7 +221,8 @@ public final class DummyCamera: Camera { ShutterSpeed(numerator: 18, denominator: 1), ShutterSpeed(numerator: 20, denominator: 1), ShutterSpeed(numerator: 25, denominator: 1), - ShutterSpeed(numerator: 30, denominator: 1) + ShutterSpeed(numerator: 30, denominator: 1), + .bulb ] as? [T.SendType]) case .setExposureCompensation: callback(true, nil, [-3.0, -2.66, -2.33, -2.0, -1.66, -1.33, -1.0, -0.66, -0.33, 0, 0.33, 0.66, 1.0, 1.33, 1.66, 2.0, 2.33, 2.66, 3.0] as? [T.SendType]) @@ -291,8 +292,9 @@ public final class DummyCamera: Camera { ShutterSpeed(numerator: 18, denominator: 1), ShutterSpeed(numerator: 20, denominator: 1), ShutterSpeed(numerator: 25, denominator: 1), - ShutterSpeed(numerator: 30, denominator: 1) - ]), + ShutterSpeed(numerator: 30, denominator: 1), + .bulb + ]), whiteBalance: CameraEvent.WhiteBalanceInformation(shouldCheck: true, whitebalanceValue: WhiteBalance.Value(mode: "Daylight", temperature: nil)), touchAF: nil, focusStatus: nil, From b7d3454872093c862eda4e01a4e9b218d8cc75b5 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Thu, 5 Dec 2019 21:03:51 +0000 Subject: [PATCH 07/42] Adds model number for RX100 M2 --- .../Sony/Camera/SonyCamera+Model.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift index 1b8fa12..26226b2 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift @@ -42,6 +42,7 @@ extension SonyCameraDevice { case cyberShot_RX0M2 = "DSC-RX0M2" case cyberShot_RX10M2 = "DSC-RX1RM2" case cyberShot_RX10M3 = "DSC-RX10M3" + case cyberShot_RX100M2 = "DSC-RX100M2" case cyberShot_RX100M3 = "DSC-RX100M3" case cyberShot_RX100M4 = "DSC-RX100M4" case cyberShot_RX100M5 = "DSC-RX100M5" @@ -95,6 +96,7 @@ extension SonyCameraDevice { case .cyberShot_WX500: return "Cyber-Shot WX500" case .cyberShot_RX10M2: return "Cyber-Shot RX1 R II" case .cyberShot_RX10M3: return "Cyber-Shot RX10 III" + case .cyberShot_RX100M2: return "Cyber-Shot RX100 II" case .cyberShot_RX100M3: return "Cyber-Shot RX100 III" case .cyberShot_RX100M4: return "Cyber-Shot RX100 IV" case .cyberShot_RX100M5: return "Cyber-Shot RX100 V" @@ -121,6 +123,10 @@ extension SonyCameraDevice { } } + internal var supportsGetVersions: Bool { + return ![.cyberShot_RX100M2].contains(self) + } + internal static func supporting(function: _CameraFunction) -> [Model] { switch function { // This isn't documented, so let's err on the side of caution! From ad342488f27ef0e3fad09b48512fb9acbc1e002c Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Thu, 5 Dec 2019 21:08:41 +0000 Subject: [PATCH 08/42] Updates connect method to ignore getVersions call for RX100 M2 --- .../Sony/Camera/SonyCamera.swift | 143 +++++++++--------- 1 file changed, 75 insertions(+), 68 deletions(-) diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift index 6b3f550..cd51b70 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift @@ -209,89 +209,96 @@ extension SonyCameraDevice: Camera { return true } - public func connect(completion: @escaping Camera.ConnectedCompletion) { + private func getInTransferMode(callback: @escaping (Result) -> Void) { guard let cameraClient = apiClient.camera else { - completion(nil, false) + callback(Result.failure(CameraError.cameraNotReady("getVersions"))) return } - cameraClient.getVersions { (result) in - - switch result { - case .failure(let versionsError): - completion(versionsError, false) - case .success(_): - - guard let avClient = self.apiClient.avContent else { + // If the camera model doesn't support getVersions then we don't need to worry! + if let modelEnum = modelEnum, !modelEnum.supportsGetVersions { + callback(Result.success(false)) + } else { + cameraClient.getVersions { (result) in + + switch result { + case .failure(let versionsError): + callback(Result.failure(versionsError)) + case .success(_): - guard self.modelEnum == nil || Model.supporting(function: .startRecordMode).contains(self.modelEnum!) else { - completion(nil, false) + guard let avClient = self.apiClient.avContent else { + callback(Result.success(false)) return } - cameraClient.startRecordMode() { (error) in - var _error = error - // Ignore no such method errors because in that case we simply never needed to call this method in the first place! - if let clientError = error as? CameraError, case .noSuchMethod(_) = clientError { - _error = nil - } - completion(_error, false) - } - return - } - - avClient.getVersions() { (result) in - switch result { - case .failure(let avVersionsError): - completion(avVersionsError, false) - case .success(_): + avClient.getVersions { (avResult) in - let successCallback: (_ inTransferMode: Bool) -> Void = { inTransferMode in + switch avResult { + case .failure(let avError): + callback(Result.failure(avError)) + case .success(_): - guard self.modelEnum == nil || Model.supporting(function: .startRecordMode).contains(self.modelEnum!) else { - completion(nil, inTransferMode) - return - } - - cameraClient.startRecordMode() { (error) in - var _error = error - // Ignore no such method errors because in that case we simply never needed to call this method in the first place! - if let clientError = error as? CameraError, case .noSuchMethod(_) = clientError { - _error = nil - } - completion(_error, inTransferMode) - } - } - - cameraClient.getCameraFunction({ (functionResult) in - - switch functionResult { - case .failure(_): // If we can't set camera function then check what it currently - // is, and if it's "contents transfer" we know that we're in "Send to Smartphone" mode! + cameraClient.getCameraFunction({ (functionResult) in - // Get event, because getCameraFunction failed! - cameraClient.getEvent(polling: false, { (eventResult) in - - var isInTransferMode: Bool = false + switch functionResult { + case .failure(_): // If we can't get camera function then check what it currently + // is, and if it's "contents transfer" we know that we're in "Send to Smartphone" mode! - switch eventResult { - case .failure(_): - successCallback(false) - break - case .success(let event): - if let function = event.function?.current { - isInTransferMode = function.lowercased() == "contents transfer" + // Get event, because getCameraFunction failed! + cameraClient.getEvent(polling: false, { (eventResult) in + + var isInTransferMode: Bool = false + + switch eventResult { + case .failure(_): + callback(Result.success(false)) + break + case .success(let event): + if let function = event.function?.current { + isInTransferMode = function.lowercased() == "contents transfer" + } } - } - - successCallback(isInTransferMode) - }) - case .success(_): // If we can get camera function, we're not in "Send to Smartphone" mode! - successCallback(false) - } - }) + + callback(Result.success(isInTransferMode)) + }) + case .success(_): // If we can get camera function, we're not in "Send to Smartphone" mode! + callback(Result.success(false)) + } + }) + } + } + } + } + } + } + + public func connect(completion: @escaping Camera.ConnectedCompletion) { + + guard let cameraClient = apiClient.camera else { + completion(nil, false) + return + } + + getInTransferMode { (result) in + + switch result { + case .failure(let error): + completion(error, false) + case .success(let inTransferMode): + + guard self.modelEnum == nil || SonyCamera.Model.supporting(function: .startRecordMode).contains(self.modelEnum!) else { + completion(nil, inTransferMode) + return + } + + cameraClient.startRecordMode() { (error) in + var _error = error + // Ignore no such method errors because in that case we simply never needed to call this method in the first place! + if let clientError = error as? CameraError, case .noSuchMethod(_) = clientError { + _error = nil } + completion(_error, inTransferMode) } } } From 8d171a7b5ea74d08f418f8708acc7b014d07776e Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Thu, 5 Dec 2019 21:12:08 +0000 Subject: [PATCH 09/42] Adds cybershot RX100 M2 to cyberShotSeries const --- .../Sony/Camera/SonyCamera+Model.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift index 26226b2..5c9300b 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift @@ -318,7 +318,7 @@ extension SonyCameraDevice { } static var cyberShotSeries: [Model] { - return [.cyberShot_HX60, .cyberShot_HX60V, .cyberShot_HX80, .cyberShot_HX90, .cyberShot_HX90V, .cyberShot_HX400, .cyberShot_HX400V, .cyberShot_WX500, .cyberShot_RX10M2, .cyberShot_RX10M3, .cyberShot_RX100M3, .cyberShot_RX100M4, .cyberShot_RX100M5, .cyberShot_RX0, .cyberShot_RX0M2] + return [.cyberShot_HX60, .cyberShot_HX60V, .cyberShot_HX80, .cyberShot_HX90, .cyberShot_HX90V, .cyberShot_HX400, .cyberShot_HX400V, .cyberShot_WX500, .cyberShot_RX10M2, .cyberShot_RX10M3, .cyberShot_RX100M2, .cyberShot_RX100M3, .cyberShot_RX100M4, .cyberShot_RX100M5, .cyberShot_RX0, .cyberShot_RX0M2] } static var fdrSeries: [Model] { From 9638515b7bf071e50664ec6e54841e2fd4cfffcb Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Fri, 6 Dec 2019 00:01:21 +0000 Subject: [PATCH 10/42] Adds HX50 and HX50V --- .../Sony/Camera/SonyCamera+Model.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift index 5c9300b..6126169 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift @@ -30,6 +30,8 @@ extension SonyCameraDevice { case a6400 = "ILCE-6400" case a6500 = "ILCE-6500" case a6600 = "ILCE-6600" + case cyberShot_HX50 = "DSC-HX50" + case cyberShot_HX50V = "DSC-HX50V" case cyberShot_HX60 = "DSC-HX60" case cyberShot_HX60V = "DSC-HX60V" case cyberShot_HX80 = "DSC-HX80" @@ -86,6 +88,8 @@ extension SonyCameraDevice { case .a6400: return "ɑ6400" case .a6500: return "ɑ6500" case .a6600: return "ɑ6600" + case .cyberShot_HX50: return "Cyber-Shot HX50" + case .cyberShot_HX50V: return "Cyber-Shot HX50V" case .cyberShot_HX60: return "Cyber-Shot HX60" case .cyberShot_HX60V: return "Cyber-Shot HX60V" case .cyberShot_HX80: return "Cyber-Shot HX80" @@ -124,7 +128,7 @@ extension SonyCameraDevice { } internal var supportsGetVersions: Bool { - return ![.cyberShot_RX100M2].contains(self) + return ![.cyberShot_RX100M2, .cyberShot_HX50V, .cyberShot_HX50].contains(self) } internal static func supporting(function: _CameraFunction) -> [Model] { @@ -318,7 +322,7 @@ extension SonyCameraDevice { } static var cyberShotSeries: [Model] { - return [.cyberShot_HX60, .cyberShot_HX60V, .cyberShot_HX80, .cyberShot_HX90, .cyberShot_HX90V, .cyberShot_HX400, .cyberShot_HX400V, .cyberShot_WX500, .cyberShot_RX10M2, .cyberShot_RX10M3, .cyberShot_RX100M2, .cyberShot_RX100M3, .cyberShot_RX100M4, .cyberShot_RX100M5, .cyberShot_RX0, .cyberShot_RX0M2] + return [.cyberShot_HX50, .cyberShot_HX50V, .cyberShot_HX60, .cyberShot_HX60V, .cyberShot_HX80, .cyberShot_HX90, .cyberShot_HX90V, .cyberShot_HX400, .cyberShot_HX400V, .cyberShot_WX500, .cyberShot_RX10M2, .cyberShot_RX10M3, .cyberShot_RX100M2, .cyberShot_RX100M3, .cyberShot_RX100M4, .cyberShot_RX100M5, .cyberShot_RX0, .cyberShot_RX0M2] } static var fdrSeries: [Model] { From ef50b2d97961408292134bc3ce64484e864c359b Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Fri, 6 Dec 2019 08:00:08 +0000 Subject: [PATCH 11/42] Fixes compiling and setting of model number on legacy cameras --- .../Sony/Camera/SonyCamera.swift | 8 ++++---- .../Sony/Device Discovery/SonyCameraDiscoverer.swift | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift index cd51b70..954bd6e 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift @@ -161,8 +161,8 @@ internal final class SonyCameraDevice { identifier = udn ?? NSUUID().uuidString - if let model = model { - modelEnum = Model(rawValue: model) + if let name = name, let modelEnum = Model(rawValue: name) { + self.modelEnum = modelEnum } else { modelEnum = nil } @@ -209,7 +209,7 @@ extension SonyCameraDevice: Camera { return true } - private func getInTransferMode(callback: @escaping (Result) -> Void) { + private func getInTransferMode(callback: @escaping (Result) -> Void) { guard let cameraClient = apiClient.camera else { callback(Result.failure(CameraError.cameraNotReady("getVersions"))) @@ -287,7 +287,7 @@ extension SonyCameraDevice: Camera { completion(error, false) case .success(let inTransferMode): - guard self.modelEnum == nil || SonyCamera.Model.supporting(function: .startRecordMode).contains(self.modelEnum!) else { + guard self.modelEnum == nil || Model.supporting(function: .startRecordMode).contains(self.modelEnum!) else { completion(nil, inTransferMode) return } diff --git a/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift b/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift index 7917ae5..f32dd5c 100644 --- a/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift +++ b/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift @@ -21,9 +21,7 @@ extension SonyCameraDevice { // Keep name if modelEnum currently nil as user has renamed camera! self.name = modelEnum == nil ? name : (deviceInfo?.model?.friendlyName ?? name) self.modelEnum = deviceInfo?.model ?? modelEnum - if let modelEnum = deviceInfo?.model { - self.model = modelEnum.friendlyName - } + self.model = modelEnum?.friendlyName ?? model self.lensModelName = deviceInfo?.lensModelName self.firmwareVersion = deviceInfo?.firmwareVersion self.remoteAppVersion = deviceInfo?.installedPlayMemoriesApps.first(where :{ $0.name == "Smart Remote Control" })?.version From 8c59f78e9fc860c881a2e5bdf927701cef9ded32 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Fri, 6 Dec 2019 08:11:02 +0000 Subject: [PATCH 12/42] Explicitly ignore 404 in case we have missed some models or user has renamed camera --- .../Sony/Camera/SonyCamera.swift | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift index 954bd6e..49b5f52 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift @@ -221,53 +221,53 @@ extension SonyCameraDevice: Camera { callback(Result.success(false)) } else { cameraClient.getVersions { (result) in - - switch result { - case .failure(let versionsError): - callback(Result.failure(versionsError)) - case .success(_): + + // Ignore 404 as this just means we're a legacy camera + if case let .failure(error) = result, (error as NSError).code != 404 { + callback(Result.failure(error)) + return + } + + guard let avClient = self.apiClient.avContent else { + callback(Result.success(false)) + return + } + + avClient.getVersions { (avResult) in - guard let avClient = self.apiClient.avContent else { - callback(Result.success(false)) + // Ignore 404 as this just means we're a legacy camera + if case let .failure(error) = avResult, (error as NSError).code != 404 { + callback(Result.failure(error)) return } - avClient.getVersions { (avResult) in + cameraClient.getCameraFunction({ (functionResult) in - switch avResult { - case .failure(let avError): - callback(Result.failure(avError)) - case .success(_): + switch functionResult { + case .failure(_): // If we can't get camera function then check what it currently + // is, and if it's "contents transfer" we know that we're in "Send to Smartphone" mode! - cameraClient.getCameraFunction({ (functionResult) in + // Get event, because getCameraFunction failed! + cameraClient.getEvent(polling: false, { (eventResult) in - switch functionResult { - case .failure(_): // If we can't get camera function then check what it currently - // is, and if it's "contents transfer" we know that we're in "Send to Smartphone" mode! - - // Get event, because getCameraFunction failed! - cameraClient.getEvent(polling: false, { (eventResult) in - - var isInTransferMode: Bool = false - - switch eventResult { - case .failure(_): - callback(Result.success(false)) - break - case .success(let event): - if let function = event.function?.current { - isInTransferMode = function.lowercased() == "contents transfer" - } - } - - callback(Result.success(isInTransferMode)) - }) - case .success(_): // If we can get camera function, we're not in "Send to Smartphone" mode! + var isInTransferMode: Bool = false + + switch eventResult { + case .failure(_): callback(Result.success(false)) + break + case .success(let event): + if let function = event.function?.current { + isInTransferMode = function.lowercased() == "contents transfer" + } } + + callback(Result.success(isInTransferMode)) }) + case .success(_): // If we can get camera function, we're not in "Send to Smartphone" mode! + callback(Result.success(false)) } - } + }) } } } From ff348a5f12a5dc06d7de59d19cfcd99ab17f4772 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sun, 8 Dec 2019 16:36:32 +0000 Subject: [PATCH 13/42] Fixed pagination of dummy images acting a bit strangely --- Rocc/Helpers/SimulatedCamera.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Rocc/Helpers/SimulatedCamera.swift b/Rocc/Helpers/SimulatedCamera.swift index 3ab4b91..67abfe8 100644 --- a/Rocc/Helpers/SimulatedCamera.swift +++ b/Rocc/Helpers/SimulatedCamera.swift @@ -355,10 +355,11 @@ public final class DummyCamera: Camera { } var files: [File] = [] - var date = Date(timeIntervalSinceNow: -100) - for i in 0.. Date: Sun, 8 Dec 2019 16:37:57 +0000 Subject: [PATCH 14/42] Fixes duplicate file uris in dummy camera --- Rocc/Helpers/SimulatedCamera.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rocc/Helpers/SimulatedCamera.swift b/Rocc/Helpers/SimulatedCamera.swift index 67abfe8..5ffd456 100644 --- a/Rocc/Helpers/SimulatedCamera.swift +++ b/Rocc/Helpers/SimulatedCamera.swift @@ -87,7 +87,7 @@ extension File { let file = File( content: content, created: date, - uri: imageUrls[index] + uri: imageUrls[index] + "\(index)" ) return file From 3fb3206d2a766f57ae4f2c48b78e24aa1560f654 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sun, 8 Dec 2019 18:28:33 +0000 Subject: [PATCH 15/42] Fixes uniqueness of image uri in dummy camera --- Rocc/Helpers/SimulatedCamera.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rocc/Helpers/SimulatedCamera.swift b/Rocc/Helpers/SimulatedCamera.swift index 5ffd456..a7f560c 100644 --- a/Rocc/Helpers/SimulatedCamera.swift +++ b/Rocc/Helpers/SimulatedCamera.swift @@ -87,7 +87,7 @@ extension File { let file = File( content: content, created: date, - uri: imageUrls[index] + "\(index)" + uri: imageUrls[index] + "\(image)" ) return file From 296f6c16b7c4db7e6ffbc1f79d8cd9ac4b19fbdd Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sun, 8 Dec 2019 18:33:19 +0000 Subject: [PATCH 16/42] Addds RX100 M2 to list of cameras which don't support startRecordMode --- .../Sony/Camera/SonyCamera+Model.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift index 6126169..0c1ff49 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift @@ -137,7 +137,7 @@ extension SonyCameraDevice { case .startBulbCapture, .endBulbCapture: return [] case .startRecordMode: - return allExcept([.a9, .a7iii, .a7riii, .a7siii]) + return allExcept([.a9, .a7iii, .a7riii, .a7siii, .cyberShot_RX100M2, .cyberShot_HX50, .cyberShot_HX50V]) case .ping: return allCases case .takePicture: From 559498696cefe2865ae44c7e50fd86adb3a0b3e3 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sun, 8 Dec 2019 18:36:07 +0000 Subject: [PATCH 17/42] Ignores 404 back from startRecordMode --- Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift index 49b5f52..13e2071 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift @@ -297,6 +297,9 @@ extension SonyCameraDevice: Camera { // Ignore no such method errors because in that case we simply never needed to call this method in the first place! if let clientError = error as? CameraError, case .noSuchMethod(_) = clientError { _error = nil + // Also ignore 404 as this is what cameras like RX100 M2 return! + } else if (error as NSError?)?.code == 404 { + _error = nil } completion(_error, inTransferMode) } From 767dc05866f8b0f304210a92daab1b90a19e6cd5 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Mon, 9 Dec 2019 08:38:49 +0000 Subject: [PATCH 18/42] Removes /sony from base url on legacy cameras --- .../Sony/Camera/SonyCamera+Model.swift | 4 +-- .../Sony/Camera/SonyCamera.swift | 33 +++++++++++-------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift index 0c1ff49..b395db4 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift @@ -127,8 +127,8 @@ extension SonyCameraDevice { } } - internal var supportsGetVersions: Bool { - return ![.cyberShot_RX100M2, .cyberShot_HX50V, .cyberShot_HX50].contains(self) + internal var usesLegacyAPI: Bool { + return [.cyberShot_RX100M2, .cyberShot_HX50V, .cyberShot_HX50].contains(self) } internal static func supporting(function: _CameraFunction) -> [Model] { diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift index 13e2071..aa89f6c 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift @@ -49,7 +49,7 @@ internal final class SonyCameraDevice { let accessType: String? - init?(dictionary: [AnyHashable : Any]) { + init?(dictionary: [AnyHashable : Any], model: Model?) { guard let _type = dictionary["av:X_ScalarWebAPI_ServiceType"] as? String else { return nil @@ -57,10 +57,14 @@ internal final class SonyCameraDevice { guard let urlString = dictionary["av:X_ScalarWebAPI_ActionList_URL"] as? String else { return nil } - guard let _url = URL(string: urlString) else { + guard var _url = URL(string: urlString) else { return nil } + if let model = model, model.usesLegacyAPI { + _url = _url.deletingLastPathComponent() + } + url = _url type = _type accessType = dictionary["av:X_ScalarWebAPI_AccessType"] as? String @@ -71,7 +75,7 @@ internal final class SonyCameraDevice { let services: [Service] - init?(dictionary: [AnyHashable : Any]) { + init?(dictionary: [AnyHashable : Any], model: Model?) { guard let versionString = dictionary["av:X_ScalarWebAPI_Version"] as? String else { return nil } version = versionString @@ -79,7 +83,7 @@ internal final class SonyCameraDevice { services = [] return } - services = serviceList.compactMap({ Service(dictionary: $0) }) + services = serviceList.compactMap({ Service(dictionary: $0, model: model) }) } } @@ -148,7 +152,15 @@ internal final class SonyCameraDevice { init?(dictionary: [AnyHashable : Any]) { - guard let apiDeviceInfoDict = dictionary["av:X_ScalarWebAPI_DeviceInfo"] as? [AnyHashable : Any], let apiInfo = ApiDeviceInfo(dictionary: apiDeviceInfoDict) else { + let _name = dictionary["friendlyName"] as? String + let _modelEnum: Model? + if let _name = _name { + _modelEnum = Model(rawValue: _name) + } else { + _modelEnum = nil + } + + guard let apiDeviceInfoDict = dictionary["av:X_ScalarWebAPI_DeviceInfo"] as? [AnyHashable : Any], let apiInfo = ApiDeviceInfo(dictionary: apiDeviceInfoDict, model: _modelEnum) else { return nil } @@ -156,17 +168,12 @@ internal final class SonyCameraDevice { apiClient = SonyCameraAPIClient(apiInfo: apiDeviceInfo) apiVersion = apiDeviceInfo.version - name = dictionary["friendlyName"] as? String + name = _modelEnum?.friendlyName ?? _name udn = dictionary["UDN"] as? String identifier = udn ?? NSUUID().uuidString - if let name = name, let modelEnum = Model(rawValue: name) { - self.modelEnum = modelEnum - } else { - modelEnum = nil - } - + modelEnum = _modelEnum model = modelEnum?.friendlyName manufacturer = dictionary["manufacturer"] as? String ?? "Sony" @@ -217,7 +224,7 @@ extension SonyCameraDevice: Camera { } // If the camera model doesn't support getVersions then we don't need to worry! - if let modelEnum = modelEnum, !modelEnum.supportsGetVersions { + if let modelEnum = modelEnum, modelEnum.usesLegacyAPI { callback(Result.success(false)) } else { cameraClient.getVersions { (result) in From 38c208373a346387b9ae104110dc2891831a75f9 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Wed, 11 Dec 2019 22:02:33 +0000 Subject: [PATCH 19/42] Restarts live view stream if it fails! --- Rocc/LiveViewStreaming.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Rocc/LiveViewStreaming.swift b/Rocc/LiveViewStreaming.swift index fefef6d..4f48609 100644 --- a/Rocc/LiveViewStreaming.swift +++ b/Rocc/LiveViewStreaming.swift @@ -398,6 +398,11 @@ extension LiveViewStream: URLSessionDataDelegate { receivedData.append(data) attemptImageParse() } + + public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { + receivedData = Data() + start() + } } /// An error enum for stream errors From 98f6870e828296d3466a1d74c5c3b0d5a0ce11ce Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Mon, 16 Dec 2019 20:20:11 +0000 Subject: [PATCH 20/42] FFixes file format of simulated camera original --- Rocc/Helpers/SimulatedCamera.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rocc/Helpers/SimulatedCamera.swift b/Rocc/Helpers/SimulatedCamera.swift index a7f560c..508841f 100644 --- a/Rocc/Helpers/SimulatedCamera.swift +++ b/Rocc/Helpers/SimulatedCamera.swift @@ -80,7 +80,7 @@ extension File { let index = image % imageUrls.count let url = URL(string: imageUrls[index]) - let original = File.Content.Original(fileName: "Test", fileType: "RAW", url: url) + let original = File.Content.Original(fileName: "Test", fileType: "JPG", url: url) let content = Content(originals: [original], largeURL: url, smallURL: url, thumbnailURL: url) From e205b945e8dc5ca266cdc3b032ffffb4862e43aa Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Tue, 17 Dec 2019 10:44:28 +0000 Subject: [PATCH 21/42] Fixes test file fileName --- Rocc/Helpers/SimulatedCamera.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rocc/Helpers/SimulatedCamera.swift b/Rocc/Helpers/SimulatedCamera.swift index 508841f..5131983 100644 --- a/Rocc/Helpers/SimulatedCamera.swift +++ b/Rocc/Helpers/SimulatedCamera.swift @@ -80,7 +80,7 @@ extension File { let index = image % imageUrls.count let url = URL(string: imageUrls[index]) - let original = File.Content.Original(fileName: "Test", fileType: "JPG", url: url) + let original = File.Content.Original(fileName: "test.jpeg", fileType: "JPG", url: url) let content = Content(originals: [original], largeURL: url, smallURL: url, thumbnailURL: url) From 8b9d097e64b05faff69788a9b6019e61ca0fa007 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Tue, 17 Dec 2019 10:48:04 +0000 Subject: [PATCH 22/42] Fixes possible missing of device model --- .../Sony/Camera/SonyCamera.swift | 4 ++-- .../Device Discovery/SonyCameraDiscoverer.swift | 14 ++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift index 6b3f550..cffc367 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift @@ -161,8 +161,8 @@ internal final class SonyCameraDevice { identifier = udn ?? NSUUID().uuidString - if let model = model { - modelEnum = Model(rawValue: model) + if let name = name { + modelEnum = Model(rawValue: name) } else { modelEnum = nil } diff --git a/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift b/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift index 7917ae5..40c099d 100644 --- a/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift +++ b/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift @@ -19,14 +19,12 @@ extension SonyCameraDevice { func update(with deviceInfo: SonyDeviceInfo?) { // Keep name if modelEnum currently nil as user has renamed camera! - self.name = modelEnum == nil ? name : (deviceInfo?.model?.friendlyName ?? name) - self.modelEnum = deviceInfo?.model ?? modelEnum - if let modelEnum = deviceInfo?.model { - self.model = modelEnum.friendlyName - } - self.lensModelName = deviceInfo?.lensModelName - self.firmwareVersion = deviceInfo?.firmwareVersion - self.remoteAppVersion = deviceInfo?.installedPlayMemoriesApps.first(where :{ $0.name == "Smart Remote Control" })?.version + name = modelEnum == nil ? name : (deviceInfo?.model?.friendlyName ?? name) + modelEnum = deviceInfo?.model ?? modelEnum + model = modelEnum?.friendlyName ?? model + lensModelName = deviceInfo?.lensModelName + firmwareVersion = deviceInfo?.firmwareVersion + remoteAppVersion = deviceInfo?.installedPlayMemoriesApps.first(where :{ $0.name == "Smart Remote Control" })?.version } } From e6a1197c92c487a5530708d4c6279612f1343746 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Tue, 17 Dec 2019 22:52:22 +0000 Subject: [PATCH 23/42] As `isCached` property to device discovery delegate which reflects whether the camera was loaded from a cached xml url --- Rocc/Device Discovery/DeviceDiscovery.swift | 21 +++++++++++------- .../UDPDeviceDiscoverer.swift | 14 ++++++------ Rocc/Helpers/SimulatedCamera.swift | 3 ++- .../SonyCameraDiscoverer.swift | 22 +++++++++---------- 4 files changed, 33 insertions(+), 27 deletions(-) diff --git a/Rocc/Device Discovery/DeviceDiscovery.swift b/Rocc/Device Discovery/DeviceDiscovery.swift index 784aa26..969bc31 100644 --- a/Rocc/Device Discovery/DeviceDiscovery.swift +++ b/Rocc/Device Discovery/DeviceDiscovery.swift @@ -33,7 +33,8 @@ protocol DeviceDiscovererDelegate { /// - Parameters: /// - discoverer: The discoverer object that discovered a device. /// - discovered: The device that it discovered. - func deviceDiscoverer(_ discoverer: T, discovered device: Camera) + /// - isCached: Whether the device was loaded from a cached xml discovery file. + func deviceDiscoverer(_ discoverer: T, discovered device: Camera, isCached: Bool) } /// A protocol to be implemented by device discovery implementations @@ -73,10 +74,13 @@ public protocol CameraDiscovererDelegate { /// Called when a camera device is discovered /// + /// - Note: if `isCached == true` you should be cautious auto-connecting to the camera (Especially if it's a transfer device) as cameras in transfer mode can advertise multiple connectivity methods and the correct one may not be returned until it's passed to you with `isCached == false`. + /// /// - Parameters: /// - discoverer: The discoverer object that discovered a device. /// - discovered: The device that it discovered. - func cameraDiscoverer(_ discoverer: CameraDiscoverer, discovered device: Camera) + /// - isCached: Whether the camera was loaded from a cached xml file url. + func cameraDiscoverer(_ discoverer: CameraDiscoverer, discovered device: Camera, isCached: Bool) } /// A class which enables the discovery of cameras @@ -133,11 +137,7 @@ public final class CameraDiscoverer { extension CameraDiscoverer: DeviceDiscovererDelegate { - func deviceDiscoverer(_ discoverer: T, didError error: Error) where T : DeviceDiscoverer { - delegate?.cameraDiscoverer(self, didError: error) - } - - func deviceDiscoverer(_ discoverer: T, discovered device: Camera) where T : DeviceDiscoverer { + func deviceDiscoverer(_ discoverer: T, discovered device: Camera, isCached: Bool) where T : DeviceDiscoverer { guard !discoveredCameras.contains(where: { $0.identifier == device.identifier @@ -147,6 +147,11 @@ extension CameraDiscoverer: DeviceDiscovererDelegate { camerasBySSID[Reachability.currentWiFiSSID, default: []].append(device) discoveredCameras.append(device) - delegate?.cameraDiscoverer(self, discovered: device) + delegate?.cameraDiscoverer(self, discovered: device, isCached: isCached) + } + + + func deviceDiscoverer(_ discoverer: T, didError error: Error) where T : DeviceDiscoverer { + delegate?.cameraDiscoverer(self, didError: error) } } diff --git a/Rocc/Device Discovery/UDPDeviceDiscoverer.swift b/Rocc/Device Discovery/UDPDeviceDiscoverer.swift index 549a0c3..b449c32 100644 --- a/Rocc/Device Discovery/UDPDeviceDiscoverer.swift +++ b/Rocc/Device Discovery/UDPDeviceDiscoverer.swift @@ -96,7 +96,7 @@ class UDPDeviceDiscoverer: DeviceDiscoverer { urls.forEach { (url) in - parseDeviceInfo(at: url) { [weak self] (error) in + parseDeviceInfo(at: url, isCached: true) { [weak self] (error) in guard let strongSelf = self else { return } @@ -170,7 +170,7 @@ class UDPDeviceDiscoverer: DeviceDiscoverer { Logger.log(message: "Did find device at \(device.ddURL.absoluteString)", category: "UDPDeviceDiscoverer") os_log("Did find device at: %{public}@", log: self.log, type: .debug, device.ddURL.absoluteString) - self.parseDeviceInfo(at: device.ddURL) + self.parseDeviceInfo(at: device.ddURL, isCached: false) } } @@ -185,7 +185,7 @@ class UDPDeviceDiscoverer: DeviceDiscoverer { udpClient.finishSearching(with: callback) } - private func parseDeviceInfo(at url: URL, callback: ((_ error: Error?) -> Void)? = nil) { + private func parseDeviceInfo(at url: URL, isCached: Bool, callback: ((_ error: Error?) -> Void)? = nil) { let lastPathComponent = url.lastPathComponent let baseURL = url.deletingLastPathComponent() @@ -210,7 +210,7 @@ class UDPDeviceDiscoverer: DeviceDiscoverer { Logger.log(message: "Parsing device info", category: "UDPDeviceDiscoverer") os_log("Parsing device info", log: strongSelf.log, type: .debug) - strongSelf.parseDevice(from: stringResponse, baseURL: baseURL, callback: { [weak strongSelf] parsed in + strongSelf.parseDevice(from: stringResponse, isCached: isCached, baseURL: baseURL, callback: { [weak strongSelf] parsed in // If we parsed a device, cache it's url! guard parsed else { return } @@ -247,7 +247,7 @@ class UDPDeviceDiscoverer: DeviceDiscoverer { } } - func parseDevice(from stringRepresentation: String, baseURL: URL, callback: @escaping (_ bool: Bool) -> Void) { + func parseDevice(from stringRepresentation: String, isCached: Bool, baseURL: URL, callback: @escaping (_ bool: Bool) -> Void) { } @@ -259,10 +259,10 @@ class UDPDeviceDiscoverer: DeviceDiscoverer { delegate?.deviceDiscoverer(self, didError: error) } - func sendDeviceToDelegate(_ camera: Camera) { + func sendDeviceToDelegate(_ camera: Camera, isCached: Bool) { Logger.log(message: "Letting delegate know about discovered device with name: \(camera.name ?? "Unknown")", category: "UDPDeviceDiscoverer") os_log("Letting delegate know about discovered device with name: %{public}@", log: log, type: .debug, camera.name ?? "Unknown") - delegate?.deviceDiscoverer(self, discovered: camera) + delegate?.deviceDiscoverer(self, discovered: camera, isCached: isCached) } } diff --git a/Rocc/Helpers/SimulatedCamera.swift b/Rocc/Helpers/SimulatedCamera.swift index 5131983..4285ccd 100644 --- a/Rocc/Helpers/SimulatedCamera.swift +++ b/Rocc/Helpers/SimulatedCamera.swift @@ -81,8 +81,9 @@ extension File { let url = URL(string: imageUrls[index]) let original = File.Content.Original(fileName: "test.jpeg", fileType: "JPG", url: url) + let rawOriginal = File.Content.Original(fileName: "rest.ARW", fileType: "ARW", url: URL(string: "http://www.rawsamples.ch/raws/sony/RAW_SONY_ILCE-7M2.ARW")) - let content = Content(originals: [original], largeURL: url, smallURL: url, thumbnailURL: url) + let content = Content(originals: [rawOriginal, original], largeURL: url, smallURL: url, thumbnailURL: url) let file = File( content: content, diff --git a/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift b/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift index 40c099d..674a706 100644 --- a/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift +++ b/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift @@ -160,17 +160,17 @@ internal final class SonyCameraDiscoverer: UDPDeviceDiscoverer { self.delegate = delegate } - override func parseDevice(from stringRepresentation: String, baseURL: URL, callback: @escaping (Bool) -> Void) { - parseXML(string: stringRepresentation, baseURL: baseURL, callback: callback) + override func parseDevice(from stringRepresentation: String, isCached: Bool, baseURL: URL, callback: @escaping (Bool) -> Void) { + parseXML(string: stringRepresentation, baseURL: baseURL, isCached: isCached, callback: callback) } - public func parseXML(string: String, baseURL: URL, callback: @escaping (Bool) -> Void) { + public func parseXML(string: String, baseURL: URL, isCached: Bool, callback: @escaping (Bool) -> Void) { - parseCameraXML(string: string, baseURL: baseURL, callback: callback) - parseTransferDeviceXML(string: string, baseURL: baseURL, callback: callback) + parseCameraXML(string: string, baseURL: baseURL, isCached: isCached, callback: callback) + parseTransferDeviceXML(string: string, baseURL: baseURL, isCached: isCached, callback: callback) } - private func parseCameraXML(string: String, baseURL: URL, callback: @escaping (Bool) -> Void) { + private func parseCameraXML(string: String, baseURL: URL, isCached: Bool, callback: @escaping (Bool) -> Void) { let parser = SonyCameraParser(xmlString: string) parser.parse { [weak self] (cameraDevice, error) in @@ -187,7 +187,7 @@ internal final class SonyCameraDiscoverer: UDPDeviceDiscoverer { callback(true) guard let digitalImagingService = device.services?.first(where: { $0.type == .digitalImaging }) else { - strongSelf.sendDeviceToDelegate(device) + strongSelf.sendDeviceToDelegate(device, isCached: isCached) return } @@ -200,7 +200,7 @@ internal final class SonyCameraDiscoverer: UDPDeviceDiscoverer { } guard let string = response?.string else { - _strongSelf.sendDeviceToDelegate(device) + _strongSelf.sendDeviceToDelegate(device, isCached: isCached) return } @@ -212,7 +212,7 @@ internal final class SonyCameraDiscoverer: UDPDeviceDiscoverer { } device.update(with: deviceInfo) - __strongSelf.sendDeviceToDelegate(device) + __strongSelf.sendDeviceToDelegate(device, isCached: isCached) }) }) @@ -220,7 +220,7 @@ internal final class SonyCameraDiscoverer: UDPDeviceDiscoverer { } } - private func parseTransferDeviceXML(string: String, baseURL: URL, callback: @escaping (Bool) -> Void) { + private func parseTransferDeviceXML(string: String, baseURL: URL, isCached: Bool, callback: @escaping (Bool) -> Void) { let transferDeviceParser = SonyTransferDeviceParser(xmlString: string) transferDeviceParser.parse { [weak self] (transferDevice, error) in @@ -249,7 +249,7 @@ internal final class SonyCameraDiscoverer: UDPDeviceDiscoverer { } callback(true) - _strongSelf.sendDeviceToDelegate(_transferDevice) + _strongSelf.sendDeviceToDelegate(_transferDevice, isCached: isCached) }) } } From 2914c144f414ccbfa6bc65472ed652536e196c14 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Wed, 18 Dec 2019 08:32:25 +0000 Subject: [PATCH 24/42] Lets user know when camera moves from cached version to non-cached version! --- Rocc/Device Discovery/DeviceDiscovery.swift | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Rocc/Device Discovery/DeviceDiscovery.swift b/Rocc/Device Discovery/DeviceDiscovery.swift index 969bc31..3e7c13e 100644 --- a/Rocc/Device Discovery/DeviceDiscovery.swift +++ b/Rocc/Device Discovery/DeviceDiscovery.swift @@ -89,7 +89,7 @@ public final class CameraDiscoverer { /// A delegate which will have methods called on it when cameras are discovered or an error occurs. public var delegate: CameraDiscovererDelegate? - private var discoveredCameras: [Camera] = [] + private var discoveredCameras: [(camera: Camera, isCached: Bool)] = [] /// A map of cameras by the SSID the local device was connected to when they were discovered public var camerasBySSID: [String?: [Camera]] = [:] @@ -139,14 +139,23 @@ extension CameraDiscoverer: DeviceDiscovererDelegate { func deviceDiscoverer(_ discoverer: T, discovered device: Camera, isCached: Bool) where T : DeviceDiscoverer { - guard !discoveredCameras.contains(where: { - $0.identifier == device.identifier - }) else { + if let previouslyDiscoveredCamera = discoveredCameras.enumerated().first(where: { + $0.element.camera.identifier == device.identifier + }) { + // If we went from non-cached, to cached, let the delegate know! + if previouslyDiscoveredCamera.element.isCached && !isCached { + discoveredCameras[previouslyDiscoveredCamera.offset] = (device, isCached) + if var camerasForSSID = camerasBySSID[Reachability.currentWiFiSSID], let indexInCamerasForSSID = camerasForSSID.firstIndex(where: { $0.identifier == device.identifier }) { + camerasForSSID[indexInCamerasForSSID] = device + camerasBySSID[Reachability.currentWiFiSSID] = camerasForSSID + } + delegate?.cameraDiscoverer(self, discovered: device, isCached: false) + } return } camerasBySSID[Reachability.currentWiFiSSID, default: []].append(device) - discoveredCameras.append(device) + discoveredCameras.append((device, isCached)) delegate?.cameraDiscoverer(self, discovered: device, isCached: isCached) } From f38fd5834092a3c1a5dc08b964ba3086af2c31df Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Wed, 18 Dec 2019 08:51:52 +0000 Subject: [PATCH 25/42] Updates `camerasBySSID` to reflect whether camera was fetched from a cached xml file. non-cached devices should be preferred over cached ones --- Rocc/Device Discovery/DeviceDiscovery.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Rocc/Device Discovery/DeviceDiscovery.swift b/Rocc/Device Discovery/DeviceDiscovery.swift index 3e7c13e..6023c4a 100644 --- a/Rocc/Device Discovery/DeviceDiscovery.swift +++ b/Rocc/Device Discovery/DeviceDiscovery.swift @@ -92,7 +92,7 @@ public final class CameraDiscoverer { private var discoveredCameras: [(camera: Camera, isCached: Bool)] = [] /// A map of cameras by the SSID the local device was connected to when they were discovered - public var camerasBySSID: [String?: [Camera]] = [:] + public var camerasBySSID: [String?: [(camera: Camera, isCached: Bool)]] = [:] var discoverers: [DeviceDiscoverer] = [] @@ -145,8 +145,8 @@ extension CameraDiscoverer: DeviceDiscovererDelegate { // If we went from non-cached, to cached, let the delegate know! if previouslyDiscoveredCamera.element.isCached && !isCached { discoveredCameras[previouslyDiscoveredCamera.offset] = (device, isCached) - if var camerasForSSID = camerasBySSID[Reachability.currentWiFiSSID], let indexInCamerasForSSID = camerasForSSID.firstIndex(where: { $0.identifier == device.identifier }) { - camerasForSSID[indexInCamerasForSSID] = device + if var camerasForSSID = camerasBySSID[Reachability.currentWiFiSSID], let indexInCamerasForSSID = camerasForSSID.firstIndex(where: { $0.camera.identifier == device.identifier }) { + camerasForSSID[indexInCamerasForSSID] = (device, isCached) camerasBySSID[Reachability.currentWiFiSSID] = camerasForSSID } delegate?.cameraDiscoverer(self, discovered: device, isCached: false) @@ -154,7 +154,7 @@ extension CameraDiscoverer: DeviceDiscovererDelegate { return } - camerasBySSID[Reachability.currentWiFiSSID, default: []].append(device) + camerasBySSID[Reachability.currentWiFiSSID, default: []].append((device, isCached)) discoveredCameras.append((device, isCached)) delegate?.cameraDiscoverer(self, discovered: device, isCached: isCached) } From 4b01ca60c557f96c89e1a952f9192fce7127e912 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Wed, 18 Dec 2019 21:01:58 +0000 Subject: [PATCH 26/42] Makes sure live view isn't restarted if no error given to URLSession delegate method --- Rocc/LiveViewStreaming.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Rocc/LiveViewStreaming.swift b/Rocc/LiveViewStreaming.swift index 4f48609..1121469 100644 --- a/Rocc/LiveViewStreaming.swift +++ b/Rocc/LiveViewStreaming.swift @@ -401,6 +401,7 @@ extension LiveViewStream: URLSessionDataDelegate { public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { receivedData = Data() + guard error != nil else { return } start() } } From 9f603b7f76edb153cfc96254035bf49fbaf83bce Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Thu, 19 Dec 2019 08:30:27 +0000 Subject: [PATCH 27/42] Addds check for getEvent vs receiveEvent --- .../Sony/API/CameraClient.swift | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift b/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift index 81ea0e3..3dc1861 100644 --- a/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift +++ b/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift @@ -714,6 +714,18 @@ internal class CameraClient: ServiceClient { typealias GenericCompletion = (_ error: Error?) -> Void + var eventMethodName: String? { + guard let availableApiList = availableApiList else { + return nil + } + for eventName in ["getEvent", "receiveEvent"] { + if availableApiList.contains(eventName) { + return eventName + } + } + return nil + } + internal convenience init?(apiInfo: SonyCameraDevice.ApiDeviceInfo) { guard let cameraService = apiInfo.services.first(where: { $0.type == "camera" }) else { return nil } self.init(service: cameraService) @@ -3854,6 +3866,21 @@ internal class CameraClient: ServiceClient { func getEvent(polling: Bool, _ completion: @escaping EventCompletion) { + guard let eventMethodName = eventMethodName else { + + getAvailableApiList { [weak self] (result) in + // Fallback to getEvent as more commonly used! + self?.getEvent(methodName: self?.eventMethodName ?? "getEvent", polling: polling, completion) + } + + return + } + + getEvent(methodName: eventMethodName, polling: polling, completion) + } + + private func getEvent(methodName: String, polling: Bool, _ completion: @escaping EventCompletion) { + let body = SonyRequestBody(method: "getEvent", params: [polling], id: 1, version: versions?.last ?? "1.0") requestController.request(service.type, method: .POST, body: body.requestSerialised) { (response, error) in From 0c2a352124bfe0857e06060b247936d98ce5f006 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Thu, 19 Dec 2019 21:06:42 +0000 Subject: [PATCH 28/42] =?UTF-8?q?Fixes=20getEvent=20method=20parameter=20n?= =?UTF-8?q?ot=20being=20used=20=F0=9F=91=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift b/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift index 3dc1861..6b45a4b 100644 --- a/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift +++ b/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift @@ -3881,7 +3881,7 @@ internal class CameraClient: ServiceClient { private func getEvent(methodName: String, polling: Bool, _ completion: @escaping EventCompletion) { - let body = SonyRequestBody(method: "getEvent", params: [polling], id: 1, version: versions?.last ?? "1.0") + let body = SonyRequestBody(method: methodName, params: [polling], id: 1, version: versions?.last ?? "1.0") requestController.request(service.type, method: .POST, body: body.requestSerialised) { (response, error) in From a51088b1013db80638b3848876b50922da6fed98 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sat, 21 Dec 2019 18:07:24 +0000 Subject: [PATCH 29/42] Updates url to https --- Rocc/Helpers/SimulatedCamera.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rocc/Helpers/SimulatedCamera.swift b/Rocc/Helpers/SimulatedCamera.swift index 4285ccd..f90031e 100644 --- a/Rocc/Helpers/SimulatedCamera.swift +++ b/Rocc/Helpers/SimulatedCamera.swift @@ -81,7 +81,7 @@ extension File { let url = URL(string: imageUrls[index]) let original = File.Content.Original(fileName: "test.jpeg", fileType: "JPG", url: url) - let rawOriginal = File.Content.Original(fileName: "rest.ARW", fileType: "ARW", url: URL(string: "http://www.rawsamples.ch/raws/sony/RAW_SONY_ILCE-7M2.ARW")) + let rawOriginal = File.Content.Original(fileName: "rest.ARW", fileType: "ARW", url: URL(string: "https://www.rawsamples.ch/raws/sony/RAW_SONY_ILCE-7M2.ARW")) let content = Content(originals: [rawOriginal, original], largeURL: url, smallURL: url, thumbnailURL: url) From c366e97c57f6097b8104b638fdffe6296bbf1743 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Fri, 27 Dec 2019 00:05:45 +0000 Subject: [PATCH 30/42] Adds startRecordMode back in for RX100 M2 and HX50 --- .../Sony/Camera/SonyCamera+Model.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift index b395db4..ab1460e 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift @@ -137,7 +137,7 @@ extension SonyCameraDevice { case .startBulbCapture, .endBulbCapture: return [] case .startRecordMode: - return allExcept([.a9, .a7iii, .a7riii, .a7siii, .cyberShot_RX100M2, .cyberShot_HX50, .cyberShot_HX50V]) + return allExcept([.a9, .a7iii, .a7riii, .a7siii]) case .ping: return allCases case .takePicture: From b9151f9ff79674c7db96066e4ffe37c2a218ab1c Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Wed, 1 Jan 2020 10:24:07 +0000 Subject: [PATCH 31/42] Changes logging --- Rocc/Device Discovery/UPnPParsers.swift | 14 +++----------- Rocc/Helpers/Logging/Logger.swift | 4 ++++ Rocc/Helpers/Networking/SOAPRequestBody.swift | 3 --- .../Sony/Device Discovery/SonyXMLParsers.swift | 9 --------- 4 files changed, 7 insertions(+), 23 deletions(-) diff --git a/Rocc/Device Discovery/UPnPParsers.swift b/Rocc/Device Discovery/UPnPParsers.swift index ce877eb..5f5da46 100644 --- a/Rocc/Device Discovery/UPnPParsers.swift +++ b/Rocc/Device Discovery/UPnPParsers.swift @@ -199,9 +199,7 @@ internal final class UPnPDeviceParser: NSObject, XMLParserDelegate { guard scope.last == elementName else { return } foundCharacters = foundCharacters.trimmingCharacters(in: .whitespacesAndNewlines) - - os_log("Parser did start element: %@\nCurrent scope:%@", log: log, type: .debug, elementName, scope) - + defer { currentElement = scope.removeLast() foundCharacters = "" @@ -344,9 +342,7 @@ internal final class UPnPFolderParser: NSObject, XMLParserDelegate { currentElement = elementName scope.append(elementName) - - os_log("Parser did start element: %@\nCurrent scope:%@", log: log, type: .debug, elementName, scope) - + switch elementName { case "container": currentFolder = attributeDict @@ -368,7 +364,6 @@ internal final class UPnPFolderParser: NSObject, XMLParserDelegate { defer { currentElement = scope.removeLast() foundCharacters = "" - os_log("Parser did end element: %@\nCurrent scope:%@", log: log, type: .debug, elementName, scope) } switch elementName { @@ -592,9 +587,7 @@ internal final class UPnPFileParser: NSObject, XMLParserDelegate { currentElement = elementName scope.append(elementName) - - os_log("Parser did start element: %@\nCurrent scope:%@", log: log, type: .debug, elementName, scope) - + switch elementName { case "item": currentFile = attributeDict @@ -619,7 +612,6 @@ internal final class UPnPFileParser: NSObject, XMLParserDelegate { defer { currentElement = scope.removeLast() foundCharacters = "" - os_log("Parser did end element: %@\nCurrent scope:%@", log: log, type: .debug, elementName, scope) } switch elementName { diff --git a/Rocc/Helpers/Logging/Logger.swift b/Rocc/Helpers/Logging/Logger.swift index 49e3ff5..011c0b6 100644 --- a/Rocc/Helpers/Logging/Logger.swift +++ b/Rocc/Helpers/Logging/Logger.swift @@ -67,6 +67,10 @@ public final class Logger { private func log(_ message: String, category: String) { + #if DEBUG + print("[\(category)] \(message)") + #endif + guard let fileURL = fileURL, let logQueue = logQueue else { return } logQueue.sync { diff --git a/Rocc/Helpers/Networking/SOAPRequestBody.swift b/Rocc/Helpers/Networking/SOAPRequestBody.swift index 3467db1..072f798 100644 --- a/Rocc/Helpers/Networking/SOAPRequestBody.swift +++ b/Rocc/Helpers/Networking/SOAPRequestBody.swift @@ -105,8 +105,6 @@ internal final class SOAPResponseParser: NSObject, XMLParserDelegate { currentElement = elementName scope.append(elementName) - - os_log("Parser did start element: %@\nCurrent scope:%@", log: log, type: .debug, elementName, scope) } func parser(_ parser: XMLParser, foundCharacters string: String) { @@ -122,7 +120,6 @@ internal final class SOAPResponseParser: NSObject, XMLParserDelegate { defer { currentElement = scope.removeLast() foundCharacters = "" - os_log("Parser did end element: %@\nCurrent scope:%@", log: log, type: .debug, elementName, scope) } // We are inside the device info object diff --git a/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyXMLParsers.swift b/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyXMLParsers.swift index 8531610..c083979 100644 --- a/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyXMLParsers.swift +++ b/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyXMLParsers.swift @@ -84,8 +84,6 @@ final class SonyCameraParser: NSObject, XMLParserDelegate { default: break } - - os_log("Parser did start element: %@\nCurrent scope:%@", log: log, type: .debug, elementName, scope) } func parser(_ parser: XMLParser, foundCharacters string: String) { @@ -101,7 +99,6 @@ final class SonyCameraParser: NSObject, XMLParserDelegate { defer { currentElement = scope.removeLast() foundCharacters = "" - os_log("Parser did end element: %@\nCurrent scope:%@", log: log, type: .debug, elementName, scope) } switch elementName { @@ -237,8 +234,6 @@ final class SonyTransferDeviceParser: NSObject, XMLParserDelegate { default: break } - - os_log("Parser did start element: %@\nCurrent scope:%@", log: log, type: .debug, elementName, scope) } func parser(_ parser: XMLParser, foundCharacters string: String) { @@ -254,7 +249,6 @@ final class SonyTransferDeviceParser: NSObject, XMLParserDelegate { defer { currentElement = scope.removeLast() foundCharacters = "" - os_log("Parser did end element: %@\nCurrent scope:%@", log: log, type: .debug, elementName, scope) } switch elementName { @@ -371,8 +365,6 @@ class SonyCameraDeviceInfoParser: NSObject, XMLParserDelegate { if elementName == "X_PlayMemoriesCameraApps_App" { currentApp = [:] } - - os_log("Parser did start element: %@\nCurrent scope:%@", log: log, type: .debug, elementName, scope) } func parser(_ parser: XMLParser, foundCharacters string: String) { @@ -388,7 +380,6 @@ class SonyCameraDeviceInfoParser: NSObject, XMLParserDelegate { defer { currentElement = scope.removeLast() foundCharacters = "" - os_log("Parser did end element: %@\nCurrent scope:%@", log: log, type: .debug, elementName, scope) } switch elementName { From b2daf16dd2ac6e455d8a553f3329073465bad25e Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Wed, 1 Jan 2020 10:57:27 +0000 Subject: [PATCH 32/42] Removes awaitFocus to fix takePicture crashing --- Rocc/LiveViewStreaming.swift | 2 +- .../Sony/Camera/SonyCamera+Model.swift | 8 ++++++-- .../Sony/Camera/SonyCamera.swift | 12 ++---------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Rocc/LiveViewStreaming.swift b/Rocc/LiveViewStreaming.swift index 1121469..2def881 100644 --- a/Rocc/LiveViewStreaming.swift +++ b/Rocc/LiveViewStreaming.swift @@ -337,7 +337,7 @@ public final class LiveViewStream: NSObject { // If we have a start byte, discard everything before it if receivedData.contains(0xFF) { - receivedData = receivedData.split(separator: 0xFF, maxSplits: 1, omittingEmptySubsequences: false).last ?? Data() + receivedData = Data(receivedData.split(separator: 0xFF, maxSplits: 1, omittingEmptySubsequences: false).last ?? Data()) } else { receivedData = Data() } diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift index ab1460e..f975420 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera+Model.swift @@ -48,6 +48,7 @@ extension SonyCameraDevice { case cyberShot_RX100M3 = "DSC-RX100M3" case cyberShot_RX100M4 = "DSC-RX100M4" case cyberShot_RX100M5 = "DSC-RX100M5" + case cyberShot_RX100M6 = "DSC-RX100M6" case FDR_X1000V = "FDR-X1000V" case FDR_X3000 = "FDR-X3000" case HDR_AS100V = "HDR-AS100V" @@ -104,6 +105,7 @@ extension SonyCameraDevice { case .cyberShot_RX100M3: return "Cyber-Shot RX100 III" case .cyberShot_RX100M4: return "Cyber-Shot RX100 IV" case .cyberShot_RX100M5: return "Cyber-Shot RX100 V" + case .cyberShot_RX100M6: return "Cybter-Shot RX100 VI" case .cyberShot_RX0: return "RX0" case .cyberShot_RX0M2: return "RX0 II" case .FDR_X1000V: return "FDR-X1000V" @@ -322,7 +324,7 @@ extension SonyCameraDevice { } static var cyberShotSeries: [Model] { - return [.cyberShot_HX50, .cyberShot_HX50V, .cyberShot_HX60, .cyberShot_HX60V, .cyberShot_HX80, .cyberShot_HX90, .cyberShot_HX90V, .cyberShot_HX400, .cyberShot_HX400V, .cyberShot_WX500, .cyberShot_RX10M2, .cyberShot_RX10M3, .cyberShot_RX100M2, .cyberShot_RX100M3, .cyberShot_RX100M4, .cyberShot_RX100M5, .cyberShot_RX0, .cyberShot_RX0M2] + return [.cyberShot_HX50, .cyberShot_HX50V, .cyberShot_HX60, .cyberShot_HX60V, .cyberShot_HX80, .cyberShot_HX90, .cyberShot_HX90V, .cyberShot_HX400, .cyberShot_HX400V, .cyberShot_WX500, .cyberShot_RX10M2, .cyberShot_RX10M3, .cyberShot_RX100M2, .cyberShot_RX100M3, .cyberShot_RX100M4, .cyberShot_RX100M5, .cyberShot_RX100M6, .cyberShot_RX0, .cyberShot_RX0M2] } static var fdrSeries: [Model] { @@ -383,7 +385,9 @@ extension SonyCameraDevice { .a7riii, .a9, .cyberShot_RX0, - .cyberShot_RX0M2 + .cyberShot_RX0M2, + .cyberShot_RX100M5, + .cyberShot_RX100M6 ] return modelsWhichRequireHalfPressToCapture.contains(self) } diff --git a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift index f059e8e..0f9ea06 100644 --- a/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift +++ b/Rocc/Manufacturer Implementations/Sony/Camera/SonyCamera.swift @@ -1803,7 +1803,7 @@ extension SonyCameraDevice: Camera { // Take picture immediately after half press has completed, two scenarios here: // 1. User is in MF, this takePicture should succeed and take the photo // 2. User is in AF, this takePicture could fail (which we ignore), and then we wait for focus change - takePicture(true, { [weak _this] success in + takePicture(false, { success in // If the take picture failed, then we'll await the focus change from `Shutter.halfPress` guard !success else { @@ -1811,15 +1811,7 @@ extension SonyCameraDevice: Camera { return } - Logger.shared.log("Take picture failed, awaiting focus change", category: "SonyCamera", level: .debug) - - // Await event letting us know the camera has finished focussing - _this?.onFocusChange({ (status) -> Bool in - guard let _status = status, _status != .focusing else { return false } - Logger.shared.log("Camera achieved focus, taking picture", category: "SonyCamera", level: .debug) - takePicture(false, nil) - return true - }) + Logger.shared.log("Take picture failed, nothing we can do...", category: "SonyCamera", level: .debug) }) }) } From f3ee827bef3daa3f6dc46042db8c068b64530753 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sun, 23 Feb 2020 16:47:22 +0000 Subject: [PATCH 33/42] Updates travis.yml --- .travis.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 030ed58..3c75d74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: swift xcode_project: Rocc.xcodeproj # path to your xcodeproj folder xcode_scheme: Rocc -osx_image: xcode10.2 +osx_image: xcode11.3 env: global: - LC_CTYPE=en_US.UTF-8 @@ -13,16 +13,8 @@ env: - TVOS_SDK=appletvsimulator12.2 - OSX_SDK=macosx10.14 matrix: - - DESTINATION="OS=11.0.1,name=iPhone 5s" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=11.0.1,name=iPhone 8 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=11.1,name=iPhone 8" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=11.2,name=iPhone 8" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=11.1,name=iPhone 8 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=11.2,name=iPhone 8 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=12.0,name=iPhone 8 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=12.0,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=12.2,name=iPhone Xʀ" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=12.2,name=iPhone XS Max" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" + xcode_destination: platform=iOS Simulator,OS=13.0,name=iPhone 11 Pro Max + - DESTINATION="OS=13.3,name=iPhone 11 Pro Max" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - DESTINATION="arch=x86_64" SCHEME="$OSX_FRAMEWORK_SCHEME" SDK="$OSX_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" script: - set -o pipefail From cbfe9c851f2f5a8904a791264dca2824fbac70a2 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sun, 23 Feb 2020 16:50:53 +0000 Subject: [PATCH 34/42] Updates README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ee0a1f2..8269d8c 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ Build Status - - Swift 5.0 + + Swift 5.0 MIT From 8090dab4dca678b3a5ced065806580b05afcb4ee Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Mon, 24 Feb 2020 09:45:04 +0000 Subject: [PATCH 35/42] Fixes travis.yml --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3c75d74..2fb72dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,6 @@ env: - TVOS_SDK=appletvsimulator12.2 - OSX_SDK=macosx10.14 matrix: - xcode_destination: platform=iOS Simulator,OS=13.0,name=iPhone 11 Pro Max - DESTINATION="OS=13.3,name=iPhone 11 Pro Max" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - DESTINATION="arch=x86_64" SCHEME="$OSX_FRAMEWORK_SCHEME" SDK="$OSX_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" script: From 6c3aa264be5b455572cf2f7e71e46582e90c1719 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Mon, 24 Feb 2020 09:51:15 +0000 Subject: [PATCH 36/42] Updates SDKs --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2fb72dc..f1aae40 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,9 @@ env: - IOS_FRAMEWORK_SCHEME="Rocc" - TVOS_FRAMEWORK_SCHEME="" - OSX_FRAMEWORK_SCHEME="RoccMac" - - IOS_SDK=iphonesimulator12.2 - - TVOS_SDK=appletvsimulator12.2 - - OSX_SDK=macosx10.14 + - IOS_SDK=iphonesimulator13.3 + - TVOS_SDK=appletvsimulator13.3 + - OSX_SDK=macosx10.15 matrix: - DESTINATION="OS=13.3,name=iPhone 11 Pro Max" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - DESTINATION="arch=x86_64" SCHEME="$OSX_FRAMEWORK_SCHEME" SDK="$OSX_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" From 771dda1dac464c23d9ea77f2da7e441bddadd412 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Mon, 24 Feb 2020 10:08:43 +0000 Subject: [PATCH 37/42] Fixes SDKs again... --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f1aae40..4db06b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,8 @@ env: - IOS_FRAMEWORK_SCHEME="Rocc" - TVOS_FRAMEWORK_SCHEME="" - OSX_FRAMEWORK_SCHEME="RoccMac" - - IOS_SDK=iphonesimulator13.3 - - TVOS_SDK=appletvsimulator13.3 + - IOS_SDK=iphonesimulator13.2 + - TVOS_SDK=appletvsimulator13.2 - OSX_SDK=macosx10.15 matrix: - DESTINATION="OS=13.3,name=iPhone 11 Pro Max" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" From 14d075e827d224bf70325cde651e79686a7dfd0a Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sat, 7 Mar 2020 11:14:24 +0000 Subject: [PATCH 38/42] Fixes compiling on macOS --- Rocc/Device Discovery/DeviceDiscovery.swift | 4 ---- Rocc/Device Discovery/UDPDeviceDiscoverer.swift | 4 ---- Rocc/Helpers/Logging/Logger.swift | 4 ---- Rocc/Helpers/Networking/SOAPRequestBody.swift | 5 +---- .../Sony/API/AVContentClient.swift | 5 ----- .../Sony/API/BaseServiceClient.swift | 5 ----- .../Manufacturer Implementations/Sony/API/CameraClient.swift | 5 ----- .../Manufacturer Implementations/Sony/API/SystemClient.swift | 5 ----- .../Sony/Device Discovery/SonyCameraDiscoverer.swift | 4 ---- .../Sony/Transfer Device/SonyTransferDevice.swift | 4 ---- 10 files changed, 1 insertion(+), 44 deletions(-) diff --git a/Rocc/Device Discovery/DeviceDiscovery.swift b/Rocc/Device Discovery/DeviceDiscovery.swift index 6023c4a..e99cbe7 100644 --- a/Rocc/Device Discovery/DeviceDiscovery.swift +++ b/Rocc/Device Discovery/DeviceDiscovery.swift @@ -7,11 +7,7 @@ // import Foundation -#if os(iOS) import ThunderRequest -#elseif os(macOS) -import ThunderRequestMac -#endif import SystemConfiguration import os diff --git a/Rocc/Device Discovery/UDPDeviceDiscoverer.swift b/Rocc/Device Discovery/UDPDeviceDiscoverer.swift index b449c32..65a5e43 100644 --- a/Rocc/Device Discovery/UDPDeviceDiscoverer.swift +++ b/Rocc/Device Discovery/UDPDeviceDiscoverer.swift @@ -8,11 +8,7 @@ import Foundation import os -#if os(macOS) -import ThunderRequestMac -#else import ThunderRequest -#endif import SystemConfiguration extension UserDefaults { diff --git a/Rocc/Helpers/Logging/Logger.swift b/Rocc/Helpers/Logging/Logger.swift index 011c0b6..00d2309 100644 --- a/Rocc/Helpers/Logging/Logger.swift +++ b/Rocc/Helpers/Logging/Logger.swift @@ -8,11 +8,7 @@ import Foundation import os.log -#if os(macOS) -import ThunderRequestMac -#elseif os(iOS) import ThunderRequest -#endif /// A simple class for logging to a given file url public final class Logger { diff --git a/Rocc/Helpers/Networking/SOAPRequestBody.swift b/Rocc/Helpers/Networking/SOAPRequestBody.swift index 072f798..2c1c805 100644 --- a/Rocc/Helpers/Networking/SOAPRequestBody.swift +++ b/Rocc/Helpers/Networking/SOAPRequestBody.swift @@ -9,11 +9,8 @@ import os.log import Foundation -#if os(iOS) import ThunderRequest -#elseif os(macOS) -import ThunderRequestMac -#endif + struct SOAPRequestBody { diff --git a/Rocc/Manufacturer Implementations/Sony/API/AVContentClient.swift b/Rocc/Manufacturer Implementations/Sony/API/AVContentClient.swift index ed86c90..ce7191f 100644 --- a/Rocc/Manufacturer Implementations/Sony/API/AVContentClient.swift +++ b/Rocc/Manufacturer Implementations/Sony/API/AVContentClient.swift @@ -7,12 +7,7 @@ // import Foundation - -#if os(macOS) -import ThunderRequestMac -#else import ThunderRequest -#endif fileprivate extension File.Content { diff --git a/Rocc/Manufacturer Implementations/Sony/API/BaseServiceClient.swift b/Rocc/Manufacturer Implementations/Sony/API/BaseServiceClient.swift index c5b6607..289fe7f 100644 --- a/Rocc/Manufacturer Implementations/Sony/API/BaseServiceClient.swift +++ b/Rocc/Manufacturer Implementations/Sony/API/BaseServiceClient.swift @@ -7,12 +7,7 @@ // import Foundation - -#if os(macOS) -import ThunderRequestMac -#else import ThunderRequest -#endif internal struct SonyRequestBody { diff --git a/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift b/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift index 6b45a4b..2a9e467 100644 --- a/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift +++ b/Rocc/Manufacturer Implementations/Sony/API/CameraClient.swift @@ -7,12 +7,7 @@ // import Foundation - -#if os(macOS) -import ThunderRequestMac -#else import ThunderRequest -#endif fileprivate extension ShootingMode { diff --git a/Rocc/Manufacturer Implementations/Sony/API/SystemClient.swift b/Rocc/Manufacturer Implementations/Sony/API/SystemClient.swift index 1b4c792..1dcdb9a 100644 --- a/Rocc/Manufacturer Implementations/Sony/API/SystemClient.swift +++ b/Rocc/Manufacturer Implementations/Sony/API/SystemClient.swift @@ -7,12 +7,7 @@ // import Foundation - -#if os(macOS) -import ThunderRequestMac -#else import ThunderRequest -#endif internal final class SystemClient: ServiceClient { diff --git a/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift b/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift index 674a706..8e56546 100644 --- a/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift +++ b/Rocc/Manufacturer Implementations/Sony/Device Discovery/SonyCameraDiscoverer.swift @@ -7,11 +7,7 @@ // import Foundation -#if os(iOS) import ThunderRequest -#elseif os(macOS) -import ThunderRequestMac -#endif import os extension SonyCameraDevice { diff --git a/Rocc/Manufacturer Implementations/Sony/Transfer Device/SonyTransferDevice.swift b/Rocc/Manufacturer Implementations/Sony/Transfer Device/SonyTransferDevice.swift index dd3e4d6..c3546bc 100644 --- a/Rocc/Manufacturer Implementations/Sony/Transfer Device/SonyTransferDevice.swift +++ b/Rocc/Manufacturer Implementations/Sony/Transfer Device/SonyTransferDevice.swift @@ -7,11 +7,7 @@ // import Foundation -#if os(iOS) import ThunderRequest -#elseif os(macOS) -import ThunderRequestMac -#endif internal final class SonyTransferDevice { From e877aec52620827efd04a3b8bd8a56c8477bb00c Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sat, 7 Mar 2020 11:20:52 +0000 Subject: [PATCH 39/42] Bumps ThunderRequest commit to try and fix travis builds --- ThunderRequest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ThunderRequest b/ThunderRequest index 2523ae9..38ba3a7 160000 --- a/ThunderRequest +++ b/ThunderRequest @@ -1 +1 @@ -Subproject commit 2523ae9c5dfb74222289b27544764b96b30f8a10 +Subproject commit 38ba3a720cdc6b83144727a928c9963a94786549 From 61d74ff6cc6df056aae0be288a22a2dd80f44862 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sat, 7 Mar 2020 11:29:34 +0000 Subject: [PATCH 40/42] Bumps ThunderRequest again --- ThunderRequest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ThunderRequest b/ThunderRequest index 38ba3a7..005265b 160000 --- a/ThunderRequest +++ b/ThunderRequest @@ -1 +1 @@ -Subproject commit 38ba3a720cdc6b83144727a928c9963a94786549 +Subproject commit 005265b8608aad34b982230f16881f3eeab89a57 From dd15d7a0ea3b0d7f19d512b9403474c7b74f585f Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sat, 7 Mar 2020 11:36:36 +0000 Subject: [PATCH 41/42] Updates to hopefully fix travis at last --- .travis.yml | 2 +- Rocc.xcodeproj/project.pbxproj | 414 +++------------------------------ ThunderRequest | 2 +- 3 files changed, 32 insertions(+), 386 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4db06b6..754f160 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ env: - LANG=en_US.UTF-8 - IOS_FRAMEWORK_SCHEME="Rocc" - TVOS_FRAMEWORK_SCHEME="" - - OSX_FRAMEWORK_SCHEME="RoccMac" + - OSX_FRAMEWORK_SCHEME="Rocc" - IOS_SDK=iphonesimulator13.2 - TVOS_SDK=appletvsimulator13.2 - OSX_SDK=macosx10.15 diff --git a/Rocc.xcodeproj/project.pbxproj b/Rocc.xcodeproj/project.pbxproj index 2b9ff7e..0563a93 100644 --- a/Rocc.xcodeproj/project.pbxproj +++ b/Rocc.xcodeproj/project.pbxproj @@ -22,25 +22,16 @@ B100E1C620A105D9004F7AB8 /* TVColorSystem.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E1C520A105D9004F7AB8 /* TVColorSystem.swift */; }; B100E1DE20A1A60A004F7AB8 /* RemotePlayback.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E1D820A1A60A004F7AB8 /* RemotePlayback.swift */; }; B10B38F021E0F6C300FED24F /* Function.swift in Sources */ = {isa = PBXBuildFile; fileRef = B10B38EF21E0F6C300FED24F /* Function.swift */; }; - B10B38F121E0F6C300FED24F /* Function.swift in Sources */ = {isa = PBXBuildFile; fileRef = B10B38EF21E0F6C300FED24F /* Function.swift */; }; - B115EF2421E9F26600667FB7 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A25F3121AE950E00D9EE81 /* Errors.swift */; }; - B115EF2A21E9F27900667FB7 /* ShutterSpeedFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A25F2021ADE6CE00D9EE81 /* ShutterSpeedFormatter.swift */; }; B115EF2F21E9FC3A00667FB7 /* SonyXMLParsers.swift in Sources */ = {isa = PBXBuildFile; fileRef = B115EF2E21E9FC3900667FB7 /* SonyXMLParsers.swift */; }; - B115EF3021E9FC3A00667FB7 /* SonyXMLParsers.swift in Sources */ = {isa = PBXBuildFile; fileRef = B115EF2E21E9FC3900667FB7 /* SonyXMLParsers.swift */; }; B115EF3721E9FDA100667FB7 /* SonyDeviceInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B115EF3621E9FDA100667FB7 /* SonyDeviceInfo.swift */; }; - B115EF3821E9FDA100667FB7 /* SonyDeviceInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B115EF3621E9FDA100667FB7 /* SonyDeviceInfo.swift */; }; B115EFB721ECF88100667FB7 /* UPnPParsers.swift in Sources */ = {isa = PBXBuildFile; fileRef = B115EFB621ECF88100667FB7 /* UPnPParsers.swift */; }; - B115EFB821ECF88100667FB7 /* UPnPParsers.swift in Sources */ = {isa = PBXBuildFile; fileRef = B115EFB621ECF88100667FB7 /* UPnPParsers.swift */; }; B115EFC521ECFB4700667FB7 /* CdsDesc.xml in Resources */ = {isa = PBXBuildFile; fileRef = B115EFC321ECFB4700667FB7 /* CdsDesc.xml */; }; B115EFC621ECFB4700667FB7 /* CmsDesc.xml in Resources */ = {isa = PBXBuildFile; fileRef = B115EFC421ECFB4700667FB7 /* CmsDesc.xml */; }; B115EFD321ECFB6B00667FB7 /* ParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B115EFD221ECFB6B00667FB7 /* ParserTests.swift */; }; B115EFD421ECFBC300667FB7 /* UPnPParsers.swift in Sources */ = {isa = PBXBuildFile; fileRef = B115EFB621ECF88100667FB7 /* UPnPParsers.swift */; }; B11786F92187753F0006B72E /* SonyCamera+Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = B11786F82187753F0006B72E /* SonyCamera+Model.swift */; }; - B11786FA2187753F0006B72E /* SonyCamera+Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = B11786F82187753F0006B72E /* SonyCamera+Model.swift */; }; B1178701218775980006B72E /* FunctionNames.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1178700218775980006B72E /* FunctionNames.swift */; }; - B1178702218775980006B72E /* FunctionNames.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1178700218775980006B72E /* FunctionNames.swift */; }; B11D8E7321B9300F00719019 /* SimulatedCamera.swift in Sources */ = {isa = PBXBuildFile; fileRef = B11D8E6D21B9300F00719019 /* SimulatedCamera.swift */; }; - B11D8E7421B9300F00719019 /* SimulatedCamera.swift in Sources */ = {isa = PBXBuildFile; fileRef = B11D8E6D21B9300F00719019 /* SimulatedCamera.swift */; }; B1316A572089C08F006BD136 /* Rocc.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1316A4D2089C08F006BD136 /* Rocc.framework */; }; B1316A5C2089C08F006BD136 /* RoccTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1316A5B2089C08F006BD136 /* RoccTests.swift */; }; B1316A5E2089C08F006BD136 /* Rocc.h in Headers */ = {isa = PBXBuildFile; fileRef = B1316A502089C08F006BD136 /* Rocc.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -48,70 +39,26 @@ B1316A742089C1D6006BD136 /* UDPClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1316A732089C1D6006BD136 /* UDPClient.swift */; }; B1316A7B2089C426006BD136 /* SonyConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1316A7A2089C426006BD136 /* SonyConstants.swift */; }; B154525C21EE61B800C59096 /* SOAPRequestBody.swift in Sources */ = {isa = PBXBuildFile; fileRef = B154525B21EE61B800C59096 /* SOAPRequestBody.swift */; }; - B154525D21EE61B800C59096 /* SOAPRequestBody.swift in Sources */ = {isa = PBXBuildFile; fileRef = B154525B21EE61B800C59096 /* SOAPRequestBody.swift */; }; B154526421EE63DB00C59096 /* SOAPRequestBody.swift in Sources */ = {isa = PBXBuildFile; fileRef = B154525B21EE61B800C59096 /* SOAPRequestBody.swift */; }; B154535521EFDC1700C59096 /* Countable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B154535421EFDC1700C59096 /* Countable.swift */; }; - B154535621EFDC1700C59096 /* Countable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B154535421EFDC1700C59096 /* Countable.swift */; }; B154535E21EFE3D100C59096 /* ChildRangeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B154535D21EFE3D100C59096 /* ChildRangeTests.swift */; }; B154535F21EFE3DC00C59096 /* Countable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B154535421EFDC1700C59096 /* Countable.swift */; }; B1561ED120976B850013D122 /* ShootMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1561ECB20976B850013D122 /* ShootMode.swift */; }; B1561ED420976F7B0013D122 /* Capture.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1561ED320976F7A0013D122 /* Capture.swift */; }; B16064A821E3A00A00AE3483 /* SonyTransferDevice.swift in Sources */ = {isa = PBXBuildFile; fileRef = B16064A221E3A00900AE3483 /* SonyTransferDevice.swift */; }; - B16064A921E3A00A00AE3483 /* SonyTransferDevice.swift in Sources */ = {isa = PBXBuildFile; fileRef = B16064A221E3A00900AE3483 /* SonyTransferDevice.swift */; }; B163AEBF20A8D6050061D1C4 /* CameraEventNotifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = B163AEBE20A8D6050061D1C4 /* CameraEventNotifier.swift */; }; - B163AEC020A8D6050061D1C4 /* CameraEventNotifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = B163AEBE20A8D6050061D1C4 /* CameraEventNotifier.swift */; }; B164F02621811BD400590A05 /* SonyCameraDiscoverer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B164F02521811BD400590A05 /* SonyCameraDiscoverer.swift */; }; - B164F02721811BD400590A05 /* SonyCameraDiscoverer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B164F02521811BD400590A05 /* SonyCameraDiscoverer.swift */; }; B164F02921811C1200590A05 /* String+Regex.swift in Sources */ = {isa = PBXBuildFile; fileRef = B164F02821811C1200590A05 /* String+Regex.swift */; }; - B164F02A21811C1200590A05 /* String+Regex.swift in Sources */ = {isa = PBXBuildFile; fileRef = B164F02821811C1200590A05 /* String+Regex.swift */; }; B16BFBC820A49F92006BD081 /* Storage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B16BFBC220A49F91006BD081 /* Storage.swift */; }; B16BFD1121F5F0E600AF3F24 /* SimplePing.m in Sources */ = {isa = PBXBuildFile; fileRef = B16BFD0F21F5F0E600AF3F24 /* SimplePing.m */; }; - B16BFD1221F5F0E600AF3F24 /* SimplePing.m in Sources */ = {isa = PBXBuildFile; fileRef = B16BFD0F21F5F0E600AF3F24 /* SimplePing.m */; }; B16BFD1321F5F0E600AF3F24 /* SimplePing.h in Headers */ = {isa = PBXBuildFile; fileRef = B16BFD1021F5F0E600AF3F24 /* SimplePing.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B16BFD1421F5F0E600AF3F24 /* SimplePing.h in Headers */ = {isa = PBXBuildFile; fileRef = B16BFD1021F5F0E600AF3F24 /* SimplePing.h */; settings = {ATTRIBUTES = (Public, ); }; }; B16BFD1621F5F0F100AF3F24 /* Pinger.swift in Sources */ = {isa = PBXBuildFile; fileRef = B16BFD1521F5F0F100AF3F24 /* Pinger.swift */; }; - B16BFD1721F5F0F100AF3F24 /* Pinger.swift in Sources */ = {isa = PBXBuildFile; fileRef = B16BFD1521F5F0F100AF3F24 /* Pinger.swift */; }; B1751E7920A316C2001D05F1 /* SystemClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1751E7320A316C2001D05F1 /* SystemClient.swift */; }; - B1751E7A20A316C2001D05F1 /* SystemClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1751E7320A316C2001D05F1 /* SystemClient.swift */; }; B1990A8020C3FA1D0090A2F6 /* DeviceConnectivityNotifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1990A7F20C3FA1D0090A2F6 /* DeviceConnectivityNotifier.swift */; }; - B1990A8120C3FA1D0090A2F6 /* DeviceConnectivityNotifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1990A7F20C3FA1D0090A2F6 /* DeviceConnectivityNotifier.swift */; }; B1990A8320C3FDAA0090A2F6 /* Reachability.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1990A8220C3FDAA0090A2F6 /* Reachability.swift */; }; - B1990A8420C3FDAA0090A2F6 /* Reachability.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1990A8220C3FDAA0090A2F6 /* Reachability.swift */; }; B1990A8620C408C20090A2F6 /* Ping.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1990A8520C408C20090A2F6 /* Ping.swift */; }; - B1990A8720C408C20090A2F6 /* Ping.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1990A8520C408C20090A2F6 /* Ping.swift */; }; B1A1AA1A20A4E01D00FD0A4A /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A1AA1420A4E01D00FD0A4A /* Event.swift */; }; - B1A1AA1E20A4E02200FD0A4A /* Aperture.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB48722092743100C33C86 /* Aperture.swift */; }; - B1A1AA1F20A4E02200FD0A4A /* AutoPowerOff.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1EF4C8A20A24DA100EEDE3E /* AutoPowerOff.swift */; }; - B1A1AA2020A4E02200FD0A4A /* BeepMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1EF4CAC20A3140A00EEDE3E /* BeepMode.swift */; }; - B1A1AA2120A4E02200FD0A4A /* Capture.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1561ED320976F7A0013D122 /* Capture.swift */; }; - B1A1AA2220A4E02200FD0A4A /* ColorSetting.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E1B920A0DA92004F7AB8 /* ColorSetting.swift */; }; - B1A1AA2320A4E02200FD0A4A /* CurrentTime.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1EF4CAF20A3161700EEDE3E /* CurrentTime.swift */; }; - B1A1AA2420A4E02200FD0A4A /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A1AA1420A4E01D00FD0A4A /* Event.swift */; }; - B1A1AA2520A4E02200FD0A4A /* Exposure.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E19E20A04CEF004F7AB8 /* Exposure.swift */; }; - B1A1AA2620A4E02200FD0A4A /* FileSystem.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B4342920939EF500A81B9D /* FileSystem.swift */; }; - B1A1AA2720A4E02200FD0A4A /* FlipSetting.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E1C220A0F90A004F7AB8 /* FlipSetting.swift */; }; - B1A1AA2820A4E02200FD0A4A /* Focus.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E1A120A04EE0004F7AB8 /* Focus.swift */; }; - B1A1AA2920A4E02200FD0A4A /* InfraredRemoteControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1EF4C8220A24B6300EEDE3E /* InfraredRemoteControl.swift */; }; - B1A1AA2A20A4E02200FD0A4A /* IntervalTime.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E1BC20A0DE7D004F7AB8 /* IntervalTime.swift */; }; - B1A1AA2B20A4E02200FD0A4A /* ISO.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B43459209747C200A81B9D /* ISO.swift */; }; - B1A1AA2C20A4E02200FD0A4A /* LiveView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1CE24A72098FD1E0049EC87 /* LiveView.swift */; }; - B1A1AA2E20A4E02200FD0A4A /* PostViewImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E1AA20A0A42D004F7AB8 /* PostViewImage.swift */; }; - B1A1AA2F20A4E02200FD0A4A /* ProgramShift.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E1A420A09986004F7AB8 /* ProgramShift.swift */; }; - B1A1AA3020A4E02200FD0A4A /* RemotePlayback.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E1D820A1A60A004F7AB8 /* RemotePlayback.swift */; }; - B1A1AA3120A4E02200FD0A4A /* Scene.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E1B620A0D7C7004F7AB8 /* Scene.swift */; }; - B1A1AA3220A4E02200FD0A4A /* ShootMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1561ECB20976B850013D122 /* ShootMode.swift */; }; - B1A1AA3420A4E02200FD0A4A /* Shutter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1CE24B32099AA7D0049EC87 /* Shutter.swift */; }; - B1A1AA3520A4E02200FD0A4A /* SteadyMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E1B020A0D282004F7AB8 /* SteadyMode.swift */; }; - B1A1AA3620A4E02200FD0A4A /* Storage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B16BFBC220A49F91006BD081 /* Storage.swift */; }; - B1A1AA3820A4E02200FD0A4A /* TouchAF.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1CE444F2099B492001DB2B6 /* TouchAF.swift */; }; - B1A1AA3920A4E02200FD0A4A /* TrackingFocus.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E196209E47F8004F7AB8 /* TrackingFocus.swift */; }; - B1A1AA3A20A4E02200FD0A4A /* TVColorSystem.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E1C520A105D9004F7AB8 /* TVColorSystem.swift */; }; - B1A1AA3B20A4E02200FD0A4A /* ViewAngle.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E1B320A0D59E004F7AB8 /* ViewAngle.swift */; }; - B1A1AA3C20A4E02200FD0A4A /* WhiteBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B4345C2097483300A81B9D /* WhiteBalance.swift */; }; - B1A1AA3D20A4E02200FD0A4A /* WindNoiseReduction.swift in Sources */ = {isa = PBXBuildFile; fileRef = B100E1BF20A0E8F1004F7AB8 /* WindNoiseReduction.swift */; }; - B1A1AA3E20A4E02200FD0A4A /* Zoom.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1CE24B12099184B0049EC87 /* Zoom.swift */; }; B1A1B67F21F8BC78008B5181 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A1B67E21F8BC78008B5181 /* Logger.swift */; }; - B1A1B68021F8BC78008B5181 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A1B67E21F8BC78008B5181 /* Logger.swift */; }; B1A25F2121ADE6CE00D9EE81 /* ShutterSpeedFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A25F2021ADE6CE00D9EE81 /* ShutterSpeedFormatter.swift */; }; B1A25F2221ADE6CE00D9EE81 /* ShutterSpeedFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A25F2021ADE6CE00D9EE81 /* ShutterSpeedFormatter.swift */; }; B1A25F2921ADEAAC00D9EE81 /* ShutterSpeedFormatterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A25F2821ADEAAC00D9EE81 /* ShutterSpeedFormatterTests.swift */; }; @@ -120,51 +67,30 @@ B1A3EC2521F11AB700670712 /* CameraFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B4344F209746B000A81B9D /* CameraFunctions.swift */; }; B1AF502A208A51D00029336B /* NetworkInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1AF5029208A51D00029336B /* NetworkInterface.swift */; }; B1AF504B208D345A0029336B /* ThunderRequest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1AF5041208D34510029336B /* ThunderRequest.framework */; }; - B1AF5091208DC3A80029336B /* RoccMac.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1AF5088208DC3A80029336B /* RoccMac.framework */; }; - B1AF5096208DC3A80029336B /* RoccMacTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1AF5095208DC3A80029336B /* RoccMacTests.swift */; }; - B1AF5098208DC3A80029336B /* RoccMac.h in Headers */ = {isa = PBXBuildFile; fileRef = B1AF508A208DC3A80029336B /* RoccMac.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B1AF509F208DC3AF0029336B /* SonyConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1316A7A2089C426006BD136 /* SonyConstants.swift */; }; - B1AF50A0208DC3B20029336B /* DeviceDiscovery.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1316A712089C0F6006BD136 /* DeviceDiscovery.swift */; }; - B1AF50A1208DC3B50029336B /* UDPClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1316A732089C1D6006BD136 /* UDPClient.swift */; }; - B1AF50A2208DC3B80029336B /* NetworkInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1AF5029208A51D00029336B /* NetworkInterface.swift */; }; B1B4342A20939EF500A81B9D /* FileSystem.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B4342920939EF500A81B9D /* FileSystem.swift */; }; B1B43450209746B000A81B9D /* CameraFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B4344F209746B000A81B9D /* CameraFunctions.swift */; }; - B1B43451209746B000A81B9D /* CameraFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B4344F209746B000A81B9D /* CameraFunctions.swift */; }; B1B4345A209747C200A81B9D /* ISO.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B43459209747C200A81B9D /* ISO.swift */; }; B1B4345D2097483300A81B9D /* WhiteBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B4345C2097483300A81B9D /* WhiteBalance.swift */; }; - B1BAAC8F222583B8007F0F61 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A1B67E21F8BC78008B5181 /* Logger.swift */; }; B1BAAC96222583B9007F0F61 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A1B67E21F8BC78008B5181 /* Logger.swift */; }; B1CDCB8322234CAA00DD0F0E /* UPnPService.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1CDCB8222234CAA00DD0F0E /* UPnPService.swift */; }; - B1CDCB8F2223524100DD0F0E /* ThunderRequestMac.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1AF5045208D34510029336B /* ThunderRequestMac.framework */; }; - B1CDCB90222352BB00DD0F0E /* UPnPService.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1CDCB8222234CAA00DD0F0E /* UPnPService.swift */; }; B1CE24AD2098FD1E0049EC87 /* LiveView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1CE24A72098FD1E0049EC87 /* LiveView.swift */; }; B1CE24B22099184B0049EC87 /* Zoom.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1CE24B12099184B0049EC87 /* Zoom.swift */; }; B1CE24B42099AA7D0049EC87 /* Shutter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1CE24B32099AA7D0049EC87 /* Shutter.swift */; }; B1CE44552099B492001DB2B6 /* TouchAF.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1CE444F2099B492001DB2B6 /* TouchAF.swift */; }; B1D358F920AA34CF0069C698 /* LiveViewStreaming.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D358F820AA34CF0069C698 /* LiveViewStreaming.swift */; }; - B1D358FA20AA34CF0069C698 /* LiveViewStreaming.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D358F820AA34CF0069C698 /* LiveViewStreaming.swift */; }; B1D3591120AADC810069C698 /* Data+Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D3591020AADC810069C698 /* Data+Conversion.swift */; }; - B1D3591220AADC810069C698 /* Data+Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D3591020AADC810069C698 /* Data+Conversion.swift */; }; B1D606542181225E001719EC /* UDPDeviceDiscoverer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D606532181225E001719EC /* UDPDeviceDiscoverer.swift */; }; - B1D606552181225E001719EC /* UDPDeviceDiscoverer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D606532181225E001719EC /* UDPDeviceDiscoverer.swift */; }; B1EF4C8820A24B6300EEDE3E /* InfraredRemoteControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1EF4C8220A24B6300EEDE3E /* InfraredRemoteControl.swift */; }; B1EF4C8B20A24DA100EEDE3E /* AutoPowerOff.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1EF4C8A20A24DA100EEDE3E /* AutoPowerOff.swift */; }; B1EF4CAD20A3140A00EEDE3E /* BeepMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1EF4CAC20A3140A00EEDE3E /* BeepMode.swift */; }; B1EF4CB020A3161700EEDE3E /* CurrentTime.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1EF4CAF20A3161700EEDE3E /* CurrentTime.swift */; }; B1FB47FC209088FD00C33C86 /* SonyCameraAPIClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB47FB209088FD00C33C86 /* SonyCameraAPIClient.swift */; }; - B1FB47FD209088FD00C33C86 /* SonyCameraAPIClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB47FB209088FD00C33C86 /* SonyCameraAPIClient.swift */; }; B1FB47FF209089CA00C33C86 /* CameraClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB47FE209089CA00C33C86 /* CameraClient.swift */; }; - B1FB4800209089CA00C33C86 /* CameraClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB47FE209089CA00C33C86 /* CameraClient.swift */; }; B1FB4802209089D800C33C86 /* AVContentClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB4801209089D800C33C86 /* AVContentClient.swift */; }; - B1FB4803209089D800C33C86 /* AVContentClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB4801209089D800C33C86 /* AVContentClient.swift */; }; B1FB48092090964100C33C86 /* BaseServiceClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB48082090964100C33C86 /* BaseServiceClient.swift */; }; - B1FB480A2090964100C33C86 /* BaseServiceClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB48082090964100C33C86 /* BaseServiceClient.swift */; }; B1FB4811209096FB00C33C86 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB4810209096FB00C33C86 /* Result.swift */; }; - B1FB4812209096FB00C33C86 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB4810209096FB00C33C86 /* Result.swift */; }; B1FB486C2092579E00C33C86 /* Camera.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB486B2092579E00C33C86 /* Camera.swift */; }; - B1FB486D2092579E00C33C86 /* Camera.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB486B2092579E00C33C86 /* Camera.swift */; }; B1FB486F2092585400C33C86 /* SonyCamera.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB486E2092585400C33C86 /* SonyCamera.swift */; }; - B1FB48702092585400C33C86 /* SonyCamera.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB486E2092585400C33C86 /* SonyCamera.swift */; }; B1FB48732092743100C33C86 /* Aperture.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FB48722092743100C33C86 /* Aperture.swift */; }; /* End PBXBuildFile section */ @@ -183,6 +109,13 @@ remoteGlobalIDString = B1316A4C2089C08F006BD136; remoteInfo = CCKit; }; + B19F94FF2413BDEC00DBBBC0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B1AF5038208D34510029336B /* ThunderRequest.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B190A829228DBA3A00E44821; + remoteInfo = "ThunderRequestTests-tvOS"; + }; B1AF5040208D34510029336B /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = B1AF5038208D34510029336B /* ThunderRequest.xcodeproj */; @@ -218,13 +151,6 @@ remoteGlobalIDString = 49084FD11BD13DBD0012F636; remoteInfo = ThunderRequestTV; }; - B1AF5092208DC3A80029336B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = B1316A442089C08E006BD136 /* Project object */; - proxyType = 1; - remoteGlobalIDString = B1AF5087208DC3A80029336B; - remoteInfo = CCKitMac; - }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -278,6 +204,8 @@ B1990A7F20C3FA1D0090A2F6 /* DeviceConnectivityNotifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceConnectivityNotifier.swift; sourceTree = ""; }; B1990A8220C3FDAA0090A2F6 /* Reachability.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Reachability.swift; sourceTree = ""; }; B1990A8520C408C20090A2F6 /* Ping.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Ping.swift; sourceTree = ""; }; + B19F95012413BDEF00DBBBC0 /* ThunderRequestMac.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ThunderRequestMac.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B19F95052413BE0100DBBBC0 /* ThunderRequest.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ThunderRequest.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B1A1AA1420A4E01D00FD0A4A /* Event.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Event.swift; sourceTree = ""; }; B1A1B67E21F8BC78008B5181 /* Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; B1A25F2021ADE6CE00D9EE81 /* ShutterSpeedFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShutterSpeedFormatter.swift; sourceTree = ""; }; @@ -285,10 +213,8 @@ B1A25F3121AE950E00D9EE81 /* Errors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Errors.swift; sourceTree = ""; }; B1AF5029208A51D00029336B /* NetworkInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkInterface.swift; sourceTree = ""; }; B1AF5038208D34510029336B /* ThunderRequest.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ThunderRequest.xcodeproj; path = ThunderRequest/ThunderRequest.xcodeproj; sourceTree = ""; }; - B1AF5088208DC3A80029336B /* RoccMac.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RoccMac.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B1AF508A208DC3A80029336B /* RoccMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoccMac.h; sourceTree = ""; }; B1AF508B208DC3A80029336B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - B1AF5090208DC3A80029336B /* RoccMacTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RoccMacTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; B1AF5095208DC3A80029336B /* RoccMacTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoccMacTests.swift; sourceTree = ""; }; B1AF5097208DC3A80029336B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B1B4342920939EF500A81B9D /* FileSystem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSystem.swift; sourceTree = ""; }; @@ -334,22 +260,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - B1AF5084208DC3A80029336B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - B1CDCB8F2223524100DD0F0E /* ThunderRequestMac.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B1AF508D208DC3A80029336B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - B1AF5091208DC3A80029336B /* RoccMac.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -371,8 +281,6 @@ children = ( B1316A4D2089C08F006BD136 /* Rocc.framework */, B1316A562089C08F006BD136 /* RoccTests.xctest */, - B1AF5088208DC3A80029336B /* RoccMac.framework */, - B1AF5090208DC3A80029336B /* RoccMacTests.xctest */, ); name = Products; sourceTree = ""; @@ -432,10 +340,11 @@ children = ( B1AF5041208D34510029336B /* ThunderRequest.framework */, B1AF5043208D34510029336B /* ThunderRequestTests.xctest */, - B1AF5045208D34510029336B /* ThunderRequestMac.framework */, + B1AF5045208D34510029336B /* ThunderRequest.framework */, B1AF5047208D34510029336B /* ThunderRequestMacTests.xctest */, - B1AF5049208D34510029336B /* ThunderRequestTV.framework */, - B115EFC021ECF88200667FB7 /* ThunderRequestWatch.framework */, + B1AF5049208D34510029336B /* ThunderRequest.framework */, + B19F95002413BDEC00DBBBC0 /* ThunderRequestTests-tvOS.xctest */, + B115EFC021ECF88200667FB7 /* ThunderRequest.framework */, ); name = Products; sourceTree = ""; @@ -443,6 +352,8 @@ B1AF504A208D345A0029336B /* Frameworks */ = { isa = PBXGroup; children = ( + B19F95052413BE0100DBBBC0 /* ThunderRequest.framework */, + B19F95012413BDEF00DBBBC0 /* ThunderRequestMac.framework */, ); name = Frameworks; sourceTree = ""; @@ -623,15 +534,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - B1AF5085208DC3A80029336B /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - B16BFD1421F5F0E600AF3F24 /* SimplePing.h in Headers */, - B1AF5098208DC3A80029336B /* RoccMac.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ @@ -671,42 +573,6 @@ productReference = B1316A562089C08F006BD136 /* RoccTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - B1AF5087208DC3A80029336B /* RoccMac */ = { - isa = PBXNativeTarget; - buildConfigurationList = B1AF5099208DC3A80029336B /* Build configuration list for PBXNativeTarget "RoccMac" */; - buildPhases = ( - B1AF5083208DC3A80029336B /* Sources */, - B1AF5084208DC3A80029336B /* Frameworks */, - B1AF5085208DC3A80029336B /* Headers */, - B1AF5086208DC3A80029336B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = RoccMac; - productName = CCKitMac; - productReference = B1AF5088208DC3A80029336B /* RoccMac.framework */; - productType = "com.apple.product-type.framework"; - }; - B1AF508F208DC3A80029336B /* RoccMacTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = B1AF509C208DC3A80029336B /* Build configuration list for PBXNativeTarget "RoccMacTests" */; - buildPhases = ( - B1AF508C208DC3A80029336B /* Sources */, - B1AF508D208DC3A80029336B /* Frameworks */, - B1AF508E208DC3A80029336B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - B1AF5093208DC3A80029336B /* PBXTargetDependency */, - ); - name = RoccMacTests; - productName = CCKitMacTests; - productReference = B1AF5090208DC3A80029336B /* RoccMacTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -724,13 +590,6 @@ B1316A552089C08F006BD136 = { CreatedOnToolsVersion = 9.3; }; - B1AF5087208DC3A80029336B = { - CreatedOnToolsVersion = 9.3; - LastSwiftMigration = 1010; - }; - B1AF508F208DC3A80029336B = { - CreatedOnToolsVersion = 9.3; - }; }; }; buildConfigurationList = B1316A472089C08E006BD136 /* Build configuration list for PBXProject "Rocc" */; @@ -753,20 +612,25 @@ targets = ( B1316A4C2089C08F006BD136 /* Rocc */, B1316A552089C08F006BD136 /* RoccTests */, - B1AF5087208DC3A80029336B /* RoccMac */, - B1AF508F208DC3A80029336B /* RoccMacTests */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ - B115EFC021ECF88200667FB7 /* ThunderRequestWatch.framework */ = { + B115EFC021ECF88200667FB7 /* ThunderRequest.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; - path = ThunderRequestWatch.framework; + path = ThunderRequest.framework; remoteRef = B115EFBF21ECF88200667FB7 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + B19F95002413BDEC00DBBBC0 /* ThunderRequestTests-tvOS.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = "ThunderRequestTests-tvOS.xctest"; + remoteRef = B19F94FF2413BDEC00DBBBC0 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; B1AF5041208D34510029336B /* ThunderRequest.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; @@ -781,10 +645,10 @@ remoteRef = B1AF5042208D34510029336B /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - B1AF5045208D34510029336B /* ThunderRequestMac.framework */ = { + B1AF5045208D34510029336B /* ThunderRequest.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; - path = ThunderRequestMac.framework; + path = ThunderRequest.framework; remoteRef = B1AF5044208D34510029336B /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -795,10 +659,10 @@ remoteRef = B1AF5046208D34510029336B /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - B1AF5049208D34510029336B /* ThunderRequestTV.framework */ = { + B1AF5049208D34510029336B /* ThunderRequest.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; - path = ThunderRequestTV.framework; + path = ThunderRequest.framework; remoteRef = B1AF5048208D34510029336B /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -821,20 +685,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - B1AF5086208DC3A80029336B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B1AF508E208DC3A80029336B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -931,90 +781,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - B1AF5083208DC3A80029336B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B1A1AA3E20A4E02200FD0A4A /* Zoom.swift in Sources */, - B1FB4812209096FB00C33C86 /* Result.swift in Sources */, - B115EF2A21E9F27900667FB7 /* ShutterSpeedFormatter.swift in Sources */, - B1A1AA3B20A4E02200FD0A4A /* ViewAngle.swift in Sources */, - B1AF50A2208DC3B80029336B /* NetworkInterface.swift in Sources */, - B1A1AA3020A4E02200FD0A4A /* RemotePlayback.swift in Sources */, - B1A1AA3620A4E02200FD0A4A /* Storage.swift in Sources */, - B1FB4800209089CA00C33C86 /* CameraClient.swift in Sources */, - B1A1AA2A20A4E02200FD0A4A /* IntervalTime.swift in Sources */, - B16064A921E3A00A00AE3483 /* SonyTransferDevice.swift in Sources */, - B1A1AA2C20A4E02200FD0A4A /* LiveView.swift in Sources */, - B164F02A21811C1200590A05 /* String+Regex.swift in Sources */, - B1A1AA3520A4E02200FD0A4A /* SteadyMode.swift in Sources */, - B1A1AA3220A4E02200FD0A4A /* ShootMode.swift in Sources */, - B154535621EFDC1700C59096 /* Countable.swift in Sources */, - B1A1AA3920A4E02200FD0A4A /* TrackingFocus.swift in Sources */, - B1A1AA2B20A4E02200FD0A4A /* ISO.swift in Sources */, - B1A1AA2520A4E02200FD0A4A /* Exposure.swift in Sources */, - B1A1AA1E20A4E02200FD0A4A /* Aperture.swift in Sources */, - B1A1AA2420A4E02200FD0A4A /* Event.swift in Sources */, - B1A1AA2820A4E02200FD0A4A /* Focus.swift in Sources */, - B1A1AA2E20A4E02200FD0A4A /* PostViewImage.swift in Sources */, - B1FB47FD209088FD00C33C86 /* SonyCameraAPIClient.swift in Sources */, - B1FB4803209089D800C33C86 /* AVContentClient.swift in Sources */, - B1A1AA3420A4E02200FD0A4A /* Shutter.swift in Sources */, - B115EF2421E9F26600667FB7 /* Errors.swift in Sources */, - B1A1AA2920A4E02200FD0A4A /* InfraredRemoteControl.swift in Sources */, - B1A1AA2720A4E02200FD0A4A /* FlipSetting.swift in Sources */, - B115EF3821E9FDA100667FB7 /* SonyDeviceInfo.swift in Sources */, - B1D606552181225E001719EC /* UDPDeviceDiscoverer.swift in Sources */, - B1AF50A1208DC3B50029336B /* UDPClient.swift in Sources */, - B11786FA2187753F0006B72E /* SonyCamera+Model.swift in Sources */, - B1FB486D2092579E00C33C86 /* Camera.swift in Sources */, - B1A1AA3A20A4E02200FD0A4A /* TVColorSystem.swift in Sources */, - B1D358FA20AA34CF0069C698 /* LiveViewStreaming.swift in Sources */, - B16BFD1221F5F0E600AF3F24 /* SimplePing.m in Sources */, - B11D8E7421B9300F00719019 /* SimulatedCamera.swift in Sources */, - B164F02721811BD400590A05 /* SonyCameraDiscoverer.swift in Sources */, - B163AEC020A8D6050061D1C4 /* CameraEventNotifier.swift in Sources */, - B1A1AA3D20A4E02200FD0A4A /* WindNoiseReduction.swift in Sources */, - B1FB48702092585400C33C86 /* SonyCamera.swift in Sources */, - B1A1AA3C20A4E02200FD0A4A /* WhiteBalance.swift in Sources */, - B1FB480A2090964100C33C86 /* BaseServiceClient.swift in Sources */, - B1A1AA2020A4E02200FD0A4A /* BeepMode.swift in Sources */, - B1A1AA1F20A4E02200FD0A4A /* AutoPowerOff.swift in Sources */, - B1A1AA2320A4E02200FD0A4A /* CurrentTime.swift in Sources */, - B1A1AA2220A4E02200FD0A4A /* ColorSetting.swift in Sources */, - B115EF3021E9FC3A00667FB7 /* SonyXMLParsers.swift in Sources */, - B1CDCB90222352BB00DD0F0E /* UPnPService.swift in Sources */, - B154525D21EE61B800C59096 /* SOAPRequestBody.swift in Sources */, - B1A1AA2F20A4E02200FD0A4A /* ProgramShift.swift in Sources */, - B16BFD1721F5F0F100AF3F24 /* Pinger.swift in Sources */, - B1AF50A0208DC3B20029336B /* DeviceDiscovery.swift in Sources */, - B1A1AA2120A4E02200FD0A4A /* Capture.swift in Sources */, - B1A1B68021F8BC78008B5181 /* Logger.swift in Sources */, - B115EFB821ECF88100667FB7 /* UPnPParsers.swift in Sources */, - B1178702218775980006B72E /* FunctionNames.swift in Sources */, - B1A1AA3820A4E02200FD0A4A /* TouchAF.swift in Sources */, - B1A1AA2620A4E02200FD0A4A /* FileSystem.swift in Sources */, - B1D3591220AADC810069C698 /* Data+Conversion.swift in Sources */, - B10B38F121E0F6C300FED24F /* Function.swift in Sources */, - B1B43451209746B000A81B9D /* CameraFunctions.swift in Sources */, - B1990A8720C408C20090A2F6 /* Ping.swift in Sources */, - B1990A8120C3FA1D0090A2F6 /* DeviceConnectivityNotifier.swift in Sources */, - B1751E7A20A316C2001D05F1 /* SystemClient.swift in Sources */, - B1AF509F208DC3AF0029336B /* SonyConstants.swift in Sources */, - B1990A8420C3FDAA0090A2F6 /* Reachability.swift in Sources */, - B1A1AA3120A4E02200FD0A4A /* Scene.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B1AF508C208DC3A80029336B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B1AF5096208DC3A80029336B /* RoccMacTests.swift in Sources */, - B1BAAC8F222583B8007F0F61 /* Logger.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -1023,11 +789,6 @@ target = B1316A4C2089C08F006BD136 /* Rocc */; targetProxy = B1316A582089C08F006BD136 /* PBXContainerItemProxy */; }; - B1AF5093208DC3A80029336B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = B1AF5087208DC3A80029336B /* RoccMac */; - targetProxy = B1AF5092208DC3A80029336B /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -1172,6 +933,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.yellowbrickbear.rocc; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1199,6 +961,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.yellowbrickbear.rocc; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -1240,105 +1003,6 @@ }; name = Release; }; - B1AF509A208DC3A80029336B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_VERSION = A; - INFOPLIST_FILE = RoccMac/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 10.13; - PRODUCT_BUNDLE_IDENTIFIER = com.yellowbrickbear.roccmac; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - B1AF509B208DC3A80029336B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_VERSION = A; - INFOPLIST_FILE = RoccMac/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@loader_path/Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 10.13; - PRODUCT_BUNDLE_IDENTIFIER = com.yellowbrickbear.roccmac; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; - B1AF509D208DC3A80029336B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = RoccMacTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@loader_path/../Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 10.13; - PRODUCT_BUNDLE_IDENTIFIER = com.yellowbrickbear.RoccMacTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - B1AF509E208DC3A80029336B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = RoccMacTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@loader_path/../Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 10.13; - PRODUCT_BUNDLE_IDENTIFIER = com.yellowbrickbear.RoccMacTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -1369,24 +1033,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - B1AF5099208DC3A80029336B /* Build configuration list for PBXNativeTarget "RoccMac" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B1AF509A208DC3A80029336B /* Debug */, - B1AF509B208DC3A80029336B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - B1AF509C208DC3A80029336B /* Build configuration list for PBXNativeTarget "RoccMacTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B1AF509D208DC3A80029336B /* Debug */, - B1AF509E208DC3A80029336B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ }; rootObject = B1316A442089C08E006BD136 /* Project object */; diff --git a/ThunderRequest b/ThunderRequest index 005265b..c9c6ad7 160000 --- a/ThunderRequest +++ b/ThunderRequest @@ -1 +1 @@ -Subproject commit 005265b8608aad34b982230f16881f3eeab89a57 +Subproject commit c9c6ad731e5201b7f0bdb13f52f25ab45f2cc90f From 9c082d25148a933d0241c2780134cb45594455c7 Mon Sep 17 00:00:00 2001 From: Simon Mitchell Date: Sat, 7 Mar 2020 11:41:38 +0000 Subject: [PATCH 42/42] Removes macOS travis target --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 754f160..c762139 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,6 @@ env: - OSX_SDK=macosx10.15 matrix: - DESTINATION="OS=13.3,name=iPhone 11 Pro Max" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="arch=x86_64" SCHEME="$OSX_FRAMEWORK_SCHEME" SDK="$OSX_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" script: - set -o pipefail - xcodebuild -version