Ferroelectricity has recently been demonstrated in germanium-based halide perovskites. We use first-principles-based simulations to study 4-18 nm CsGeBr3 films and develop a theory for ferroelectric ultrathin films. The theory introduces (i) a local order parameter, which identifies phase transitions into both monodomain and polydomain phases, and (ii) a dipole pattern classifier, which allows efficient and reliable identification of dipole patterns. Application of the theory to both halides CsGeBr3 and CsGeI3 and oxide BiFeO3 ultrathin ferroelectrics reveals two distinct scenarios. First, the films transition into a monodomain phase below the critical value of the residual depolarizing field. Above this critical value, the second scenario occurs, and the film undergoes a transition into a nanodomain phase. The two scenarios exhibit opposite responses of Curie temperature to thickness reduction. Application of a dipole pattern classifier reveals rich nanodomain phases in halide films: nanostripes, labyrinths, zig-zags, pillars, and lego domains.