My understanding is that you need to enable it on your developer dashboard, like here. So, if you're building locally casting won't work anyways.
However, eventhough I have enabled sharing here it says that I can't cast my content. Is it related to my app being in the alpha channel and not released on the store yet? Can only store-released app be casted?