Who owns custom-built software?
This is the question least often asked before signing and most painful afterwards.
What you want settled
Who holds the rights to the code, who may change it, and what happens if the collaboration ends. Write it down explicitly — the absence of an agreement usually does not work in your favour.
Access to the code
You should have permanent access to the code repository, not only to the running software. Without it, switching partners is impossible.
Third-party components
Almost all software uses existing libraries. That is normal and desirable, but ask which licences are used and whether they limit your use.
Accounts
Servers, domain names, app store accounts, certificates. They should be in your name, not your developer's. This is the point that blocks most transitions.
Documentation
Software without documentation is technically yours and practically unusable by anybody else. Make it a delivery condition.