how to override the MCID over the cookies for mobile app implementation?
It is a while since I looked at this so I could be wrong or might even be referring to an old version of the SDK. Caveats aside....
If you are looking to set the MCID in a mobile app, I don't think you can directly overwrite the MCID but you can set a custom visitor ID which takes precedence over the MCID (the equivalent of setting s.visitorID on the web). There is some nuances which may be relevant depending on why you want to do it.
As mentioned setting a custom visitor ID does not overwrite the MCID. It is an additional visitor ID that is captured as well to the MCID. When it comes to processing the data, if a custom visitor ID is set, both MCID and custom visitor ID exist but I believe the custom visitor ID takes precedence and will be used for joining journeys together, counting visitor numbers etc.
At the time I was looking at this, we had been considering passing the MCID from our website to mobile app so the journey joined up as a single visitor. However, the nuance we found was that it isn't treated exactly as thought the MCID has been replaced. So even though the custom visitor ID we were setting was the same value as the MCID on the website, the website and app journeys did not join up - i.e. it was not seen as the same visitor. We might have got round this by setting the MCID as a custom visitor ID on the website but it was getting all too complex!
As mentioned things might have moved on... would be interested to hear if anyone else has experience of this!
If my understanding is correct, you are looking for overwriting existing MCID cookies on a web page when a user arrives via a mobile app. If that is the scenario, you might want to use appendToURL function along withoverwriteCrossDomainMCIDAndAID. Refer to the below docs.