mackworth / cTiVo

TiVo Show Downloads for MacOS
220 stars 36 forks source link

Update to TVDB v4 API and port TVDB implementation to Swift #495

Closed talientinc closed 2 years ago

talientinc commented 2 years ago

As I type this, I believe everything is fully merged all the way up and down the tree. This pull request merges your _SwiftTVDB branch with my changes and you have already merged your changes from the master branch down into _SwiftTVDB, so there shouldn't be any merge conflicts along the way to eventually pushing this to master.

The project file should be compatible with your existing build environment, but you will need to reset the development team back to your own team under the Signings & Capabilities tab for the cTiVo and the new cTiVoTests target in the project editor. (The cTiVo MAS target was never flipped over to my development account in my build environment, so it shouldn't be affected.)

The Podfile was updated to include the new cTiVoTests target. I don't think you need to perform a pod install step if you are building somewhere where you've already performed the pod installation since CocoaLumberjack was added. If you're building in a freshly cloned environment, the pod install command will spit out warnings like the following:

[!] The `cTiVoTests [Debug]` target overrides the `CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER` build setting defined in `Pods/Target Support Files/Pods-cTiVoTests/Pods-cTiVoTests.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `cTiVoTests [Release]` target overrides the `CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER` build setting defined in `Pods/Target Support Files/Pods-cTiVoTests/Pods-cTiVoTests.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

These warnings should be harmless. As you probably already know, rerunning the pod install command doesn't overwrite the patch manually applied to the DDLog.m file.

In addition to the new cTiVoTests target, the most significant change in the project file is changing the MACOSX_DEPLOYMENT_TARGET to 10.15, which is required to support Swift concurrency. I've only tested on 12.x, but I have specifically tested the fallback code that uses the URLSession.dataTask() function for versions older than 12.x.