Skip to content

Conversation

AlejandroOrozco
Copy link
Contributor

@AlejandroOrozco AlejandroOrozco commented Feb 15, 2022

Ticket

  • [23926]

Description

  • Store & Show Challenges from Notification Extension

Testing

  • Added unit tests
  • Ran unit tests successfully
  • Added documentation for public APIs and/or Wiki

@AlejandroOrozco AlejandroOrozco changed the title [23926] Store & Show Challenges from Notification Extension. [23926] - Store & Show Challenges from Notification Extension. Feb 15, 2022
var bestAttemptContent: UNMutableNotificationContent?

private lazy var twilioVerify: TwilioVerify? = try? TwilioVerifyBuilder()
.setAccessGroup("group.company.identifier")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add a TODO for setting the customer's correct access group. Should we use the access group for the sample app in order to generate builds for testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added #warning instead, that would be more visible.

#endif
twilioVerify = try builder.build()
twilioVerify = try builder
.setAccessGroup("group.company.identifier")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add a TODO for setting the customer's correct access group. Should we use the access group for the sample app in order to generate builds for testing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we can include also where to update the access group for the extension

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added #warning instead, that would be more visible. Also mentioned the NotificationExtension.

import XCTest
@testable import TwilioVerifyDemoCache

final class TwilioVerifyDemoCacheTests: XCTestCase {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we need this?

public var algorithm = kSecAttrKeyTypeECSECPrimeRandom as String
public var signatureAlgorithm = SecKeyAlgorithm.ecdsaSignatureMessageX962SHA256
public var accessControl: SecAccessControl
public var accessGroup: String?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the base branch to not see the changes for the SDK

@AlejandroOrozco AlejandroOrozco force-pushed the aorozcobuiles/23926/StoreAndShowChallengesInNotificationServiceExtension branch from 625966d to c5b2840 Compare February 23, 2022 13:11
}

func updateChallenge(withSid sid: String, withFactor factor: PushFactor, status: ChallengeStatus, success: @escaping EmptySuccessBlock, failure: @escaping TwilioVerifyErrorBlock) {
func updateChallenge(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Function should have complexity 10 or less: currently complexity equals 11
cyclomatic_complexity PushChallengeProcessor.swift:54

}

func updateChallenge(withSid sid: String, withFactor factor: PushFactor, status: ChallengeStatus, success: @escaping EmptySuccessBlock, failure: @escaping TwilioVerifyErrorBlock) {
func updateChallenge(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Function body should span 40 lines or less excluding comments and whitespace: currently spans 60 lines
function_body_length PushChallengeProcessor.swift:54

@AlejandroOrozco AlejandroOrozco force-pushed the aorozcobuiles/23926/StoreAndShowChallengesInNotificationServiceExtension branch from c5b2840 to a758bd6 Compare February 23, 2022 13:25
@yafuquen yafuquen requested a review from mejiagarcia February 23, 2022 13:28
@AlejandroOrozco AlejandroOrozco force-pushed the aorozcobuiles/23926/StoreAndShowChallengesInNotificationServiceExtension branch from a758bd6 to 2c6609e Compare February 23, 2022 13:48
@AlejandroOrozco AlejandroOrozco force-pushed the aorozcobuiles/23926/StoreAndShowChallengesInNotificationServiceExtension branch from 2c6609e to b1b2013 Compare February 23, 2022 13:56
@AuthyApps
Copy link

1 Warning
⚠️ Big PR

Code coverage

Total coverage: 93.61%

Powered by Slather

Generated by 🚫 Danger

@yafuquen yafuquen merged commit be4e943 into feature/notificationExtension Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants