菜鸟教程小白 发表于 2022-12-11 19:54:16

android - 如何处理移动应用程序中过时的 api


                                            <p><p>虚构的情况如下:我有一个已发布到商店大约一年的移动应用程序(适用于 iOS 和 Android)。我正在准备新版本的应用程序。后端的一些 api 已过时或弃用。</p>

<p>问题是应用程序的用户如果不更新应用程序到新版本,应用程序的运行会遇到问题,因为后端api已经被替换或删除。</p>

<p>问题是如何在成为问题之前处理这种情况?
对于不同版本的应用程序之间的过时功能,苹果或谷歌是否有任何指南?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>@Dimitris,这里您需要对旧应用程序进行强制更新。这可以使用应用程序配置文件来完成。基本上,您将拥有一个应用配置文件,其中包含带有以下键的 JSON:</p>

<p></p><div class="snippet"data-lang="js"data-hide="false"data-console="true"data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>{
   &#34;server&#34;:{
      &#34;app-server1-base-url&#34;:&#34;http://&#34;,
      &#34;status&#34;:{
         &#34;is-running&#34;:true,
         &#34;message&#34;:&#34;We are busy upgrading XYZ server with technology and features. We will be back soon. We apologize for the inconvenience and appreciate your patience. Thank you for using XYZ!&#34;
      },
      &#34;force-update&#34;:{
         &#34;status&#34;:false,
         &#34;message&#34;:&#34;Please download the latest version of XYZ from App Store to continue using the app. Thank You!&#34;
      }
   }
}</code></pre>

                                                <p style="font-size: 20px;">关于android - 如何处理移动应用程序中过时的 api,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/49431265/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/49431265/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: android - 如何处理移动应用程序中过时的 api