San Diego just updated their rules to comply with the state mandates on granny flats being allowed. One thing they still have to discourage it is the high permitting fees.
At the time we built the permit was almost impossible to get. When DH went to apply they said "no" before even reviewing it - citing the common reasons to deny: too small a lot (ours was big enough), no offstreet parking (we had room for a driveway spot), had to be in back third of lot (our site was on the back third). It took multiple trips before they would even start reviewing the plans, and many months before they approved them. Because we were required to be on the back third of the lot we had to deal with grading and retaining walls, pumps for sewer and storm water, etc. They even required us to get a cal-osha certified grader for the retaining wall footings which turns out to be hard to find. But we jumped through all their hoops. The new process is much easier and less restrictive.
As for neighbors protesting or planning group protests.... Here in San Diego if you meet all of the requirements (setbacks, sf, etc) the neighbors don't have a say.
What we did, as part of being a good neighbor, was go to all of our neighbors to let them know about the project. This included our neighbors on either side and across the street, but also our neighbors who live on the street below us. We showed them renderings (DH was an architect and did the design) to show it was a *nice* looking building and not a junky/ugly thing that would drive down home prices. We told them we'd work with any concerns they had about the construction impact. I'm now (after the fact) friends with the neighbor directly below our house... she has said she really appreciated us making contact with them before the construction started, allaying their concerns about rain runoff (we have a pump system - so roof runoff gets pumped up to our street vs flooding their backyard). It helped that we were building it as a literal granny flat - my in-laws lived in it - so everything was designed handicap accessible (FIL was in a wheelchair).... Who could object to the emotional tug of building a granny flat to help care for aging parents.
The costs are high compared to normal price per square foot because it's a smaller space with a bathroom ($$) and kitchen ($$). Adding a bedroom (without plumbing) is a much cheaper $/sf than adding an addition or detached building with a kitchen and bathroom.
If you have the space - we were limited to a max of 700sf... which isn't a lot. But we're fortunate to have a very nice canyon view - so we took advantage of that view with a covered front porch - which doesn't count as part of the 700sf. But here in San Diego acts as an outdoor living room.
FWIW - ours is detached and has some cost design elements that added to the cost. Including site development (grading, retaining walls, ada compliant ramped pathway to the site.) If we had not had the contractor issues - the original accepted bid put it at $350ish/sf... but as mentioned, that included a lot of grading and overbuilt retaining walls because of the hillside nature of the site. We actually paid out more - but that includes lawyer fees and expenses related to the contractor issues.... we got *some* of that money back in bonds and judgements.
One more note that is california specific... Any ADA compliant features will reduce the property tax increase. In our case reductions were given for the ada compliant ramp down to the site (extra grading costs) and for the wheel chair friendly roll in shower. In CA you pay current costs for new additions/construction - (vs the prop 13 rate you might be paying on your primary). So reducing that tax hit was nice.