iCloud works only in apps dowloaded from The Mac App Store. There isn’t a way to use iCloud in app which isn’t downloaded from Mac App Store.
Unfortunately, this means there isn’t a way to test app iCloud integration without submitting it (for now).