Skip to content

Commit

Permalink
Example app gardening (#44)
Browse files Browse the repository at this point in the history
Re-add SDK local package

Significantly helps discoverability by ensuring the right
package name is displayed in Xcode.

Respell Example project and target identifiers for distinctness

Rename Example directories to match respelled app name
  • Loading branch information
andrewjl-mux authored Jul 20, 2023
1 parent 5dd0ce6 commit 902eea5
Show file tree
Hide file tree
Showing 44 changed files with 154 additions and 203 deletions.

Large diffs are not rendered by default.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class FakeBackend {
return url
}

private let logger = Test_AppApp.logger
private let logger = SwiftUploadSDKExample.logger

let urlSession: URLSession
let jsonEncoder: JSONEncoder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ class ThumbnailModel: ObservableObject {
in
switch result {
case .cancelled: do {
Test_AppApp.logger.debug("Thumbnail request canceled")
SwiftUploadSDKExample.logger.debug("Thumbnail request canceled")
}
case .failed: do {
Test_AppApp.logger.error("Failed to extract thumnail: \(error?.localizedDescription ?? "unknown")")
SwiftUploadSDKExample.logger.error("Failed to extract thumnail: \(error?.localizedDescription ?? "unknown")")
}
case .succeeded: do {
Task.detached {
Expand Down Expand Up @@ -59,7 +59,7 @@ class ThumbnailModel: ObservableObject {
self.upload = upload

upload.progressHandler = { state in
Test_AppApp.logger.info("Upload progressing from ViewModel: \(state.progress)")
SwiftUploadSDKExample.logger.info("Upload progressing from ViewModel: \(state.progress)")
self.uploadProgress = state
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class UploadCreationModel : ObservableObject {
private var prepareTask: Task<Void, Never>? = nil
private var thumbnailGenerator: AVAssetImageGenerator? = nil

private let logger = Test_AppApp.logger
private let logger = SwiftUploadSDKExample.logger
private let myServerBackend = FakeBackend(urlSession: URLSession(configuration: URLSessionConfiguration.default))

@Published
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fileprivate struct ErrorView: View {
trailing: 20
)
)
.frame(height: Test_AppApp.THUMBNAIL_HEIGHT)
.frame(height: SwiftUploadSDKExample.THUMBNAIL_HEIGHT)

Spacer()
}
Expand Down Expand Up @@ -130,7 +130,7 @@ fileprivate struct ThumbnailView: View {
trailing: 20
)
)
.frame(height: Test_AppApp.THUMBNAIL_HEIGHT)
.frame(height: SwiftUploadSDKExample.THUMBNAIL_HEIGHT)
Spacer()
StretchyDefaultButton("Upload") {
if let preparedMedia = preparedMedia {
Expand Down Expand Up @@ -169,7 +169,7 @@ fileprivate struct ProcessingView: View {
trailing: 20
)
)
.frame(height: Test_AppApp.THUMBNAIL_HEIGHT)
.frame(height: SwiftUploadSDKExample.THUMBNAIL_HEIGHT)
Spacer()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ fileprivate struct ListItem: View {
trailing: 20
)
)
.frame(height: Test_AppApp.THUMBNAIL_HEIGHT)
.frame(height: SwiftUploadSDKExample.THUMBNAIL_HEIGHT)
.onAppear {
thumbnailModel.startExtractingThumbnail()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//
// Test_AppApp.swift
// Test App
// SwiftUploadSDKExample.swift
//
// Created by Emily Dixon on 2/14/23.
//
Expand All @@ -10,7 +9,7 @@ import MuxUploadSDK
import OSLog

@main
struct Test_AppApp: App {
struct SwiftUploadSDKExample: App {

static var logger = Logger(subsystem: "mux", category: "default")
static let THUMBNAIL_HEIGHT = 228.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct BigUploadCTALabel: View {
.foregroundColor(White)
}
}
.frame(height: Test_AppApp.THUMBNAIL_HEIGHT)
.frame(height: SwiftUploadSDKExample.THUMBNAIL_HEIGHT)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//
// Test_AppUITests.swift
// Test AppUITests
// SwiftUploadSDKExampleUITests.swift
//
// Created by Emily Dixon on 2/14/23.
//

import XCTest

final class Test_AppUITests: XCTestCase {
final class SwiftUploadSDKExampleUITests: XCTestCase {

override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//
// Test_AppUITestsLaunchTests.swift
// SwiftUploadSDKExampleLaunchTests.swift
// Test AppUITests
//
// Created by Emily Dixon on 2/14/23.
//

import XCTest

final class Test_AppUITestsLaunchTests: XCTestCase {
final class SwiftUploadSDKExampleLaunchTests: XCTestCase {

override class var runsForEachTargetApplicationUIConfiguration: Bool {
true
Expand Down
23 changes: 0 additions & 23 deletions Package.resolved

This file was deleted.

5 changes: 0 additions & 5 deletions apps/Test App/Test-App-Info.plist

This file was deleted.

This file was deleted.

0 comments on commit 902eea5

Please sign in to comment.