-
Notifications
You must be signed in to change notification settings - Fork 444
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
Occurrence circles #674
Comments
Very strange! Are you able to reproduce the issue and print out the event that's displayed in the view? I wonder if there are no events found for those particular tasks. If the events are retrieved properly, can you share as much information as possible to help me reproduce the issue? That way I can track down what's happening. It also seems like these might be custom views, sharing the view synchronizer implementation will be helpful here. |
Thanks, @gavirawson-apple for your kind response. We were able to identify the issue but are not able to identify the reason yet. It happens when there is only one scheduled event for the day of activity. But it appears the circles if we change it from 1 to 2 or 3 occurrences. Unfortunately, I don't have access to the device that is showing this issue. I cannot print an output of the event. Can you please advise an alternate way to debug the issue on that device when I don't have access to it? I used the following statement to schedule a single occurrence event. I also tried the following statement for scheduling a single occurrence event but it also didn't work: This doesn't work for some people but works for others. The people are living in different TimeZones, do you think it's because of the different TimeZones? I'll create a private gist to share my custom views and synchronizer implementation with you. Thank You!
|
It's hard to say whether this is a time zone or a visual issue. There are complexities that occur when a user moves across time zones - a scheduled task is typically fixed to the time zone in which it was scheduled. The exception is an all-day task. But if your users are not moving across time zones, I suspect time zones is lower on the list of potential culprits, but definitely still a possibility. It sounds like the problem is only occurring when there is one event in the card, which leads me to suspect this might be a visual issue. If you're able to share that gist with me, I can use the scheduling logic you've shared above along with the custom view synchronizer logic and try to reproduce the issue on my end. With a reproducible case and some breakpoints, we can better lock down the underlying issue. |
The user isn't moving between the time zones. I and the user lives in different time zones so, when I log into the app using his credentials, it loads all the content correctly at my end. I used different devices and it worked just fine for me on all different devices. But when the user tries on his side, he faces this strange issue on his side. You can see the gist files here: https://gist.github.com/majidsaleem105/f2ce4d348eac3e79748a780a03bdc12a. Please let me know if you need any additional information from me. Thank You!
|
I've shared the gist files. Did you get a chance to look at them? Kind Regards,
|
Any suggestions? We're stuck because of this strange issue. Thanks,
|
Apologies for the delay! Looking through the code for the view synchronizer, there might be some business logic could be causing issues. Mainly the logic that fetches events, or the logic that dispatches to the main queue. We typically put lightweight logic in that Let's test that hunch - can you try using the plain |
I followed your instructions and removed all my custom logic from the Here is my OCKGridTaskViewSynchronizer class: https://gist.github.com/majidsaleem105/8e28e7afa6588c3cdec933d321a59660 It is omitting Single Event activities from the Home screen. As I don't have access to the devices, is there a way that I can write/fetch error logs for debugging purpses from the Device? Thank You. Best Regards,
|
Hi @gavirawson-apple, Best Regards,
|
Ah okay, sounds like my hunch was wrong. I'm having trouble reproducing this issue with the gist here, because I'm missing a lot of the contextual code needed to get this compiling and running on my end. Are you able to demonstrate this issue in a smaller reproducable example? Can you also share the CareKit scheduling code for the task that's disappearing? Is it ever updated or deleted throughout the app lifecycle? |
I might also try implementing the method |
Here is the gist for CareKit scheduling. We group activities for users' ease to find them quickly. Initially, I used sample app to start building our app. The app was working fine a few weeks ago for everyone. But we experienced this issue after taking iOS 16 updates and build generated on XCode 14.0. It is not happening to all users on all devices but for a few users. I also saw warning while upload the app to the TF/Store. An issue is already open for this issue. As I don't have access to the devices, is there a way that I can write/fetch error logs for debugging purpses from the Device? Thank you so much for your help. Best Regards, |
Thanks for the gist! Looks like there are a few tasks scheduled in here, but only a subset of them have multiple events on a single day. Is my reading correct - the task in question is scheduled either on line 126 or 139? Any idea which one it is exactly?
Thank you for that info! I'll make sure to use that configuration in my attempts to reproduce the issue.
Is that issue a blocker for you uploading to the App Store? Or is it just a warning? My understanding is that it is just a warning, and the underlying issue is not in CareKit.
It will depend on a few factors, including how the app is deployed. This link should contain all of the info you need! |
Thanks for looking at the gist file. The lines 126 or 139 were not for the single task. I've updated the gist file, the
Yes, It is just a warning. It doesn't block us to publish the app to the store. I tried to create a very basic version to identify this issue. I took the stable versions of the CareKit and ResearchKit frameworks. But when I try to build the app, it gives Any idea, why I'm getting this error? Best Regards, |
Thanks for the additional info. Unfortunately, I'm still not able to reproduce the issue you're seeing. I feel like I'm still missing the key piece here. Were you able to reproduce the issue in a small example project to send me? In the attempt I've put together, I first seed the store with what I think is the same task information you have above: func seed() async throws {
// Trying to match the start date you have in the example above
let startDate = Calendar.current.date(
bySettingHour: 5,
minute: 0,
second: 0,
of: Date()
)!
let schedule = OCKSchedule.dailyAtTime(
hour: 8,
minutes: 0,
start: startDate,
end: nil,
text: "Push Up"
)
let task = OCKTask(
id: "pushups",
title: "Pushups",
carePlanUUID: nil,
schedule: schedule
)
_ = try await storage.addTask(task)
} I then display the task using this custom view controller: class CareViewController: OCKDailyPageViewController {
override func dailyPageViewController(
_ dailyPageViewController: OCKDailyPageViewController,
prepare listViewController: OCKListViewController,
for date: Date
) {
let taskViewController = OCKGridTaskViewController(
taskID: "pushups",
eventQuery: OCKEventQuery(for: date),
storeManager: storeManager
)
listViewController.appendViewController(taskViewController, animated: false)
}
} When I run the app, I see the correct occurrence circle: What am I missing here? |
I'm also doing the same. I schedule the event, save into the store first and then I fetch it from the store to display it. But it doesn't work on some of the devices. I created the simple app version from the Sample app, but the issue appeared on that device with it. sample.app.mp4The following activities are scheduled for the Single Event:
As I explained earlier that it doesn't happen to every device but on some devices. You can see in the attached video that the Sample app also doesn't work on that device. Do you think it's an issue on the device side? Thank You.
|
Unfortunately I'm not able to reproduce the issue even when I test this out on an iPhone 13 running iOS 16.1. I'm sure there's some piece I'm missing that you have in your own app. If you can, please try reproducing the issue in a new project that you can send to me. That way I'll have the full context here, and we can lock down what's causing the issue. |
Out of curiosity, if you change the grid to an |
I've created a new sample project for you. You can clone it from https://github.com/majidsaleem105/sample-health-app.git.
Here is the phone info if it helps: Please let me know if you need any information from my side. We've completed our upgrade from the 1.2 version to the CareKit 2.0 version, but unfortunately, we are unable to release it because of this Single Event issue. Thanks,
|
As per your suggestion, I replaced Can you please advise, what could be the possible reason for not displaying the Single Event with Thanks,
|
Thanks for sharing that project. Unfortunately after running the project, I'm still not seeing the circles disappear. Without being able to reproduce the issue, it'll be really tough to say for certain what the cause is. However, after I cloned the project it didn't immediately compile - so it's possible the fixes I had to apply could have affected the problem. I had to manually embed the frameworks, and copy the source code into a new Xcode project (there were some strange build errors after embedding the frameworks, perhaps remnants from some previous setup). Given the |
Thanks, @gavirawson-apple for the advice. We decided to use the How we can do this if it's possible? |
Which title are you referring to? The one in the checklist item? |
Yes, I'm referring to the checklist item label. |
There isn't first class support for that sort of action as it may not be immediately clear to the user that tapping in those two different areas will produce different results. But, if you'd still like to support that feature you can modify the framework directly. See the Alternatively, you can create a custom task view that might better fit your specific needs and desired UX. |
@majidsaleem105 does that help address your question? Is this issue ready to be closed out? |
Thanks, @gavirawson-apple for your kind help. We are using |
Sounds great! |
Hi @gavirawson-apple,
We are facing a very strange issue regarding occurrence circles (scheduling events). Sometimes the occurrence circles do not display in the app and it's not happening to all users and all devices. Some of our users are experiencing this issue and it started happening a few days ago.
We've tested on the following real devices and we haven't experienced this issue:
But the people who are experiencing this issue are using:
Please see the attached screenshot:
Do you've any clue why it is happening to some of the users?
Kind Regards,
The text was updated successfully, but these errors were encountered: