<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://forums.garmin.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq</link><description>A growing set of useful information for the Connect IQ Developer Community.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq</link><pubDate>Mon, 03 Mar 2025 15:52:03 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Current Revision posted to Wiki by Brandon.ConnectIQ on 3/3/2025 3:52:03 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I build apps that will work on any device that supports Connect IQ?" href="#any-device"&gt;I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I have side-loaded an app as described above, but app settings won't work. Why is this?" href="#app-settings"&gt;I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?" href="#settings-crash"&gt;My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?" href="#too-many-arguments"&gt;I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I test or debug Connect IQ apps I am developing?" href="#debugging"&gt;How can I test or debug Connect IQ apps I am developing?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I think that I've found a bug with CIQ. How do I report it?" href="#report-bugs"&gt;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="sdk-download"&gt;&lt;/a&gt; Where can I download the SDK?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="get-started"&gt;&lt;/a&gt; How do I get started with Connect IQ?&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/connect-iq-basics/"&gt;Connect IQ Basics Guide&lt;/a&gt;&lt;span&gt; is a good place&lt;/span&gt;&lt;span&gt; to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Once you&amp;#39;re set up, take a look at the &lt;a href="https://developer.garmin.com/connect-iq/core-topics/"&gt;Core Topics&lt;/a&gt; and &lt;a href="https://developer.garmin.com/connect-iq/user-experience-guidelines/"&gt;User Experience Guide&lt;/a&gt; for more in-depth info. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; and more &lt;a href="https://developer.garmin.com/connect-iq/monkey-c/"&gt;Monkey C&lt;/a&gt; specifics are also available on our developer site.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate some of the basic capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="any-device"&gt;&lt;/a&gt; I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, regardless of the Connect IQ version they support. A project can be configured to target a minimum SDK version, which limits the selectable target devices to those that support the selected Connect IQ version. Targeting the newest version of Connect IQ will limit the devices that can run your app, but will give you access to all of the latest goodies. Anything built targeting earlier SDK versions will work on the latest devices, so allows your app to run on more devices as long as you don&amp;#39;t need the newest features for your app.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (3.x), B (2.x), and C (1.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Eligible Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What Gets Built&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;3.0.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.4.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="charge"&gt;&lt;/a&gt;&amp;nbsp;Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! Garmin offers a monetization solution that allows you to accept payments for your apps directly through the App Store. You can read more about it in the &lt;a href="https://developer.garmin.com/connect-iq/monetization/"&gt;Monetization&lt;/a&gt; docs.&lt;br /&gt;&lt;br /&gt;It is also acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app and you mark&amp;nbsp;that the app requires payments, etc., in the app listing details.. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="display-seconds"&gt;&lt;/a&gt; Can I display seconds on my watch face?&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="https://developer.garmin.com/connect-iq/connect-iq-basics/"&gt;Connect IQ Basics Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="leading-zeros"&gt;&lt;/a&gt; How do I format output padded with leading zeros?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as &amp;quot;12:05:05&amp;quot; rather than &amp;quot;12:5:5&amp;quot;. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/api-docs/Toybox/Lang.html#format-instance_function"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="testing-purposes"&gt;&lt;/a&gt; How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how (this assumes you already have the &lt;a href="https://marketplace.visualstudio.com/items?itemName=garmin.monkey-c"&gt;Monkey C Visual Studio Code Extension&lt;/a&gt; installed):&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;In Visual Studio Code, choose&amp;nbsp;&lt;em&gt;View&amp;nbsp;&lt;/em&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Command Palette...&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;/em&gt;Select&amp;nbsp;&lt;em&gt;Monkey C: Build for Device&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Select the target product from the device list&lt;/li&gt;
&lt;li&gt;Choose an output location for the build&lt;/li&gt;
&lt;li&gt;Select either &lt;em&gt;Debug&lt;/em&gt; or&amp;nbsp;&lt;em&gt;Release&lt;/em&gt; depending on your intent (&lt;em&gt;&lt;/em&gt;either will build a PRG that will run on a device)&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="app-settings"&gt;&lt;/a&gt; I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.garmin.com/connect-iq/core-topics/app-settings/"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via the &lt;a href="https://buy.garmin.com/en-US/US/p/616398/pn/010-CONIQ-00"&gt;Connect IQ Store app&lt;/a&gt;, &lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;, or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and depend on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is either in a beta state or pending approval.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="settings-crash"&gt;&lt;/a&gt; My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the past, there have been issues where the client used to manage app settings, like the &lt;a href="https://buy.garmin.com/en-US/US/p/616398/pn/010-CONIQ-00"&gt;Connect IQ Store app&lt;/a&gt;, &lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;, or &lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;, has returned a setting value with an unexpected type, so it&amp;#39;s good practice to check a setting value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span&gt;&lt;a id="too-many-arguments"&gt;&lt;/a&gt; I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;We added a a feature in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;&lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; or &lt;code&gt;CIQ_LOG.YML&lt;/code&gt; file as a &lt;em&gt;Too many arguments&lt;/em&gt; error, signifying the argument count check has failed. Here are a couple of examples that illustrate potential causes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Missing &lt;code&gt;state&lt;/code&gt; arguments for the &lt;code&gt;onStart()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;onStop()&lt;/code&gt; methods. These are currently unused arguments and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly.&lt;/li&gt;
&lt;li&gt;An&amp;nbsp;&lt;code&gt;initialize()&lt;/code&gt; method that takes an array of options but to which none are passed&lt;code&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="debugging"&gt;&lt;/a&gt; How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A simple way to test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;code&gt;System.println()&lt;/code&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&lt;/span&gt;&lt;span&gt; statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt; &lt;/span&gt;&lt;/i&gt;these &lt;span&gt;statements write to the &lt;code&gt;/GARMIN/APPS/LOGS&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/code&gt;&lt;span&gt;&amp;nbsp;file, if it exists&lt;/span&gt;&lt;span&gt;. This file is not automatically created, so must be created manually and named to match the name of the app&amp;#39;s &lt;code&gt;PRG&lt;/code&gt; file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN/APPS/MYAPP.PRG&lt;/code&gt;&lt;span&gt;, create the &lt;/span&gt;&lt;code&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/code&gt;&lt;span&gt; file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For more advanced debugging, Connect IQ has a unit testing framework called &lt;em&gt;Run No Evil&lt;/em&gt;, and a debugger that&amp;#39;s included in the Connect IQ plug-in for Eclipse that can be used to dig into potential issues within the Connect IQ simulator. Check out the &lt;a href="https://developer.garmin.com/connect-iq/core-topics/debugging/"&gt;Debugging &lt;/a&gt;and &lt;a href="https://developer.garmin.com/connect-iq/core-topics/unit-testing/"&gt;Unit Testing&lt;/a&gt; chapters of the Core Topics Guide for more info.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In addition to these tools, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;app crashes&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;device crashes&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;App crashes&lt;/strong&gt; typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a &lt;code&gt;/GARMIN/APPS/LOGS/&lt;/code&gt;&lt;/span&gt;&lt;code&gt;CIQ_LOG.YML&lt;/code&gt;&lt;span&gt; file is written&lt;/span&gt;&lt;span&gt; to the device, which usually contains a call stack from the app (older devices may write a &lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; file).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Device crashes&lt;/strong&gt; typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;code&gt;ERR_LOG.TXT&lt;/code&gt;&lt;span&gt; file is typically written to&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN&lt;/code&gt; or &lt;code&gt;/GARMIN/DEBUG&lt;/code&gt;&lt;span&gt; on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any crash log file exceeds 5 KB, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/code&gt;&lt;span&gt;, and a new log will be started. Any old &lt;code&gt;.BAK&lt;/code&gt; files will be overwritten when the archive occurs, so the maximum practical space available for logging is ~10 KB.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="report-bugs"&gt;&lt;/a&gt;&amp;nbsp;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a Connect IQ bug, please report it in the &lt;a title="Connect IQ Bug Reports" href="/developer/connect-iq/i/bug-reports"&gt;Connect IQ Bug Reports&lt;/a&gt; tool!&amp;nbsp; Please make sure to read the &lt;a title="Bug Reporting Rules" href="/developer/connect-iq/w/wiki/5/bug-reports-faq"&gt;Bug Reporting FAQ&lt;/a&gt; to ensure you provide us with the information we need to investigate the problem. Be advised that if you post about a bug in the discussion forum, your thread may be moved or deleted.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/20</link><pubDate>Mon, 03 Mar 2025 15:50:15 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 20 posted to Wiki by Brandon.ConnectIQ on 3/3/2025 3:50:15 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I build apps that will work on any device that supports Connect IQ?" href="#any-device"&gt;I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I have side-loaded an app as described above, but app settings won't work. Why is this?" href="#app-settings"&gt;I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?" href="#settings-crash"&gt;My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?" href="#too-many-arguments"&gt;I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I test or debug Connect IQ apps I am developing?" href="#debugging"&gt;How can I test or debug Connect IQ apps I am developing?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I think that I've found a bug with CIQ. How do I report it?" href="#report-bugs"&gt;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#reviews"&gt;My app is receiving inappropriate reviews. Is there something I can do about that?&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="sdk-download"&gt;&lt;/a&gt; Where can I download the SDK?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="get-started"&gt;&lt;/a&gt; How do I get started with Connect IQ?&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/connect-iq-basics/"&gt;Connect IQ Basics Guide&lt;/a&gt;&lt;span&gt; is a good place&lt;/span&gt;&lt;span&gt; to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Once you&amp;#39;re set up, take a look at the &lt;a href="https://developer.garmin.com/connect-iq/core-topics/"&gt;Core Topics&lt;/a&gt; and &lt;a href="https://developer.garmin.com/connect-iq/user-experience-guidelines/"&gt;User Experience Guide&lt;/a&gt; for more in-depth info. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; and more &lt;a href="https://developer.garmin.com/connect-iq/monkey-c/"&gt;Monkey C&lt;/a&gt; specifics are also available on our developer site.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate some of the basic capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="any-device"&gt;&lt;/a&gt; I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, regardless of the Connect IQ version they support. A project can be configured to target a minimum SDK version, which limits the selectable target devices to those that support the selected Connect IQ version. Targeting the newest version of Connect IQ will limit the devices that can run your app, but will give you access to all of the latest goodies. Anything built targeting earlier SDK versions will work on the latest devices, so allows your app to run on more devices as long as you don&amp;#39;t need the newest features for your app.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (3.x), B (2.x), and C (1.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Eligible Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What Gets Built&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;3.0.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.4.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="charge"&gt;&lt;/a&gt;&amp;nbsp;Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! Garmin offers a monetization solution that allows you to accept payments for your apps directly through the App Store. You can read more about it in the &lt;a href="https://developer.garmin.com/connect-iq/monetization/"&gt;Monetization&lt;/a&gt; docs.&lt;br /&gt;&lt;br /&gt;It is also acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app and you mark&amp;nbsp;that the app requires payments, etc., in the app listing details.. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="display-seconds"&gt;&lt;/a&gt; Can I display seconds on my watch face?&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="https://developer.garmin.com/connect-iq/connect-iq-basics/"&gt;Connect IQ Basics Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="leading-zeros"&gt;&lt;/a&gt; How do I format output padded with leading zeros?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as &amp;quot;12:05:05&amp;quot; rather than &amp;quot;12:5:5&amp;quot;. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/api-docs/Toybox/Lang.html#format-instance_function"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="testing-purposes"&gt;&lt;/a&gt; How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how (this assumes you already have the &lt;a href="https://marketplace.visualstudio.com/items?itemName=garmin.monkey-c"&gt;Monkey C Visual Studio Code Extension&lt;/a&gt; installed):&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;In Visual Studio Code, choose&amp;nbsp;&lt;em&gt;View&amp;nbsp;&lt;/em&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Command Palette...&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;/em&gt;Select&amp;nbsp;&lt;em&gt;Monkey C: Build for Device&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Select the target product from the device list&lt;/li&gt;
&lt;li&gt;Choose an output location for the build&lt;/li&gt;
&lt;li&gt;Select either &lt;em&gt;Debug&lt;/em&gt; or&amp;nbsp;&lt;em&gt;Release&lt;/em&gt; depending on your intent (&lt;em&gt;&lt;/em&gt;either will build a PRG that will run on a device)&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="app-settings"&gt;&lt;/a&gt; I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.garmin.com/connect-iq/core-topics/app-settings/"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via the &lt;a href="https://buy.garmin.com/en-US/US/p/616398/pn/010-CONIQ-00"&gt;Connect IQ Store app&lt;/a&gt;, &lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;, or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and depend on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is either in a beta state or pending approval.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="settings-crash"&gt;&lt;/a&gt; My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the past, there have been issues where the client used to manage app settings, like the &lt;a href="https://buy.garmin.com/en-US/US/p/616398/pn/010-CONIQ-00"&gt;Connect IQ Store app&lt;/a&gt;, &lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;, or &lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;, has returned a setting value with an unexpected type, so it&amp;#39;s good practice to check a setting value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span&gt;&lt;a id="too-many-arguments"&gt;&lt;/a&gt; I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;We added a a feature in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;&lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; or &lt;code&gt;CIQ_LOG.YML&lt;/code&gt; file as a &lt;em&gt;Too many arguments&lt;/em&gt; error, signifying the argument count check has failed. Here are a couple of examples that illustrate potential causes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Missing &lt;code&gt;state&lt;/code&gt; arguments for the &lt;code&gt;onStart()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;onStop()&lt;/code&gt; methods. These are currently unused arguments and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly.&lt;/li&gt;
&lt;li&gt;An&amp;nbsp;&lt;code&gt;initialize()&lt;/code&gt; method that takes an array of options but to which none are passed&lt;code&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="debugging"&gt;&lt;/a&gt; How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A simple way to test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;code&gt;System.println()&lt;/code&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&lt;/span&gt;&lt;span&gt; statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt; &lt;/span&gt;&lt;/i&gt;these &lt;span&gt;statements write to the &lt;code&gt;/GARMIN/APPS/LOGS&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/code&gt;&lt;span&gt;&amp;nbsp;file, if it exists&lt;/span&gt;&lt;span&gt;. This file is not automatically created, so must be created manually and named to match the name of the app&amp;#39;s &lt;code&gt;PRG&lt;/code&gt; file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN/APPS/MYAPP.PRG&lt;/code&gt;&lt;span&gt;, create the &lt;/span&gt;&lt;code&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/code&gt;&lt;span&gt; file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For more advanced debugging, Connect IQ has a unit testing framework called &lt;em&gt;Run No Evil&lt;/em&gt;, and a debugger that&amp;#39;s included in the Connect IQ plug-in for Eclipse that can be used to dig into potential issues within the Connect IQ simulator. Check out the &lt;a href="https://developer.garmin.com/connect-iq/core-topics/debugging/"&gt;Debugging &lt;/a&gt;and &lt;a href="https://developer.garmin.com/connect-iq/core-topics/unit-testing/"&gt;Unit Testing&lt;/a&gt; chapters of the Core Topics Guide for more info.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In addition to these tools, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;app crashes&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;device crashes&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;App crashes&lt;/strong&gt; typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a &lt;code&gt;/GARMIN/APPS/LOGS/&lt;/code&gt;&lt;/span&gt;&lt;code&gt;CIQ_LOG.YML&lt;/code&gt;&lt;span&gt; file is written&lt;/span&gt;&lt;span&gt; to the device, which usually contains a call stack from the app (older devices may write a &lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; file).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Device crashes&lt;/strong&gt; typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;code&gt;ERR_LOG.TXT&lt;/code&gt;&lt;span&gt; file is typically written to&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN&lt;/code&gt; or &lt;code&gt;/GARMIN/DEBUG&lt;/code&gt;&lt;span&gt; on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any crash log file exceeds 5 KB, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/code&gt;&lt;span&gt;, and a new log will be started. Any old &lt;code&gt;.BAK&lt;/code&gt; files will be overwritten when the archive occurs, so the maximum practical space available for logging is ~10 KB.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="report-bugs"&gt;&lt;/a&gt;&amp;nbsp;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a Connect IQ bug, please report it in the &lt;a title="Connect IQ Bug Reports" href="/developer/connect-iq/i/bug-reports"&gt;Connect IQ Bug Reports&lt;/a&gt; tool!&amp;nbsp; Please make sure to read the &lt;a title="Bug Reporting Rules" href="/developer/connect-iq/w/wiki/5/bug-reports-faq"&gt;Bug Reporting FAQ&lt;/a&gt; to ensure you provide us with the information we need to investigate the problem. Be advised that if you post about a bug in the discussion forum, your thread may be moved or deleted.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="reviews"&gt;&lt;/a&gt; My app is receiving inappropriate reviews. Is there something I can do about that?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Developers may flag reviews of their own apps they believe are inappropriate and provide a reason explaining why. Store admins will evaluate each case and remove reviews that violate Garmin&amp;#39;s Terms of Use (see&amp;nbsp;&lt;a href="https://www.garmin.com/en-US/legal/terms-of-use/"&gt;https://www.garmin.com/en-US/legal/terms-of-use/&lt;/a&gt;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/19</link><pubDate>Mon, 03 Mar 2025 15:33:33 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 19 posted to Wiki by Brandon.ConnectIQ on 3/3/2025 3:33:33 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I build apps that will work on any device that supports Connect IQ?" href="#any-device"&gt;I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I have side-loaded an app as described above, but app settings won't work. Why is this?" href="#app-settings"&gt;I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?" href="#settings-crash"&gt;My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?" href="#too-many-arguments"&gt;I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I test or debug Connect IQ apps I am developing?" href="#debugging"&gt;How can I test or debug Connect IQ apps I am developing?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I think that I've found a bug with CIQ. How do I report it?" href="#report-bugs"&gt;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#reviews"&gt;My app is receiving inappropriate reviews. Is there something I can do about that?&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="sdk-download"&gt;&lt;/a&gt; Where can I download the SDK?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="get-started"&gt;&lt;/a&gt; How do I get started with Connect IQ?&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/connect-iq-basics/"&gt;Connect IQ Basics Guide&lt;/a&gt;&lt;span&gt; is a good place&lt;/span&gt;&lt;span&gt; to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Once you&amp;#39;re set up, take a look at the &lt;a href="https://developer.garmin.com/connect-iq/core-topics/"&gt;Core Topics&lt;/a&gt; and &lt;a href="https://developer.garmin.com/connect-iq/user-experience-guidelines/"&gt;User Experience Guide&lt;/a&gt; for more in-depth info. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; and more &lt;a href="https://developer.garmin.com/connect-iq/monkey-c/"&gt;Monkey C&lt;/a&gt; specifics are also available on our developer site.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate some of the basic capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="any-device"&gt;&lt;/a&gt; I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, regardless of the Connect IQ version they support. A project can be configured to target a minimum SDK version, which limits the selectable target devices to those that support the selected Connect IQ version. Targeting the newest version of Connect IQ will limit the devices that can run your app, but will give you access to all of the latest goodies. Anything built targeting earlier SDK versions will work on the latest devices, so allows your app to run on more devices as long as you don&amp;#39;t need the newest features for your app.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (3.x), B (2.x), and C (1.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Eligible Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What Gets Built&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;3.0.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.4.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="charge"&gt;&lt;/a&gt;&amp;nbsp;Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! Garmin offers a monetization solution that allows you to accept payments for your apps directly through the App Store. You can read more about it in the &lt;a href="https://developer.garmin.com/connect-iq/monetization/"&gt;Monetization&lt;/a&gt; docs.&lt;br /&gt;&lt;br /&gt;It is also acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app and you mark&amp;nbsp;that the app requires payments, etc., in the app listing details.. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="display-seconds"&gt;&lt;/a&gt; Can I display seconds on my watch face?&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="https://developer.garmin.com/connect-iq/connect-iq-basics/"&gt;Connect IQ Basics Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="leading-zeros"&gt;&lt;/a&gt; How do I format output padded with leading zeros?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as &amp;quot;12:05:05&amp;quot; rather than &amp;quot;12:5:5&amp;quot;. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/api-docs/Toybox/Lang.html#format-instance_function"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="testing-purposes"&gt;&lt;/a&gt; How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Wizard window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Choose the SDK version to target&lt;/li&gt;
&lt;li&gt;Specify a signing key&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file made by the Build for Device Wizard from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="app-settings"&gt;&lt;/a&gt; I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.garmin.com/connect-iq/core-topics/app-settings/"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via the &lt;a href="https://buy.garmin.com/en-US/US/p/616398/pn/010-CONIQ-00"&gt;Connect IQ Store app&lt;/a&gt;, &lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;, or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and depend on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is either in a beta state or pending approval.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="settings-crash"&gt;&lt;/a&gt; My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the past, there have been issues where the client used to manage app settings, like the &lt;a href="https://buy.garmin.com/en-US/US/p/616398/pn/010-CONIQ-00"&gt;Connect IQ Store app&lt;/a&gt;, &lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;, or &lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;, has returned a setting value with an unexpected type, so it&amp;#39;s good practice to check a setting value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span&gt;&lt;a id="too-many-arguments"&gt;&lt;/a&gt; I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;We added a a feature in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;&lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; or &lt;code&gt;CIQ_LOG.YML&lt;/code&gt; file as a &lt;em&gt;Too many arguments&lt;/em&gt; error, signifying the argument count check has failed. Here are a couple of examples that illustrate potential causes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Missing &lt;code&gt;state&lt;/code&gt; arguments for the &lt;code&gt;onStart()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;onStop()&lt;/code&gt; methods. These are currently unused arguments and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly.&lt;/li&gt;
&lt;li&gt;An&amp;nbsp;&lt;code&gt;initialize()&lt;/code&gt; method that takes an array of options but to which none are passed&lt;code&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="debugging"&gt;&lt;/a&gt; How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A simple way to test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;code&gt;System.println()&lt;/code&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&lt;/span&gt;&lt;span&gt; statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt; &lt;/span&gt;&lt;/i&gt;these &lt;span&gt;statements write to the &lt;code&gt;/GARMIN/APPS/LOGS&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/code&gt;&lt;span&gt;&amp;nbsp;file, if it exists&lt;/span&gt;&lt;span&gt;. This file is not automatically created, so must be created manually and named to match the name of the app&amp;#39;s &lt;code&gt;PRG&lt;/code&gt; file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN/APPS/MYAPP.PRG&lt;/code&gt;&lt;span&gt;, create the &lt;/span&gt;&lt;code&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/code&gt;&lt;span&gt; file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For more advanced debugging, Connect IQ has a unit testing framework called &lt;em&gt;Run No Evil&lt;/em&gt;, and a debugger that&amp;#39;s included in the Connect IQ plug-in for Eclipse that can be used to dig into potential issues within the Connect IQ simulator. Check out the &lt;a href="https://developer.garmin.com/connect-iq/core-topics/debugging/"&gt;Debugging &lt;/a&gt;and &lt;a href="https://developer.garmin.com/connect-iq/core-topics/unit-testing/"&gt;Unit Testing&lt;/a&gt; chapters of the Core Topics Guide for more info.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In addition to these tools, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;app crashes&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;device crashes&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;App crashes&lt;/strong&gt; typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a &lt;code&gt;/GARMIN/APPS/LOGS/&lt;/code&gt;&lt;/span&gt;&lt;code&gt;CIQ_LOG.YML&lt;/code&gt;&lt;span&gt; file is written&lt;/span&gt;&lt;span&gt; to the device, which usually contains a call stack from the app (older devices may write a &lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; file).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Device crashes&lt;/strong&gt; typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;code&gt;ERR_LOG.TXT&lt;/code&gt;&lt;span&gt; file is typically written to&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN&lt;/code&gt; or &lt;code&gt;/GARMIN/DEBUG&lt;/code&gt;&lt;span&gt; on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any crash log file exceeds 5 KB, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/code&gt;&lt;span&gt;, and a new log will be started. Any old &lt;code&gt;.BAK&lt;/code&gt; files will be overwritten when the archive occurs, so the maximum practical space available for logging is ~10 KB.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="report-bugs"&gt;&lt;/a&gt;&amp;nbsp;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a Connect IQ bug, please report it in the &lt;a title="Connect IQ Bug Reports" href="/developer/connect-iq/i/bug-reports"&gt;Connect IQ Bug Reports&lt;/a&gt; tool!&amp;nbsp; Please make sure to read the &lt;a title="Bug Reporting Rules" href="/developer/connect-iq/w/wiki/5/bug-reports-faq"&gt;Bug Reporting FAQ&lt;/a&gt; to ensure you provide us with the information we need to investigate the problem. Be advised that if you post about a bug in the discussion forum, your thread may be moved or deleted.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="reviews"&gt;&lt;/a&gt; My app is receiving inappropriate reviews. Is there something I can do about that?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Developers may flag reviews of their own apps they believe are inappropriate and provide a reason explaining why. Store admins will evaluate each case and remove reviews that violate Garmin&amp;#39;s Terms of Use (see&amp;nbsp;&lt;a href="https://www.garmin.com/en-US/legal/terms-of-use/"&gt;https://www.garmin.com/en-US/legal/terms-of-use/&lt;/a&gt;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/18</link><pubDate>Tue, 16 Apr 2024 21:51:16 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 18 posted to Wiki by Brandon.ConnectIQ on 4/16/2024 9:51:16 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I build apps that will work on any device that supports Connect IQ?" href="#any-device"&gt;I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I have side-loaded an app as described above, but app settings won't work. Why is this?" href="#app-settings"&gt;I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?" href="#settings-crash"&gt;My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?" href="#too-many-arguments"&gt;I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I test or debug Connect IQ apps I am developing?" href="#debugging"&gt;How can I test or debug Connect IQ apps I am developing?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I think that I've found a bug with CIQ. How do I report it?" href="#report-bugs"&gt;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#reviews"&gt;My app is receiving inappropriate reviews. Is there something I can do about that?&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="sdk-download"&gt;&lt;/a&gt; Where can I download the SDK?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="get-started"&gt;&lt;/a&gt; How do I get started with Connect IQ?&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/connect-iq-basics/"&gt;Connect IQ Basics Guide&lt;/a&gt;&lt;span&gt; is a good place&lt;/span&gt;&lt;span&gt; to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Once you&amp;#39;re set up, take a look at the &lt;a href="https://developer.garmin.com/connect-iq/core-topics/"&gt;Core Topics&lt;/a&gt; and &lt;a href="https://developer.garmin.com/connect-iq/user-experience-guidelines/"&gt;User Experience Guide&lt;/a&gt; for more in-depth info. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; and more &lt;a href="https://developer.garmin.com/connect-iq/monkey-c/"&gt;Monkey C&lt;/a&gt; specifics are also available on our developer site.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate some of the basic capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="any-device"&gt;&lt;/a&gt; I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, regardless of the Connect IQ version they support. A project can be configured to target a minimum SDK version, which limits the selectable target devices to those that support the selected Connect IQ version. Targeting the newest version of Connect IQ will limit the devices that can run your app, but will give you access to all of the latest goodies. Anything built targeting earlier SDK versions will work on the latest devices, so allows your app to run on more devices as long as you don&amp;#39;t need the newest features for your app.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (3.x), B (2.x), and C (1.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Eligible Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What Gets Built&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;3.0.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.4.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="charge"&gt;&lt;/a&gt;&amp;nbsp;Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="display-seconds"&gt;&lt;/a&gt; Can I display seconds on my watch face?&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="https://developer.garmin.com/connect-iq/connect-iq-basics/"&gt;Connect IQ Basics Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="leading-zeros"&gt;&lt;/a&gt; How do I format output padded with leading zeros?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as &amp;quot;12:05:05&amp;quot; rather than &amp;quot;12:5:5&amp;quot;. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/api-docs/Toybox/Lang.html#format-instance_function"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="testing-purposes"&gt;&lt;/a&gt; How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Wizard window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Choose the SDK version to target&lt;/li&gt;
&lt;li&gt;Specify a signing key&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file made by the Build for Device Wizard from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="app-settings"&gt;&lt;/a&gt; I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.garmin.com/connect-iq/core-topics/app-settings/"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via the &lt;a href="https://buy.garmin.com/en-US/US/p/616398/pn/010-CONIQ-00"&gt;Connect IQ Store app&lt;/a&gt;, &lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;, or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and depend on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is either in a beta state or pending approval.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="settings-crash"&gt;&lt;/a&gt; My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the past, there have been issues where the client used to manage app settings, like the &lt;a href="https://buy.garmin.com/en-US/US/p/616398/pn/010-CONIQ-00"&gt;Connect IQ Store app&lt;/a&gt;, &lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;, or &lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;, has returned a setting value with an unexpected type, so it&amp;#39;s good practice to check a setting value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span&gt;&lt;a id="too-many-arguments"&gt;&lt;/a&gt; I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;We added a a feature in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;&lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; or &lt;code&gt;CIQ_LOG.YML&lt;/code&gt; file as a &lt;em&gt;Too many arguments&lt;/em&gt; error, signifying the argument count check has failed. Here are a couple of examples that illustrate potential causes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Missing &lt;code&gt;state&lt;/code&gt; arguments for the &lt;code&gt;onStart()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;onStop()&lt;/code&gt; methods. These are currently unused arguments and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly.&lt;/li&gt;
&lt;li&gt;An&amp;nbsp;&lt;code&gt;initialize()&lt;/code&gt; method that takes an array of options but to which none are passed&lt;code&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="debugging"&gt;&lt;/a&gt; How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A simple way to test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;code&gt;System.println()&lt;/code&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&lt;/span&gt;&lt;span&gt; statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt; &lt;/span&gt;&lt;/i&gt;these &lt;span&gt;statements write to the &lt;code&gt;/GARMIN/APPS/LOGS&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/code&gt;&lt;span&gt;&amp;nbsp;file, if it exists&lt;/span&gt;&lt;span&gt;. This file is not automatically created, so must be created manually and named to match the name of the app&amp;#39;s &lt;code&gt;PRG&lt;/code&gt; file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN/APPS/MYAPP.PRG&lt;/code&gt;&lt;span&gt;, create the &lt;/span&gt;&lt;code&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/code&gt;&lt;span&gt; file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For more advanced debugging, Connect IQ has a unit testing framework called &lt;em&gt;Run No Evil&lt;/em&gt;, and a debugger that&amp;#39;s included in the Connect IQ plug-in for Eclipse that can be used to dig into potential issues within the Connect IQ simulator. Check out the &lt;a href="https://developer.garmin.com/connect-iq/core-topics/debugging/"&gt;Debugging &lt;/a&gt;and &lt;a href="https://developer.garmin.com/connect-iq/core-topics/unit-testing/"&gt;Unit Testing&lt;/a&gt; chapters of the Core Topics Guide for more info.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In addition to these tools, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;app crashes&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;device crashes&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;App crashes&lt;/strong&gt; typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a &lt;code&gt;/GARMIN/APPS/LOGS/&lt;/code&gt;&lt;/span&gt;&lt;code&gt;CIQ_LOG.YML&lt;/code&gt;&lt;span&gt; file is written&lt;/span&gt;&lt;span&gt; to the device, which usually contains a call stack from the app (older devices may write a &lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; file).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Device crashes&lt;/strong&gt; typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;code&gt;ERR_LOG.TXT&lt;/code&gt;&lt;span&gt; file is typically written to&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN&lt;/code&gt; or &lt;code&gt;/GARMIN/DEBUG&lt;/code&gt;&lt;span&gt; on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any crash log file exceeds 5 KB, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/code&gt;&lt;span&gt;, and a new log will be started. Any old &lt;code&gt;.BAK&lt;/code&gt; files will be overwritten when the archive occurs, so the maximum practical space available for logging is ~10 KB.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="report-bugs"&gt;&lt;/a&gt;&amp;nbsp;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a Connect IQ bug, please report it in the &lt;a title="Connect IQ Bug Reports" href="/developer/connect-iq/i/bug-reports"&gt;Connect IQ Bug Reports&lt;/a&gt; tool!&amp;nbsp; Please make sure to read the &lt;a title="Bug Reporting Rules" href="/developer/connect-iq/w/wiki/5/bug-reports-faq"&gt;Bug Reporting FAQ&lt;/a&gt; to ensure you provide us with the information we need to investigate the problem. Be advised that if you post about a bug in the discussion forum, your thread may be moved or deleted.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="reviews"&gt;&lt;/a&gt; My app is receiving inappropriate reviews. Is there something I can do about that?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Developers may flag reviews of their own apps they believe are inappropriate and provide a reason explaining why. Store admins will evaluate each case and remove reviews that violate Garmin&amp;#39;s Terms of Use (see&amp;nbsp;&lt;a href="https://www.garmin.com/en-US/legal/terms-of-use/"&gt;https://www.garmin.com/en-US/legal/terms-of-use/&lt;/a&gt;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/17</link><pubDate>Tue, 05 Jan 2021 20:25:47 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 17 posted to Wiki by Brandon.ConnectIQ on 1/5/2021 8:25:47 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I build apps that will work on any device that supports Connect IQ?" href="#any-device"&gt;I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I have side-loaded an app as described above, but app settings won't work. Why is this?" href="#app-settings"&gt;I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?" href="#settings-crash"&gt;My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?" href="#too-many-arguments"&gt;I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I test or debug Connect IQ apps I am developing?" href="#debugging"&gt;How can I test or debug Connect IQ apps I am developing?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I think that I've found a bug with CIQ. How do I report it?" href="#report-bugs"&gt;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#reviews"&gt;My app is receiving inappropriate reviews. Is there something I can do about that?&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="sdk-download"&gt;&lt;/a&gt; Where can I download the SDK?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="get-started"&gt;&lt;/a&gt; How do I get started with Connect IQ?&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/connect-iq-basics/"&gt;Connect IQ Basics Guide&lt;/a&gt;&lt;span&gt; is a good place&lt;/span&gt;&lt;span&gt; to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Once you&amp;#39;re set up, take a look at the &lt;a href="https://developer.garmin.com/connect-iq/core-topics/"&gt;Core Topics&lt;/a&gt; and &lt;a href="https://developer.garmin.com/connect-iq/user-experience-guidelines/"&gt;User Experience Guide&lt;/a&gt; for more in-depth info. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; and more &lt;a href="https://developer.garmin.com/connect-iq/monkey-c/"&gt;Monkey C&lt;/a&gt; specifics are also available on our developer site.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate some of the basic capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="any-device"&gt;&lt;/a&gt; I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, regardless of the Connect IQ version they support. A project can be configured to target a minimum SDK version, which limits the selectable target devices to those that support the selected Connect IQ version. Targeting the newest version of Connect IQ will limit the devices that can run your app, but will give you access to all of the latest goodies. Anything built targeting earlier SDK versions will work on the latest devices, so allows your app to run on more devices as long as you don&amp;#39;t need the newest features for your app.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (3.x), B (2.x), and C (1.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Eligible Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What Gets Built&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;3.0.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.4.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="charge"&gt;&lt;/a&gt;&amp;nbsp;Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="display-seconds"&gt;&lt;/a&gt; Can I display seconds on my watch face?&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="https://developer.garmin.com/connect-iq/connect-iq-basics/"&gt;Connect IQ Basics Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="leading-zeros"&gt;&lt;/a&gt; How do I format output padded with leading zeros?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as &amp;quot;12:05:05&amp;quot; rather than &amp;quot;12:5:5&amp;quot;. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/api-docs/Toybox/Lang.html#format-instance_function"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="testing-purposes"&gt;&lt;/a&gt; How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Wizard window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Choose the SDK version to target&lt;/li&gt;
&lt;li&gt;Specify a signing key&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file made by the Build for Device Wizard from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="app-settings"&gt;&lt;/a&gt; I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.garmin.com/connect-iq/core-topics/app-settings/"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via the &lt;a href="https://buy.garmin.com/en-US/US/p/616398/pn/010-CONIQ-00"&gt;Connect IQ Store app&lt;/a&gt;, &lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;, or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and depend on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is either in a beta state or pending approval.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="settings-crash"&gt;&lt;/a&gt; My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the past, there have been issues where the client used to manage app settings, like the &lt;a href="https://buy.garmin.com/en-US/US/p/616398/pn/010-CONIQ-00"&gt;Connect IQ Store app&lt;/a&gt;, &lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;, or &lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;, has returned a setting value with an unexpected type, so it&amp;#39;s good practice to check a setting value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span&gt;&lt;a id="too-many-arguments"&gt;&lt;/a&gt; I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;We added a a feature in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;&lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; or &lt;code&gt;CIQ_LOG.YML&lt;/code&gt; file as a &lt;em&gt;Too many arguments&lt;/em&gt; error, signifying the argument count check has failed. Here are a couple of examples that illustrate potential causes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Missing &lt;code&gt;state&lt;/code&gt; arguments for the &lt;code&gt;onStart()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;onStop()&lt;/code&gt; methods. These are currently unused arguments and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly.&lt;/li&gt;
&lt;li&gt;An&amp;nbsp;&lt;code&gt;initialize()&lt;/code&gt; method that takes an array of options but to which none are passed&lt;code&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="debugging"&gt;&lt;/a&gt; How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A simple way to test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;code&gt;System.println()&lt;/code&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&lt;/span&gt;&lt;span&gt; statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt; &lt;/span&gt;&lt;/i&gt;these &lt;span&gt;statements write to the &lt;code&gt;/GARMIN/APPS/LOGS&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/code&gt;&lt;span&gt;&amp;nbsp;file, if it exists&lt;/span&gt;&lt;span&gt;. This file is not automatically created, so must be created manually and named to match the name of the app&amp;#39;s &lt;code&gt;PRG&lt;/code&gt; file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN/APPS/MYAPP.PRG&lt;/code&gt;&lt;span&gt;, create the &lt;/span&gt;&lt;code&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/code&gt;&lt;span&gt; file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For more advanced debugging, Connect IQ has a unit testing framework called &lt;em&gt;Run No Evil&lt;/em&gt;, and a debugger that&amp;#39;s included in the Connect IQ plug-in for Eclipse that can be used to dig into potential issues within the Connect IQ simulator. Check out the &lt;a href="https://developer.garmin.com/connect-iq/core-topics/debugging/"&gt;Debugging &lt;/a&gt;and &lt;a href="https://developer.garmin.com/connect-iq/core-topics/unit-testing/"&gt;Unit Testing&lt;/a&gt; chapters of the Core Topics Guide for more info.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In addition to these tools, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;app crashes&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;device crashes&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;App crashes&lt;/strong&gt; typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a &lt;code&gt;/GARMIN/APPS/LOGS/&lt;/code&gt;&lt;/span&gt;&lt;code&gt;CIQ_LOG.YML&lt;/code&gt;&lt;span&gt; file is written&lt;/span&gt;&lt;span&gt; to the device, which usually contains a call stack from the app (older devices may write a &lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; file).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Device crashes&lt;/strong&gt; typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;code&gt;ERR_LOG.TXT&lt;/code&gt;&lt;span&gt; file is typically written to&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN&lt;/code&gt; or &lt;code&gt;/GARMIN/DEBUG&lt;/code&gt;&lt;span&gt; on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any crash log file exceeds 5 KB, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/code&gt;&lt;span&gt;, and a new log will be started. Any old &lt;code&gt;.BAK&lt;/code&gt; files will be overwritten when the archive occurs, so the maximum practical space available for logging is ~10 KB.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="report-bugs"&gt;&lt;/a&gt;&amp;nbsp;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a Connect IQ bug, please report it in the &lt;a title="Connect IQ Bug Reports" href="/developer/connect-iq/i/bug-reports"&gt;Connect IQ Bug Reports&lt;/a&gt; tool!&amp;nbsp; Please make sure to read the &lt;a title="Bug Reporting Rules" href="/developer/connect-iq/w/wiki/5/bug-reports-faq"&gt;Bug Reporting FAQ&lt;/a&gt; to ensure you provide us with the information we need to investigate the problem. Be advised that if you post about a bug in the discussion forum, your thread may be moved or deleted.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="reviews"&gt;&lt;/a&gt; My app is receiving inappropriate reviews. Is there something I can do about that?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Developers may flag reviews of their own apps they believe are inappropriate and provide a reason explaining why. Store admins will evaluate each case and remove reviews that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contain abusive language or profanity&lt;/li&gt;
&lt;li&gt;Are not relevant to the app or are spam&lt;/li&gt;
&lt;li&gt;Reference a firmware bug and not an app bug (since that&amp;#39;s not the app developer&amp;#39;s fault)&lt;/li&gt;
&lt;li&gt;Refer to a device support issue (e.g. I don&amp;#39;t know how to configure my activity with this data field)&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/16</link><pubDate>Tue, 05 Jan 2021 19:55:16 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 16 posted to Wiki by Brandon.ConnectIQ on 1/5/2021 7:55:16 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I build apps that will work on any device that supports Connect IQ?" href="#any-device"&gt;I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I have side-loaded an app as described above, but app settings won't work. Why is this?" href="#app-settings"&gt;I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?" href="#settings-crash"&gt;My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?" href="#too-many-arguments"&gt;I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I test or debug Connect IQ apps I am developing?" href="#debugging"&gt;How can I test or debug Connect IQ apps I am developing?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I think that I've found a bug with CIQ. How do I report it?" href="#report-bugs"&gt;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#reviews"&gt;My app is receiving inappropriate reviews. Is there something I can do about that?&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="sdk-download"&gt;&lt;/a&gt; Where can I download the SDK?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="get-started"&gt;&lt;/a&gt; How do I get started with Connect IQ?&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/connect-iq-basics/"&gt;Connect IQ Basics Guide&lt;/a&gt;&lt;span&gt; is a good place&lt;/span&gt;&lt;span&gt; to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Once you&amp;#39;re set up, take a look at the &lt;a href="https://developer.garmin.com/connect-iq/core-topics/"&gt;Core Topics&lt;/a&gt; and &lt;a href="https://developer.garmin.com/connect-iq/user-experience-guidelines/"&gt;User Experience Guide&lt;/a&gt; for more in-depth info. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; and more &lt;a href="https://developer.garmin.com/connect-iq/monkey-c/"&gt;Monkey C&lt;/a&gt; specifics are also available on our developer site.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate some of the basic capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="any-device"&gt;&lt;/a&gt; I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, regardless of the Connect IQ version they support. A project can be configured to target a minimum SDK version, which limits the selectable target devices to those that support the selected Connect IQ version. Targeting the newest version of Connect IQ will limit the devices that can run your app, but will give you access to all of the latest goodies. Anything built targeting earlier SDK versions will work on the latest devices, so allows your app to run on more devices as long as you don&amp;#39;t need the newest features for your app.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (3.x), B (2.x), and C (1.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Eligible Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What Gets Built&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;3.0.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.4.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="charge"&gt;&lt;/a&gt;&amp;nbsp;Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="display-seconds"&gt;&lt;/a&gt; Can I display seconds on my watch face?&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="leading-zeros"&gt;&lt;/a&gt; How do I format output padded with leading zeros?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as &amp;quot;12:05:05&amp;quot; rather than &amp;quot;12:5:5&amp;quot;. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="testing-purposes"&gt;&lt;/a&gt; How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Wizard window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Choose the SDK version to target&lt;/li&gt;
&lt;li&gt;Specify a signing key&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file made by the Build for Device Wizard from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="app-settings"&gt;&lt;/a&gt; I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and depend on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is either in a beta state or pending approval.&lt;/span&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="settings-crash"&gt;&lt;/a&gt; My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the past, there have been issues where the client used to manage app settings, like Garmin Express or Garmin Connect Mobile, has returned a setting value with an unexpected type, so it&amp;#39;s good practice to check a setting value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span&gt;&lt;a id="too-many-arguments"&gt;&lt;/a&gt; I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;We added a a feature in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;&lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; or &lt;code&gt;CIQ_LOG.YML&lt;/code&gt; file as a &lt;em&gt;Too many arguments&lt;/em&gt; error, signifying the argument count check has failed. Here are a couple of examples that illustrate potential causes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Missing &lt;code&gt;state&lt;/code&gt; arguments for the &lt;code&gt;onStart()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;onStop()&lt;/code&gt; methods. These are currently unused arguments and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly.&lt;/li&gt;
&lt;li&gt;An&amp;nbsp;&lt;code&gt;initialize()&lt;/code&gt; method that takes an array of options but to which none are passed&lt;code&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="debugging"&gt;&lt;/a&gt; How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A simple way to test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;code&gt;System.println()&lt;/code&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&lt;/span&gt;&lt;span&gt; statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt; &lt;/span&gt;&lt;/i&gt;these &lt;span&gt;statements write to the &lt;code&gt;/GARMIN/APPS/LOGS&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/code&gt;&lt;span&gt;&amp;nbsp;file, if it exists&lt;/span&gt;&lt;span&gt;. This file is not automatically created, so must be created manually and named to match the name of the app&amp;#39;s &lt;code&gt;PRG&lt;/code&gt; file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN/APPS/MYAPP.PRG&lt;/code&gt;&lt;span&gt;, create the &lt;/span&gt;&lt;code&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/code&gt;&lt;span&gt; file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For more advanced debugging, Connect IQ has a unit testing framework called &lt;em&gt;Run No Evil&lt;/em&gt;, and a debugger that&amp;#39;s included in the Connect IQ plug-in for Eclipse that can be used to dig into potential issues within the Connect IQ simulator. Check out the &lt;a title="How to Test" href="http://developer.garmin.com/connect-iq/programmers-guide/how-to-test/"&gt;How to Test&lt;/a&gt; chapter of the Programmer&amp;#39;s Guide for more info.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In addition to these tools, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;app crashes&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;device crashes&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;App crashes&lt;/strong&gt; typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a &lt;code&gt;/GARMIN/APPS/LOGS/&lt;/code&gt;&lt;/span&gt;&lt;code&gt;CIQ_LOG.YML&lt;/code&gt;&lt;span&gt; file is written&lt;/span&gt;&lt;span&gt; to the device, which usually contains a call stack from the app (older devices may write a &lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; file).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Device crashes&lt;/strong&gt; typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;code&gt;ERR_LOG.TXT&lt;/code&gt;&lt;span&gt; file is typically written to&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN&lt;/code&gt; or &lt;code&gt;/GARMIN/DEBUG&lt;/code&gt;&lt;span&gt; on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any crash log file exceeds 5 KB, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/code&gt;&lt;span&gt;, and a new log will be started. Any old &lt;code&gt;.BAK&lt;/code&gt; files will be overwritten when the archive occurs, so the maximum practical space available for logging is ~10 KB.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="report-bugs"&gt;&lt;/a&gt;&amp;nbsp;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a Connect IQ bug, please report it in the &lt;a title="Connect IQ Bug Reports" href="/developer/connect-iq/i/bug-reports"&gt;Connect IQ Bug Reports&lt;/a&gt; tool!&amp;nbsp; Please make sure to read the &lt;a title="Bug Reporting Rules" href="/connect-iq/w/wiki/5/bug-reports-faq"&gt;Bug Reporting Rules&lt;/a&gt; to ensure you provide us with the information we need to investigate the problem. Be advised that if you post about a bug in the discussion forum, your thread may be moved or deleted.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="reviews"&gt;&lt;/a&gt; My app is receiving inappropriate reviews. Is there something I can do about that?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Developers may flag reviews of their own apps they believe are inappropriate and provide a reason explaining why. Store admins will evaluate each case and remove reviews that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contain abusive language or profanity&lt;/li&gt;
&lt;li&gt;Are not relevant to the app or are spam&lt;/li&gt;
&lt;li&gt;Reference a firmware bug and not an app bug (since that&amp;#39;s not the app developer&amp;#39;s fault)&lt;/li&gt;
&lt;li&gt;Refer to a device support issue (e.g. I don&amp;#39;t know how to configure my activity with this data field)&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/15</link><pubDate>Fri, 20 Dec 2019 15:59:43 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 15 posted to Wiki by Brandon.ConnectIQ on 12/20/2019 3:59:43 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I build apps that will work on any device that supports Connect IQ?" href="#any-device"&gt;I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I have side-loaded an app as described above, but app settings won't work. Why is this?" href="#app-settings"&gt;I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?" href="#settings-crash"&gt;My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?" href="#too-many-arguments"&gt;I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I test or debug Connect IQ apps I am developing?" href="#debugging"&gt;How can I test or debug Connect IQ apps I am developing?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I think that I've found a bug with CIQ. How do I report it?" href="#report-bugs"&gt;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#reviews"&gt;My app is receiving inappropriate reviews. Is there something I can do about that?&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="sdk-download"&gt;&lt;/a&gt; Where can I download the SDK?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="get-started"&gt;&lt;/a&gt; How do I get started with Connect IQ?&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good places to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; is available on our developer site.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK also includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="any-device"&gt;&lt;/a&gt; I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, regardless of the Connect IQ version they support. A project can be configured to target a minimum SDK version, which limits the selectable target devices to those that support the selected Connect IQ version. Targeting the newest version of Connect IQ will limit the devices that can run your app, but will give you access to all of the latest goodies. Anything built targeting earlier SDK versions will work on the latest devices, so allows your app to run on more devices as long as you don&amp;#39;t need the newest features for your app.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (3.x), B (2.x), and C (1.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Eligible Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What Gets Built&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;3.0.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.4.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="charge"&gt;&lt;/a&gt;&amp;nbsp;Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="display-seconds"&gt;&lt;/a&gt; Can I display seconds on my watch face?&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="leading-zeros"&gt;&lt;/a&gt; How do I format output padded with leading zeros?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as &amp;quot;12:05:05&amp;quot; rather than &amp;quot;12:5:5&amp;quot;. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="testing-purposes"&gt;&lt;/a&gt; How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Wizard window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Choose the SDK version to target&lt;/li&gt;
&lt;li&gt;Specify a signing key&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file made by the Build for Device Wizard from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="app-settings"&gt;&lt;/a&gt; I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and depend on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is either in a beta state or pending approval.&lt;/span&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="settings-crash"&gt;&lt;/a&gt; My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the past, there have been issues where the client used to manage app settings, like Garmin Express or Garmin Connect Mobile, has returned a setting value with an unexpected type, so it&amp;#39;s good practice to check a setting value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span&gt;&lt;a id="too-many-arguments"&gt;&lt;/a&gt; I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;We added a a feature in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;&lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; or &lt;code&gt;CIQ_LOG.YML&lt;/code&gt; file as a &lt;em&gt;Too many arguments&lt;/em&gt; error, signifying the argument count check has failed. Here are a couple of examples that illustrate potential causes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Missing &lt;code&gt;state&lt;/code&gt; arguments for the &lt;code&gt;onStart()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;onStop()&lt;/code&gt; methods. These are currently unused arguments and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly.&lt;/li&gt;
&lt;li&gt;An&amp;nbsp;&lt;code&gt;initialize()&lt;/code&gt; method that takes an array of options but to which none are passed&lt;code&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="debugging"&gt;&lt;/a&gt; How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A simple way to test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;code&gt;System.println()&lt;/code&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&lt;/span&gt;&lt;span&gt; statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt; &lt;/span&gt;&lt;/i&gt;these &lt;span&gt;statements write to the &lt;code&gt;/GARMIN/APPS/LOGS&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/code&gt;&lt;span&gt;&amp;nbsp;file, if it exists&lt;/span&gt;&lt;span&gt;. This file is not automatically created, so must be created manually and named to match the name of the app&amp;#39;s &lt;code&gt;PRG&lt;/code&gt; file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN/APPS/MYAPP.PRG&lt;/code&gt;&lt;span&gt;, create the &lt;/span&gt;&lt;code&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/code&gt;&lt;span&gt; file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For more advanced debugging, Connect IQ has a unit testing framework called &lt;em&gt;Run No Evil&lt;/em&gt;, and a debugger that&amp;#39;s included in the Connect IQ plug-in for Eclipse that can be used to dig into potential issues within the Connect IQ simulator. Check out the &lt;a title="How to Test" href="http://developer.garmin.com/connect-iq/programmers-guide/how-to-test/"&gt;How to Test&lt;/a&gt; chapter of the Programmer&amp;#39;s Guide for more info.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In addition to these tools, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;app crashes&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;device crashes&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;App crashes&lt;/strong&gt; typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a &lt;code&gt;/GARMIN/APPS/LOGS/&lt;/code&gt;&lt;/span&gt;&lt;code&gt;CIQ_LOG.YML&lt;/code&gt;&lt;span&gt; file is written&lt;/span&gt;&lt;span&gt; to the device, which usually contains a call stack from the app (older devices may write a &lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; file).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Device crashes&lt;/strong&gt; typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;code&gt;ERR_LOG.TXT&lt;/code&gt;&lt;span&gt; file is typically written to&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN&lt;/code&gt; or &lt;code&gt;/GARMIN/DEBUG&lt;/code&gt;&lt;span&gt; on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any crash log file exceeds 5 KB, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/code&gt;&lt;span&gt;, and a new log will be started. Any old &lt;code&gt;.BAK&lt;/code&gt; files will be overwritten when the archive occurs, so the maximum practical space available for logging is ~10 KB.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="report-bugs"&gt;&lt;/a&gt;&amp;nbsp;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a Connect IQ bug, please report it in the &lt;a title="Connect IQ Bug Reports" href="/developer/connect-iq/i/bug-reports"&gt;Connect IQ Bug Reports&lt;/a&gt; tool!&amp;nbsp; Please make sure to read the &lt;a title="Bug Reporting Rules" href="/connect-iq/w/wiki/5/bug-reports-faq"&gt;Bug Reporting Rules&lt;/a&gt; to ensure you provide us with the information we need to investigate the problem. Be advised that if you post about a bug in the discussion forum, your thread may be moved or deleted.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="reviews"&gt;&lt;/a&gt; My app is receiving inappropriate reviews. Is there something I can do about that?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Developers may flag reviews of their own apps they believe are inappropriate and provide a reason explaining why. Store admins will evaluate each case and remove reviews that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contain abusive language or profanity&lt;/li&gt;
&lt;li&gt;Are not relevant to the app or are spam&lt;/li&gt;
&lt;li&gt;Reference a firmware bug and not an app bug (since that&amp;#39;s not the app developer&amp;#39;s fault)&lt;/li&gt;
&lt;li&gt;Refer to a device support issue (e.g. I don&amp;#39;t know how to configure my activity with this data field)&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/14</link><pubDate>Fri, 20 Dec 2019 15:59:23 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 14 posted to Wiki by Brandon.ConnectIQ on 12/20/2019 3:59:23 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I build apps that will work on any device that supports Connect IQ?" href="#any-device"&gt;I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I have side-loaded an app as described above, but app settings won't work. Why is this?" href="#app-settings"&gt;I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?" href="#settings-crash"&gt;My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?" href="#too-many-arguments"&gt;I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I test or debug Connect IQ apps I am developing?" href="#debugging"&gt;How can I test or debug Connect IQ apps I am developing?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I think that I've found a bug with CIQ. How do I report it?" href="#report-bugs"&gt;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#reviews"&gt;My app is receiving unfair or inappropriate reviews. Is there something I can do about that?&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="sdk-download"&gt;&lt;/a&gt; Where can I download the SDK?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="get-started"&gt;&lt;/a&gt; How do I get started with Connect IQ?&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good places to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; is available on our developer site.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK also includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="any-device"&gt;&lt;/a&gt; I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, regardless of the Connect IQ version they support. A project can be configured to target a minimum SDK version, which limits the selectable target devices to those that support the selected Connect IQ version. Targeting the newest version of Connect IQ will limit the devices that can run your app, but will give you access to all of the latest goodies. Anything built targeting earlier SDK versions will work on the latest devices, so allows your app to run on more devices as long as you don&amp;#39;t need the newest features for your app.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (3.x), B (2.x), and C (1.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Eligible Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What Gets Built&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;3.0.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.4.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="charge"&gt;&lt;/a&gt;&amp;nbsp;Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="display-seconds"&gt;&lt;/a&gt; Can I display seconds on my watch face?&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="leading-zeros"&gt;&lt;/a&gt; How do I format output padded with leading zeros?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as &amp;quot;12:05:05&amp;quot; rather than &amp;quot;12:5:5&amp;quot;. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="testing-purposes"&gt;&lt;/a&gt; How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Wizard window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Choose the SDK version to target&lt;/li&gt;
&lt;li&gt;Specify a signing key&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file made by the Build for Device Wizard from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="app-settings"&gt;&lt;/a&gt; I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and depend on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is either in a beta state or pending approval.&lt;/span&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="settings-crash"&gt;&lt;/a&gt; My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the past, there have been issues where the client used to manage app settings, like Garmin Express or Garmin Connect Mobile, has returned a setting value with an unexpected type, so it&amp;#39;s good practice to check a setting value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span&gt;&lt;a id="too-many-arguments"&gt;&lt;/a&gt; I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;We added a a feature in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;&lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; or &lt;code&gt;CIQ_LOG.YML&lt;/code&gt; file as a &lt;em&gt;Too many arguments&lt;/em&gt; error, signifying the argument count check has failed. Here are a couple of examples that illustrate potential causes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Missing &lt;code&gt;state&lt;/code&gt; arguments for the &lt;code&gt;onStart()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;onStop()&lt;/code&gt; methods. These are currently unused arguments and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly.&lt;/li&gt;
&lt;li&gt;An&amp;nbsp;&lt;code&gt;initialize()&lt;/code&gt; method that takes an array of options but to which none are passed&lt;code&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="debugging"&gt;&lt;/a&gt; How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A simple way to test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;code&gt;System.println()&lt;/code&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&lt;/span&gt;&lt;span&gt; statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt; &lt;/span&gt;&lt;/i&gt;these &lt;span&gt;statements write to the &lt;code&gt;/GARMIN/APPS/LOGS&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/code&gt;&lt;span&gt;&amp;nbsp;file, if it exists&lt;/span&gt;&lt;span&gt;. This file is not automatically created, so must be created manually and named to match the name of the app&amp;#39;s &lt;code&gt;PRG&lt;/code&gt; file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN/APPS/MYAPP.PRG&lt;/code&gt;&lt;span&gt;, create the &lt;/span&gt;&lt;code&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/code&gt;&lt;span&gt; file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For more advanced debugging, Connect IQ has a unit testing framework called &lt;em&gt;Run No Evil&lt;/em&gt;, and a debugger that&amp;#39;s included in the Connect IQ plug-in for Eclipse that can be used to dig into potential issues within the Connect IQ simulator. Check out the &lt;a title="How to Test" href="http://developer.garmin.com/connect-iq/programmers-guide/how-to-test/"&gt;How to Test&lt;/a&gt; chapter of the Programmer&amp;#39;s Guide for more info.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In addition to these tools, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;app crashes&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;device crashes&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;App crashes&lt;/strong&gt; typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a &lt;code&gt;/GARMIN/APPS/LOGS/&lt;/code&gt;&lt;/span&gt;&lt;code&gt;CIQ_LOG.YML&lt;/code&gt;&lt;span&gt; file is written&lt;/span&gt;&lt;span&gt; to the device, which usually contains a call stack from the app (older devices may write a &lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; file).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Device crashes&lt;/strong&gt; typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;code&gt;ERR_LOG.TXT&lt;/code&gt;&lt;span&gt; file is typically written to&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN&lt;/code&gt; or &lt;code&gt;/GARMIN/DEBUG&lt;/code&gt;&lt;span&gt; on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any crash log file exceeds 5 KB, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/code&gt;&lt;span&gt;, and a new log will be started. Any old &lt;code&gt;.BAK&lt;/code&gt; files will be overwritten when the archive occurs, so the maximum practical space available for logging is ~10 KB.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="report-bugs"&gt;&lt;/a&gt;&amp;nbsp;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a Connect IQ bug, please report it in the &lt;a title="Connect IQ Bug Reports" href="/developer/connect-iq/i/bug-reports"&gt;Connect IQ Bug Reports&lt;/a&gt; tool!&amp;nbsp; Please make sure to read the &lt;a title="Bug Reporting Rules" href="/connect-iq/w/wiki/5/bug-reports-faq"&gt;Bug Reporting Rules&lt;/a&gt; to ensure you provide us with the information we need to investigate the problem. Be advised that if you post about a bug in the discussion forum, your thread may be moved or deleted.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="reviews"&gt;&lt;/a&gt; My app is receiving inappropriate reviews. Is there something I can do about that?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Developers may flag reviews of their own apps they believe are inappropriate and provide a reason explaining why. Store admins will evaluate each case and remove reviews that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contain abusive language or profanity&lt;/li&gt;
&lt;li&gt;Are not relevant to the app or are spam&lt;/li&gt;
&lt;li&gt;Reference a firmware bug and not an app bug (since that&amp;#39;s not the app developer&amp;#39;s fault)&lt;/li&gt;
&lt;li&gt;Refer to a device support issue (e.g. I don&amp;#39;t know how to configure my activity with this data field)&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/13</link><pubDate>Thu, 04 Apr 2019 13:20:29 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 13 posted to Wiki by Brandon.ConnectIQ on 4/4/2019 1:20:29 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I build apps that will work on any device that supports Connect IQ?" href="#any-device"&gt;I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I have side-loaded an app as described above, but app settings won't work. Why is this?" href="#app-settings"&gt;I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?" href="#settings-crash"&gt;My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?" href="#too-many-arguments"&gt;I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I test or debug Connect IQ apps I am developing?" href="#debugging"&gt;How can I test or debug Connect IQ apps I am developing?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I think that I've found a bug with CIQ. How do I report it?" href="#report-bugs"&gt;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="sdk-download"&gt;&lt;/a&gt; Where can I download the SDK?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="get-started"&gt;&lt;/a&gt; How do I get started with Connect IQ?&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good places to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; is available on our developer site.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK also includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="any-device"&gt;&lt;/a&gt; I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, regardless of the Connect IQ version they support. A project can be configured to target a minimum SDK version, which limits the selectable target devices to those that support the selected Connect IQ version. Targeting the newest version of Connect IQ will limit the devices that can run your app, but will give you access to all of the latest goodies. Anything built targeting earlier SDK versions will work on the latest devices, so allows your app to run on more devices as long as you don&amp;#39;t need the newest features for your app.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (3.x), B (2.x), and C (1.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Eligible Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What Gets Built&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;3.0.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.4.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="charge"&gt;&lt;/a&gt;&amp;nbsp;Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="display-seconds"&gt;&lt;/a&gt; Can I display seconds on my watch face?&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="leading-zeros"&gt;&lt;/a&gt; How do I format output padded with leading zeros?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as &amp;quot;12:05:05&amp;quot; rather than &amp;quot;12:5:5&amp;quot;. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="testing-purposes"&gt;&lt;/a&gt; How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Wizard window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Choose the SDK version to target&lt;/li&gt;
&lt;li&gt;Specify a signing key&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file made by the Build for Device Wizard from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="app-settings"&gt;&lt;/a&gt; I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and depend on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is either in a beta state or pending approval.&lt;/span&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="settings-crash"&gt;&lt;/a&gt; My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the past, there have been issues where the client used to manage app settings, like Garmin Express or Garmin Connect Mobile, has returned a setting value with an unexpected type, so it&amp;#39;s good practice to check a setting value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span&gt;&lt;a id="too-many-arguments"&gt;&lt;/a&gt; I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;We added a a feature in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;&lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; or &lt;code&gt;CIQ_LOG.YML&lt;/code&gt; file as a &lt;em&gt;Too many arguments&lt;/em&gt; error, signifying the argument count check has failed. Here are a couple of examples that illustrate potential causes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Missing &lt;code&gt;state&lt;/code&gt; arguments for the &lt;code&gt;onStart()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;onStop()&lt;/code&gt; methods. These are currently unused arguments and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly.&lt;/li&gt;
&lt;li&gt;An&amp;nbsp;&lt;code&gt;initialize()&lt;/code&gt; method that takes an array of options but to which none are passed&lt;code&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="debugging"&gt;&lt;/a&gt; How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A simple way to test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;code&gt;System.println()&lt;/code&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&lt;/span&gt;&lt;span&gt; statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt; &lt;/span&gt;&lt;/i&gt;these &lt;span&gt;statements write to the &lt;code&gt;/GARMIN/APPS/LOGS&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/code&gt;&lt;span&gt;&amp;nbsp;file, if it exists&lt;/span&gt;&lt;span&gt;. This file is not automatically created, so must be created manually and named to match the name of the app&amp;#39;s &lt;code&gt;PRG&lt;/code&gt; file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN/APPS/MYAPP.PRG&lt;/code&gt;&lt;span&gt;, create the &lt;/span&gt;&lt;code&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/code&gt;&lt;span&gt; file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For more advanced debugging, Connect IQ has a unit testing framework called &lt;em&gt;Run No Evil&lt;/em&gt;, and a debugger that&amp;#39;s included in the Connect IQ plug-in for Eclipse that can be used to dig into potential issues within the Connect IQ simulator. Check out the &lt;a title="How to Test" href="http://developer.garmin.com/connect-iq/programmers-guide/how-to-test/"&gt;How to Test&lt;/a&gt; chapter of the Programmer&amp;#39;s Guide for more info.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In addition to these tools, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;app crashes&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;device crashes&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;App crashes&lt;/strong&gt; typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a &lt;code&gt;/GARMIN/APPS/LOGS/&lt;/code&gt;&lt;/span&gt;&lt;code&gt;CIQ_LOG.YML&lt;/code&gt;&lt;span&gt; file is written&lt;/span&gt;&lt;span&gt; to the device, which usually contains a call stack from the app (older devices may write a &lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; file).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Device crashes&lt;/strong&gt; typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;code&gt;ERR_LOG.TXT&lt;/code&gt;&lt;span&gt; file is typically written to&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN&lt;/code&gt; or &lt;code&gt;/GARMIN/DEBUG&lt;/code&gt;&lt;span&gt; on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any crash log file exceeds 5 KB, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/code&gt;&lt;span&gt;, and a new log will be started. Any old &lt;code&gt;.BAK&lt;/code&gt; files will be overwritten when the archive occurs, so the maximum practical space available for logging is ~10 KB.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="report-bugs"&gt;&lt;/a&gt;&amp;nbsp;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a Connect IQ bug, please report it in the &lt;a title="Connect IQ Bug Reports" href="/developer/connect-iq/i/bug-reports"&gt;Connect IQ Bug Reports&lt;/a&gt; tool!&amp;nbsp; Please make sure to read the &lt;a title="Bug Reporting Rules" href="/connect-iq/w/wiki/5/bug-reports-faq"&gt;Bug Reporting Rules&lt;/a&gt; to ensure you provide us with the information we need to investigate the problem. Be advised that if you post about a bug in the discussion forum, your thread may be moved or deleted.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/12</link><pubDate>Wed, 03 Apr 2019 22:04:55 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 12 posted to Wiki by Brandon.ConnectIQ on 4/3/2019 10:04:55 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I build apps that will work on any device that supports Connect IQ?" href="#any-device"&gt;I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I have side-loaded an app as described above, but app settings won't work. Why is this?" href="#app-settings"&gt;I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?" href="#settings-crash"&gt;My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?" href="#too-many-arguments"&gt;I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I test or debug Connect IQ apps I am developing?" href="#debugging"&gt;How can I test or debug Connect IQ apps I am developing?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I think that I've found a bug with CIQ. How do I report it?" href="#report-bugs"&gt;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="sdk-download"&gt;&lt;/a&gt; Where can I download the SDK?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="get-started"&gt;&lt;/a&gt; How do I get started with Connect IQ?&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good places to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; is available on our developer site.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK also includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="any-device"&gt;&lt;/a&gt; I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, regardless of the Connect IQ version they support. A project can be configured to target a minimum SDK version, which limits the selectable target devices to those that support the selected Connect IQ version. Targeting the newest version of Connect IQ will limit the devices that can run your app, but will give you access to all of the latest goodies. Anything built targeting earlier SDK versions will work on the latest devices, so allows your app to run on more devices as long as you don&amp;#39;t need the newest features for your app.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (3.x), B (2.x), and C (1.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Eligible Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What Gets Built&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;3.0.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.4.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="charge"&gt;&lt;/a&gt;&amp;nbsp;Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="display-seconds"&gt;&lt;/a&gt; Can I display seconds on my watch face?&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="leading-zeros"&gt;&lt;/a&gt; How do I format output padded with leading zeros?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as &amp;quot;12:05:05&amp;quot; rather than &amp;quot;12:5:5&amp;quot;. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="testing-purposes"&gt;&lt;/a&gt; How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Wizard window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Choose the SDK version to target&lt;/li&gt;
&lt;li&gt;Specify a signing key&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file made by the Build for Device Wizard from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="app-settings"&gt;&lt;/a&gt; I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and depend on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is either in a beta state or pending approval.&lt;/span&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="settings-crash"&gt;&lt;/a&gt; My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the past, there have been issues where the client used to manage app settings, like Garmin Express or Garmin Connect Mobile, has returned a setting value with an unexpected type, so it&amp;#39;s good practice to check a setting value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span&gt;&lt;a id="too-many-arguments"&gt;&lt;/a&gt; I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;We added a a feature in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;&lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; or &lt;code&gt;CIQ_LOG.YML&lt;/code&gt; file as a &lt;em&gt;Too many arguments&lt;/em&gt; error, signifying the argument count check has failed. Here are a couple of examples that illustrate potential causes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Missing &lt;code&gt;state&lt;/code&gt; arguments for the &lt;code&gt;onStart()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;onStop()&lt;/code&gt; methods. These are currently unused arguments and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly.&lt;/li&gt;
&lt;li&gt;An&amp;nbsp;&lt;code&gt;initialize()&lt;/code&gt; method that takes an array of options but to which none are passed&lt;code&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="debugging"&gt;&lt;/a&gt; How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A simple way to test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;code&gt;System.println()&lt;/code&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&lt;/span&gt;&lt;span&gt; statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt; &lt;/span&gt;&lt;/i&gt;these &lt;span&gt;statements write to the &lt;code&gt;/GARMIN/APPS/LOGS&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/code&gt;&lt;span&gt;&amp;nbsp;file, if it exists&lt;/span&gt;&lt;span&gt;. This file is not automatically created, so must be created manually and named to match the name of the app&amp;#39;s &lt;code&gt;PRG&lt;/code&gt; file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN/APPS/MYAPP.PRG&lt;/code&gt;&lt;span&gt;, create the &lt;/span&gt;&lt;code&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/code&gt;&lt;span&gt; file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For more advanced debugging, Connect IQ has a unit testing framework called &lt;em&gt;Run No Evil&lt;/em&gt;, and a debugger that&amp;#39;s included in the Connect IQ plug-in for Eclipse that can be used to dig into potential issues within the Connect IQ simulator. Check out the &lt;a title="How to Test" href="http://developer.garmin.com/connect-iq/programmers-guide/how-to-test/"&gt;How to Test&lt;/a&gt; chapter of the Programmer&amp;#39;s Guide for more info.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In addition to these tools, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;app crashes&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;device crashes&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;App crashes&lt;/strong&gt; typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a &lt;code&gt;/GARMIN/APPS/LOGS/&lt;/code&gt;&lt;/span&gt;&lt;code&gt;CIQ_LOG.YML&lt;/code&gt;&lt;span&gt; file is written&lt;/span&gt;&lt;span&gt; to the device, which usually contains a call stack from the app (older devices may write a &lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; file).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Device crashes&lt;/strong&gt; typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;code&gt;ERR_LOG.TXT&lt;/code&gt;&lt;span&gt; file is typically written to&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN&lt;/code&gt; or &lt;code&gt;/GARMIN/DEBUG&lt;/code&gt;&lt;span&gt; on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any crash log file exceeds 5 KB, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/code&gt;&lt;span&gt;, and a new log will be started. Any old &lt;code&gt;.BAK&lt;/code&gt; files will be overwritten when the archive occurs, so the maximum practical space available for logging is ~10 KB.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="report-bugs"&gt;&lt;/a&gt;&amp;nbsp;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a Connect IQ bug, please report it in the &lt;a title="Connect IQ Bug Reports" href="/developer/connect-iq/i/bug-reports"&gt;Connect IQ Bug Reports&lt;/a&gt; tool!&amp;nbsp; Please make sure to read the &lt;a title="Bug Reporting Rules" href="/developer/connect-iq/w/wiki/7/bug-reporting-rules"&gt;Bug Reporting Rules&lt;/a&gt; to ensure you provide us with the information we need to investigate the problem. Be advised that if you post about a bug in the discussion forum, your thread may be moved or deleted.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/11</link><pubDate>Wed, 03 Apr 2019 22:03:48 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 11 posted to Wiki by Brandon.ConnectIQ on 4/3/2019 10:03:48 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I build apps that will work on any device that supports Connect IQ?" href="#any-device"&gt;I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I have side-loaded an app as described above, but app settings won't work. Why is this?" href="#app-settings"&gt;I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?" href="#settings-crash"&gt;My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;a title="I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?" href="#too-many-arguments"&gt;I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I test or debug Connect IQ apps I am developing?" href="#debugging"&gt;How can I test or debug Connect IQ apps I am developing?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I think that I've found a bug with CIQ. How do I report it?" href="#report-bugs"&gt;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="sdk-download"&gt;&lt;/a&gt; Where can I download the SDK?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="get-started"&gt;&lt;/a&gt; How do I get started with Connect IQ?&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good places to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; is available on our developer site.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK also includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="any-device"&gt;&lt;/a&gt; I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, regardless of the Connect IQ version they support. A project can be configured to target a minimum SDK version, which limits the selectable target devices to those that support the selected Connect IQ version. Targeting the newest version of Connect IQ will limit the devices that can run your app, but will give you access to all of the latest goodies. Anything built targeting earlier SDK versions will work on the latest devices, so allows your app to run on more devices as long as you don&amp;#39;t need the newest features for your app.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (3.x), B (2.x), and C (1.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Eligible Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What Gets Built&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;3.0.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.4.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;3.0.x PRG for A, 2.4.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="charge"&gt;&lt;/a&gt;&amp;nbsp;Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="display-seconds"&gt;&lt;/a&gt; Can I display seconds on my watch face?&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="leading-zeros"&gt;&lt;/a&gt; How do I format output padded with leading zeros?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as &amp;quot;12:05:05&amp;quot; rather than &amp;quot;12:5:5&amp;quot;. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="testing-purposes"&gt;&lt;/a&gt; How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Wizard window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Choose the SDK version to target&lt;/li&gt;
&lt;li&gt;Specify a signing key&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file made by the Build for Device Wizard from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="app-settings"&gt;&lt;/a&gt; I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and depend on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is either in a beta state or pending approval.&lt;/span&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="settings-crash"&gt;&lt;/a&gt; My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the past, there have been issues where the client used to manage app settings, like Garmin Express or Garmin Connect Mobile, has returned a setting value with an unexpected type, so it&amp;#39;s good practice to check a setting value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span&gt;&lt;a id="too-many-arguments"&gt;&lt;/a&gt; I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;We added a a feature in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;&lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; or &lt;code&gt;CIQ_LOG.YML&lt;/code&gt; file as a &lt;em&gt;Too many arguments&lt;/em&gt; error, signifying the argument count check has failed. Here are a couple of examples that illustrate potential causes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Missing &lt;code&gt;state&lt;/code&gt; arguments for the &lt;code&gt;onStart()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;onStop()&lt;/code&gt; methods. These are currently unused arguments and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly.&lt;/li&gt;
&lt;li&gt;An&amp;nbsp;&lt;code&gt;initialize()&lt;/code&gt; method that takes an array of options but to which none are passed&lt;code&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="debugging"&gt;&lt;/a&gt; How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A simple way to test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;code&gt;System.println()&lt;/code&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&lt;/span&gt;&lt;span&gt; statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt; &lt;/span&gt;&lt;/i&gt;these &lt;span&gt;statements write to the &lt;code&gt;/GARMIN/APPS/LOGS&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/code&gt;&lt;span&gt;&amp;nbsp;file, if it exists&lt;/span&gt;&lt;span&gt;. This file is not automatically created, so must be created manually and named to match the name of the app&amp;#39;s &lt;code&gt;PRG&lt;/code&gt; file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN/APPS/MYAPP.PRG&lt;/code&gt;&lt;span&gt;, create the &lt;/span&gt;&lt;code&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/code&gt;&lt;span&gt; file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For more advanced debugging, Connect IQ has a unit testing framework called &lt;em&gt;Run No Evil&lt;/em&gt;, and a debugger that&amp;#39;s included in the Connect IQ plug-in for Eclipse that can be used to dig into potential issues within the Connect IQ simulator. Check out the &lt;a title="How to Test" href="http://developer.garmin.com/connect-iq/programmers-guide/how-to-test/"&gt;How to Test&lt;/a&gt; chapter of the Programmer&amp;#39;s Guide for more info.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In addition to these tools, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;app crashes&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;device crashes&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;App crashes&lt;/strong&gt; typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a &lt;code&gt;/GARMIN/APPS/LOGS/&lt;/code&gt;&lt;/span&gt;&lt;code&gt;CIQ_LOG.YML&lt;/code&gt;&lt;span&gt; file is written&lt;/span&gt;&lt;span&gt; to the device, which usually contains a call stack from the app (older devices may write a &lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; file).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Device crashes&lt;/strong&gt; typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;code&gt;ERR_LOG.TXT&lt;/code&gt;&lt;span&gt; file is typically written to&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN&lt;/code&gt; or &lt;code&gt;/GARMIN/DEBUG&lt;/code&gt;&lt;span&gt; on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any crash log file exceeds 5 KB, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/code&gt;&lt;span&gt;, and a new log will be started. Any old &lt;code&gt;.BAK&lt;/code&gt; files will be overwritten when the archive occurs, so the maximum practical space available for logging is ~10 KB.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;a id="report-bugs"&gt;&lt;/a&gt;&amp;nbsp;I think that I&amp;#39;ve found a bug with CIQ. How do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a Connect IQ bug, please report it in the &lt;a title="Connect IQ Bug Reports" href="/developer/connect-iq/i/bug-reports"&gt;Connect IQ Bug Reports&lt;/a&gt; tool!&amp;nbsp; Please make sure to read the &lt;a title="Bug Reporting Rules" href="/developer/connect-iq/w/wiki/7/bug-reporting-rules"&gt;Bug Reporting Rules&lt;/a&gt; to ensure you provide us with the information we need to investigate the problem. Be advised that if you post about a bug in the discussion forum, your thread may be moved or deleted.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/10</link><pubDate>Wed, 03 Apr 2019 21:19:10 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 10 posted to Wiki by Brandon.ConnectIQ on 4/3/2019 9:19:10 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="I have side-loaded an app as described above, but app settings won't work. Why is this?" href="#app-settings"&gt;I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How can I test or debug Connect IQ apps I am developing?" href="#debugging"&gt;How can I test or debug Connect IQ apps I am developing?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="sdk-download"&gt;&lt;/a&gt; Where can I download the SDK?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="get-started"&gt;&lt;/a&gt; How do I get started with Connect IQ?&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good places to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; is available on our developer site.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK also includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="charge"&gt;&lt;/a&gt;&amp;nbsp;Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="display-seconds"&gt;&lt;/a&gt; Can I display seconds on my watch face?&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="leading-zeros"&gt;&lt;/a&gt; How do I format output padded with leading zeros?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as &amp;quot;12:05:05&amp;quot; rather than &amp;quot;12:5:5&amp;quot;. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="testing-purposes"&gt;&lt;/a&gt; How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Wizard window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Choose the SDK version to target&lt;/li&gt;
&lt;li&gt;Specify a signing key&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file made by the Build for Device Wizard from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="app-settings"&gt;&lt;/a&gt; I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and depend on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is either in a beta state or pending approval.&lt;/span&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="debugging"&gt;&lt;/a&gt; How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A simple way to test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;code&gt;System.println()&lt;/code&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&lt;/span&gt;&lt;span&gt; statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt; &lt;/span&gt;&lt;/i&gt;these &lt;span&gt;statements write to the &lt;code&gt;/GARMIN/APPS/LOGS&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/code&gt;&lt;span&gt;&amp;nbsp;file, if it exists&lt;/span&gt;&lt;span&gt;. This file is not automatically created, so must be created manually and named to match the name of the app&amp;#39;s &lt;code&gt;PRG&lt;/code&gt; file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN/APPS/MYAPP.PRG&lt;/code&gt;&lt;span&gt;, create the &lt;/span&gt;&lt;code&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/code&gt;&lt;span&gt; file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For more advanced debugging, Connect IQ has a unit testing framework called &lt;em&gt;Run No Evil&lt;/em&gt;, and a debugger that&amp;#39;s included in the Connect IQ plug-in for Eclipse that can be used to dig into potential issues within the Connect IQ simulator. Check out the &lt;a title="How to Test" href="http://developer.garmin.com/connect-iq/programmers-guide/how-to-test/"&gt;How to Test&lt;/a&gt; chapter of the Programmer&amp;#39;s Guide for more info.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In addition to these tools, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;app crashes&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;device crashes&lt;span&gt;. &lt;strong&gt;App crashes&lt;/strong&gt; typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a &lt;code&gt;/GARMIN/APPS/LOGS/&lt;/code&gt;&lt;/span&gt;&lt;code&gt;CIQ_LOG.YML&lt;/code&gt;&lt;span&gt; file is written&lt;/span&gt;&lt;span&gt; to the device, which usually contains a call stack from the app (older devices may write a &lt;code&gt;CIQ_LOG.TXT&lt;/code&gt; file). &lt;strong&gt;Device crashes&lt;/strong&gt; typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;code&gt;ERR_LOG.TXT&lt;/code&gt;&lt;span&gt; file is typically written to&amp;nbsp;&lt;/span&gt;&lt;code&gt;/GARMIN&lt;/code&gt; or &lt;code&gt;/GARMIN/DEBUG&lt;/code&gt;&lt;span&gt; on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any crash log file exceeds 5 KB, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;code&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/code&gt;&lt;span&gt;, and a new log will be started. Any old &lt;code&gt;.BAK&lt;/code&gt; files will be overwritten when the archive occurs, so the maximum practical space available for logging is ~10 KB.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;9. I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, whether they support version 1.2.x, 1.3.x, or 2.1.x.&lt;br /&gt;&lt;br /&gt;Anything built for 1.2.x devices will work on 1.3.x and 2.1.x devices, so it&amp;#39;s the most inclusive approach as long as you don&amp;#39;t need the newest features for your app. Building for 2.1.x will limit the devices you can target, but will give you access to all of the latest goodies.&lt;br /&gt;&lt;br /&gt;In the 2.1.2 SDK release, we added an option to the App Export Wizard that allows you to select a target Connect IQ version, which limits the selectable target devices to only those that support the Connect IQ version you&amp;#39;ve chosen. The only decision for you to make is which devices you would like to support. Here&amp;#39;s a handy-dandy table to help with that choice:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.2.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.4.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;2.1.x Devices (Biker)&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;epix&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;Approach S60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo Titanium&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Charlie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 230&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 520&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 235&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 630&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 920XT&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3 HR&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 735XT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 935&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;tactix Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5S&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5X&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix Chronos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Oregon 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Rino 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive HR&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;10. My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;With GCM for Android there is an issue where it sets a value as a Float when a Number is expected. It&amp;#39;s good practice to check the value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="bbcode_container"&gt;
&lt;div class="bbcode_description"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;11. I think that I&amp;#39;ve found a bug with CIQ. Where do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a bug in the platform we have a &lt;a href="/developer/connect-iq/i/bug-reports" rel="noopener noreferrer" target="_blank"&gt;Bug Reports&lt;/a&gt; tool here in the community.&amp;nbsp; Please make sure to read the &lt;a href="/developer/connect-iq/w/faqs/5/bug-reports" rel="noopener noreferrer" target="_blank"&gt;Bug Reports Wiki&amp;nbsp;&lt;/a&gt;and follow the directions there on rules and usage there. If you post about a bug in the regular forums your thread may be moved or deleted.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;12. I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We added a functionality in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.1.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;CIQ_LOG.txt&amp;nbsp;file as a &amp;quot;Too many arguments&amp;quot; error, signifying the argument count check has failed.&lt;br /&gt;&lt;br /&gt;In most cases, the culprits behind this &amp;quot;Too many arguments&amp;quot; issue are missing&amp;nbsp;&amp;#39;state&amp;#39;&amp;nbsp;arguments for&amp;nbsp;onStart()&amp;nbsp;and&amp;nbsp;onStop(). These are currently unused argument and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly. Another example that can cause this is something like an&amp;nbsp;initialize()&amp;nbsp;function for a Drawable, which takes an array of options but to which none are passed.&lt;br /&gt;&lt;br /&gt;The new minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (2.1.x), B (1.3.x), and C (1.2.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Available Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What We Build&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.1.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.3.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B,&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;It can sometimes be difficult to troubleshoot this issue due to a bug in our build system. The Build For Device Wizard may build a PRG for a target VM version lower than expected for a given device. The result is that a PRG made with the Build For Device Wizard will operate without issue on a device, but the same app will fail with a &amp;quot;Too many arguments&amp;quot; error when using a PRG from the App Export Wizard (i.e. installed from the store). As a consequence, it can be difficult to obtain a useful call stack in the&amp;nbsp;CIQ_LOG.txt. We have a fix for this that will be included in an upcoming release of the SDK.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/9</link><pubDate>Wed, 03 Apr 2019 20:58:11 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 9 posted to Wiki by Brandon.ConnectIQ on 4/3/2019 8:58:11 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="sdk-download"&gt;&lt;/a&gt; Where can I download the SDK?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="get-started"&gt;&lt;/a&gt; How do I get started with Connect IQ?&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good places to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; is available on our developer site.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK also includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;a id="charge"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Can I display seconds on my watch face?&lt;a id="display-seconds"&gt;&lt;/a&gt;&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;How do I format output padded with leading zeros?&lt;a id="leading-zeros"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as 12:05:05 rather than 12:5:5. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;How can I load the apps I develop to my device for testing purposes?&lt;a id="testing-purposes"&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Wizard window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Choose the SDK version to target&lt;/li&gt;
&lt;li&gt;Specify a signing key&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file made by the Build for Device Wizard from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and rely on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is still pending approval.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;8. How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The best way to currently test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;i&gt;System.println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&amp;nbsp;&lt;/span&gt;&lt;i&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements write to an&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/i&gt;&lt;span&gt;&amp;nbsp;file in&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;. These log files are not automatically created, so must be manually created on the device and named to match the name of the app&amp;#39;s corresponding PRG file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/MYAPP.PRG&lt;/i&gt;&lt;span&gt;, you must create&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/i&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Aside from this basic debugging technique, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;&lt;b&gt;app crashes&lt;/b&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;b&gt;device crashes&lt;/b&gt;&lt;span&gt;. App crashes typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a&amp;nbsp;&lt;/span&gt;&lt;i&gt;CIQ_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;on the device, and contains information related to the crash that app developers may use to address the problem. Device crashes typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;i&gt;ERR_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN&lt;/i&gt;&lt;span&gt;&amp;nbsp;on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;When any log file exceeds 5kb, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/i&gt;&lt;span&gt;, and a new log will be started. Any old .BAK files will be overwritten when the archive occurs, so the max space a log can reach is ~10kb.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;9. I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, whether they support version 1.2.x, 1.3.x, or 2.1.x.&lt;br /&gt;&lt;br /&gt;Anything built for 1.2.x devices will work on 1.3.x and 2.1.x devices, so it&amp;#39;s the most inclusive approach as long as you don&amp;#39;t need the newest features for your app. Building for 2.1.x will limit the devices you can target, but will give you access to all of the latest goodies.&lt;br /&gt;&lt;br /&gt;In the 2.1.2 SDK release, we added an option to the App Export Wizard that allows you to select a target Connect IQ version, which limits the selectable target devices to only those that support the Connect IQ version you&amp;#39;ve chosen. The only decision for you to make is which devices you would like to support. Here&amp;#39;s a handy-dandy table to help with that choice:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.2.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.4.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;2.1.x Devices (Biker)&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;epix&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;Approach S60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo Titanium&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Charlie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 230&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 520&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 235&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 630&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 920XT&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3 HR&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 735XT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 935&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;tactix Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5S&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5X&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix Chronos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Oregon 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Rino 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive HR&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;10. My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;With GCM for Android there is an issue where it sets a value as a Float when a Number is expected. It&amp;#39;s good practice to check the value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="bbcode_container"&gt;
&lt;div class="bbcode_description"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;11. I think that I&amp;#39;ve found a bug with CIQ. Where do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a bug in the platform we have a &lt;a href="/developer/connect-iq/i/bug-reports" rel="noopener noreferrer" target="_blank"&gt;Bug Reports&lt;/a&gt; tool here in the community.&amp;nbsp; Please make sure to read the &lt;a href="/developer/connect-iq/w/faqs/5/bug-reports" rel="noopener noreferrer" target="_blank"&gt;Bug Reports Wiki&amp;nbsp;&lt;/a&gt;and follow the directions there on rules and usage there. If you post about a bug in the regular forums your thread may be moved or deleted.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;12. I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We added a functionality in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.1.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;CIQ_LOG.txt&amp;nbsp;file as a &amp;quot;Too many arguments&amp;quot; error, signifying the argument count check has failed.&lt;br /&gt;&lt;br /&gt;In most cases, the culprits behind this &amp;quot;Too many arguments&amp;quot; issue are missing&amp;nbsp;&amp;#39;state&amp;#39;&amp;nbsp;arguments for&amp;nbsp;onStart()&amp;nbsp;and&amp;nbsp;onStop(). These are currently unused argument and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly. Another example that can cause this is something like an&amp;nbsp;initialize()&amp;nbsp;function for a Drawable, which takes an array of options but to which none are passed.&lt;br /&gt;&lt;br /&gt;The new minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (2.1.x), B (1.3.x), and C (1.2.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Available Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What We Build&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.1.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.3.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B,&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;It can sometimes be difficult to troubleshoot this issue due to a bug in our build system. The Build For Device Wizard may build a PRG for a target VM version lower than expected for a given device. The result is that a PRG made with the Build For Device Wizard will operate without issue on a device, but the same app will fail with a &amp;quot;Too many arguments&amp;quot; error when using a PRG from the App Export Wizard (i.e. installed from the store). As a consequence, it can be difficult to obtain a useful call stack in the&amp;nbsp;CIQ_LOG.txt. We have a fix for this that will be included in an upcoming release of the SDK.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/8</link><pubDate>Wed, 03 Apr 2019 20:57:11 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 8 posted to Wiki by Brandon.ConnectIQ on 4/3/2019 8:57:11 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;&lt;a id="sdk-download"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Where can I download the SDK?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a id="get-started"&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How do I get started with Connect IQ?&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good places to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; is available on our developer site.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK also includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;a id="charge"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Can I display seconds on my watch face?&lt;a id="display-seconds"&gt;&lt;/a&gt;&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;How do I format output padded with leading zeros?&lt;a id="leading-zeros"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as 12:05:05 rather than 12:5:5. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;How can I load the apps I develop to my device for testing purposes?&lt;a id="testing-purposes"&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Wizard window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Choose the SDK version to target&lt;/li&gt;
&lt;li&gt;Specify a signing key&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file made by the Build for Device Wizard from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;br /&gt;&lt;b&gt;7. I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and rely on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is still pending approval.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;8. How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The best way to currently test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;i&gt;System.println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&amp;nbsp;&lt;/span&gt;&lt;i&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements write to an&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/i&gt;&lt;span&gt;&amp;nbsp;file in&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;. These log files are not automatically created, so must be manually created on the device and named to match the name of the app&amp;#39;s corresponding PRG file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/MYAPP.PRG&lt;/i&gt;&lt;span&gt;, you must create&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/i&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Aside from this basic debugging technique, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;&lt;b&gt;app crashes&lt;/b&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;b&gt;device crashes&lt;/b&gt;&lt;span&gt;. App crashes typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a&amp;nbsp;&lt;/span&gt;&lt;i&gt;CIQ_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;on the device, and contains information related to the crash that app developers may use to address the problem. Device crashes typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;i&gt;ERR_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN&lt;/i&gt;&lt;span&gt;&amp;nbsp;on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;When any log file exceeds 5kb, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/i&gt;&lt;span&gt;, and a new log will be started. Any old .BAK files will be overwritten when the archive occurs, so the max space a log can reach is ~10kb.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;9. I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, whether they support version 1.2.x, 1.3.x, or 2.1.x.&lt;br /&gt;&lt;br /&gt;Anything built for 1.2.x devices will work on 1.3.x and 2.1.x devices, so it&amp;#39;s the most inclusive approach as long as you don&amp;#39;t need the newest features for your app. Building for 2.1.x will limit the devices you can target, but will give you access to all of the latest goodies.&lt;br /&gt;&lt;br /&gt;In the 2.1.2 SDK release, we added an option to the App Export Wizard that allows you to select a target Connect IQ version, which limits the selectable target devices to only those that support the Connect IQ version you&amp;#39;ve chosen. The only decision for you to make is which devices you would like to support. Here&amp;#39;s a handy-dandy table to help with that choice:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.2.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.4.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;2.1.x Devices (Biker)&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;epix&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;Approach S60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo Titanium&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Charlie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 230&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 520&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 235&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 630&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 920XT&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3 HR&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 735XT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 935&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;tactix Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5S&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5X&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix Chronos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Oregon 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Rino 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive HR&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;10. My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;With GCM for Android there is an issue where it sets a value as a Float when a Number is expected. It&amp;#39;s good practice to check the value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="bbcode_container"&gt;
&lt;div class="bbcode_description"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;11. I think that I&amp;#39;ve found a bug with CIQ. Where do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a bug in the platform we have a &lt;a href="/developer/connect-iq/i/bug-reports" rel="noopener noreferrer" target="_blank"&gt;Bug Reports&lt;/a&gt; tool here in the community.&amp;nbsp; Please make sure to read the &lt;a href="/developer/connect-iq/w/faqs/5/bug-reports" rel="noopener noreferrer" target="_blank"&gt;Bug Reports Wiki&amp;nbsp;&lt;/a&gt;and follow the directions there on rules and usage there. If you post about a bug in the regular forums your thread may be moved or deleted.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;12. I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We added a functionality in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.1.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;CIQ_LOG.txt&amp;nbsp;file as a &amp;quot;Too many arguments&amp;quot; error, signifying the argument count check has failed.&lt;br /&gt;&lt;br /&gt;In most cases, the culprits behind this &amp;quot;Too many arguments&amp;quot; issue are missing&amp;nbsp;&amp;#39;state&amp;#39;&amp;nbsp;arguments for&amp;nbsp;onStart()&amp;nbsp;and&amp;nbsp;onStop(). These are currently unused argument and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly. Another example that can cause this is something like an&amp;nbsp;initialize()&amp;nbsp;function for a Drawable, which takes an array of options but to which none are passed.&lt;br /&gt;&lt;br /&gt;The new minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (2.1.x), B (1.3.x), and C (1.2.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Available Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What We Build&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.1.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.3.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B,&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;It can sometimes be difficult to troubleshoot this issue due to a bug in our build system. The Build For Device Wizard may build a PRG for a target VM version lower than expected for a given device. The result is that a PRG made with the Build For Device Wizard will operate without issue on a device, but the same app will fail with a &amp;quot;Too many arguments&amp;quot; error when using a PRG from the App Export Wizard (i.e. installed from the store). As a consequence, it can be difficult to obtain a useful call stack in the&amp;nbsp;CIQ_LOG.txt. We have a fix for this that will be included in an upcoming release of the SDK.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/7</link><pubDate>Wed, 03 Apr 2019 20:54:55 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Brandon.ConnectIQ</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 7 posted to Wiki by Brandon.ConnectIQ on 4/3/2019 8:54:55 PM&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Where can I download the SDK?" href="#sdk-download"&gt;Where can I download the SDK?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I get started with Connect IQ?" href="#get-started"&gt;How do I get started with Connect IQ?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Am I allowed to charge for my app though the Connect IQ app store?" href="#charge"&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="Can I display seconds on my watch face?" href="#display-seconds"&gt;Can I display seconds on my watch face?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;a title="How do I format output padded with leading zeros?" href="#leading-zeros"&gt;How do I format output padded with leading zeros?&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;&lt;a title="How can I load the apps I develop to my device for testing purposes?" href="#testing-purposes"&gt;How can I load the apps I develop to my device for testing purposes?&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;b&gt;Where can I download the SDK?&lt;a id="sdk-download"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The latest version of the SDK can be found at &lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How do I get started with Connect IQ?&lt;a id="get-started"&gt;&lt;/a&gt;&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good places to start gaining familiarity with Monkey C and Connect IQ. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a title="API Documentation" href="http://developer.garmin.com/connect-iq/api-docs/"&gt;API Documentation&lt;/a&gt; is available on our developer site.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The SDK also includes a set of sample apps in the &amp;#39;samples&amp;#39; folder that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Am I allowed to charge for my app though the Connect IQ app store?&lt;a id="charge"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on Garmin sites other than the app store (such as this forum) is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Can I display seconds on my watch face?&lt;a id="display-seconds"&gt;&lt;/a&gt;&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can! However, one priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Generally, watch faces update once per minute in low power mode, and once per second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then returns to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Newer devices may also support Always On watch faces, which can update once per second as long as they operate within certain limits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find out more about low power mode, full power mode, and Always On watch faces in the &lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;, or read about the related APIs in the&amp;nbsp;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;How do I format output padded with leading zeros?&lt;a id="leading-zeros"&gt;&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as 12:05:05 rather than 12:5:5. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a &lt;/span&gt;&lt;code&gt;%02d&lt;/code&gt;&lt;span&gt; format specifier.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common error is to specify a format of &lt;code&gt;%.2d&lt;/code&gt; or &lt;code&gt;%0.2d&lt;/code&gt;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &lt;code&gt;0&lt;/code&gt; flag to specify padding with leading zeros for &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;u&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;, &lt;code&gt;g&lt;/code&gt;, and &lt;code&gt;G&lt;/code&gt; conversions. In addition, C99 states that if a precision is specified with &amp;#39;&lt;code&gt;.&lt;/code&gt;&amp;#39;, the the &lt;code&gt;0&lt;/code&gt; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;How can I load the apps I develop to my device for testing purposes?&lt;a id="testing-purposes"&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Wizard window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Choose the SDK version to target&lt;/li&gt;
&lt;li&gt;Specify a signing key&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the PRG file made by the Build for Device Wizard from the output location to &lt;code&gt;/GARMIN/APPS&lt;/code&gt; on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;br /&gt;&lt;b&gt;7. I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and rely on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is still pending approval.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;8. How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The best way to currently test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;i&gt;System.println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&amp;nbsp;&lt;/span&gt;&lt;i&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements write to an&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/i&gt;&lt;span&gt;&amp;nbsp;file in&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;. These log files are not automatically created, so must be manually created on the device and named to match the name of the app&amp;#39;s corresponding PRG file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/MYAPP.PRG&lt;/i&gt;&lt;span&gt;, you must create&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/i&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Aside from this basic debugging technique, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;&lt;b&gt;app crashes&lt;/b&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;b&gt;device crashes&lt;/b&gt;&lt;span&gt;. App crashes typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a&amp;nbsp;&lt;/span&gt;&lt;i&gt;CIQ_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;on the device, and contains information related to the crash that app developers may use to address the problem. Device crashes typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;i&gt;ERR_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN&lt;/i&gt;&lt;span&gt;&amp;nbsp;on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;When any log file exceeds 5kb, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/i&gt;&lt;span&gt;, and a new log will be started. Any old .BAK files will be overwritten when the archive occurs, so the max space a log can reach is ~10kb.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;9. I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, whether they support version 1.2.x, 1.3.x, or 2.1.x.&lt;br /&gt;&lt;br /&gt;Anything built for 1.2.x devices will work on 1.3.x and 2.1.x devices, so it&amp;#39;s the most inclusive approach as long as you don&amp;#39;t need the newest features for your app. Building for 2.1.x will limit the devices you can target, but will give you access to all of the latest goodies.&lt;br /&gt;&lt;br /&gt;In the 2.1.2 SDK release, we added an option to the App Export Wizard that allows you to select a target Connect IQ version, which limits the selectable target devices to only those that support the Connect IQ version you&amp;#39;ve chosen. The only decision for you to make is which devices you would like to support. Here&amp;#39;s a handy-dandy table to help with that choice:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.2.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.4.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;2.1.x Devices (Biker)&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;epix&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;Approach S60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo Titanium&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Charlie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 230&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 520&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 235&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 630&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 920XT&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3 HR&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 735XT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 935&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;tactix Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5S&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5X&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix Chronos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Oregon 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Rino 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive HR&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;10. My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;With GCM for Android there is an issue where it sets a value as a Float when a Number is expected. It&amp;#39;s good practice to check the value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="bbcode_container"&gt;
&lt;div class="bbcode_description"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;11. I think that I&amp;#39;ve found a bug with CIQ. Where do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a bug in the platform we have a &lt;a href="/developer/connect-iq/i/bug-reports" rel="noopener noreferrer" target="_blank"&gt;Bug Reports&lt;/a&gt; tool here in the community.&amp;nbsp; Please make sure to read the &lt;a href="/developer/connect-iq/w/faqs/5/bug-reports" rel="noopener noreferrer" target="_blank"&gt;Bug Reports Wiki&amp;nbsp;&lt;/a&gt;and follow the directions there on rules and usage there. If you post about a bug in the regular forums your thread may be moved or deleted.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;12. I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We added a functionality in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.1.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;CIQ_LOG.txt&amp;nbsp;file as a &amp;quot;Too many arguments&amp;quot; error, signifying the argument count check has failed.&lt;br /&gt;&lt;br /&gt;In most cases, the culprits behind this &amp;quot;Too many arguments&amp;quot; issue are missing&amp;nbsp;&amp;#39;state&amp;#39;&amp;nbsp;arguments for&amp;nbsp;onStart()&amp;nbsp;and&amp;nbsp;onStop(). These are currently unused argument and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly. Another example that can cause this is something like an&amp;nbsp;initialize()&amp;nbsp;function for a Drawable, which takes an array of options but to which none are passed.&lt;br /&gt;&lt;br /&gt;The new minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (2.1.x), B (1.3.x), and C (1.2.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Available Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What We Build&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.1.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.3.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B,&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;It can sometimes be difficult to troubleshoot this issue due to a bug in our build system. The Build For Device Wizard may build a PRG for a target VM version lower than expected for a given device. The result is that a PRG made with the Build For Device Wizard will operate without issue on a device, but the same app will fail with a &amp;quot;Too many arguments&amp;quot; error when using a PRG from the App Export Wizard (i.e. installed from the store). As a consequence, it can be difficult to obtain a useful call stack in the&amp;nbsp;CIQ_LOG.txt. We have a fix for this that will be included in an upcoming release of the SDK.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/6</link><pubDate>Fri, 29 Mar 2019 20:08:10 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Former Member</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 6 posted to Wiki by Former Member on 3/29/2019 8:08:10 PM&lt;br /&gt;
&lt;p&gt;&lt;span&gt;Welcome to the Connect IQ forums!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Below are some of the most common questions and answers we see on the forums. We&amp;#39;ll add to the FAQ over time, so check back now and then for updates!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Definitions&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;app - Generic term for all Connect IQ four application types: watch face, watch app, widget, and data field. The &amp;quot;watch-app&amp;quot; type is commonly just referred to as an &amp;quot;application&amp;quot; and may run on non-watch-like devices like the Edge or Oregon series devices.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;APAC - Asia-Pacific, which includes China, Taiwan, Japan, Indonesia, Malaysia, and Singapore&lt;/span&gt;&lt;br /&gt;&lt;span&gt;API -&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/api-docs/" rel="noopener noreferrer" target="_blank"&gt;Application Programming Interface&lt;/a&gt;&lt;span&gt;; the specific software routines supported by the SDK used to write Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;span&gt;CIQ - Connect IQ&lt;/span&gt;&lt;br /&gt;&lt;span&gt;GCM - Garmin Connect Mobile&lt;/span&gt;&lt;br /&gt;&lt;span&gt;GE - Garmin Express&lt;/span&gt;&lt;br /&gt;&lt;span&gt;SDK -&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Software Development Kit&lt;/a&gt;&lt;span&gt;; the tool set which developers use to create Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;span&gt;VM - Virtual Machine; the software on Garmin devices that runs Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Where can I download the SDK?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;You can find noth Mac and Windows version of the SDK at developer.garmin.com:&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. How do I get started with Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good references to start gaining familiarity with Monkey C and Connect IQ. These are also included with the SDK as PDFs for offline reference. The SDK also includes a set of sample apps that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on other Garmin web sites, including this forum, is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?268566-CHARGING-for-something-in-the-App-store-Isn-t-this-forbidden" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...this-forbidden&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4. Can I display seconds on my watch face?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, you can! However, a priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Watch faces update at once a minute in low power mode, and once a second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then return to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. You can find out more about the low power and full power mode transition in the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;, or read about the specifics of detecting these transitions in the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?174527-Watchface-with-Seconds" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...e-with-Seconds&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5. How do I format output padded with leading zeros?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as 12:05:05 rather than 12:5:5. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a&amp;nbsp;&lt;/span&gt;&lt;b&gt;&amp;quot;%02d&amp;quot;&lt;/b&gt;&lt;span&gt;&amp;nbsp;format specifier.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;A common error is to specify a format of &amp;quot;%.2d&amp;quot; or &amp;quot;%0.2d&amp;quot;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &amp;#39;0&amp;#39; flag to specify padding with leading zeros for d, i, o, u, x, X, a, A, e, f, F, g, and G conversions. In addition, if a precision is specified with &amp;#39;.&amp;#39;, according to C99 the the &amp;#39;0&amp;#39; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?255191-Formatted-Output" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...rmatted-Output&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;6. How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Tool window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should connect as mass storage and appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the resultant PRG file from the output location to /GARMIN/APPS on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;br /&gt;&lt;b&gt;7. I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and rely on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is still pending approval.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;8. How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The best way to currently test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;i&gt;System.println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&amp;nbsp;&lt;/span&gt;&lt;i&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements write to an&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/i&gt;&lt;span&gt;&amp;nbsp;file in&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;. These log files are not automatically created, so must be manually created on the device and named to match the name of the app&amp;#39;s corresponding PRG file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/MYAPP.PRG&lt;/i&gt;&lt;span&gt;, you must create&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/i&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Aside from this basic debugging technique, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;&lt;b&gt;app crashes&lt;/b&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;b&gt;device crashes&lt;/b&gt;&lt;span&gt;. App crashes typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a&amp;nbsp;&lt;/span&gt;&lt;i&gt;CIQ_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;on the device, and contains information related to the crash that app developers may use to address the problem. Device crashes typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;i&gt;ERR_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN&lt;/i&gt;&lt;span&gt;&amp;nbsp;on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;When any log file exceeds 5kb, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/i&gt;&lt;span&gt;, and a new log will be started. Any old .BAK files will be overwritten when the archive occurs, so the max space a log can reach is ~10kb.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;9. I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, whether they support version 1.2.x, 1.3.x, or 2.1.x.&lt;br /&gt;&lt;br /&gt;Anything built for 1.2.x devices will work on 1.3.x and 2.1.x devices, so it&amp;#39;s the most inclusive approach as long as you don&amp;#39;t need the newest features for your app. Building for 2.1.x will limit the devices you can target, but will give you access to all of the latest goodies.&lt;br /&gt;&lt;br /&gt;In the 2.1.2 SDK release, we added an option to the App Export Wizard that allows you to select a target Connect IQ version, which limits the selectable target devices to only those that support the Connect IQ version you&amp;#39;ve chosen. The only decision for you to make is which devices you would like to support. Here&amp;#39;s a handy-dandy table to help with that choice:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.2.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.4.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;2.1.x Devices (Biker)&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;epix&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;Approach S60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo Titanium&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Charlie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 230&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 520&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 235&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 630&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 920XT&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3 HR&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 735XT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 935&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;tactix Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5S&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5X&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix Chronos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Oregon 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Rino 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive HR&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;10. My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;With GCM for Android there is an issue where it sets a value as a Float when a Number is expected. It&amp;#39;s good practice to check the value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="bbcode_container"&gt;
&lt;div class="bbcode_description"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;11. I think that I&amp;#39;ve found a bug with CIQ. Where do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a bug in the platform we have a &lt;a href="/developer/connect-iq/i/bug-reports" rel="noopener noreferrer" target="_blank"&gt;Bug Reports&lt;/a&gt; tool here in the community.&amp;nbsp; Please make sure to read the &lt;a href="/developer/connect-iq/w/faqs/5/bug-reports" rel="noopener noreferrer" target="_blank"&gt;Bug Reports Wiki&amp;nbsp;&lt;/a&gt;and follow the directions there on rules and usage there. If you post about a bug in the regular forums your thread may be moved or deleted.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;12. I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We added a functionality in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.1.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;CIQ_LOG.txt&amp;nbsp;file as a &amp;quot;Too many arguments&amp;quot; error, signifying the argument count check has failed.&lt;br /&gt;&lt;br /&gt;In most cases, the culprits behind this &amp;quot;Too many arguments&amp;quot; issue are missing&amp;nbsp;&amp;#39;state&amp;#39;&amp;nbsp;arguments for&amp;nbsp;onStart()&amp;nbsp;and&amp;nbsp;onStop(). These are currently unused argument and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly. Another example that can cause this is something like an&amp;nbsp;initialize()&amp;nbsp;function for a Drawable, which takes an array of options but to which none are passed.&lt;br /&gt;&lt;br /&gt;The new minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (2.1.x), B (1.3.x), and C (1.2.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Available Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What We Build&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.1.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.3.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B,&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;It can sometimes be difficult to troubleshoot this issue due to a bug in our build system. The Build For Device Wizard may build a PRG for a target VM version lower than expected for a given device. The result is that a PRG made with the Build For Device Wizard will operate without issue on a device, but the same app will fail with a &amp;quot;Too many arguments&amp;quot; error when using a PRG from the App Export Wizard (i.e. installed from the store). As a consequence, it can be difficult to obtain a useful call stack in the&amp;nbsp;CIQ_LOG.txt. We have a fix for this that will be included in an upcoming release of the SDK.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/5</link><pubDate>Fri, 29 Mar 2019 19:53:37 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Former Member</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 5 posted to Wiki by Former Member on 3/29/2019 7:53:37 PM&lt;br /&gt;
&lt;p&gt;&lt;span&gt;Welcome to the Connect IQ forums!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Below are some of the most common questions and answers we see on the forums. We&amp;#39;ll add to the FAQ over time, so check back now and then for updates!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Definitions&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;app - Generic term for all Connect IQ four application types: watch face, watch app, widget, and data field. The &amp;quot;watch-app&amp;quot; type is commonly just referred to as an &amp;quot;application&amp;quot; and may run on non-watch-like devices like the Edge or Oregon series devices.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;APAC - Asia-Pacific, which includes China, Taiwan, Japan, Indonesia, Malaysia, and Singapore&lt;/span&gt;&lt;br /&gt;&lt;span&gt;API -&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/api-docs/" rel="noopener noreferrer" target="_blank"&gt;Application Programming Interface&lt;/a&gt;&lt;span&gt;; the specific software routines supported by the SDK used to write Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;span&gt;CIQ - Connect IQ&lt;/span&gt;&lt;br /&gt;&lt;span&gt;GCM - Garmin Connect Mobile&lt;/span&gt;&lt;br /&gt;&lt;span&gt;GE - Garmin Express&lt;/span&gt;&lt;br /&gt;&lt;span&gt;SDK -&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Software Development Kit&lt;/a&gt;&lt;span&gt;; the tool set which developers use to create Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;span&gt;VM - Virtual Machine; the software on Garmin devices that runs Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Where can I download the SDK?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;You can find noth Mac and Windows version of the SDK at developer.garmin.com:&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. How do I get started with Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good references to start gaining familiarity with Monkey C and Connect IQ. These are also included with the SDK as PDFs for offline reference. The SDK also includes a set of sample apps that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on other Garmin web sites, including this forum, is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?268566-CHARGING-for-something-in-the-App-store-Isn-t-this-forbidden" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...this-forbidden&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4. Can I display seconds on my watch face?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, you can! However, a priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Watch faces update at once a minute in low power mode, and once a second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then return to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. You can find out more about the low power and full power mode transition in the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;, or read about the specifics of detecting these transitions in the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?174527-Watchface-with-Seconds" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...e-with-Seconds&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5. How do I format output padded with leading zeros?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as 12:05:05 rather than 12:5:5. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a&amp;nbsp;&lt;/span&gt;&lt;b&gt;&amp;quot;%02d&amp;quot;&lt;/b&gt;&lt;span&gt;&amp;nbsp;format specifier.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;A common error is to specify a format of &amp;quot;%.2d&amp;quot; or &amp;quot;%0.2d&amp;quot;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &amp;#39;0&amp;#39; flag to specify padding with leading zeros for d, i, o, u, x, X, a, A, e, f, F, g, and G conversions. In addition, if a precision is specified with &amp;#39;.&amp;#39;, according to C99 the the &amp;#39;0&amp;#39; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?255191-Formatted-Output" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...rmatted-Output&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;6. How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Tool window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should connect as mass storage and appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the resultant PRG file from the output location to /GARMIN/APPS on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;br /&gt;&lt;b&gt;7. I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and rely on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is still pending approval.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;8. How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The best way to currently test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;i&gt;System.println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&amp;nbsp;&lt;/span&gt;&lt;i&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements write to an&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/i&gt;&lt;span&gt;&amp;nbsp;file in&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;. These log files are not automatically created, so must be manually created on the device and named to match the name of the app&amp;#39;s corresponding PRG file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/MYAPP.PRG&lt;/i&gt;&lt;span&gt;, you must create&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/i&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Aside from this basic debugging technique, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;&lt;b&gt;app crashes&lt;/b&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;b&gt;device crashes&lt;/b&gt;&lt;span&gt;. App crashes typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a&amp;nbsp;&lt;/span&gt;&lt;i&gt;CIQ_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;on the device, and contains information related to the crash that app developers may use to address the problem. Device crashes typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;i&gt;ERR_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN&lt;/i&gt;&lt;span&gt;&amp;nbsp;on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;When any log file exceeds 5kb, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/i&gt;&lt;span&gt;, and a new log will be started. Any old .BAK files will be overwritten when the archive occurs, so the max space a log can reach is ~10kb.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;9. I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, whether they support version 1.2.x, 1.3.x, or 2.1.x.&lt;br /&gt;&lt;br /&gt;Anything built for 1.2.x devices will work on 1.3.x and 2.1.x devices, so it&amp;#39;s the most inclusive approach as long as you don&amp;#39;t need the newest features for your app. Building for 2.1.x will limit the devices you can target, but will give you access to all of the latest goodies.&lt;br /&gt;&lt;br /&gt;In the 2.1.2 SDK release, we added an option to the App Export Wizard that allows you to select a target Connect IQ version, which limits the selectable target devices to only those that support the Connect IQ version you&amp;#39;ve chosen. The only decision for you to make is which devices you would like to support. Here&amp;#39;s a handy-dandy table to help with that choice:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.2.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.4.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;2.1.x Devices (Biker)&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;epix&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;Approach S60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo Titanium&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Charlie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 230&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 520&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 235&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 630&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 920XT&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3 HR&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 735XT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 935&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;tactix Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5S&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5X&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix Chronos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Oregon 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Rino 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive HR&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;10. My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;With GCM for Android there is an issue where it sets a value as a Float when a Number is expected. It&amp;#39;s good practice to check the value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="bbcode_container"&gt;
&lt;div class="bbcode_description"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;11. I think that I&amp;#39;ve found a bug with CIQ. Where do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a bug in the platform we have a Bug Reports tool here in the community.&amp;nbsp; Please make sure to read the &lt;a href="/developer/connect-iq/w/faqs/5/bug-reports" rel="noopener noreferrer" target="_blank"&gt;Bug Reports Wiki&amp;nbsp;&lt;/a&gt;and follow the directions there. If you post about a bug in the regular forums your thread may be moved or deleted.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;12. I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We added a functionality in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.1.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;CIQ_LOG.txt&amp;nbsp;file as a &amp;quot;Too many arguments&amp;quot; error, signifying the argument count check has failed.&lt;br /&gt;&lt;br /&gt;In most cases, the culprits behind this &amp;quot;Too many arguments&amp;quot; issue are missing&amp;nbsp;&amp;#39;state&amp;#39;&amp;nbsp;arguments for&amp;nbsp;onStart()&amp;nbsp;and&amp;nbsp;onStop(). These are currently unused argument and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly. Another example that can cause this is something like an&amp;nbsp;initialize()&amp;nbsp;function for a Drawable, which takes an array of options but to which none are passed.&lt;br /&gt;&lt;br /&gt;The new minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (2.1.x), B (1.3.x), and C (1.2.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Available Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What We Build&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.1.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.3.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B,&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;It can sometimes be difficult to troubleshoot this issue due to a bug in our build system. The Build For Device Wizard may build a PRG for a target VM version lower than expected for a given device. The result is that a PRG made with the Build For Device Wizard will operate without issue on a device, but the same app will fail with a &amp;quot;Too many arguments&amp;quot; error when using a PRG from the App Export Wizard (i.e. installed from the store). As a consequence, it can be difficult to obtain a useful call stack in the&amp;nbsp;CIQ_LOG.txt. We have a fix for this that will be included in an upcoming release of the SDK.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/4</link><pubDate>Fri, 29 Mar 2019 19:44:24 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Former Member</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 4 posted to Wiki by Former Member on 3/29/2019 7:44:24 PM&lt;br /&gt;
&lt;p&gt;&lt;span&gt;Welcome to the Connect IQ forums!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Below are some of the most common questions and answers we see on the forums. We&amp;#39;ll add to the FAQ over time, so check back now and then for updates!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Definitions&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;app - Generic term for all Connect IQ four application types: watch face, watch app, widget, and data field. The &amp;quot;watch-app&amp;quot; type is commonly just referred to as an &amp;quot;application&amp;quot; and may run on non-watch-like devices like the Edge or Oregon series devices.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;APAC - Asia-Pacific, which includes China, Taiwan, Japan, Indonesia, Malaysia, and Singapore&lt;/span&gt;&lt;br /&gt;&lt;span&gt;API -&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/api-docs/" rel="noopener noreferrer" target="_blank"&gt;Application Programming Interface&lt;/a&gt;&lt;span&gt;; the specific software routines supported by the SDK used to write Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;span&gt;CIQ - Connect IQ&lt;/span&gt;&lt;br /&gt;&lt;span&gt;GCM - Garmin Connect Mobile&lt;/span&gt;&lt;br /&gt;&lt;span&gt;GE - Garmin Express&lt;/span&gt;&lt;br /&gt;&lt;span&gt;SDK -&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Software Development Kit&lt;/a&gt;&lt;span&gt;; the tool set which developers use to create Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;span&gt;VM - Virtual Machine; the software on Garmin devices that runs Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Where can I download the SDK?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;You can find noth Mac and Windows version of the SDK at developer.garmin.com:&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. How do I get started with Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good references to start gaining familiarity with Monkey C and Connect IQ. These are also included with the SDK as PDFs for offline reference. The SDK also includes a set of sample apps that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on other Garmin web sites, including this forum, is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?268566-CHARGING-for-something-in-the-App-store-Isn-t-this-forbidden" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...this-forbidden&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4. Can I display seconds on my watch face?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, you can! However, a priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Watch faces update at once a minute in low power mode, and once a second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then return to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. You can find out more about the low power and full power mode transition in the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;, or read about the specifics of detecting these transitions in the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?174527-Watchface-with-Seconds" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...e-with-Seconds&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5. How do I format output padded with leading zeros?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as 12:05:05 rather than 12:5:5. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a&amp;nbsp;&lt;/span&gt;&lt;b&gt;&amp;quot;%02d&amp;quot;&lt;/b&gt;&lt;span&gt;&amp;nbsp;format specifier.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;A common error is to specify a format of &amp;quot;%.2d&amp;quot; or &amp;quot;%0.2d&amp;quot;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &amp;#39;0&amp;#39; flag to specify padding with leading zeros for d, i, o, u, x, X, a, A, e, f, F, g, and G conversions. In addition, if a precision is specified with &amp;#39;.&amp;#39;, according to C99 the the &amp;#39;0&amp;#39; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?255191-Formatted-Output" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...rmatted-Output&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;6. How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Tool window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should connect as mass storage and appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the resultant PRG file from the output location to /GARMIN/APPS on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;br /&gt;&lt;b&gt;7. I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and rely on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is still pending approval.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;8. How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The best way to currently test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;i&gt;System.println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&amp;nbsp;&lt;/span&gt;&lt;i&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements write to an&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/i&gt;&lt;span&gt;&amp;nbsp;file in&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;. These log files are not automatically created, so must be manually created on the device and named to match the name of the app&amp;#39;s corresponding PRG file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/MYAPP.PRG&lt;/i&gt;&lt;span&gt;, you must create&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/i&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Aside from this basic debugging technique, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;&lt;b&gt;app crashes&lt;/b&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;b&gt;device crashes&lt;/b&gt;&lt;span&gt;. App crashes typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a&amp;nbsp;&lt;/span&gt;&lt;i&gt;CIQ_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;on the device, and contains information related to the crash that app developers may use to address the problem. Device crashes typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;i&gt;ERR_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN&lt;/i&gt;&lt;span&gt;&amp;nbsp;on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;When any log file exceeds 5kb, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/i&gt;&lt;span&gt;, and a new log will be started. Any old .BAK files will be overwritten when the archive occurs, so the max space a log can reach is ~10kb.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;9. I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, whether they support version 1.2.x, 1.3.x, or 2.1.x.&lt;br /&gt;&lt;br /&gt;Anything built for 1.2.x devices will work on 1.3.x and 2.1.x devices, so it&amp;#39;s the most inclusive approach as long as you don&amp;#39;t need the newest features for your app. Building for 2.1.x will limit the devices you can target, but will give you access to all of the latest goodies.&lt;br /&gt;&lt;br /&gt;In the 2.1.2 SDK release, we added an option to the App Export Wizard that allows you to select a target Connect IQ version, which limits the selectable target devices to only those that support the Connect IQ version you&amp;#39;ve chosen. The only decision for you to make is which devices you would like to support. Here&amp;#39;s a handy-dandy table to help with that choice:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.2.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.4.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;2.1.x Devices (Biker)&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;epix&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;Approach S60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo Titanium&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Charlie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 230&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 520&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 235&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 630&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 920XT&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3 HR&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 735XT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 935&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;tactix Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5S&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5X&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix Chronos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Oregon 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Rino 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive HR&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;10. My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;With GCM for Android there is an issue where it sets a value as a Float when a Number is expected. It&amp;#39;s good practice to check the value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="bbcode_container"&gt;
&lt;div class="bbcode_description"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;11. I think that I&amp;#39;ve found a bug with CIQ. Where do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a bug in the platform we have a Connect IQ Bug Reports Sub-Forum&amp;nbsp;&lt;a href="https://forums.garmin.com/forumdisplay.php?623-Connect-IQ-Bug-Reports" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;. Please make sure to read the&amp;nbsp;&lt;a href="https://forums.garmin.com/showthread.php?366516-Bug-Reports-Forum-Rules" rel="noopener noreferrer" target="_blank"&gt;rules sticky thread&lt;/a&gt;&amp;nbsp;and follow the directions there. If you post about a bug in the regular forums your thread may be moved or deleted.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;12. I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We added a functionality in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.1.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;CIQ_LOG.txt&amp;nbsp;file as a &amp;quot;Too many arguments&amp;quot; error, signifying the argument count check has failed.&lt;br /&gt;&lt;br /&gt;In most cases, the culprits behind this &amp;quot;Too many arguments&amp;quot; issue are missing&amp;nbsp;&amp;#39;state&amp;#39;&amp;nbsp;arguments for&amp;nbsp;onStart()&amp;nbsp;and&amp;nbsp;onStop(). These are currently unused argument and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly. Another example that can cause this is something like an&amp;nbsp;initialize()&amp;nbsp;function for a Drawable, which takes an array of options but to which none are passed.&lt;br /&gt;&lt;br /&gt;The new minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (2.1.x), B (1.3.x), and C (1.2.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Available Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What We Build&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.1.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.3.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B,&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;It can sometimes be difficult to troubleshoot this issue due to a bug in our build system. The Build For Device Wizard may build a PRG for a target VM version lower than expected for a given device. The result is that a PRG made with the Build For Device Wizard will operate without issue on a device, but the same app will fail with a &amp;quot;Too many arguments&amp;quot; error when using a PRG from the App Export Wizard (i.e. installed from the store). As a consequence, it can be difficult to obtain a useful call stack in the&amp;nbsp;CIQ_LOG.txt. We have a fix for this that will be included in an upcoming release of the SDK.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/3</link><pubDate>Fri, 29 Mar 2019 19:41:44 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Former Member</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 3 posted to Wiki by Former Member on 3/29/2019 7:41:44 PM&lt;br /&gt;
&lt;p&gt;&lt;span&gt;Welcome to the Connect IQ forums!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Below are some of the most common questions and answers we see on the forums. We&amp;#39;ll add to the FAQ over time, so check back now and then for updates!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Definitions&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;app - Generic term for all Connect IQ four application types: watch face, watch app, widget, and data field. The &amp;quot;watch-app&amp;quot; type is commonly just referred to as an &amp;quot;application&amp;quot; and may run on non-watch-like devices like the Edge or Oregon series devices.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;APAC - Asia-Pacific, which includes China, Taiwan, Japan, Indonesia, Malaysia, and Singapore&lt;/span&gt;&lt;br /&gt;&lt;span&gt;API -&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/api-docs/" rel="noopener noreferrer" target="_blank"&gt;Application Programming Interface&lt;/a&gt;&lt;span&gt;; the specific software routines supported by the SDK used to write Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;span&gt;CIQ - Connect IQ&lt;/span&gt;&lt;br /&gt;&lt;span&gt;GCM - Garmin Connect Mobile&lt;/span&gt;&lt;br /&gt;&lt;span&gt;GE - Garmin Express&lt;/span&gt;&lt;br /&gt;&lt;span&gt;SDK -&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Software Development Kit&lt;/a&gt;&lt;span&gt;; the tool set which developers use to create Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;span&gt;VM - Virtual Machine; the software on Garmin devices that runs Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Where can I download the SDK?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;You can find noth Mac and Windows version of the SDK at developer.garmin.com:&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. How do I get started with Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good references to start gaining familiarity with Monkey C and Connect IQ. These are also included with the SDK as PDFs for offline reference. The SDK also includes a set of sample apps that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on other Garmin web sites, including this forum, is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?268566-CHARGING-for-something-in-the-App-store-Isn-t-this-forbidden" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...this-forbidden&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4. Can I display seconds on my watch face?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, you can! However, a priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Watch faces update at once a minute in low power mode, and once a second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then return to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. You can find out more about the low power and full power mode transition in the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;, or read about the specifics of detecting these transitions in the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?174527-Watchface-with-Seconds" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...e-with-Seconds&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5. How do I format output padded with leading zeros?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as 12:05:05 rather than 12:5:5. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a&amp;nbsp;&lt;/span&gt;&lt;b&gt;&amp;quot;%02d&amp;quot;&lt;/b&gt;&lt;span&gt;&amp;nbsp;format specifier.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;A common error is to specify a format of &amp;quot;%.2d&amp;quot; or &amp;quot;%0.2d&amp;quot;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &amp;#39;0&amp;#39; flag to specify padding with leading zeros for d, i, o, u, x, X, a, A, e, f, F, g, and G conversions. In addition, if a precision is specified with &amp;#39;.&amp;#39;, according to C99 the the &amp;#39;0&amp;#39; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?255191-Formatted-Output" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...rmatted-Output&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;6. How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Tool window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should connect as mass storage and appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the resultant PRG file from the output location to /GARMIN/APPS on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;br /&gt;&lt;b&gt;7. I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and rely on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is still pending approval.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;8. How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The best way to currently test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;i&gt;System.println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&amp;nbsp;&lt;/span&gt;&lt;i&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements write to an&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/i&gt;&lt;span&gt;&amp;nbsp;file in&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;. These log files are not automatically created, so must be manually created on the device and named to match the name of the app&amp;#39;s corresponding PRG file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/MYAPP.PRG&lt;/i&gt;&lt;span&gt;, you must create&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/i&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Aside from this basic debugging technique, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;&lt;b&gt;app crashes&lt;/b&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;b&gt;device crashes&lt;/b&gt;&lt;span&gt;. App crashes typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a&amp;nbsp;&lt;/span&gt;&lt;i&gt;CIQ_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;on the device, and contains information related to the crash that app developers may use to address the problem. Device crashes typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;i&gt;ERR_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN&lt;/i&gt;&lt;span&gt;&amp;nbsp;on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;When any log file exceeds 5kb, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/i&gt;&lt;span&gt;, and a new log will be started. Any old .BAK files will be overwritten when the archive occurs, so the max space a log can reach is ~10kb.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;9. I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, whether they support version 1.2.x, 1.3.x, or 2.1.x.&lt;br /&gt;&lt;br /&gt;Anything built for 1.2.x devices will work on 1.3.x and 2.1.x devices, so it&amp;#39;s the most inclusive approach as long as you don&amp;#39;t need the newest features for your app. Building for 2.1.x will limit the devices you can target, but will give you access to all of the latest goodies.&lt;br /&gt;&lt;br /&gt;In the 2.1.2 SDK release, we added an option to the App Export Wizard that allows you to select a target Connect IQ version, which limits the selectable target devices to only those that support the Connect IQ version you&amp;#39;ve chosen. The only decision for you to make is which devices you would like to support. Here&amp;#39;s a handy-dandy table to help with that choice:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.2.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.4.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;2.1.x Devices (Biker)&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;epix&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;Approach S60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo Titanium&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Charlie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 230&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 520&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 235&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 630&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 920XT&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3 HR&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 735XT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 935&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;tactix Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5S&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5X&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix Chronos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Oregon 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Rino 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive HR&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;10. My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;With GCM for Android there is an issue where it sets a value as a Float when a Number is expected. It&amp;#39;s good practice to check the value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="bbcode_container"&gt;
&lt;div class="bbcode_description"&gt;&lt;/div&gt;
&lt;pre class="bbcode_code"&gt;&lt;span style="font-family:inherit;"&gt;&lt;b&gt;11. I think that I&amp;#39;ve found a bug with CIQ. Where do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a bug in the platform we have a Connect IQ Bug Reports Sub-Forum&amp;nbsp;&lt;a href="https://forums.garmin.com/forumdisplay.php?623-Connect-IQ-Bug-Reports" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;. Please make sure to read the&amp;nbsp;&lt;a href="https://forums.garmin.com/showthread.php?366516-Bug-Reports-Forum-Rules" rel="noopener noreferrer" target="_blank"&gt;rules sticky thread&lt;/a&gt;&amp;nbsp;and follow the directions there. If you post about a bug in the regular forums your thread may be moved or deleted.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;12. I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We added a functionality in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.1.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;CIQ_LOG.txt&amp;nbsp;file as a &amp;quot;Too many arguments&amp;quot; error, signifying the argument count check has failed.&lt;br /&gt;&lt;br /&gt;In most cases, the culprits behind this &amp;quot;Too many arguments&amp;quot; issue are missing&amp;nbsp;&amp;#39;state&amp;#39;&amp;nbsp;arguments for&amp;nbsp;onStart()&amp;nbsp;and&amp;nbsp;onStop(). These are currently unused argument and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly. Another example that can cause this is something like an&amp;nbsp;initialize()&amp;nbsp;function for a Drawable, which takes an array of options but to which none are passed.&lt;br /&gt;&lt;br /&gt;The new minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (2.1.x), B (1.3.x), and C (1.2.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Available Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What We Build&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.1.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.3.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B,&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;It can sometimes be difficult to troubleshoot this issue due to a bug in our build system. The Build For Device Wizard may build a PRG for a target VM version lower than expected for a given device. The result is that a PRG made with the Build For Device Wizard will operate without issue on a device, but the same app will fail with a &amp;quot;Too many arguments&amp;quot; error when using a PRG from the App Export Wizard (i.e. installed from the store). As a consequence, it can be difficult to obtain a useful call stack in the&amp;nbsp;CIQ_LOG.txt. We have a fix for this that will be included in an upcoming release of the SDK.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/2</link><pubDate>Fri, 29 Mar 2019 19:40:48 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Former Member</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 2 posted to Wiki by Former Member on 3/29/2019 7:40:48 PM&lt;br /&gt;
&lt;p&gt;&lt;span&gt;Welcome to the Connect IQ forums!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Below are some of the most common questions and answers we see on the forums. We&amp;#39;ll add to the FAQ over time, so check back now and then for updates!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Definitions&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;app - Generic term for all Connect IQ four application types: watch face, watch app, widget, and data field. The &amp;quot;watch-app&amp;quot; type is commonly just referred to as an &amp;quot;application&amp;quot; and may run on non-watch-like devices like the Edge or Oregon series devices.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;APAC - Asia-Pacific, which includes China, Taiwan, Japan, Indonesia, Malaysia, and Singapore&lt;/span&gt;&lt;br /&gt;&lt;span&gt;API -&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/api-docs/" rel="noopener noreferrer" target="_blank"&gt;Application Programming Interface&lt;/a&gt;&lt;span&gt;; the specific software routines supported by the SDK used to write Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;span&gt;CIQ - Connect IQ&lt;/span&gt;&lt;br /&gt;&lt;span&gt;GCM - Garmin Connect Mobile&lt;/span&gt;&lt;br /&gt;&lt;span&gt;GE - Garmin Express&lt;/span&gt;&lt;br /&gt;&lt;span&gt;SDK -&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Software Development Kit&lt;/a&gt;&lt;span&gt;; the tool set which developers use to create Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;span&gt;VM - Virtual Machine; the software on Garmin devices that runs Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Where can I download the SDK?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;You can find noth Mac and Windows version of the SDK at developer.garmin.com:&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. How do I get started with Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good references to start gaining familiarity with Monkey C and Connect IQ. These are also included with the SDK as PDFs for offline reference. The SDK also includes a set of sample apps that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on other Garmin web sites, including this forum, is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?268566-CHARGING-for-something-in-the-App-store-Isn-t-this-forbidden" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...this-forbidden&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4. Can I display seconds on my watch face?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, you can! However, a priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Watch faces update at once a minute in low power mode, and once a second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then return to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. You can find out more about the low power and full power mode transition in the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;, or read about the specifics of detecting these transitions in the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?174527-Watchface-with-Seconds" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...e-with-Seconds&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5. How do I format output padded with leading zeros?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as 12:05:05 rather than 12:5:5. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a&amp;nbsp;&lt;/span&gt;&lt;b&gt;&amp;quot;%02d&amp;quot;&lt;/b&gt;&lt;span&gt;&amp;nbsp;format specifier.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;A common error is to specify a format of &amp;quot;%.2d&amp;quot; or &amp;quot;%0.2d&amp;quot;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &amp;#39;0&amp;#39; flag to specify padding with leading zeros for d, i, o, u, x, X, a, A, e, f, F, g, and G conversions. In addition, if a precision is specified with &amp;#39;.&amp;#39;, according to C99 the the &amp;#39;0&amp;#39; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?255191-Formatted-Output" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...rmatted-Output&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;6. How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Tool window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should connect as mass storage and appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the resultant PRG file from the output location to /GARMIN/APPS on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;br /&gt;&lt;b&gt;7. I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and rely on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is still pending approval.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;8. How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The best way to currently test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;i&gt;System.println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&amp;nbsp;&lt;/span&gt;&lt;i&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements write to an&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/i&gt;&lt;span&gt;&amp;nbsp;file in&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;. These log files are not automatically created, so must be manually created on the device and named to match the name of the app&amp;#39;s corresponding PRG file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/MYAPP.PRG&lt;/i&gt;&lt;span&gt;, you must create&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/i&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Aside from this basic debugging technique, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;&lt;b&gt;app crashes&lt;/b&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;b&gt;device crashes&lt;/b&gt;&lt;span&gt;. App crashes typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a&amp;nbsp;&lt;/span&gt;&lt;i&gt;CIQ_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;on the device, and contains information related to the crash that app developers may use to address the problem. Device crashes typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;i&gt;ERR_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN&lt;/i&gt;&lt;span&gt;&amp;nbsp;on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;When any log file exceeds 5kb, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/i&gt;&lt;span&gt;, and a new log will be started. Any old .BAK files will be overwritten when the archive occurs, so the max space a log can reach is ~10kb.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;9. I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, whether they support version 1.2.x, 1.3.x, or 2.1.x.&lt;br /&gt;&lt;br /&gt;Anything built for 1.2.x devices will work on 1.3.x and 2.1.x devices, so it&amp;#39;s the most inclusive approach as long as you don&amp;#39;t need the newest features for your app. Building for 2.1.x will limit the devices you can target, but will give you access to all of the latest goodies.&lt;br /&gt;&lt;br /&gt;In the 2.1.2 SDK release, we added an option to the App Export Wizard that allows you to select a target Connect IQ version, which limits the selectable target devices to only those that support the Connect IQ version you&amp;#39;ve chosen. The only decision for you to make is which devices you would like to support. Here&amp;#39;s a handy-dandy table to help with that choice:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.2.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.4.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;2.1.x Devices (Biker)&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;epix&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;Approach S60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo Titanium&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Charlie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 230&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 520&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 235&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 630&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 920XT&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3 HR&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 735XT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 935&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;tactix Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5S&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5X&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix Chronos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Oregon 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Rino 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive HR&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;10. My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;With GCM for Android there is an issue where it sets a value as a Float when a Number is expected. It&amp;#39;s good practice to check the value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="java"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="bbcode_container"&gt;
&lt;div class="bbcode_description"&gt;&lt;/div&gt;
&lt;pre class="bbcode_code"&gt;&lt;span&gt;&lt;b&gt;11. I think that I&amp;#39;ve found a bug with CIQ. Where do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a bug in the platform we have a Connect IQ Bug Reports Sub-Forum&amp;nbsp;&lt;a href="https://forums.garmin.com/forumdisplay.php?623-Connect-IQ-Bug-Reports" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;. Please make sure to read the&amp;nbsp;&lt;a href="https://forums.garmin.com/showthread.php?366516-Bug-Reports-Forum-Rules" rel="noopener noreferrer" target="_blank"&gt;rules sticky thread&lt;/a&gt;&amp;nbsp;and follow the directions there. If you post about a bug in the regular forums your thread may be moved or deleted.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;12. I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We added a functionality in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.1.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;CIQ_LOG.txt&amp;nbsp;file as a &amp;quot;Too many arguments&amp;quot; error, signifying the argument count check has failed.&lt;br /&gt;&lt;br /&gt;In most cases, the culprits behind this &amp;quot;Too many arguments&amp;quot; issue are missing&amp;nbsp;&amp;#39;state&amp;#39;&amp;nbsp;arguments for&amp;nbsp;onStart()&amp;nbsp;and&amp;nbsp;onStop(). These are currently unused argument and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly. Another example that can cause this is something like an&amp;nbsp;initialize()&amp;nbsp;function for a Drawable, which takes an array of options but to which none are passed.&lt;br /&gt;&lt;br /&gt;The new minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (2.1.x), B (1.3.x), and C (1.2.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Available Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What We Build&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.1.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.3.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B,&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;It can sometimes be difficult to troubleshoot this issue due to a bug in our build system. The Build For Device Wizard may build a PRG for a target VM version lower than expected for a given device. The result is that a PRG made with the Build For Device Wizard will operate without issue on a device, but the same app will fail with a &amp;quot;Too many arguments&amp;quot; error when using a PRG from the App Export Wizard (i.e. installed from the store). As a consequence, it can be difficult to obtain a useful call stack in the&amp;nbsp;CIQ_LOG.txt. We have a fix for this that will be included in an upcoming release of the SDK.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item><item><title>New Developer FAQ</title><link>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq/revision/1</link><pubDate>Fri, 29 Mar 2019 19:39:09 GMT</pubDate><guid isPermaLink="false">a9571b57-dd57-479e-8763-8f8a603e40aa:f550ecc7-adab-4078-99fc-58b61b8587dd</guid><dc:creator>Former Member</dc:creator><comments>https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#comments</comments><description>Revision 1 posted to Wiki by Former Member on 3/29/2019 7:39:09 PM&lt;br /&gt;
&lt;p&gt;&lt;span&gt;Welcome to the Connect IQ forums!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Below are some of the most common questions and answers we see on the forums. We&amp;#39;ll add to the FAQ over time, so check back now and then for updates!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Definitions&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;app - Generic term for all Connect IQ four application types: watch face, watch app, widget, and data field. The &amp;quot;watch-app&amp;quot; type is commonly just referred to as an &amp;quot;application&amp;quot; and may run on non-watch-like devices like the Edge or Oregon series devices.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;APAC - Asia-Pacific, which includes China, Taiwan, Japan, Indonesia, Malaysia, and Singapore&lt;/span&gt;&lt;br /&gt;&lt;span&gt;API -&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/api-docs/" rel="noopener noreferrer" target="_blank"&gt;Application Programming Interface&lt;/a&gt;&lt;span&gt;; the specific software routines supported by the SDK used to write Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;span&gt;CIQ - Connect IQ&lt;/span&gt;&lt;br /&gt;&lt;span&gt;GCM - Garmin Connect Mobile&lt;/span&gt;&lt;br /&gt;&lt;span&gt;GE - Garmin Express&lt;/span&gt;&lt;br /&gt;&lt;span&gt;SDK -&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Software Development Kit&lt;/a&gt;&lt;span&gt;; the tool set which developers use to create Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;span&gt;VM - Virtual Machine; the software on Garmin devices that runs Connect IQ apps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Where can I download the SDK?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;You can find noth Mac and Windows version of the SDK at developer.garmin.com:&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;http://developer.garmin.com/connect-iq/sdk/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. How do I get started with Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/" rel="noopener noreferrer" target="_blank"&gt;Programmer&amp;#39;s Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;&amp;nbsp;are good references to start gaining familiarity with Monkey C and Connect IQ. These are also included with the SDK as PDFs for offline reference. The SDK also includes a set of sample apps that demonstrate the capabilities of Connect IQ.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;If you have questions along the way, these forums are the best place to go for assistance. Many questions have already been answered in previously posted threads, however both the Connect IQ team and several experienced developers monitor the forums to answer new questions or respond to issues you may encounter.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Am I allowed to charge for my app though the Connect IQ app store?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, you are! It is acceptable to list prices, link to payment sites, or ask for donations on the Connect IQ app store as long as solicitations are related to your app. The app store falls under the the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/sdk/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ SDK License Agreement&lt;/a&gt;&lt;span&gt;, which does not forbid solicitation for sales of apps by app developers. However, solicitation for business on other Garmin web sites, including this forum, is prohibited but Garmin&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.garmin.com/en-US/legal/terms-of-use" rel="noopener noreferrer" target="_blank"&gt;Terms of Use&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?268566-CHARGING-for-something-in-the-App-store-Isn-t-this-forbidden" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...this-forbidden&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4. Can I display seconds on my watch face?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, you can! However, a priority of Connect IQ is the preservation of battery life, so we have a system in place that governs how often watch faces may be updated. Watch faces update at once a minute in low power mode, and once a second when in full power mode. The watch will enter full power mode for a few seconds when the user gestures to look at it, and then return to low power mode. Developers will often detect this transition to full power mode, display a seconds indicator for a few moments, and then hide the seconds indicator once the device returns to low power mode. You can find out more about the low power and full power mode transition in the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/connect-iq/user-experience-guide/" rel="noopener noreferrer" target="_blank"&gt;User Experience Guide&lt;/a&gt;&lt;span&gt;, or read about the specifics of detecting these transitions in the&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/WatchUi/WatchFace.html" rel="noopener noreferrer" target="_blank"&gt;API Docs&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?174527-Watchface-with-Seconds" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...e-with-Seconds&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5. How do I format output padded with leading zeros?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Many Connect IQ apps include time values that require leading zeros. For example, time written in an HH:MM:SS format appears as 12:05:05 rather than 12:5:5. Monkey C includes&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Lang.html#format-instance_method" rel="noopener noreferrer" target="_blank"&gt;string formatting functions&lt;/a&gt;&lt;span&gt;&amp;nbsp;that can get this job done using a&amp;nbsp;&lt;/span&gt;&lt;b&gt;&amp;quot;%02d&amp;quot;&lt;/b&gt;&lt;span&gt;&amp;nbsp;format specifier.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;A common error is to specify a format of &amp;quot;%.2d&amp;quot; or &amp;quot;%0.2d&amp;quot;. This may pad a decimal with leading zeros in some languages, such as in C++&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.cplusplus.com/reference/cstdio/printf/" rel="noopener noreferrer" target="_blank"&gt;printf()&lt;/a&gt;&lt;span&gt;&amp;nbsp;function, but Monkey C follows the&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf" rel="noopener noreferrer" target="_blank"&gt;C99 standard&lt;/a&gt;&lt;span&gt;. C99 requires the &amp;#39;0&amp;#39; flag to specify padding with leading zeros for d, i, o, u, x, X, a, A, e, f, F, g, and G conversions. In addition, if a precision is specified with &amp;#39;.&amp;#39;, according to C99 the the &amp;#39;0&amp;#39; flag is ignored.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.garmin.com/showthread.php?255191-Formatted-Output" rel="noopener noreferrer" target="_blank"&gt;https://forums.garmin.com/showthread...rmatted-Output&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;6. How can I load the apps I develop to my device for testing purposes?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Apps are typically installed to devices via the&amp;nbsp;&lt;/span&gt;&lt;a href="https://apps.garmin.com/en-US/" rel="noopener noreferrer" target="_blank"&gt;Connect IQ App Store&lt;/a&gt;&lt;span&gt;, but it&amp;#39;s often useful to side-load an app to a device for testing without having to first upload a version to the app store. Here&amp;#39;s how:&lt;/span&gt;&lt;/p&gt;
&lt;ol class="decimal"&gt;
&lt;li&gt;In Eclipse, choose&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Connect IQ &amp;gt; Build for Device Wizard&amp;hellip;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;In the Build for Device Tool window:
&lt;ul&gt;
&lt;li&gt;Choose the project you wish to build&lt;/li&gt;
&lt;li&gt;Choose the target device&lt;/li&gt;
&lt;li&gt;Set an output location&lt;/li&gt;
&lt;li&gt;Click&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;Finish&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your device to the computer via USB (it should connect as mass storage and appear as a drive)&lt;/li&gt;
&lt;li&gt;Copy the resultant PRG file from the output location to /GARMIN/APPS on your device&lt;/li&gt;
&lt;li&gt;Disconnect your device; the app should be available for use&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;br /&gt;&lt;b&gt;7. I have side-loaded an app as described above, but app settings won&amp;#39;t work. Why is this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/" rel="noopener noreferrer" target="_blank"&gt;App settings&lt;/a&gt;&lt;span&gt;&amp;nbsp;allow user to configure an app via&amp;nbsp;&lt;/span&gt;&lt;a href="http://software.garmin.com/en-US/express.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Express&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a href="https://buy.garmin.com/en-US/US/on-the-go/apps/garmin-connect-mobile/prod125677.html" rel="noopener noreferrer" target="_blank"&gt;Garmin Connect Mobile&lt;/a&gt;&lt;span&gt;, and rely on the Connect IQ App Store to function properly. When an app is side loaded, this connection to the Connect IQ App Store is never established. If you have an app that uses app settings that needs to be tested, you may submit the app to the Connect IQ App Store and test out the settings features while the app is still pending approval.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;8. How can I test or debug Connect IQ apps I am developing?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The best way to currently test Connect IQ apps is to include&amp;nbsp;&lt;/span&gt;&lt;i&gt;System.println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements at strategic points in your app. Within Eclipse, these&amp;nbsp;&lt;/span&gt;&lt;i&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements will output to the console. On a device,&lt;/span&gt;&lt;i&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;println()&lt;/i&gt;&lt;span&gt;&amp;nbsp;statements write to an&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;APPNAME&amp;gt;.TXT&lt;/i&gt;&lt;span&gt;&amp;nbsp;file in&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;. These log files are not automatically created, so must be manually created on the device and named to match the name of the app&amp;#39;s corresponding PRG file. For example, to log output from&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/MYAPP.PRG&lt;/i&gt;&lt;span&gt;, you must create&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS/MYAPP.TXT&lt;/i&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Aside from this basic debugging technique, there are two general types of on-device crash that can occur related to Connect IQ, which each generate log files:&amp;nbsp;&lt;/span&gt;&lt;b&gt;app crashes&lt;/b&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;b&gt;device crashes&lt;/b&gt;&lt;span&gt;. App crashes typically result in an app quitting unexpectedly or displaying an &amp;#39;IQ!&amp;#39; icon, but does not cause the entire device to crash or reboot. This kind of crash is most commonly due to a bug in an app, though it can also be due to a bug in Connect IQ itself&lt;/span&gt;&lt;i&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;Whenever an app crash occurs, a&amp;nbsp;&lt;/span&gt;&lt;i&gt;CIQ_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN/APPS/LOGS&lt;/i&gt;&lt;span&gt;on the device, and contains information related to the crash that app developers may use to address the problem. Device crashes typically cause the device to reboot or freeze. These indicate a Connect IQ or device firmware bug, and should be much less common than app crashes. When a device crash occurs, an&amp;nbsp;&lt;/span&gt;&lt;i&gt;ERR_LOG.txt&lt;/i&gt;&lt;span&gt;&amp;nbsp;file is written to&amp;nbsp;&lt;/span&gt;&lt;i&gt;/GARMIN&lt;/i&gt;&lt;span&gt;&amp;nbsp;on the device, containing stack trace information related to the crash. Garmin&amp;#39;s device teams can take a look at the device crash logs to determine the cause of the crash and will typically provide a fix in a future firmware release.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;When any log file exceeds 5kb, it will automatically be archived to&amp;nbsp;&lt;/span&gt;&lt;i&gt;&amp;lt;LOGNAME&amp;gt;.BAK&lt;/i&gt;&lt;span&gt;, and a new log will be started. Any old .BAK files will be overwritten when the archive occurs, so the max space a log can reach is ~10kb.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;9. I just downloaded the latest SDK. Can I build apps that will work on any device that supports Connect IQ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Yes! We have designed the SDK so that you can target any Connect IQ-compatible devices, whether they support version 1.2.x, 1.3.x, or 2.1.x.&lt;br /&gt;&lt;br /&gt;Anything built for 1.2.x devices will work on 1.3.x and 2.1.x devices, so it&amp;#39;s the most inclusive approach as long as you don&amp;#39;t need the newest features for your app. Building for 2.1.x will limit the devices you can target, but will give you access to all of the latest goodies.&lt;br /&gt;&lt;br /&gt;In the 2.1.2 SDK release, we added an option to the App Export Wizard that allows you to select a target Connect IQ version, which limits the selectable target devices to only those that support the Connect IQ version you&amp;#39;ve chosen. The only decision for you to make is which devices you would like to support. Here&amp;#39;s a handy-dandy table to help with that choice:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.2.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;1.4.x Devices (Aikido)&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;2.1.x Devices (Biker)&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;epix&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;Approach S60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Bravo Titanium&lt;/td&gt;
&lt;td class="text_table_td"&gt;D2 Charlie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 230&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 520&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 235&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 630&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 820&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 920XT&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Edge Explore 1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 3 HR&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 735XT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 3&lt;/td&gt;
&lt;td class="text_table_td"&gt;Forerunner 935&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;tactix Bravo&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5S&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix 5X&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;fenix Chronos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Oregon 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;quatix 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;Rino 7xx Series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;vivoactive HR&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;10. My app uses app settings, and it sometimes crashes after changing the settings, but the rest of the time it works fine. What can cause this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;With GCM for Android there is an issue where it sets a value as a Float when a Number is expected. It&amp;#39;s good practice to check the value to ensure it&amp;#39;s the expected type. For example, this code will check for a null value and convert the value to a Number as long as it is not null. Otherwise, a default value is returned:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="bbcode_container"&gt;
&lt;div class="bbcode_description"&gt;Code:&lt;/div&gt;
&lt;pre class="bbcode_code"&gt;function readKeyInt(myApp,key,thisDefault) {
    var value = myApp.getProperty(key);
    if(value == null || !(value instanceof Number)) {
        if(value != null) {
            value = value.toNumber();
        } else {
            value = thisDefault;
        }
    }
    return value;
}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;11. I think that I&amp;#39;ve found a bug with CIQ. Where do I report it?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you think you&amp;#39;ve found a bug in the platform we have a Connect IQ Bug Reports Sub-Forum&amp;nbsp;&lt;a href="https://forums.garmin.com/forumdisplay.php?623-Connect-IQ-Bug-Reports" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;. Please make sure to read the&amp;nbsp;&lt;a href="https://forums.garmin.com/showthread.php?366516-Bug-Reports-Forum-Rules" rel="noopener noreferrer" target="_blank"&gt;rules sticky thread&lt;/a&gt;&amp;nbsp;and follow the directions there. If you post about a bug in the regular forums your thread may be moved or deleted.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;12. I keep getting a &amp;quot;Too Many Arguments Error&amp;quot;, but I never used to get this. What is going on?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We added a functionality in the 2.1.2 SDK release to perform an argument count check on function and method calls. This was included as part of a larger security effort, which includes things like app signing and encryption of app data. Overall, this is a good thing, since it promotes more robust source code prevents some potential security exploits. Unfortunately, it has also caused some apps to crash on 1.3.x and 2.1.x devices when built with the 2.1.2 SDK even though these same apps execute without issue when built with earlier SDK releases. This kind of crash appears in the&amp;nbsp;CIQ_LOG.txt&amp;nbsp;file as a &amp;quot;Too many arguments&amp;quot; error, signifying the argument count check has failed.&lt;br /&gt;&lt;br /&gt;In most cases, the culprits behind this &amp;quot;Too many arguments&amp;quot; issue are missing&amp;nbsp;&amp;#39;state&amp;#39;&amp;nbsp;arguments for&amp;nbsp;onStart()&amp;nbsp;and&amp;nbsp;onStop(). These are currently unused argument and were passed implicitly in earlier versions of Connect IQ, but must now be included explicitly. Another example that can cause this is something like an&amp;nbsp;initialize()&amp;nbsp;function for a Drawable, which takes an array of options but to which none are passed.&lt;br /&gt;&lt;br /&gt;The new minimum SDK selector is designed to build for the highest supported SDK for each device. For example, consider this set of devices: device A (2.1.x), B (1.3.x), and C (1.2.x). The table below illustrates how the build system is designed to function:&lt;/span&gt;&lt;/p&gt;
&lt;div class="text_table_"&gt;
&lt;table class="text_table" align="center"&gt;
&lt;tbody&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Minimum SDK Selected&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;Available Target Devices&lt;/b&gt;&lt;/td&gt;
&lt;td class="text_table_td"&gt;&lt;b&gt;What We Build&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;2.1.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.3.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B,&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="text_table_tr" valign="top"&gt;
&lt;td class="text_table_td"&gt;1.2.x&lt;/td&gt;
&lt;td class="text_table_td"&gt;A, B, C&lt;/td&gt;
&lt;td class="text_table_td"&gt;2.1.x PRG for A, 1.3.x PRG for B, 1.2.x PRG for C&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;It can sometimes be difficult to troubleshoot this issue due to a bug in our build system. The Build For Device Wizard may build a PRG for a target VM version lower than expected for a given device. The result is that a PRG made with the Build For Device Wizard will operate without issue on a device, but the same app will fail with a &amp;quot;Too many arguments&amp;quot; error when using a PRG from the App Export Wizard (i.e. installed from the store). As a consequence, it can be difficult to obtain a useful call stack in the&amp;nbsp;CIQ_LOG.txt. We have a fix for this that will be included in an upcoming release of the SDK.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Getting Started, New Developer, CIQ, Connect IQ, New&lt;/div&gt;
</description></item></channel></rss>