Skip to content

Commit

Permalink
Update all to latest Swift 3 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
p2 committed Aug 30, 2016
1 parent c06fcec commit 5e50c47
Show file tree
Hide file tree
Showing 55 changed files with 691 additions and 569 deletions.
12 changes: 12 additions & 0 deletions C3PRO.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
EE2A9D7F1CE61F2500FB2B4F /* Questionnaire_ValueSet-relative.json in Resources */ = {isa = PBXBuildFile; fileRef = EE2A9D7C1CE61F2500FB2B4F /* Questionnaire_ValueSet-relative.json */; };
EE2A9D801CE61F2500FB2B4F /* ValueSet_SF36.json in Resources */ = {isa = PBXBuildFile; fileRef = EE2A9D7D1CE61F2500FB2B4F /* ValueSet_SF36.json */; };
EE2D8DE51B87764200D044B4 /* EncryptedDataQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE2D8DE41B87764200D044B4 /* EncryptedDataQueue.swift */; };
EE3813FE1D75A643001EFC49 /* QuestionnaireResponse in Resources */ = {isa = PBXBuildFile; fileRef = EE9560AA1D645B4B0069D49B /* QuestionnaireResponse */; };
EE3813FF1D75A673001EFC49 /* public.crt in Resources */ = {isa = PBXBuildFile; fileRef = EE3813FC1D75A3D8001EFC49 /* public.crt */; };
EE507A2E1B1DF2B000AE02E9 /* DataQueueManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE507A2D1B1DF2B000AE02E9 /* DataQueueManager.swift */; };
EE507A3B1B1E169300AE02E9 /* OAuth2DynRegAppStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE507A3A1B1E169300AE02E9 /* OAuth2DynRegAppStore.swift */; };
EE519BA31B0CD44300036B96 /* Questionnaire+C3-PRO.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE519BA21B0CD44200036B96 /* Questionnaire+C3-PRO.swift */; };
Expand Down Expand Up @@ -60,6 +62,7 @@
EEC5A8621D5CB2CC00753852 /* SQLite.h in Headers */ = {isa = PBXBuildFile; fileRef = EEC5A8611D5CB2CC00753852 /* SQLite.h */; };
EEC6DC2B1C4D3CDD00A42E87 /* SystemPermissionTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEC6DC2A1C4D3CDD00A42E87 /* SystemPermissionTableViewController.swift */; };
EEC6DC3D1C4D4F0200A42E87 /* C3PRO.strings in Resources */ = {isa = PBXBuildFile; fileRef = EEC6DC3F1C4D4F0200A42E87 /* C3PRO.strings */; };
EEE091FE1D66105C00F1C829 /* EncryptionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEE091FD1D66105C00F1C829 /* EncryptionTests.swift */; };
EEE60CD31C68999E00F381B7 /* ConditionalStep.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEE60CD21C68999E00F381B7 /* ConditionalStep.swift */; };
EEEA7F481BD61EA20089BF85 /* StudyIntroCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEEA7F471BD61EA20089BF85 /* StudyIntroCollectionViewController.swift */; };
EEEA7F4A1BD624490089BF85 /* StudyIntroCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEEA7F491BD624490089BF85 /* StudyIntroCollectionViewCell.swift */; };
Expand Down Expand Up @@ -100,6 +103,8 @@
EE2A9D7C1CE61F2500FB2B4F /* Questionnaire_ValueSet-relative.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "Questionnaire_ValueSet-relative.json"; sourceTree = "<group>"; };
EE2A9D7D1CE61F2500FB2B4F /* ValueSet_SF36.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = ValueSet_SF36.json; sourceTree = "<group>"; };
EE2D8DE41B87764200D044B4 /* EncryptedDataQueue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EncryptedDataQueue.swift; sourceTree = "<group>"; };
EE3813FB1D75A35A001EFC49 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
EE3813FC1D75A3D8001EFC49 /* public.crt */ = {isa = PBXFileReference; lastKnownFileType = file; name = public.crt; path = enc/public.crt; sourceTree = "<group>"; };
EE507A2D1B1DF2B000AE02E9 /* DataQueueManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataQueueManager.swift; sourceTree = "<group>"; };
EE507A3A1B1E169300AE02E9 /* OAuth2DynRegAppStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2DynRegAppStore.swift; sourceTree = "<group>"; };
EE519B9C1B0CD3AC00036B96 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
Expand Down Expand Up @@ -176,6 +181,7 @@
EEC5A8611D5CB2CC00753852 /* SQLite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLite.h; path = SQLiteSwift/SQLite/SQLite.h; sourceTree = SOURCE_ROOT; };
EEC6DC2A1C4D3CDD00A42E87 /* SystemPermissionTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SystemPermissionTableViewController.swift; sourceTree = "<group>"; };
EEC6DC3E1C4D4F0200A42E87 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/C3PRO.strings; sourceTree = "<group>"; };
EEE091FD1D66105C00F1C829 /* EncryptionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EncryptionTests.swift; sourceTree = "<group>"; };
EEE60CD21C68999E00F381B7 /* ConditionalStep.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConditionalStep.swift; sourceTree = "<group>"; };
EEEA7F451BD61E800089BF85 /* StudyIntro.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = StudyIntro.storyboard; sourceTree = "<group>"; };
EEEA7F471BD61EA20089BF85 /* StudyIntroCollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StudyIntroCollectionViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -297,6 +303,7 @@
isa = PBXGroup;
children = (
EE9560A51D6456050069D49B /* README.md */,
EE3813FC1D75A3D8001EFC49 /* public.crt */,
EE9560AC1D645EB30069D49B /* Contract */,
EE9560A91D645B3D0069D49B /* Questionnaire */,
EE9560AA1D645B4B0069D49B /* QuestionnaireResponse */,
Expand Down Expand Up @@ -431,6 +438,7 @@
isa = PBXGroup;
children = (
EE519B9C1B0CD3AC00036B96 /* README.md */,
EE3813FB1D75A35A001EFC49 /* CHANGELOG.md */,
EEEA7F681BD68E800089BF85 /* C3Error.swift */,
EE86C48E1C4AC1E500B7D486 /* String+C3-PRO.swift */,
EEC6DC3F1C4D4F0200A42E87 /* C3PRO.strings */,
Expand Down Expand Up @@ -491,6 +499,7 @@
isa = PBXGroup;
children = (
EEFA84CD1AE5C18B00E61006 /* C3PROTests.swift */,
EEE091FD1D66105C00F1C829 /* EncryptionTests.swift */,
EE2A9D6C1CE5FB3E00FB2B4F /* QuestionnaireTests.swift */,
EE9560971D6454850069D49B /* ConsentControllerTests.swift */,
EE95609B1D6456050069D49B /* examples */,
Expand Down Expand Up @@ -616,8 +625,10 @@
buildActionMask = 2147483647;
files = (
EE2A9D801CE61F2500FB2B4F /* ValueSet_SF36.json in Resources */,
EE3813FE1D75A643001EFC49 /* QuestionnaireResponse in Resources */,
EE2A9D7E1CE61F2500FB2B4F /* Questionnaire_ValueSet-contained.json in Resources */,
EE9560AD1D645EBC0069D49B /* Contract in Resources */,
EE3813FF1D75A673001EFC49 /* public.crt in Resources */,
EE2A9D7F1CE61F2500FB2B4F /* Questionnaire_ValueSet-relative.json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -692,6 +703,7 @@
files = (
EE9560981D6454850069D49B /* ConsentControllerTests.swift in Sources */,
EEFA84CE1AE5C18B00E61006 /* C3PROTests.swift in Sources */,
EEE091FE1D66105C00F1C829 /* EncryptionTests.swift in Sources */,
EE2A9D6D1CE5FB3E00FB2B4F /* QuestionnaireTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ Changelog
=========


## 1.5 (2016-xx-xx)

- Full conversion to Swift 3.0
- Now using FHIR v1.6 (STU-3 ballot version)


## 1.1 (2016-07-20)

- Adds the `ActivityReporter` protocol and implementations to retrieve activity data from HealthKit and CoreMotion
Expand Down
2 changes: 1 addition & 1 deletion CryptoSwift
Submodule CryptoSwift updated 60 files
+1 −0 .gitignore
+1 −1 .swift-version
+3 −3 .travis.yml
+2 −2 CryptoSwift.playground/Contents.swift
+94 −61 CryptoSwift.xcodeproj/project.pbxproj
+1 −6 Package.swift
+3 −3 README.md
+6 −6 Sources/CryptoSwift/AES.swift
+15 −0 Sources/CryptoSwift/Array+Extension.swift
+3 −36 Sources/CryptoSwift/Authenticator.swift
+1 −1 Sources/CryptoSwift/BlockMode/BlockMode.swift
+2 −2 Sources/CryptoSwift/BlockMode/CBC.swift
+2 −2 Sources/CryptoSwift/BlockMode/CFB.swift
+2 −2 Sources/CryptoSwift/BlockMode/CTR.swift
+1 −1 Sources/CryptoSwift/BlockMode/ECB.swift
+2 −2 Sources/CryptoSwift/BlockMode/OFB.swift
+2 −2 Sources/CryptoSwift/BlockMode/PCBC.swift
+18 −12 Sources/CryptoSwift/CSArrayType+Extensions.swift
+8 −5 Sources/CryptoSwift/ChaCha20.swift
+15 −5 Sources/CryptoSwift/Checksum.swift
+68 −0 Sources/CryptoSwift/Collection+Extension.swift
+10 −19 Sources/CryptoSwift/Foundation/Data+Extension.swift
+9 −9 Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift
+4 −27 Sources/CryptoSwift/Generics.swift
+20 −12 Sources/CryptoSwift/HMAC.swift
+24 −27 Sources/CryptoSwift/Hash.swift
+11 −15 Sources/CryptoSwift/Int+Extension.swift
+1 −1 Sources/CryptoSwift/MD5.swift
+4 −19 Sources/CryptoSwift/Operators.swift
+2 −2 Sources/CryptoSwift/PKCS5/PBKDF1.swift
+18 −12 Sources/CryptoSwift/PKCS5/PBKDF2.swift
+35 −28 Sources/CryptoSwift/Poly1305.swift
+13 −9 Sources/CryptoSwift/Rabbit.swift
+3 −3 Sources/CryptoSwift/SHA1.swift
+7 −7 Sources/CryptoSwift/SHA2.swift
+14 −9 Sources/CryptoSwift/String+Extension.swift
+18 −0 Sources/CryptoSwift/UInt16+Extension.swift
+10 −15 Sources/CryptoSwift/UInt32+Extension.swift
+18 −0 Sources/CryptoSwift/UInt64+Extension.swift
+0 −23 Sources/CryptoSwift/UInt64Extension.swift
+2 −2 Sources/CryptoSwift/UInt8+Extension.swift
+7 −7 Sources/CryptoSwift/Updatable.swift
+0 −32 Sources/CryptoSwift/Utils.swift
+55 −17 Tests/CryptoSwiftTests/AESTests.swift
+241 −0 Tests/CryptoSwiftTests/Access.swift
+0 −0 Tests/CryptoSwiftTests/Bridging.h
+9 −9 Tests/CryptoSwiftTests/ChaCha20Tests.swift
+26 −0 Tests/CryptoSwiftTests/CommonCryptoTests.swift
+17 −0 Tests/CryptoSwiftTests/Error+Extension.swift
+38 −20 Tests/CryptoSwiftTests/ExtensionsTest.swift
+15 −15 Tests/CryptoSwiftTests/HMACTests.swift
+25 −32 Tests/CryptoSwiftTests/HashTests.swift
+0 −0 Tests/CryptoSwiftTests/Helpers.swift
+0 −0 Tests/CryptoSwiftTests/Info.plist
+9 −11 Tests/CryptoSwiftTests/PBKDF.swift
+7 −0 Tests/CryptoSwiftTests/PaddingTests.swift
+7 −11 Tests/CryptoSwiftTests/Poly1305Tests.swift
+18 −19 Tests/CryptoSwiftTests/RabbitTests.swift
+15 −0 Tests/LinuxMain.swift
+42 −0 scripts/CI.sh
2 changes: 1 addition & 1 deletion Sources/Common/C3Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import SMART


/// The FHIR version used by this instance of the framework.
public let C3PROFHIRVersion = "1.4.0"
public let C3PROFHIRVersion = "1.6.0"


/**
Expand Down
38 changes: 19 additions & 19 deletions Sources/Consent/ConsentController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import ResearchKit


/**
Callback used when signing the consent. Provides `contract`, `patient` and an optional `error`.
Callback used when signing the consent. Provides `Contract`, `Patient` and an optional `Error`.
*/
public typealias ConsentSigningCallback = ((contract: Contract, patient: Patient, error: Error?) -> Void)
public typealias ConsentSigningCallback = ((Contract, Patient, Error?) -> Void)

/// Name of notification sent when the user completes and agrees to consent.
public let C3UserDidConsentNotification = "C3UserDidConsentNotification"
Expand Down Expand Up @@ -89,10 +89,10 @@ public class ConsentController {
var consentDelegate: ConsentTaskViewControllerDelegate?

/// The callback to call when the user consents.
var onUserDidConsent: ((controller: ORKTaskViewController, result: ConsentResult) -> Void)?
var onUserDidConsent: ((ORKTaskViewController, ConsentResult) -> Void)?

/// The callback to call when the user declines (or aborts) consenting.
var onUserDidDeclineConsent: ((controller: ORKTaskViewController) -> Void)?
var onUserDidDeclineConsent: ((ORKTaskViewController) -> Void)?

/// Whether a PIN was present before; if not and consenting is cancelled, the PIN is cleared.
internal private(set) var pinPresentBefore = false
Expand All @@ -113,7 +113,7 @@ public class ConsentController {
*/
public init(bundledContract: String? = nil, subdirectory: String? = nil) throws {
if let name = bundledContract {
let bundle = Bundle(for: self.dynamicType)
let bundle = Bundle(for: type(of: self))
contract = try bundle.fhir_bundledResource(name, subdirectory: subdirectory, type: Contract.self)
}
}
Expand All @@ -130,7 +130,7 @@ public class ConsentController {
nil to automatically present (and dismiss) the consent task view controller that will be returned by
`consentViewController()`.
*/
public func eligibilityStatusViewController(_ config: StudyIntroConfiguration? = nil, onStartConsent: ((viewController: EligibilityCheckViewController) -> Void)? = nil) -> EligibilityStatusViewController {
public func eligibilityStatusViewController(_ config: StudyIntroConfiguration? = nil, onStartConsent: ((EligibilityCheckViewController) -> Void)? = nil) -> EligibilityStatusViewController {
let check = EligibilityStatusViewController()
check.title = "Eligibility".c3_localized
check.titleText = "Let's see if you may take part in this study".c3_localized
Expand Down Expand Up @@ -201,7 +201,7 @@ public class ConsentController {
- parameter callback: The callback that is called when the group is resolved (or resolution fails); may be on any thread but may be
called immediately in case of embedded resources.
*/
public func eligibilityRequirements(callback: ((requirements: [EligibilityRequirement]?) -> Void)) {
public func eligibilityRequirements(callback: (([EligibilityRequirement]?) -> Void)) {
if let group = contract?.subject?.first {
group.resolve(Group.self) { group in
if let characteristics = group?.characteristic {
Expand All @@ -214,17 +214,17 @@ public class ConsentController {
c3_warn("this characteristic failed to return an eligibility requirement: \(characteristic.asJSON())")
}
}
callback(requirements: criteria)
callback(criteria)
}
else {
c3_warn("failed to resolve the contract's subject group or there are no characteristics, hence no eligibility criteria")
callback(requirements: nil)
callback(nil)
}
}
}
else {
logger?.debug("C3-PRO", msg: "the contract does not have a subject, hence no eligibility criteria")
callback(requirements: nil)
callback(nil)
}
}

Expand Down Expand Up @@ -254,8 +254,8 @@ public class ConsentController {
- parameter onUserDidDecline: Block executed when the user cancels or actively declines consent
- throws: Re-throws from `createConsentTask()`
*/
public func consentViewController(onUserDidConsent onConsent: ((controller: ORKTaskViewController, result: ConsentResult) -> Void),
onUserDidDecline: ((controller: ORKTaskViewController) -> Void)) throws -> ORKTaskViewController {
public func consentViewController(onUserDidConsent onConsent: ((ORKTaskViewController, ConsentResult) -> Void),
onUserDidDecline: ((ORKTaskViewController) -> Void)) throws -> ORKTaskViewController {

if nil != onUserDidConsent {
c3_warn("a `onUserDidConsent` block is already set on \(self), are you already presenting a consent view controller? This might have unintended consequences.")
Expand Down Expand Up @@ -283,7 +283,7 @@ public class ConsentController {
sign(consentDocument: task.consentDocument, with: signatureResult)

// sharing choice
if let sharingResult = taskResult.stepResult(forStepIdentifier: task.dynamicType.sharingStepName),
if let sharingResult = taskResult.stepResult(forStepIdentifier: type(of: task).sharingStepName),
let sharing = sharingResult.results?.first as? ORKChoiceQuestionResult,
let choice = sharing.choiceAnswers?.first as? Int {
result.shareWidely = (0 == choice) // the first option, index 0, is "share worldwide"
Expand Down Expand Up @@ -320,7 +320,7 @@ public class ConsentController {
*/
public func userDidConsent(_ taskViewController: ORKTaskViewController, result: ConsentResult) {
if let exec = onUserDidConsent {
exec(controller: taskViewController, result: result)
exec(taskViewController, result)
}
let userInfo = [C3ConsentResultKey: result]
NotificationCenter.default.post(name: Notification.Name(rawValue: C3UserDidConsentNotification), object: self, userInfo: userInfo)
Expand All @@ -334,7 +334,7 @@ public class ConsentController {
ORKPasscodeViewController.removePasscodeFromKeychain()
}
if let exec = onUserDidDeclineConsent {
exec(controller: taskViewController)
exec(taskViewController)
}
NotificationCenter.default.post(name: Notification.Name(rawValue: C3UserDidDeclineConsentNotification), object: self)
}
Expand Down Expand Up @@ -416,11 +416,11 @@ public class ConsentController {

do {
let contract = try self.signContract(with: patient, result: result)
callback(contract: contract, patient: patient, error: nil)
callback(contract, patient, nil)
}
catch let error {
c3_warn("\(error)")
callback(contract: Contract(json: nil), patient: patient, error: error)
callback(Contract(json: nil), patient, error)
}
}
}
Expand All @@ -429,7 +429,7 @@ public class ConsentController {
// MARK: - Consent PDF

/**
Asynchronously generates a consent PDF at `self.dynamicType.signedConsentPDFURL()`, containing the given signature.
Asynchronously generates a consent PDF at `type(of: self).signedConsentPDFURL()`, containing the given signature.

- parameter consentDocument: The consent document to sign, usually the one used in our consent task
- parameter with: The signature to apply to the document
Expand All @@ -438,7 +438,7 @@ public class ConsentController {
logger?.debug("C3-PRO", msg: "Writing consent PDF")
signature.apply(to: document)
document.makePDF() { data, error in
if let data = data, let pdfURL = self.dynamicType.signedConsentPDFURL() {
if let data = data, let pdfURL = type(of: self).signedConsentPDFURL() {
do {
try data.write(to: pdfURL, options: .atomic)
self.logger?.debug("C3-PRO", msg: "Consent PDF written to \(pdfURL)")
Expand Down
14 changes: 7 additions & 7 deletions Sources/Consent/ConsentResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ import ResearchKit
/**
Class to hold on to the consent result.
*/
public class ConsentResult {
open class ConsentResult {

/// When the participant did consent, if at all.
public var consentDate: Date?
open var consentDate: Date?

/// Given name of the participant.
public var participantGivenName: String?
open var participantGivenName: String?

/// Family name of the participant.
public var participantFamilyName: String?
open var participantFamilyName: String?

/// Name composed of given and family name.
public var participantFriendlyName: String? {
open var participantFriendlyName: String? {
if let given = participantGivenName {
if let family = participantFamilyName {
return "\(given) \(family)"
Expand All @@ -47,10 +47,10 @@ public class ConsentResult {
}

/// Image of the participant's signature.
public var signatureImage: UIImage?
open var signatureImage: UIImage?

/// Answer to data sharing: nil if not asked/answered, true if data may be shared widely, false if data is for study researchers only.
public var shareWidely: Bool?
open var shareWidely: Bool?


public init(signature: ORKConsentSignature?) {
Expand Down
10 changes: 5 additions & 5 deletions Sources/Consent/ConsentTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class ConsentTask: ORKOrderedTask {

/// The sharing step.
public var sharingStep: ORKStep? {
return step(withIdentifier: self.dynamicType.sharingStepName)
return step(withIdentifier: type(of: self).sharingStepName)
}

/// The identifier of the sharing step.
Expand All @@ -66,7 +66,7 @@ public class ConsentTask: ORKOrderedTask {
public init(identifier: String, contract: Contract, options: ConsentTaskOptions) throws {
self.contract = contract
do {
let prepped = try self.dynamicType.stepsAndConsent(from: contract, options: options)
let prepped = try type(of: self).stepsAndConsent(from: contract, options: options)
consentDocument = prepped.consent
super.init(identifier: identifier, steps: prepped.steps)
}
Expand Down Expand Up @@ -175,8 +175,8 @@ public class ConsentTask: ORKOrderedTask {
- returns: The consent signature result, if the step has been completed yet
*/
public func signatureResult(from taskResult: ORKTaskResult) -> ORKConsentSignatureResult? {
return taskResult.stepResult(forStepIdentifier: self.dynamicType.reviewStepName)?
.result(forIdentifier: self.dynamicType.participantSignatureName) as? ORKConsentSignatureResult
return taskResult.stepResult(forStepIdentifier: type(of: self).reviewStepName)?
.result(forIdentifier: type(of: self).participantSignatureName) as? ORKConsentSignatureResult
}

/**
Expand Down Expand Up @@ -215,7 +215,7 @@ public class ConsentTask: ORKOrderedTask {
}

// declined consent, stop here
if self.dynamicType.reviewStepName == step.identifier && nil == signature(from: result) {
if type(of: self).reviewStepName == step.identifier && nil == signature(from: result) {
return nil
}
return super.step(after: step, with: result)
Expand Down
Loading

0 comments on commit 5e50c47

Please sign in to comment.