Skip to content

Commit

Permalink
feat: support xcframeworks (#50)
Browse files Browse the repository at this point in the history
* support xcframeworks

* feat: support ios 13

* Update readme

---------

Co-authored-by: Alejandro Arjonilla <[email protected]>
  • Loading branch information
FranAlarza and alexkater authored Dec 13, 2024
1 parent 32cfe9e commit f706f5e
Show file tree
Hide file tree
Showing 83 changed files with 580 additions and 1,223 deletions.
792 changes: 31 additions & 761 deletions AppliverySDK.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
enableUBSanitizer = "YES"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Applivery.swift
// AppliverySDK.swift
// AppliverySDK
//
// Created by Alejandro Jiménez on 3/10/15.
Expand Down Expand Up @@ -48,7 +48,7 @@ import UIKit
- Author: Alejandro Jiménez Agudo
- Copyright: Applivery S.L.
*/
public class Applivery: NSObject {
public class AppliverySDK: NSObject {

// MARK: - Static Properties

Expand All @@ -57,7 +57,7 @@ public class Applivery: NSObject {
// MARK: - Type Properties

/// Singleton instance
@objc public static let shared = Applivery()
@objc public static let shared = AppliverySDK()

var window: AppliveryWindow?

Expand Down
41 changes: 0 additions & 41 deletions AppliverySDK/Applivery/Modules/ForceUpdateScreen.swift

This file was deleted.

31 changes: 0 additions & 31 deletions AppliverySDK/Applivery/Modules/VideoReport/TimedButton.swift

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions AppliverySDK/Applivery/SDKConfig/Configurator.swift

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ enum KeychainError: Error {
struct SessionPersister {
let userDefaults: UserDefaultsProtocol

func save(accessToken: AccessToken?) {
self.userDefaults.set(accessToken, forKey: kAccessTokenKey)
_ = self.userDefaults.synchronize()
}
// func save(accessToken: AccessToken?) {
// self.userDefaults.set(accessToken, forKey: kAccessTokenKey)
// _ = self.userDefaults.synchronize()
// }

func loadAccessToken() -> AccessToken? {
let accessToken: AccessToken? = self.userDefaults.token(forKey: kAccessTokenKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ 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 Expand Up @@ -134,7 +135,7 @@ private extension StartInteractor {
} catch {
log("Error obtaining redirect URL: \(error.localizedDescription)")
await MainActor.run {
app.showErrorAlert("Error obtaining redirect URL: \(error)", retryHandler: {})
app.showErrorAlert("Error obtaining redirect URL", retryHandler: {})
}
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
69 changes: 69 additions & 0 deletions AppliverySDK/Modules/ForceUpdateScreen.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
//
// ForceUpdateScreen.swift
// Applivery
//
// Created by Fran Alarza on 3/12/24.
//

import SwiftUI

struct ForceUpdateScreen: View {
private let pallete = GlobalConfig.shared.palette
let service: UpdateServiceProtocol = UpdateService()
@State var isLoading: Bool = false

var body: some View {
ZStack {
VStack(spacing: 32) {
Text(service.forceUpdateMessage())
.padding(.horizontal)
.multilineTextAlignment(.center)

Button(action: {
isLoading = true
service.downloadLastBuild()
}) {
Text(literal(.buttonForceUpdate) ?? "")
.foregroundColor(.white)
.padding()
.background(Color.blue)
.cornerRadius(8)
}
}
.background(Color(pallete.secondaryColor))

if isLoading {
Color.black.opacity(0.4)
.edgesIgnoringSafeArea(.all)

ActivityIndicatorView(isAnimating: .constant(true), style: .large)
}
}
}
}

struct ActivityIndicatorView: UIViewRepresentable {
@Binding var isAnimating: Bool
let style: UIActivityIndicatorView.Style

func makeUIView(context: Context) -> UIActivityIndicatorView {
let indicator = UIActivityIndicatorView(style: style)
return indicator
}

func updateUIView(_ uiView: UIActivityIndicatorView, context: Context) {
if isAnimating {
uiView.startAnimating()
} else {
uiView.stopAnimating()
}
}
}

#Preview {
ForceUpdateScreen()
}

#Preview {
ForceUpdateScreen(isLoading: true)
}
Loading

0 comments on commit f706f5e

Please sign in to comment.