![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@alitajs/cordova
Advanced tools
umi support cordova
1.安装 XCode
2.安装 xcode-select
xcode-select --install
弹出软件一直下一步就好。
3.安装 ios-deploy
sudo yarn global add ios-deploy
4.全局安装 Cordova
sudo yarn global add cordova
Configure in .umirc.js
,
yarn add @alitajs/cordova
export default {
plugins: [['@alitajs/cordova', options]],
};
Configure in config/config.js
,
export default {
appType: 'cordova',
};
如果你全局安装了 umi
,可以使用umi cordova --init --ios
如果你没有全局安装 umi
,可以在 package.json
里面添加 scripts
{
"scripts": {
"cordova-init": "umi cordova --init",
"cordova-add-ios": "umi cordova --ios",
"cordova-add-android": "umi cordova --android",
"start": "umi dev",
"start-cordova-android": "CORDOVA=android umi dev",
"build-cordova-android": "CORDOVA=android umi build",
"build": "umi build"
}
}
参数 | 说明 |
---|---|
--init | 初始化 Cordova 项目,添加配置文件和相关文件夹 |
--ios | 执行 cordova platforms add ios |
--android | 执行 cordova platforms add android |
默认使用的平台是 ios,如果开发安卓,需要设置环境变量
如果umi cordova --init --ios
一直没有动静,可以ctrl+c
关闭进程,手动执行cordova platforms add ios
开发环境执行 umi dev
dev 环境有热更新,如果使用手机查看,要求需要在统一个网络环境下。
编译执行umi build
使用xcode打开项目 ./platforms/ios/Tutorial.xcworkspace
选择虚拟机,执行。
虚拟机中查看效果
Xcode10 要修改编译系统 File->Workspace Setting 修改 Build System -> Legacy Build System
umi dev
和 umi build
的时候要设置环境变量CORDOVA=android
如果使用的是 Mac,可以通过命令安装 java 环境
brew cask install java
对安卓开发不熟悉的朋友,注意看右下角的窗口,会有提示需要安装 sdk,先装完 sdk。
The minSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file.
Open Manifest File
Move minSdkVersion to build file and sync project
点击 “Move minSdkVersion to build file and sync project”
接着点击运行项目,在 Android Studio 右上角,点击绿色小三角形按钮。
然后选择一个模拟器,如果没有就点击左下角新建,随便选一个你喜欢的下载,然后弹出提示全部选择蓝色默认的选项一直下一步。(就是选择完成,安装,之类的)。
MIT
FAQs
umi support cordova
The npm package @alitajs/cordova receives a total of 0 weekly downloads. As such, @alitajs/cordova popularity was classified as not popular.
We found that @alitajs/cordova demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.