The best way to think about this is in terms of accesories for physical products.
Unofficial aftermarket accesories are considered completely legal to make and sell, without paying a dime to the base product's manufacturer. Such should be the case with iOS. Apps are essentially "digital accesories".