After all I inspired a little from this thread, more exactly this answer.
And here is how my solution looks:
Removed @UIApplicationMain
from AppDelegate
and created main.swift
and added this code:
if !SharedConstants.isDebugEnabled {
let supportedLanguages: [String] = ["el"]
UserDefaults.standard.set(supportedLanguages, forKey: "AppleLanguages")
UserDefaults.standard.synchronize()
}
UIApplicationMain(CommandLine.argc, CommandLine.unsafeArgv, nil, NSStringFromClass(AppDelegate.self))
LATER EDIT:
Later I found the solution to add the below script in Build Phases
to remove the english language and I don't need any of the workarounds above.
if [ $CONFIGURATION == 'Release' ]; then
rm -r "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/en.lproj"
fi;