Cherokee Purple Tomato Disaster!
If you are referring to the cracking on the skin that is due to environmental stress - too much or too little water is a likely cause. I also notice that your container appears small for a full sized tomato variety such as you have. I would suggest using nothing smaller than a 10 gallon container next year and a larger one would be even better. Tomatoes have huge root systems that can roam several feet if planted in the ground and will ultimately do better. If the loss of leaves is your concern that is likely due to fungus and the time of year. Normally tomatoes start declining this time of year. If you were losing leaves seemingly overnight it could be the work of the tomato hornworm.