diff --git a/Applivery.podspec b/Applivery.podspec index 7b6cad3..2ca719c 100644 --- a/Applivery.podspec +++ b/Applivery.podspec @@ -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 JimeĢnez Agudo" => "alejandro@applivery.com" } 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 diff --git a/AppliverySDK/Interactors/StartInteractor.swift b/AppliverySDK/Interactors/StartInteractor.swift index bc44638..9da5fc4 100644 --- a/AppliverySDK/Interactors/StartInteractor.swift +++ b/AppliverySDK/Interactors/StartInteractor.swift @@ -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() diff --git a/AppliverySDK/Model/Public/TextLiterals.swift b/AppliverySDK/Model/Public/TextLiterals.swift index b0b6751..6be16e8 100644 --- a/AppliverySDK/Model/Public/TextLiterals.swift +++ b/AppliverySDK/Model/Public/TextLiterals.swift @@ -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. @@ -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 @@ -239,6 +248,8 @@ public class TextLiterals: NSObject { self.loginMessage = loginMessage self.loginInvalidCredentials = loginInvalidCredentials self.loginSessionExpired = loginSessionExpired + self.sheetScreenshotAction = sheetScreenshotAction + self.sheetRecordAction = sheetRecordAction } } @@ -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) @@ -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 diff --git a/AppliverySDK/Modules/VideoReport/RecordingViewController.swift b/AppliverySDK/Modules/VideoReport/RecordingViewController.swift index 6afea6c..d472a43 100644 --- a/AppliverySDK/Modules/VideoReport/RecordingViewController.swift +++ b/AppliverySDK/Modules/VideoReport/RecordingViewController.swift @@ -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() } diff --git a/AppliverySDK/Modules/VideoReport/VideoPreviewRow.swift b/AppliverySDK/Modules/VideoReport/VideoPreviewRow.swift index 274d4b9..f87640a 100644 --- a/AppliverySDK/Modules/VideoReport/VideoPreviewRow.swift +++ b/AppliverySDK/Modules/VideoReport/VideoPreviewRow.swift @@ -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 {