Reaching an understanding regarding the cooperation is a must before outsourcing your app. This includes:
establishing communication guidelines
estimating the timeline
defining goals and milestones
agreeing upon payment terms
signing an NDA and intellectual property rights contract
ensuring code guarantees
adding contract termination and money-back guarantee clauses