Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .buildkite/shared-pipeline-vars
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
#!/bin/sh
#!/bin/bash

# This file is `source`'d before calling `buildkite-agent pipeline upload`, and can be used
# to set up some variables that will be interpolated in the `.yml` pipeline before uploading it.

# 🎗️ If you update the image to a newer Xcode version, don't forget to also update the badge in the README.md file accordingly for consistency
XCODE_VERSION="16.4"
CI_TOOLKIT_PLUGIN_VERSION="5.3.1"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

XCODE_VERSION_FILE="$SCRIPT_DIR/../.xcode-version"
if [[ ! -s "$XCODE_VERSION_FILE" ]]; then
echo "Error: '$XCODE_VERSION_FILE' not found or empty." >&2
exit 1
fi
XCODE_VERSION=$(sed -E 's/^~> ?//' "$XCODE_VERSION_FILE")

CI_TOOLKIT_PLUGIN_VERSION="6.0.0"

export IMAGE_ID="xcode-$XCODE_VERSION"
export CI_TOOLKIT="automattic/a8c-ci-toolkit#$CI_TOOLKIT_PLUGIN_VERSION"
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "supertonic"]
path = podcasts/Text to Speech/supertonic
url = https://huggingface.co/Supertone/supertonic
1 change: 1 addition & 0 deletions .xcode-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
26.1.1
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ gem 'fastlane', '~> 2.216'
gem 'fastlane-plugin-firebase_app_distribution', '~> 0.10'
gem 'fastlane-plugin-sentry', '~> 1.14'
gem 'fastlane-plugin-wpmreleasetoolkit', '~> 13.8'
# To avoid errors like:
#
# SSL_connect returned=1 errno=0 peeraddr=3.5.132.155:443 state=error: certificate verify failed (unable to get certificate CRL)
#
# See https://github.com/ruby/openssl/issues/949
gem 'openssl', '~> 3.3', '>= 3.3.2'
gem 'rubocop', '~> 1.60'
gem 'watchbuild'

Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ GEM
faraday (>= 1, < 3)
sawyer (~> 0.9)
open4 (1.3.4)
openssl (3.3.2)
options (2.3.2)
optparse (0.8.1)
os (1.1.4)
Expand Down Expand Up @@ -371,6 +372,7 @@ DEPENDENCIES
fastlane-plugin-firebase_app_distribution (~> 0.10)
fastlane-plugin-sentry (~> 1.14)
fastlane-plugin-wpmreleasetoolkit (~> 13.8)
openssl (~> 3.3, >= 3.3.2)
rake (>= 12.0, < 14.0)
rubocop (~> 1.60)
watchbuild
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!-- Badge: "platform: ios|watchos" -->
<img src="https://img.shields.io/badge/platform-ios%20%7C%20watchos-lightgrey" />
<!-- Badge: "Xcode: {version}+" -->
<img src="https://img.shields.io/badge/Xcode-v16.4%2B-informational" />
<img src="https://img.shields.io/badge/Xcode-v26.1.1%2B-informational" />
</p>

<p align="center">
Expand Down
34 changes: 17 additions & 17 deletions Share Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>SUBQUERY (
extensionItems,
$extensionItem,
SUBQUERY (
$extensionItem.attachments,
$attachment,
(
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "unofficial.opml"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.opml"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.opml.opml"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.audio"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie"
)
).@count == 1
).@count == 1
</string>
<key>NSExtensionActivationRule</key>
<string>SUBQUERY (
extensionItems,
$extensionItem,
SUBQUERY (
$extensionItem.attachments,
$attachment,
(
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "unofficial.opml"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.opml"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.opml.opml"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.audio"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
)
).@count == 1
).@count == 1</string>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
Expand Down
10 changes: 9 additions & 1 deletion Share Extension/ShareViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ShareViewController: UIViewController {
return
}

let acceptedTypes: [UTType] = [.audio, .movie, .data]
let acceptedTypes: [UTType] = [.audio, .movie, .url, .data]

if let type = acceptedTypes.first(where: { attachment.hasItemConformingToTypeIdentifier($0.identifier) }) {
loadFile(from: attachment, identifier: type.identifier)
Expand Down Expand Up @@ -43,6 +43,14 @@ class ShareViewController: UIViewController {
return
}

guard url.isFileURL else {
self?.close()

//TODO: Search for podcasts and present list to select from
self?.redirectToHostApp(url.absoluteString)
return
}

// Save the file to the shared group directory
let fileManager = FileManager.default
guard let container = fileManager.containerURL(forSecurityApplicationGroupIdentifier: SharedConstants.GroupUserDefaults.groupContainerId) else {
Expand Down
39 changes: 39 additions & 0 deletions podcasts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1797,6 +1797,7 @@
F53EFEE82CD405DA00F4561B /* YearOverYearCompareTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F53EFEE72CD405DA00F4561B /* YearOverYearCompareTests.swift */; };
F53EFEEA2CD42AE400F4561B /* Ratings2024Story.swift in Sources */ = {isa = PBXBuildFile; fileRef = F53EFEE92CD42ADF00F4561B /* Ratings2024Story.swift */; };
F543F6A42C0804FA00FEC8B6 /* AnyPublisher+Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = F543F6A32C0804FA00FEC8B6 /* AnyPublisher+Async.swift */; };
F54577E62EEB902700727EE2 /* WebURLHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F54577E52EEB901F00727EE2 /* WebURLHandler.swift */; };
F549D3532DBBED7B00451246 /* PodcastTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F549D3522DBBED7B00451246 /* PodcastTableViewCell.swift */; };
F54E0F542CC764C0006D4DA2 /* PositionModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = F54E0F532CC764C0006D4DA2 /* PositionModifier.swift */; };
F54E72192CA722A000CD5C86 /* Array+DiscoverItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = F54E72182CA722A000CD5C86 /* Array+DiscoverItem.swift */; };
Expand Down Expand Up @@ -1850,6 +1851,7 @@
F57D8F142C66CA230004C4DF /* UnsafeWait.swift in Sources */ = {isa = PBXBuildFile; fileRef = F57D8F132C66CA230004C4DF /* UnsafeWait.swift */; };
F57D8F162C66CBB80004C4DF /* UnsafeTransfer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F57D8F152C66CBB80004C4DF /* UnsafeTransfer.swift */; };
F57D8F182C66CDF40004C4DF /* View+CVPixelBuffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F57D8F172C66CDF40004C4DF /* View+CVPixelBuffer.swift */; };
F57ECFB62EF0A3F8009EBB82 /* onnxruntime in Frameworks */ = {isa = PBXBuildFile; productRef = F57ECFB52EF0A3F8009EBB82 /* onnxruntime */; };
F580777C2DEA032A005AFBA6 /* Theme+Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = C715EE0E2A0497DB0054A082 /* Theme+Color.swift */; };
F58189C22DBC56A200B95199 /* PodcastInfo+DiscoverPodcast.swift in Sources */ = {isa = PBXBuildFile; fileRef = F58189C12DBC56A200B95199 /* PodcastInfo+DiscoverPodcast.swift */; };
F58189C32DBC56A200B95199 /* PodcastInfo+DiscoverPodcast.swift in Sources */ = {isa = PBXBuildFile; fileRef = F58189C12DBC56A200B95199 /* PodcastInfo+DiscoverPodcast.swift */; };
Expand Down Expand Up @@ -4150,6 +4152,7 @@
F53EFEE72CD405DA00F4561B /* YearOverYearCompareTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YearOverYearCompareTests.swift; sourceTree = "<group>"; };
F53EFEE92CD42ADF00F4561B /* Ratings2024Story.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Ratings2024Story.swift; sourceTree = "<group>"; };
F543F6A32C0804FA00FEC8B6 /* AnyPublisher+Async.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AnyPublisher+Async.swift"; sourceTree = "<group>"; };
F54577E52EEB901F00727EE2 /* WebURLHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebURLHandler.swift; sourceTree = "<group>"; };
F549D3522DBBED7B00451246 /* PodcastTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodcastTableViewCell.swift; sourceTree = "<group>"; };
F54E0F532CC764C0006D4DA2 /* PositionModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PositionModifier.swift; sourceTree = "<group>"; };
F54E72182CA722A000CD5C86 /* Array+DiscoverItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+DiscoverItem.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -4383,7 +4386,23 @@
FFFCD23E2C7768F900A345ED /* Referrals.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Referrals.xcassets; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
F57ECFB72EF0A4EB009EBB82 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
supertonic/.gitattributes,
supertonic/.gitignore,
supertonic/config.json,
supertonic/LICENSE,
supertonic/README.md,
TTSViewModel.swift,
);
target = BDBD53EB17019B2A0048C8C5 /* podcasts */;
};
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */

/* Begin PBXFileSystemSynchronizedRootGroup section */
F57ECF892EF0A30A009EBB82 /* Text to Speech */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (F57ECFB72EF0A4EB009EBB82 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = "Text to Speech"; sourceTree = "<group>"; };
FFB74AE72E94037500F16857 /* End of Year 2025 */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = "End of Year 2025"; sourceTree = "<group>"; };
/* End PBXFileSystemSynchronizedRootGroup section */

Expand Down Expand Up @@ -4492,6 +4511,7 @@
8B365E502B62E82000143DAC /* Agrume in Frameworks */,
8BE36E002873552500E35313 /* PocketCastsServer in Frameworks */,
9A9004C62E2E62EA005879CB /* (null) in Frameworks */,
F57ECFB62EF0A3F8009EBB82 /* onnxruntime in Frameworks */,
9A11FCD42DA410F600A1EF3E /* GoogleCast in Frameworks */,
BDD239BD267C869B0047750C /* SwipeCellKit in Frameworks */,
8B1762772B6808F700F44450 /* JLRoutes in Frameworks */,
Expand Down Expand Up @@ -7348,6 +7368,7 @@
BDBD53F717019B2A0048C8C5 /* Pocket Casts */ = {
isa = PBXGroup;
children = (
F57ECF892EF0A30A009EBB82 /* Text to Speech */,
462EE0B127024FF3003D67DC /* Credentials */,
BD7D337619F7D48E00B907EA /* podcasts.entitlements */,
3FD6E04F2BF735EC003941C0 /* podcasts.prototype.entitlements */,
Expand All @@ -7372,6 +7393,7 @@
F53481C52E21C07B00E80253 /* UserSatisfactionSurveyManager.swift */,
C73CD7A72916E8A900EAE879 /* SwiftUI+Previews.swift */,
BD585C1E2047887700AC842C /* AppDelegate+UrlHandling.swift */,
F54577E52EEB901F00727EE2 /* WebURLHandler.swift */,
BD585C242047C74D00AC842C /* AppDelegate+Defaults.swift */,
403B5B0521812E6000821A54 /* AppDelegate+SiriShortcuts.swift */,
C72CED35289DB8690017883A /* AppDelegate+Analytics.swift */,
Expand Down Expand Up @@ -9343,6 +9365,7 @@
9AB645122D51368300A842C8 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
F57ECF892EF0A30A009EBB82 /* Text to Speech */,
FFB74AE72E94037500F16857 /* End of Year 2025 */,
);
name = podcasts;
Expand All @@ -9367,6 +9390,7 @@
9A11FCD32DA410F600A1EF3E /* GoogleCast */,
9A9004C72E2E6447005879CB /* PocketCastsDependencyInjection */,
FFBCADEA2E6578F900EA8287 /* WrappingHStack */,
F57ECFB52EF0A3F8009EBB82 /* onnxruntime */,
);
productName = podcasts;
productReference = BDBD53EC17019B2A0048C8C5 /* podcasts.app */;
Expand Down Expand Up @@ -9557,6 +9581,7 @@
FF7F89EB2C2AF53C00FC0ED5 /* XCRemoteSwiftPackageReference "SwiftSubtitles" */,
9A11FCD22DA410F600A1EF3E /* XCRemoteSwiftPackageReference "google-cast" */,
FFBCADE92E65770300EA8287 /* XCRemoteSwiftPackageReference "WrappingHStack" */,
F57ECFB42EF0A3F8009EBB82 /* XCRemoteSwiftPackageReference "onnxruntime-swift-package-manager" */,
);
productRefGroup = BDBD53ED17019B2A0048C8C5 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -10537,6 +10562,7 @@
408426322134CBE60076D82E /* SmallPagedListSummaryViewController.swift in Sources */,
C7FAFF6A2942E78A00329B40 /* HighlightedText.swift in Sources */,
BD4098801B9EFE3C007F36BD /* AudioPlayTask.swift in Sources */,
F54577E62EEB902700727EE2 /* WebURLHandler.swift in Sources */,
40AA12732488AE1F006B9D48 /* MultiSelectFooterView.swift in Sources */,
BDF15A461B54E21B000EC323 /* PlaybackEffects.swift in Sources */,
8B630A332AFBF49400D65D25 /* PlayPauseAnimatableModifier.swift in Sources */,
Expand Down Expand Up @@ -14341,6 +14367,14 @@
minimumVersion = 7.1.0;
};
};
F57ECFB42EF0A3F8009EBB82 /* XCRemoteSwiftPackageReference "onnxruntime-swift-package-manager" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/microsoft/onnxruntime-swift-package-manager.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.20.0;
};
};
FF7F89EB2C2AF53C00FC0ED5 /* XCRemoteSwiftPackageReference "SwiftSubtitles" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/dagronf/SwiftSubtitles";
Expand Down Expand Up @@ -14506,6 +14540,11 @@
isa = XCSwiftPackageProductDependency;
productName = PocketCastsUtils;
};
F57ECFB52EF0A3F8009EBB82 /* onnxruntime */ = {
isa = XCSwiftPackageProductDependency;
package = F57ECFB42EF0A3F8009EBB82 /* XCRemoteSwiftPackageReference "onnxruntime-swift-package-manager" */;
productName = onnxruntime;
};
F5ADE2F62CF52B4800F2CEA7 /* AutomatticTracks */ = {
isa = XCSwiftPackageProductDependency;
package = 46305CEE272B082C003AC87B /* XCRemoteSwiftPackageReference "Automattic-Tracks-iOS" */;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions podcasts/AppDelegate+UrlHandling.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ extension AppDelegate {
if let scheme = url.scheme, scheme == "pktc" {
JLRoutes.routeURL(url)
}

Task {
await WebURLHandler.handle(url: url)
}
}
return true
}
Expand Down
2 changes: 2 additions & 0 deletions podcasts/CarPlayImageHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class CarPlayImageHelper {
image = ImageManager.sharedManager.cachedImageFor(podcastUuid: episode.podcastUuid, size: .list)
} else if let userEpisode = episode as? UserEpisode {
image = ImageManager.sharedManager.cachedImageForUserEpisode(episode: userEpisode, size: .list)
} else if let tempEpisode = episode as? TTSTemporaryEpisode, let artwork = tempEpisode.artwork {
image = artwork
}

if let image {
Expand Down
2 changes: 2 additions & 0 deletions podcasts/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ struct Constants {
static let pushEnabled = "PushEnabled"
static let globalEpisodesToKeep = "SJPodcastsToKeep"
static let openLinksInExternalBrowser = "SJOpenLinksInExternalBrowser"
static let diffbotApiKey = "DiffbotApiKey"
static let ttsVoice = "TTSVoice"

static let appBadgeFilterUuid = "SJEppBadgeFilterId"
static let lastAppCloseDate = "SJLastAppCloseDate"
Expand Down
Loading