For an app built from scratch (or readymade app purchased by a client), the source is shared with the client as soon as the app is live. The source code will be owned by the client only. The client can modify the code if as per future requirements.