<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Support for adding API key to QML directly (rather than in the c++ code) in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/support-for-adding-api-key-to-qml-directly-rather/m-p/1145277#M4491</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous User. I can answer this from an ArcGIS Runtime perspective.&lt;/P&gt;&lt;P&gt;We do actually support and encourage setting the license in C++ code. Code like this will work, and this is the boilerplate example code we provide in our QML template:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;QCoreApplication::instance()-&amp;gt;setProperty("Esri.ArcGISRuntime.license", "YourLicenseStringHere");&lt;/LI-CODE&gt;&lt;P&gt;The Runtime will internally check for that property (with that exact name) at startup and set the license string.&lt;/P&gt;&lt;P&gt;As you guessed, it can be a security concern to have your API key in Qml code directly, as some app configurations ship qml files in plaintext, so that leaves the key unprotected.&lt;/P&gt;&lt;P&gt;Unfortunately, I cannot answer about AppStudio specifics. I recommend posting your question in&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-appstudio-questions/bd-p/arcgis-appstudio-questions" target="_blank"&gt;https://community.esri.com/t5/arcgis-appstudio-questions/bd-p/arcgis-appstudio-questions&lt;/A&gt;&amp;nbsp;so the AppStudio experts can help you.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Feb 2022 18:19:01 GMT</pubDate>
    <dc:creator>JamesBallard1</dc:creator>
    <dc:date>2022-02-17T18:19:01Z</dc:date>
    <item>
      <title>Support for adding API key to QML directly (rather than in the c++ code)</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/support-for-adding-api-key-to-qml-directly-rather/m-p/1145200#M4490</link>
      <description>&lt;P&gt;Using AppStudio to create an app, it is not always possible or desirable for developers to access the c++ code in order to add the api key.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will support be added to add the api key directly within the QML? If it is a security issue, that doesn't quite make sense as the same api key is totally visible in most javascript based client applications.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 16:11:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/support-for-adding-api-key-to-qml-directly-rather/m-p/1145200#M4490</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-02-17T16:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Support for adding API key to QML directly (rather than in the c++ code)</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/support-for-adding-api-key-to-qml-directly-rather/m-p/1145277#M4491</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous User. I can answer this from an ArcGIS Runtime perspective.&lt;/P&gt;&lt;P&gt;We do actually support and encourage setting the license in C++ code. Code like this will work, and this is the boilerplate example code we provide in our QML template:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;QCoreApplication::instance()-&amp;gt;setProperty("Esri.ArcGISRuntime.license", "YourLicenseStringHere");&lt;/LI-CODE&gt;&lt;P&gt;The Runtime will internally check for that property (with that exact name) at startup and set the license string.&lt;/P&gt;&lt;P&gt;As you guessed, it can be a security concern to have your API key in Qml code directly, as some app configurations ship qml files in plaintext, so that leaves the key unprotected.&lt;/P&gt;&lt;P&gt;Unfortunately, I cannot answer about AppStudio specifics. I recommend posting your question in&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-appstudio-questions/bd-p/arcgis-appstudio-questions" target="_blank"&gt;https://community.esri.com/t5/arcgis-appstudio-questions/bd-p/arcgis-appstudio-questions&lt;/A&gt;&amp;nbsp;so the AppStudio experts can help you.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 18:19:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/support-for-adding-api-key-to-qml-directly-rather/m-p/1145277#M4491</guid>
      <dc:creator>JamesBallard1</dc:creator>
      <dc:date>2022-02-17T18:19:01Z</dc:date>
    </item>
  </channel>
</rss>

