Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #576 from razeware/development
Browse files Browse the repository at this point in the history
v1.0.7: 🐼mic
  • Loading branch information
sammyd authored May 11, 2021
2 parents 9a8f847 + c6ea7c5 commit c5f1e66
Show file tree
Hide file tree
Showing 74 changed files with 450 additions and 603 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/appstore-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Switch to Xcode 12
run: sudo xcode-select --switch /Applications/Xcode_12.app
- name: Switch to Xcode 12.4
run: sudo xcode-select --switch /Applications/Xcode_12.4.app
- name: Update fastlane
run: |
cd Emitron
Expand All @@ -29,12 +29,12 @@ jobs:
scripts/download_s3.sh production > Emitron/Emitron/Configuration/secrets.production.xcconfig
- name: Execute fastlane
env:
FASTLANE_USER: [email protected]
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
SLACK_URL: ${{ secrets.SLACK_URL }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 5
FASTLANE_XCODEBUILD_SETTINGS_RETRIES: 5
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Switch to Xcode 12
run: sudo xcode-select -s /Applications/Xcode_12.app
- name: Switch to Xcode 12.4
run: sudo xcode-select -s /Applications/Xcode_12.4.app
- name: Update fastlane
run: |
cd Emitron
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Install Swiftlint
run: brew install swiftlint

- name: Run Swiftlint
run: swiftlint --config Emitron/.swiftlint.yml
10 changes: 5 additions & 5 deletions .github/workflows/testflight-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Switch to Xcode 12
run: sudo xcode-select --switch /Applications/Xcode_12.app
- name: Switch to Xcode 12.4
run: sudo xcode-select --switch /Applications/Xcode_12.4.app
- name: Update fastlane
run: |
cd Emitron
Expand All @@ -29,12 +29,12 @@ jobs:
scripts/download_s3.sh production > Emitron/Emitron/Configuration/secrets.production.xcconfig
- name: Execute fastlane
env:
FASTLANE_USER: [email protected]
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
SLACK_URL: ${{ secrets.SLACK_URL }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 5
FASTLANE_XCODEBUILD_SETTINGS_RETRIES: 5
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/testflight-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Switch to Xcode 12
run: sudo xcode-select --switch /Applications/Xcode_12.app
- name: Switch to Xcode 12.4
run: sudo xcode-select --switch /Applications/Xcode_12.4.app
- name: Update fastlane
run: |
cd Emitron
Expand All @@ -29,12 +29,12 @@ jobs:
scripts/download_s3.sh production > Emitron/Emitron/Configuration/secrets.production.xcconfig
- name: Execute fastlane
env:
FASTLANE_USER: [email protected]
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
SLACK_URL: ${{ secrets.SLACK_URL }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 5
FASTLANE_XCODEBUILD_SETTINGS_RETRIES: 5
run: |
Expand Down
1 change: 1 addition & 0 deletions Emitron/.ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.7.3
5 changes: 0 additions & 5 deletions Emitron/.swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ opt_in_rules:
- unowned_variable_capture
- untyped_error_in_catch
- unused_import
- unused_private_declaration
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- xct_specific_matcher
Expand Down Expand Up @@ -80,10 +79,6 @@ large_tuple:
- 3 # warning
- 4 # error

line_length:
- 150 # warning
- 200 # error

file_length:
- 1200 # warning
- 1500 # error
Expand Down
12 changes: 4 additions & 8 deletions Emitron/Emitron.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@
8BFCEF1F2341184A003FF72F /* PermissionsRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BFCEF1E2341184A003FF72F /* PermissionsRequest.swift */; };
95A4513522E224B500D24E56 /* SessionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95A4513322E224B500D24E56 /* SessionController.swift */; };
B5678C62233668B100BCB8A1 /* CircleProgressBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5678C61233668B100BCB8A1 /* CircleProgressBarView.swift */; };
B595654423130E4C00A3FF44 /* CustomToggleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B595654323130E4C00A3FF44 /* CustomToggleView.swift */; };
B60612B922CCE352007FC852 /* Parameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = B60612B822CCE352007FC852 /* Parameters.swift */; };
B60FF7BE23000ABD00F36B32 /* CardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B60FF7BD23000ABD00F36B32 /* CardView.swift */; };
B621DD5122F5EEC500A1F27A /* DataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B621DD5022F5EEC500A1F27A /* DataManager.swift */; };
Expand Down Expand Up @@ -598,7 +597,6 @@
8BFCEF1E2341184A003FF72F /* PermissionsRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionsRequest.swift; sourceTree = "<group>"; };
95A4513322E224B500D24E56 /* SessionController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SessionController.swift; sourceTree = "<group>"; };
B5678C61233668B100BCB8A1 /* CircleProgressBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleProgressBarView.swift; sourceTree = "<group>"; };
B595654323130E4C00A3FF44 /* CustomToggleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomToggleView.swift; sourceTree = "<group>"; };
B60612B822CCE352007FC852 /* Parameters.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Parameters.swift; sourceTree = "<group>"; };
B60FF7BD23000ABD00F36B32 /* CardView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardView.swift; sourceTree = "<group>"; };
B621DD3622F5CB9A00A1F27A /* Attachment_Downloads.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Attachment_Downloads.json; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1675,7 +1673,6 @@
isa = PBXGroup;
children = (
B6C4F3D122E6ECA40087ED10 /* CheckmarkView.swift */,
B595654323130E4C00A3FF44 /* CustomToggleView.swift */,
B66778AB2305D2D4003EEBAB /* MainButtonView.swift */,
8B283DEE23169A1E001F1B17 /* ProgressBarView.swift */,
229F0AC223BB27820004DD4F /* Content Detail */,
Expand Down Expand Up @@ -2104,7 +2101,6 @@
B6D8EB2322CBA81200DE29AF /* DomainsService.swift in Sources */,
229935D023FE8C6F00D3D16A /* SettingsSelectable.swift in Sources */,
B6D7DC4622C7AF60006DD325 /* UIFont+Extensions.swift in Sources */,
B595654423130E4C00A3FF44 /* CustomToggleView.swift in Sources */,
22D39FC823EC0AEA0058599D /* LoadingView.swift in Sources */,
B6DF2FB622CA62E50081A3A3 /* JSONAPIDocument.swift in Sources */,
229F4A1623FE7ECB006E2DE6 /* SettingsToggleRow.swift in Sources */,
Expand Down Expand Up @@ -2394,7 +2390,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.6;
MARKETING_VERSION = 1.0.7;
PRODUCT_BUNDLE_IDENTIFIER = "com.razeware.emitron.ios$(BUNDLE_ID_SUFFIX)";
PRODUCT_MODULE_NAME = Emitron;
PRODUCT_NAME = raywenderlich;
Expand Down Expand Up @@ -2599,7 +2595,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.6;
MARKETING_VERSION = 1.0.7;
PRODUCT_BUNDLE_IDENTIFIER = "com.razeware.emitron.ios$(BUNDLE_ID_SUFFIX)";
PRODUCT_MODULE_NAME = Emitron;
PRODUCT_NAME = raywenderlich;
Expand All @@ -2625,7 +2621,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.6;
MARKETING_VERSION = 1.0.7;
PRODUCT_BUNDLE_IDENTIFIER = "com.razeware.emitron.ios$(BUNDLE_ID_SUFFIX)";
PRODUCT_MODULE_NAME = Emitron;
PRODUCT_NAME = raywenderlich;
Expand Down Expand Up @@ -2710,7 +2706,7 @@
repositoryURL = "https://github.com/SwiftyJSON/SwiftyJSON";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 5.0.0;
minimumVersion = 5.0.1;
};
};
22C0512B23A4CBB9004D1223 /* XCRemoteSwiftPackageReference "GRDBCombine" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@
"repositoryURL": "https://github.com/onevcat/Kingfisher",
"state": {
"branch": null,
"revision": "0efb20f022501327f4028aa9bf7cd4a0d390bea0",
"version": "5.15.2"
"revision": "1a0c2df04b31ed7aa318354f3583faea24f006fc",
"version": "5.15.8"
}
},
{
"package": "SwiftyJSON",
"repositoryURL": "https://github.com/SwiftyJSON/SwiftyJSON",
"state": {
"branch": null,
"revision": "2b6054efa051565954e1d2b9da831680026cd768",
"version": "5.0.0"
"revision": "b3dcd7dbd0d488e1a7077cb33b00f2083e382f07",
"version": "5.0.1"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion Emitron/Emitron/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
persistenceStore: persistenceStore,
downloadService: downloadService
)
downloadService.startProcessing()
downloadService.startProcessing()
}

// MARK: UISceneSession Lifecycle
Expand Down
6 changes: 3 additions & 3 deletions Emitron/Emitron/Assets.xcassets/Artwork/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
6 changes: 3 additions & 3 deletions Emitron/Emitron/Assets.xcassets/Icons/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
{
"images" : [
{
"filename" : "gear.png",
"idiom" : "universal",
"filename" : "materialIconSettings.png",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 5 additions & 6 deletions Emitron/Emitron/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ extension Int {
}

extension String {
static let clearAll = "Clear All"
static let downloads = "Downloads"
static let filters = "Filters"
static let library = "Library"
static let loading = "Loading"
static let loading = "Loading..."
static let myTutorials = "My Tutorials"
static let newest = "Newest"
static let popularity = "Popularity"
Expand Down Expand Up @@ -99,10 +98,6 @@ extension String {
static let yes = "Yes"
static let no = "No" // swiftlint:disable:this identifier_name

// MARK: Pull-to-refresh
static let pullToRefreshPullMessage = "Pull to refresh"
static let pullToRefreshLoadingMessage = "Loading…"

// MARK: Settings screens
static let settingsPlaybackSpeedLabel = "Video Playback Speed"
static let settingsWifiOnlyDownloadsLabel = "Downloads (WiFi only)"
Expand All @@ -117,3 +112,7 @@ extension TimeInterval {
// MARK: Video playback
static let videoPlaybackOfflinePermissionsCheckPeriod: Self = 7 * 24 * 60 * 60
}

enum LookupKey {
static let requestReview = "request"
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ final class DynamicContentViewModel: ObservableObject, DynamicContentDisplayable
var state: DataState = .initial
@Published var viewProgress: ContentViewProgressDisplayable = .notStarted
@Published var downloadProgress: DownloadProgressDisplayable = .notDownloadable
@Published var bookmarked: Bool = false
@Published var bookmarked = false

private var subscriptions = Set<AnyCancellable>()
private var downloadActionSubscriptions = Set<AnyCancellable>()
Expand Down
1 change: 1 addition & 0 deletions Emitron/Emitron/Data/ViewModels/TabViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ enum MainTab: Hashable {
case library
case downloads
case myTutorials
case settings
}

final class TabViewModel: ObservableObject {
Expand Down
11 changes: 8 additions & 3 deletions Emitron/Emitron/Data/ViewModels/VideoPlaybackViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ extension VideoPlaybackViewModel {
}
}

extension Notification.Name {
static let requestReview = Notification.Name("requestReview")
}

final class VideoPlaybackViewModel {
// Allow control of appearance and dismissal of the video view
var shouldShow: Bool = false
var shouldShow = false

private let initialContentId: Int
private let repository: Repository
Expand Down Expand Up @@ -316,14 +320,14 @@ private extension VideoPlaybackViewModel {
// Don't load the next one if we've already got another one ready to play
guard player.items().last == currentItem else { return }
// Preload the next video 10s from the end

if (currentItem.duration - time).seconds < 10 {
enqueueNext()
}
}

func enqueueNext() {
guard nextContentToEnqueueIndex < contentList.endIndex else { return }

enqueue(index: nextContentToEnqueueIndex)
}

Expand Down Expand Up @@ -380,7 +384,8 @@ private extension VideoPlaybackViewModel {
if let download = state.download,
download.state == .complete,
let localURL = download.localURL {
let item = AVPlayerItem(url: localURL)
let asset = AVURLAsset(url: localURL)
let item = AVPlayerItem(asset: asset)
self.addMetadata(from: state, to: item)
self.addClosedCaptions(for: item)
// Add it to the cache
Expand Down
Loading

0 comments on commit c5f1e66

Please sign in to comment.