This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Basic configuration for creating Alamofire manager | |
let configuration = URLSessionConfiguration.default | |
configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders | |
configuration.timeoutIntervalForRequest = 60 | |
var serverTrustPolicies: [String: ServerTrustPolicy] = [:] | |
// 2. Pass your certificate filename, type and directory path to load the cefrtificate | |
guard let certificatePath = Bundle.main.path(forResource: "CertificateFileName", ofType: "der", inDirectory: "assets/certificate") else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedInputStream; | |
import java.io.BufferedOutputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.OutputStream; | |
import com.jcraft.jsch.Channel; | |
import com.jcraft.jsch.ChannelSftp; | |
import com.jcraft.jsch.JSch; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface LoginContracts { | |
interface View { | |
fun presentHomeScreen(user: User) | |
fun showError(message: String) | |
} | |
interface Presenter { | |
fun onDestroy() | |
fun onLoginButtonPressed(username: String, password: String) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface LoginContracts { | |
interface View { | |
fun showError(message: String) | |
} | |
interface Presenter { | |
fun onDestroy() | |
fun onLoginButtonPressed(username: String, password: String) | |
} | |