-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add support for Apple Watch in CoreAardvark #41
Conversation
Missing:
If there's no shared disk space between watch and iOS, then I guess it's up to the consumer to vend logs from the watch to the parent app. |
Tracking getting logs from the watch with #42 |
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.
Looks like CoreAardvark needs some work to compile on WatchOS. Hopefully UIApplication*
notifications have an equivalent on WatchOS.
s.license = 'Apache License, Version 2.0' | ||
s.summary = 'Aardvark is a library that makes it dead simple to create actionable bug reports. Usable by extensions.' | ||
s.homepage = 'https://github.com/square/Aardvark' | ||
s.authors = 'Square' | ||
s.source = { :git => 'https://github.com/square/Aardvark.git', :tag => "CoreAardvark/#{ s.version.to_s }" } | ||
s.ios.deployment_target = '8.0' | ||
s.watchos.deployment_target = '3.0' |
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.
Build is failing. Looks like watch doesn't know about UIApplicationWillTerminateNotification
.
… do the same task
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.
Naming nits only. 🤞 for a green build!
@@ -57,4 +57,7 @@ | |||
/// Removes all logs. Completion handler is called on the main queue. | |||
- (void)clearLogsWithCompletionHandler:(nullable dispatch_block_t)completionHandler; | |||
|
|||
/// Waits for all of the pending logs to distribute from the log distributor, then saves with optional wait. This is done automatically when platform=ios, but must be done manually in watchos, preferably in WKExtensionDelegate applicationWillResignActive; |
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.
Let's be clear as to when this is called on iOS.
@@ -128,12 +130,17 @@ - (void)clearLogsWithCompletionHandler:(nullable dispatch_block_t)completionHand | |||
} | |||
} | |||
|
|||
- (void)waitForPendingLogsThenSaveAndWait:(BOOL)wait; |
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.
I'm not sure how much the wait
parameter gives us here, since we're already waiting for one thing. Maybe just waitUntilAllLogsConsumedAndArchiveSaved
?
Merge when green! |
I think this should be all that's needed, but we'll have to see. Never tried making code that is shared between platforms watchos and ios