Skip to content

Commit

Permalink
fix: simplify literals and remove reset token
Browse files Browse the repository at this point in the history
  • Loading branch information
FranAlarza committed Dec 13, 2024
1 parent 6cba310 commit c8be948
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 33 deletions.
6 changes: 3 additions & 3 deletions Applivery.podspec
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Pod::Spec.new do |s|
s.name = "Applivery"
s.version = "3.3.0"
s.version = "4.3.0"
s.summary = "Mobile App Distribution"
s.homepage = "https://www.applivery.com"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Alejandro Jiménez Agudo" => "[email protected]" }
s.social_media_url = "https://twitter.com/Applivery"
s.source = { :git => "https://github.com/applivery/applivery-ios-sdk.git", :tag => "v#{s.version}" }
s.platform = :ios, "11.0"
s.platform = :ios, "13.0"
s.source_files = "AppliverySDK/**/*.swift"
s.exclude_files = "AppliverySDK/**/getConstants.swift"
s.resource_bundle = { 'Applivery' => ["AppliverySDK/**/*.storyboard", "AppliverySDK/**/*.strings"] }
s.swift_version = "5.0"
s.swift_version = "5.5"
end
1 change: 0 additions & 1 deletion AppliverySDK/Interactors/StartInteractor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class StartInteractor {
// MARK: Internal Methods

func start() {
try? keychain.remove(for: app.bundleId())
logInfo("Applivery is starting... ")
logInfo("SDK Version: \(GlobalConfig.shared.app.getSDKVersion())")
setupBindings()
Expand Down
67 changes: 41 additions & 26 deletions AppliverySDK/Model/Public/TextLiterals.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ public class TextLiterals: NSObject {
/// "Your session has expired. Please, log in again"
@objc public var loginSessionExpired: String

/// "Your session has expired. Please, log in again"
@objc public var sheetScreenshotAction: String

/// "Your session has expired. Please, log in again"
@objc public var sheetRecordAction: String

// MARK: - Initializer
/**
Creates a new instance of TextLiterals.
Expand Down Expand Up @@ -186,32 +192,35 @@ public class TextLiterals: NSObject {
- Version: 2.4
*/
@objc public init(
appName: String = kLocaleSdkName,
alertButtonCancel: String = kLocaleAlertButtonCancel,
alertButtonRetry: String = kLocaleAlertButtonRetry,
alertButtonOK: String = kLocaleAlertButtonOk,
errorUnexpected: String = kLocaleErrorUnexpected,
errorInvalidCredentials: String = kLocaleErrorInvalidCredentials,
errorDownloadURL: String = kLocaleErrorDownloadUrl,
otaUpdateMessage: String? = nil,
alertButtonLater: String = kLocaleAlertButtonLater,
alertButtonUpdate: String = kLocaleAlertButtonUpdate,
forceUpdateMessage: String? = nil,
buttonForceUpdate: String = kLocaleUpdateViewButtonUpdate,
feedbackButtonClose: String = kLocaleFeedbackButtonClose,
feedbackButtonAdd: String = kLocaleFeedbackButtonAdd,
feedbackButtonSend: String = kLocaleFeedbackButtonSend,
feedbackSelectType: String = kLocaleFeedbackLabelSelectType,
feedbackTypeBug: String = kLocaleFeedbackButtonBug,
feedbackTypeFeedback: String = kLocaleFeedbackButtonFeedback,
feedbackMessagePlaceholder: String = kLocaleFeedbackTextMessagePlaceholder,
feedbackAttach: String = kLocaleFeedbackLabelAttach,
loginInputUser: String = kLocaleLoginInputUser,
loginInputPassword: String = kLocaleLoginInputPassword,
loginButton: String = kLocaleLoginButton,
loginMessage: String = kLocaleLoginAlertMessage,
loginInvalidCredentials: String = kLocaleLoginAlertMessageInvalidCredentials,
loginSessionExpired: String = kLocaleLoginAlertMessageExpired) {
appName: String = "Applivery",
alertButtonCancel: String = "Cancel",
alertButtonRetry: String = "Retry",
alertButtonOK: String = "OK",
errorUnexpected: String = "Unexpected error",
errorInvalidCredentials: String = "Invalid credentials",
errorDownloadURL: String = "Couldn't start download. Invalid url",
otaUpdateMessage: String? = "There is a new version available for download. Do you want to update to the latest version?",
alertButtonLater: String = "Later",
alertButtonUpdate: String = "Update",
forceUpdateMessage: String? = "Sorry this App is outdated. Please, update the App to continue using it",
buttonForceUpdate: String = "Update now",
feedbackButtonClose: String = "Close",
feedbackButtonAdd: String = "Add Feedback",
feedbackButtonSend: String = "Send Feedback",
feedbackSelectType: String = "Select type",
feedbackTypeBug: String = "Bug",
feedbackTypeFeedback: String = "Feedback",
feedbackMessagePlaceholder: String = "Add a message",
feedbackAttach: String = "Attach Screenshot",
loginInputUser: String = "user",
loginInputPassword: String = "password",
loginButton: String = "Login",
loginMessage: String = "Login is required!",
loginInvalidCredentials: String = "Wrong user or password, please, try again",
loginSessionExpired: String = "Your session has expired. Please, log in again",
sheetScreenshotAction: String = "Take Screenshoot",
sheetRecordAction: String = "Record Screen"
) {

self.appName = appName
self.alertButtonCancel = alertButtonCancel
Expand Down Expand Up @@ -239,6 +248,8 @@ public class TextLiterals: NSObject {
self.loginMessage = loginMessage
self.loginInvalidCredentials = loginInvalidCredentials
self.loginSessionExpired = loginSessionExpired
self.sheetScreenshotAction = sheetScreenshotAction
self.sheetRecordAction = sheetRecordAction
}
}

Expand Down Expand Up @@ -269,6 +280,8 @@ enum Literal: CustomStringConvertible {
case loginMessage
case loginInvalidCredentials
case loginSessionExpired
case sheetScreenshotAction
case sheetRecordAction

var description: String {
return literal(self) ?? String(self.hashValue)
Expand Down Expand Up @@ -306,6 +319,8 @@ func literal(_ literal: Literal) -> String? {
case .loginMessage: return literals.loginMessage
case .loginInvalidCredentials: return literals.loginInvalidCredentials
case .loginSessionExpired: return literals.loginSessionExpired
case .sheetScreenshotAction: return literals.sheetScreenshotAction
case .sheetRecordAction: return literals.sheetRecordAction
}
}
// swiftlint:enable cyclomatic_complexity
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ class RecordingViewController: UIViewController {
func presentActionSheet() {
actionSheet = UIAlertController()

let screenshotAction = UIAlertAction(title: localize("sheet_screenshoot_action"), style: .default) { _ in
let screenshotAction = UIAlertAction(title: literal(.sheetScreenshotAction), style: .default) { _ in
ScreenRecorderManager.shared.presentPreviewWithScreenshoot()
}

let screenRecordingAction = UIAlertAction(title: localize("sheet_record_action"), style: .default) { _ in
let screenRecordingAction = UIAlertAction(title: literal(.sheetRecordAction), style: .default) { _ in
ScreenRecorderManager.shared.startClipBuffering()
}

Expand Down
1 change: 0 additions & 1 deletion AppliverySDK/Modules/VideoReport/VideoPreviewRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ struct VideoPreviewRow: View {
let imageGenerator = AVAssetImageGenerator(asset: asset)
imageGenerator.appliesPreferredTrackTransform = true

// Extraer el primer segundo del video (puedes ajustar el tiempo si es necesario)
let time = CMTime(seconds: 1, preferredTimescale: 60)
DispatchQueue.global().async {
do {
Expand Down

0 comments on commit c8be948

Please sign in to comment.