Is there a maximum length for the name of a DeviceActivity? Practically, I'm wondering if I can assume no loss/truncation in the string as long as it's under 2000 characters, nothing too crazy.
max length of DeviceActivityName?
Under 2000 characters should be OK. However, the best practice is to keep activity names reasonably short. If you don't need thousands of characters, then don't use thousands of characters. If you need a unique identifier, you can always use UUID().uuidString
.