<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [TOC] # 什么是Cordova Apache Cordova是一個開源的移動開發框架。允許你用標準的web技術-HTML5,CSS3和JavaScript做跨平臺開發。 應用在每個平臺的具體執行被封裝了起來,并依靠符合標準的統一API綁定去訪問每個設備的功能,比如說:傳感器、數據、網絡狀態等。 # 使用Apache Cordova的人群 1. 移動應用開發者,想擴展一個應用的使用平臺,而不通過每個平臺的語言和工具集重新實現。 2. web開發者,想包裝部署自己的web App將其分發到各個應用商店門戶。 3. 移動開發人員,希望將原生應用程序組件與可以訪問設備級API的WebView(特殊瀏覽器窗口)混合,**或者你想在原生和WebView組件之間開發一個插件接口。**。 # Cordova 適用于你的項目嗎? 1. Apache Cordova是一種開發移動App的很好選擇,它能以合理代價將App快速地交付市場。 2. 事實顯示,大部分使用Cordova創建的App是不成功的,并且由于這些App表現不佳,用戶在失望之余很快就棄用了它們。 3. 要降低失敗的風險,重在了解Cordova非常適合開發哪些類型的App。 4. Cordova不適用于醫療、游戲和金融App,但非常適合于商業、教育和聊天App,最好是生活、廣告和新聞App。 # [架構](http://cordova.apache.org/docs/en/8.x/guide/overview/index.html#architecture) ~略 # 參考 ## plugin.xml `plugin.xml` 的意義就是把插件所需要的資源按著規定的格式寫好,工程調用插件的時候會按著這些配置到指定位置尋找資源并整合到工程對應的位置里。 示例講解: ~~~ <?xml version="1.0" encoding="UTF-8" ?> <plugin xmlns="http://phonegap.com/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="com.justep.cordova.plugin.voiceManager" version="1.0.0"><!--id就是cordova_plugins.js里配置的插件的pluginId,version是插件版本,根據自己需要寫--> <engines> <engine name="cordova" version=">=3.3.0" /><!--指定cordova編譯的版本--> </engines> <name>voiceMode</name> <description>Switch audio playback mode</description> <js-module src="www/voice.js" name="voiceManager"><!--voice.js的目錄位置,navigator.voiceManager是被調用時候的名字--> <clobbers target="navigator.voiceManager" /> </js-module> <platform name="android"><!--android配置--> <config-file target="res/xml/config.xml" parent="/*"><!--對應config.xml里的配置寫在這里--> <feature name="voiceManager"> <param name="android-package" value="com.justep.cordova.plugin.voicemanager.VoiceManager" /> </feature> </config-file> <config-file target="AndroidManifest.xml" parent="/manifest"> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /><!--改變聲音模式所需要的權限--> </config-file> <source-file src="src/android/VoiceManager.java" target-dir="src/com/justep/cordova/plugin/voicemanager" /><!--VoiceManager.java的位置以及拷貝到工程后的地址--> </platform> <platform name="ios"> <source-file src="src/ios/CDVVoiceManager.m" /> <header-file src="src/ios/CDVVoiceManager.h" /> <config-file target="config.xml" parent="/widget"> <feature name="voiceManager"> <param name="ios-package" value="CDVVoiceManager"/> </feature> </config-file> </platform> </plugin> ~~~ ## [Hooks](http://cordova.apache.org/docs/en/8.x/guide/appdev/hooks/index.html) Cordova hook表示特殊的腳本,可以由應用程序和插件開發人員添加,甚至可以由您自己的構建系統定制Cordova命令。 ### 定義hooks 1. 在 `plugin.xml` 中定義 2. 在 `config.xml` 中定義 ## config.xml `config.xml` 控制了 Cordova應用程序的很多行為: 常用的有 id, name等,參考示例: ~~~ <?xml version='1.0' encoding='utf-8'?> <widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>HelloCordova</name> <description> A sample Apache Cordova application that responds to the deviceready event. </description> <author email="dev@cordova.apache.org" href="http://cordova.io"> Apache Cordova Team </author> <content src="index.html" /> <plugin name="cordova-plugin-sharesdk" spec="0.0.1"> <variable name="SHARESDK_IOS_APPKEY" value="636ed1972d16e" /> </plugin> <access origin="*" /> <allow-intent href="http://*/*" /> <allow-intent href="https://*/*" /> <allow-intent href="tel:*" /> <allow-intent href="sms:*" /> <allow-intent href="mailto:*" /> <allow-intent href="geo:*" /> <platform name="android"> <allow-intent href="market:*" /> </platform> <platform name="ios"> <allow-intent href="itms:*" /> <allow-intent href="itms-apps:*" /> </platform> </widget> ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看