-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests Apps in both Objective C and Swift #9
Conversation
|
||
class AppDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDelegate { | ||
|
||
var pushDetails = PushNotificationDetailClass() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we use @StateObject
to init PushNotificationDetailClass (which is an ObservableObject)
@StateObject var pushDetails = PushNotificationDetailClass()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No StateObject isn't an ideal choice for use for classes that are not SwiftUI.
We get a warning
"Accessing StateObject's object without being installed on a View. This will create a new instance each time."
} | ||
} | ||
|
||
struct CampaignClassicMockAPICard: View { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Im not sure why we need this when we have enabled the app for Push. We already have integration tests that help inspect and test the outgoing requests for the APIs (happy path).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the time for quick API testing we use the app with simulator. These mocks will certainly help on those times
Test App Swift
Test App Objective C