These dogs are moderately active, do not need large spaces and can live in an apartment.
A properly trained German shepherd may well exist in a city apartment. But do not forget that this is still a large breed. Ideally, an apartment of at least three rooms should be located near a park or other spacious walking area where the dog can freely run and train.
Of course, it is best to keep the dog in your own estate, but in some cases, the dog will be comfortable and in a spacious apartment. With sufficient activity in the fresh air in the house, the dog is imposing and calm. He needs a high place, but rather a special sofa for sleeping.
With proper education, this breed can be easily kept in the apartment, but puppies can cause a lot of trouble to the owners. Young animals need long walks, games, and socializing.