diff --git a/lang/en/admin.php b/lang/en/admin.php
index 779a8893df5..5e21e571c9f 100644
--- a/lang/en/admin.php
+++ b/lang/en/admin.php
@@ -61,7 +61,7 @@ $string['allowindexingexceptlogin'] = 'Everywhere except login and signup pages'
$string['allowindexingnowhere'] = 'Nowhere';
$string['allowusermailcharset'] = 'Allow user to select character set';
$string['allowframembedding'] = 'Allow frame embedding';
-$string['allowframembedding_help'] = 'If enabled, this site may be embedded in a frame in a remote system, as recommended when using the \'Publish as LTI tool\' enrolment plugin. Otherwise, it is recommended to leave frame embedding disabled for security reasons.';
+$string['allowframembedding_help'] = 'If enabled, this site may be embedded in a frame in a remote system, as recommended when using the \'Publish as LTI tool\' enrolment plugin. Otherwise, it is recommended to leave frame embedding disabled for security reasons. Please, note also that for the mobile app this setting is ignored and frame embedding is always allowed.';
$string['allowguestmymoodle'] = 'Allow guest access to Dashboard';
$string['allowobjectembed'] = 'Allow EMBED and OBJECT tags';
$string['allowthemechangeonurl'] = 'Allow theme changes in the URL';
diff --git a/lib/classes/useragent.php b/lib/classes/useragent.php
index 2e547086bd7..763543b77f0 100644
--- a/lib/classes/useragent.php
+++ b/lib/classes/useragent.php
@@ -1068,6 +1068,23 @@ class core_useragent {
return false;
}
+ /**
+ * Returns true if the client appears to be the Moodle app (or an app based on the Moodle app code).
+ *
+ * @return bool true if the client is the Moodle app
+ * @since Moodle 3.7
+ */
+ public static function is_moodle_app() {
+ $useragent = self::get_user_agent_string();
+
+ // Make it case insensitive, things can change in the app or desktop app depending on the platform frameworks.
+ if (stripos($useragent, 'MoodleMobile') !== false) {
+ return true;
+ }
+
+ return false;
+ }
+
/**
* Checks if current browser supports files with give extension as