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
| class A: Description { | |
| func discribe() -> String { | |
| return "Class Name - A and Author is Sandeep Bhandari" | |
| } | |
| } | |
| class B: Description { | |
| func discribe() -> String { | |
| return "Class Name - B and Author is Sandeep Bhandari" | |
| } |
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
| protocol Description { | |
| func discribe() -> 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
| var genericOperationClass: GenericOperations! |
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
| class ViewController: UIViewController,GenericOperations { | |
| typealias Operand = Int | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| let a = 100 | |
| let b = 200 | |
| debugPrint(self.add(operand1: a, operand2: b)) | |
| } | |
| } |
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
| protocol GenericOperations { | |
| associatedtype Operand | |
| func add(operand1: Operand, operand2: Operand) -> Operand | |
| } | |
| extension GenericOperations where Operand == Int { | |
| func add(operand1: Operand, operand2: Operand) -> Operand { | |
| return operand1 + operand2 | |
| } | |
| } |
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
| class A: GenericOperations { | |
| typealias Operand = Int | |
| func add(operand1: Int, operand2: Int) -> Int { | |
| return operand1 + operand2 | |
| } | |
| } | |
| class B: GenericOperations { | |
| typealias Operand = 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
| protocol GenericOperations { | |
| associatedtype Operand | |
| func add(operand1: Operand, operand2: Operand) -> Operand | |
| } |
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
| /Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool --upload-app -f ~/Desktop/your_project.ipa -u [email protected] -p your_itunes_connect_password |
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
| security unlock-keychain -p "your_system_password" ~/Library/Keychains/login.keychain-db && xcodebuild -workspace your_project.xcworkspace/ -scheme your_project_schema -sdk iphoneos -configuration "${CONFIGURATION}" archive -archivePath /Users/Shared/Jenkins/Documents/build/your_project.xcarchive PROVISIONING_PROFILE="${PROVISION_PROFILE}" && xcodebuild -exportArchive -archivePath /Users/Shared/Jenkins/Documents/build/your_project.xcarchive/ -exportPath ~/Desktop/ -exportOptionsPlist ExportOptions.plist |
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
| security unlock-keychain -p "your_system_password" ~/Library/Keychains/login.keychain-db |