Hi
For me, there is a mistake in the Plant.swift file for the needsWater computed property.
return lastWateredOn.timeIntervalSince(Date()) > TimeInterval(wateringFrequency) * 24
IS WRONG and should be:
return Date().timeIntervalSince(lastWateredOn) > TimeInterval(wateringFrequency) * 24 * 60 * 60
The interval is from lastWateredOn until Now and not the opposite.
So the initial code lastWateredOn.timeIntervalSince(Date()) gives a negative value and the test is always false so no badge appears.
Regards
Vincent
Post
Replies
Boosts
Views
Activity
Hi
This was very helpful.
I have a sandbox app and I have created a intent that need to open user-selected files and url.startAccessingSecurityScopedResource() has done the trick.
Iomegano, in your screenshot, you have the save action where you can save a content in a given file path.
How did you get this action.
The only action I have to save does not have "to:" argument
Regards
Vincent