Update capacitor version
This commit is contained in:
parent
91155bce0a
commit
f3b3a86b32
610 changed files with 28718 additions and 7101 deletions
30
@capacitor/cli/dist/ios/common.js
vendored
30
@capacitor/cli/dist/ios/common.js
vendored
|
@ -1,9 +1,9 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.editProjectSettingsIOS = exports.resolvePlugin = exports.getIOSPlugins = exports.checkCocoaPods = exports.checkBundler = exports.checkIOSPackage = void 0;
|
||||
exports.getMajoriOSVersion = exports.editProjectSettingsIOS = exports.resolvePlugin = exports.getIOSPlugins = exports.checkCocoaPods = exports.checkBundler = exports.checkIOSPackage = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const utils_fs_1 = require("@ionic/utils-fs");
|
||||
const child_process_1 = require("child_process");
|
||||
const fs_extra_1 = require("fs-extra");
|
||||
const path_1 = require("path");
|
||||
const colors_1 = tslib_1.__importDefault(require("../colors"));
|
||||
const common_1 = require("../common");
|
||||
|
@ -42,8 +42,7 @@ async function checkBundler(config) {
|
|||
}
|
||||
exports.checkBundler = checkBundler;
|
||||
async function checkCocoaPods(config) {
|
||||
if (!(await (0, subprocess_1.isInstalled)(await config.ios.podPath)) &&
|
||||
config.cli.os === "mac" /* OS.Mac */) {
|
||||
if (!(await (0, subprocess_1.isInstalled)(await config.ios.podPath)) && config.cli.os === "mac" /* OS.Mac */) {
|
||||
return (`CocoaPods is not installed.\n` +
|
||||
`See this install guide: ${colors_1.default.strong('https://capacitorjs.com/docs/getting-started/environment-setup#homebrew')}`);
|
||||
}
|
||||
|
@ -71,8 +70,7 @@ async function resolvePlugin(plugin) {
|
|||
type: 1 /* PluginType.Cordova */,
|
||||
path: 'src/' + platform,
|
||||
};
|
||||
if ((0, cordova_1.getIncompatibleCordovaPlugins)(platform).includes(plugin.id) ||
|
||||
!(0, plugin_1.getPluginPlatform)(plugin, platform)) {
|
||||
if ((0, cordova_1.getIncompatibleCordovaPlugins)(platform).includes(plugin.id) || !(0, plugin_1.getPluginPlatform)(plugin, platform)) {
|
||||
plugin.ios.type = 2 /* PluginType.Incompatible */;
|
||||
}
|
||||
}
|
||||
|
@ -87,17 +85,21 @@ exports.resolvePlugin = resolvePlugin;
|
|||
*/
|
||||
async function editProjectSettingsIOS(config) {
|
||||
const appId = config.app.appId;
|
||||
const appName = config.app.appName
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
const appName = config.app.appName.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
||||
const pbxPath = `${config.ios.nativeXcodeProjDirAbs}/project.pbxproj`;
|
||||
const plistPath = (0, path_1.resolve)(config.ios.nativeTargetDirAbs, 'Info.plist');
|
||||
let plistContent = await (0, utils_fs_1.readFile)(plistPath, { encoding: 'utf-8' });
|
||||
let plistContent = await (0, fs_extra_1.readFile)(plistPath, { encoding: 'utf-8' });
|
||||
plistContent = plistContent.replace(/<key>CFBundleDisplayName<\/key>[\s\S]?\s+<string>([^<]*)<\/string>/, `<key>CFBundleDisplayName</key>\n <string>${appName}</string>`);
|
||||
let pbxContent = await (0, utils_fs_1.readFile)(pbxPath, { encoding: 'utf-8' });
|
||||
let pbxContent = await (0, fs_extra_1.readFile)(pbxPath, { encoding: 'utf-8' });
|
||||
pbxContent = pbxContent.replace(/PRODUCT_BUNDLE_IDENTIFIER = ([^;]+)/g, `PRODUCT_BUNDLE_IDENTIFIER = ${appId}`);
|
||||
await (0, utils_fs_1.writeFile)(plistPath, plistContent, { encoding: 'utf-8' });
|
||||
await (0, utils_fs_1.writeFile)(pbxPath, pbxContent, { encoding: 'utf-8' });
|
||||
await (0, fs_extra_1.writeFile)(plistPath, plistContent, { encoding: 'utf-8' });
|
||||
await (0, fs_extra_1.writeFile)(pbxPath, pbxContent, { encoding: 'utf-8' });
|
||||
}
|
||||
exports.editProjectSettingsIOS = editProjectSettingsIOS;
|
||||
function getMajoriOSVersion(config) {
|
||||
const pbx = (0, fs_extra_1.readFileSync)((0, path_1.join)(config.ios.nativeXcodeProjDirAbs, 'project.pbxproj'), 'utf-8');
|
||||
const searchString = 'IPHONEOS_DEPLOYMENT_TARGET = ';
|
||||
const iosVersion = pbx.substring(pbx.indexOf(searchString) + searchString.length, pbx.indexOf(searchString) + searchString.length + 2);
|
||||
return iosVersion;
|
||||
}
|
||||
exports.getMajoriOSVersion = getMajoriOSVersion;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue