iOS app does not use base localization

I have an app that is designed with an English user interface and additionally got a German UI translation. When running, the correct user interface language is chosen. Base Internationalization is used, Xcode 8.2.1, Swift 3.


Then I cloned the app into a new one, mainly stripping off parts and renaming the app (and with this, all occurences of the previous name). This was quite a PITA (sorry) with the main problem being CocoaPods not recognised anymore (error on

import
) etc. After some fiddling it works again, but the UI is always in German(!), regardless of the iOS Settings. Even if iPhone language is English, with no other preferred languages, and region is United States, the app UI shows up in German.


Strangely, the strings used in the app (via

NSLocalizedString()
) are correctly chosen in English.


Bundle.main.preferredLocalizations.first
also returns
en
.

The system dialogs presented by the app are in English.
The key

CFBundleDevelopmentRegion
is set to
en
in
Info.plist
.
The UI texts in
Base.lproj/Main.storyboard
are in English.


Same behaviour on simulator and real devices.


I suspect that the English (Base) UI has become kind of unavailable during the cloning/modification process. However, in Interface Builder the English version is shown as "Main Storyboard > Main Storyboard (Base)" with a sibling file "Main.strings (German)" containing the translation.


In Project → Info → Localizations, I can see "English — Development Language: 2 Files Localized" but "German: 5 Files Localized". Maybe that's the reason why some resources are not available in English at runtime but others are. But I cannot determine which files are meant by the entries.


If I "Export for Localization", I get an

xliff
file with these 5(!) headers (
XY
being the project name):
  <file original="XY/Base.lproj/LaunchScreen.storyboard" source-language="en" datatype="plaintext" target-language="de">
  <file original="XY/Base.lproj/Main.storyboard" source-language="en" datatype="plaintext" target-language="de">
  <file original="XY/Info.plist" source-language="en" datatype="plaintext" target-language="de">
  <file original="XY/Localizable.strings" source-language="en" datatype="plaintext" target-language="de">
  <file original="XY/Main.strings" source-language="en" datatype="plaintext" target-language="de">

Any hints? According to QA1828 How iOS Determines the Language For Your App, all is fine.

iOS app does not use base localization
 
 
Q