
uniapp h5上传图片对图片进行压缩旋转处理
csdn博客地址:uniapp h5上传图片对图片进行旋转处理
场景:uniapp开发的h5项目,需要内嵌在app中运行,在项目首页有一块是自定义上传日历背景图,并且需要进行裁剪。
最开始直接使用的插件市场的插件,但是由于webview的原因,该项目内嵌app后在ios上出现了无法解决的bug。故弃用了插件,并且由于需求调整目前只进行图片的上传旋转处理。(下面着重旋转的处理)
思路:
1、参考vue的处理方法,需要exif.js 获取到图片meta信息中的旋转角度,故首先需要引入exif.js,(本人直接从bootcdn上搜索下载的exif.min.js )(使用import引入本地文件的方式尝试了下没有成功,放弃了。由于项目本身需要存在了引入第三方的js方法所以exifjs是通过动态添加js的方式全局引入的)
2、通过uni.chooseImage 获取到图片的临时路径,并且将blob临时路径转化为 file文件用于exif获取图片的旋转值
3、根据获取到旋转值(有:1 3 6 8),如下:
//如果方向角不为1,都需要进行旋转
switch (Orientation) {
case 6: //需要顺时针(向右)90度旋转
console.log('(向右)90度旋转');
break;
case 8: //需要逆时针(向左)90度旋转
console.log('向左)90度旋转');
break;
case 3: //需要180度旋转 转两次
console.log('需要180度旋转');
break;
default:
break;
}
4、根据网上搜索的处理图片旋转方法或者从往期vue的上传图博客中提到的,对图片进行旋转处理,最终拿到base64的图片信息然后对图片进行上传。(1.直接上传base64 ;2.将base64转化为blob文件后再传后台)
具体代码如下:
1、
choiceImg(){
var that = this;
let maxWidth = 500; //压缩图片最大宽度
let Orientation = 1;
uni.chooseImage({
count: 1, // 能够选择的图片数量
sizeType: ['original', 'compressed'], // original: 原图, compressed: 压缩图, 默认二者都有
sourceType: ['album'], // album: 从相册选择 camera: 相机拍照
success: res => {
let imgArr = res.tempFilePaths; // 所选择图片的临时路径数组
//BlobUrl转blob数据
uni.showToast({
icon: "none",
title: "图片处理中..."
})
//blob数据转file
this.objectURLToBlob(imgArr[0], function(blob) {
let files = new window.File([blob], 'file.name', { type: 'file.type' });
console.log('获取图片文件', files);
EXIF.getData(files, async function() {
let or = EXIF.getTag(this, 'Orientation'); //这个Orientation 就是我们判断需不需要旋转的值了,有1、3、6、8
console.log(or);
Orientation = or;
var img = null;
var canvas = null;
await that.comprossImage(imgArr[0], maxWidth, function(e) {
img = e.img;
canvas = e.canvas;
});
let baseStr = '';
//如果方向角不为1,都需要进行旋转
switch (Orientation) {
case 6: //需要顺时针(向右)90度旋转
console.log('(向右)90度旋转');
baseStr = that.rotateImg(img, 'right', canvas);
break;
case 8: //需要逆时针(向左)90度旋转
console.log('向左)90度旋转');
baseStr = rotateImg(img, 'left', canvas);
break;
case 3: //需要180度旋转 转两次
console.log('需要180度旋转');
baseStr = that.rotateImg(img, 'right', canvas, 2);
break;
default:
baseStr = that.rotateImg(img, '', canvas);
break;
}
});
});
}
});
}
2、1中使用到的将blob转化为file方法 和图片的压缩方法
objectURLToBlob(url, callback) {
var http = new XMLHttpRequest();
http.open('GET', url, true);
http.responseType = 'blob';
http.onload = function(e) {
if (this.status == 200 || this.status === 0) {
callback(this.response);
}
};
http.send();
},
async comprossImage(imgSrc, maxWidth, func) {
if (!imgSrc) return 0;
return new Promise((resolve, reject) => {
uni.getImageInfo({
src: imgSrc,
success(res) {
let img = new Image();
img.src = res.path;
console.log(img);
let canvas = document.createElement('canvas');
let obj = new Object();
obj.img = img;
obj.canvas = canvas;
resolve(func(obj));
}
});
});
},
3、图片的旋转处理
rotateImg(img, direction, canvas, times = 1) {
console.log('开始旋转');
//最小与最大旋转方向,图片旋转4次后回到原方向
var min_step = 0;
var max_step = 3;
if (img == null) return;
//img的高度和宽度不能在img元素隐藏后获取,否则会出错
var height = img.height;
var width = img.width;
let maxWidth = 500;
let canvasWidth = width; //图片原始长宽
let canvasHeight = height;
let base = canvasWidth / canvasHeight;
console.log(maxWidth);
if (canvasWidth > maxWidth) {
canvasWidth = maxWidth;
canvasHeight = Math.floor(canvasWidth / base);
}
width = canvasWidth;
height = canvasHeight;
var step = 0;
if (step == null) {
step = min_step;
}
if (direction == 'right') {
step += times;
//旋转到原位置,即超过最大值
step > max_step && (step = min_step);
} else if (direction == 'left') {
step -= times;
step < min_step && (step = max_step);
} else {
//不旋转
step = 0;
}
//旋转角度以弧度值为参数
var degree = (step * 90 * Math.PI) / 180;
var ctx = canvas.getContext('2d');
// console.log(degree)
// console.log(step)
switch (step) {
case 1:
console.log('右旋转 90度');
canvas.width = height;
canvas.height = width;
ctx.rotate(degree);
ctx.drawImage(img, 0, -height, width, height);
break;
case 2:
//console.log('旋转 180度')
canvas.width = width;
canvas.height = height;
ctx.rotate(degree);
ctx.drawImage(img, -width, -height, width, height);
break;
case 3:
console.log('左旋转 90度');
canvas.width = height;
canvas.height = width;
ctx.rotate(degree);
ctx.drawImage(img, -width, 0, width, height);
break;
default:
//不旋转
canvas.width = width;
canvas.height = height;
ctx.drawImage(img, 0, 0, width, height);
break;
}
let baseStr = canvas.toDataURL('image/jpeg', 1);
// console.log(baseStr)
// return baseStr;
// replace("data:image/jpeg;base64,", "")
// 将base64转化为blob文件进行图片上传,(考虑到转化后再上传耗费时间暂时没有使用,如果需要base64ToPath 方法可百度或者私信我)
// base64ToPath(baseStr).then(tempPath => {
// this.uploadBgImg(tempPath)
// });
// 自定义上传请求
this.uploadBaseImg(baseStr);
},
csdn博客地址:uniapp h5上传图片对图片进行旋转处理
场景:uniapp开发的h5项目,需要内嵌在app中运行,在项目首页有一块是自定义上传日历背景图,并且需要进行裁剪。
最开始直接使用的插件市场的插件,但是由于webview的原因,该项目内嵌app后在ios上出现了无法解决的bug。故弃用了插件,并且由于需求调整目前只进行图片的上传旋转处理。(下面着重旋转的处理)
思路:
1、参考vue的处理方法,需要exif.js 获取到图片meta信息中的旋转角度,故首先需要引入exif.js,(本人直接从bootcdn上搜索下载的exif.min.js )(使用import引入本地文件的方式尝试了下没有成功,放弃了。由于项目本身需要存在了引入第三方的js方法所以exifjs是通过动态添加js的方式全局引入的)
2、通过uni.chooseImage 获取到图片的临时路径,并且将blob临时路径转化为 file文件用于exif获取图片的旋转值
3、根据获取到旋转值(有:1 3 6 8),如下:
//如果方向角不为1,都需要进行旋转
switch (Orientation) {
case 6: //需要顺时针(向右)90度旋转
console.log('(向右)90度旋转');
break;
case 8: //需要逆时针(向左)90度旋转
console.log('向左)90度旋转');
break;
case 3: //需要180度旋转 转两次
console.log('需要180度旋转');
break;
default:
break;
}
4、根据网上搜索的处理图片旋转方法或者从往期vue的上传图博客中提到的,对图片进行旋转处理,最终拿到base64的图片信息然后对图片进行上传。(1.直接上传base64 ;2.将base64转化为blob文件后再传后台)
具体代码如下:
1、
choiceImg(){
var that = this;
let maxWidth = 500; //压缩图片最大宽度
let Orientation = 1;
uni.chooseImage({
count: 1, // 能够选择的图片数量
sizeType: ['original', 'compressed'], // original: 原图, compressed: 压缩图, 默认二者都有
sourceType: ['album'], // album: 从相册选择 camera: 相机拍照
success: res => {
let imgArr = res.tempFilePaths; // 所选择图片的临时路径数组
//BlobUrl转blob数据
uni.showToast({
icon: "none",
title: "图片处理中..."
})
//blob数据转file
this.objectURLToBlob(imgArr[0], function(blob) {
let files = new window.File([blob], 'file.name', { type: 'file.type' });
console.log('获取图片文件', files);
EXIF.getData(files, async function() {
let or = EXIF.getTag(this, 'Orientation'); //这个Orientation 就是我们判断需不需要旋转的值了,有1、3、6、8
console.log(or);
Orientation = or;
var img = null;
var canvas = null;
await that.comprossImage(imgArr[0], maxWidth, function(e) {
img = e.img;
canvas = e.canvas;
});
let baseStr = '';
//如果方向角不为1,都需要进行旋转
switch (Orientation) {
case 6: //需要顺时针(向右)90度旋转
console.log('(向右)90度旋转');
baseStr = that.rotateImg(img, 'right', canvas);
break;
case 8: //需要逆时针(向左)90度旋转
console.log('向左)90度旋转');
baseStr = rotateImg(img, 'left', canvas);
break;
case 3: //需要180度旋转 转两次
console.log('需要180度旋转');
baseStr = that.rotateImg(img, 'right', canvas, 2);
break;
default:
baseStr = that.rotateImg(img, '', canvas);
break;
}
});
});
}
});
}
2、1中使用到的将blob转化为file方法 和图片的压缩方法
objectURLToBlob(url, callback) {
var http = new XMLHttpRequest();
http.open('GET', url, true);
http.responseType = 'blob';
http.onload = function(e) {
if (this.status == 200 || this.status === 0) {
callback(this.response);
}
};
http.send();
},
async comprossImage(imgSrc, maxWidth, func) {
if (!imgSrc) return 0;
return new Promise((resolve, reject) => {
uni.getImageInfo({
src: imgSrc,
success(res) {
let img = new Image();
img.src = res.path;
console.log(img);
let canvas = document.createElement('canvas');
let obj = new Object();
obj.img = img;
obj.canvas = canvas;
resolve(func(obj));
}
});
});
},
3、图片的旋转处理
rotateImg(img, direction, canvas, times = 1) {
console.log('开始旋转');
//最小与最大旋转方向,图片旋转4次后回到原方向
var min_step = 0;
var max_step = 3;
if (img == null) return;
//img的高度和宽度不能在img元素隐藏后获取,否则会出错
var height = img.height;
var width = img.width;
let maxWidth = 500;
let canvasWidth = width; //图片原始长宽
let canvasHeight = height;
let base = canvasWidth / canvasHeight;
console.log(maxWidth);
if (canvasWidth > maxWidth) {
canvasWidth = maxWidth;
canvasHeight = Math.floor(canvasWidth / base);
}
width = canvasWidth;
height = canvasHeight;
var step = 0;
if (step == null) {
step = min_step;
}
if (direction == 'right') {
step += times;
//旋转到原位置,即超过最大值
step > max_step && (step = min_step);
} else if (direction == 'left') {
step -= times;
step < min_step && (step = max_step);
} else {
//不旋转
step = 0;
}
//旋转角度以弧度值为参数
var degree = (step * 90 * Math.PI) / 180;
var ctx = canvas.getContext('2d');
// console.log(degree)
// console.log(step)
switch (step) {
case 1:
console.log('右旋转 90度');
canvas.width = height;
canvas.height = width;
ctx.rotate(degree);
ctx.drawImage(img, 0, -height, width, height);
break;
case 2:
//console.log('旋转 180度')
canvas.width = width;
canvas.height = height;
ctx.rotate(degree);
ctx.drawImage(img, -width, -height, width, height);
break;
case 3:
console.log('左旋转 90度');
canvas.width = height;
canvas.height = width;
ctx.rotate(degree);
ctx.drawImage(img, -width, 0, width, height);
break;
default:
//不旋转
canvas.width = width;
canvas.height = height;
ctx.drawImage(img, 0, 0, width, height);
break;
}
let baseStr = canvas.toDataURL('image/jpeg', 1);
// console.log(baseStr)
// return baseStr;
// replace("data:image/jpeg;base64,", "")
// 将base64转化为blob文件进行图片上传,(考虑到转化后再上传耗费时间暂时没有使用,如果需要base64ToPath 方法可百度或者私信我)
// base64ToPath(baseStr).then(tempPath => {
// this.uploadBgImg(tempPath)
// });
// 自定义上传请求
this.uploadBaseImg(baseStr);
},
收起阅读 »

uniapp开发的 淘宝、京东、拼多多 三合一APP已上线
uniapp开发的 淘宝、京东、拼多多 三合一APP
需要的加QQ:676133829
uniapp开发的 淘宝、京东、拼多多 三合一APP
需要的加QQ:676133829

调用蓝牙打印机打印一维码
if(bluetoothSocket.isConnected()) {
var outputStream = bluetoothSocket.getOutputStream();
plus.android.importClass(outputStream);
var bytes = plus.android.invoke(string, 'getBytes', 'gbk'); //其它内容
var bar = plus.android.invoke(billcode, 'getBytes', 'gbk');
outputStream.write(bytes);
outputStream.flush();
outputStream.write(29);
outputStream.write(72);
outputStream.write(2);
outputStream.flush(); //hri字符打印位置
outputStream.write(29);
outputStream.write(119);
outputStream.write(2);
outputStream.flush(); //条码宽度
outputStream.write(29);
outputStream.write(104);
outputStream.write(81);
outputStream.flush(); //条码高度
outputStream.write(29);
outputStream.write(107); //打印条码
outputStream.write(73); // 条码类型 code128
outputStream.write(15); // 条码位数
outputStream.write(123);
outputStream.write(66); //code128 的子类型,有128a,128b,128c
outputStream.write(bar);
outputStream.flush();
outputStream.flush();
device = null //这里关键
bluetoothSocket.close(); //必须关闭蓝牙连接否则意外断开的话打印错误
}
if(bluetoothSocket.isConnected()) {
var outputStream = bluetoothSocket.getOutputStream();
plus.android.importClass(outputStream);
var bytes = plus.android.invoke(string, 'getBytes', 'gbk'); //其它内容
var bar = plus.android.invoke(billcode, 'getBytes', 'gbk');
outputStream.write(bytes);
outputStream.flush();
outputStream.write(29);
outputStream.write(72);
outputStream.write(2);
outputStream.flush(); //hri字符打印位置
outputStream.write(29);
outputStream.write(119);
outputStream.write(2);
outputStream.flush(); //条码宽度
outputStream.write(29);
outputStream.write(104);
outputStream.write(81);
outputStream.flush(); //条码高度
outputStream.write(29);
outputStream.write(107); //打印条码
outputStream.write(73); // 条码类型 code128
outputStream.write(15); // 条码位数
outputStream.write(123);
outputStream.write(66); //code128 的子类型,有128a,128b,128c
outputStream.write(bar);
outputStream.flush();
outputStream.flush();
device = null //这里关键
bluetoothSocket.close(); //必须关闭蓝牙连接否则意外断开的话打印错误
}
收起阅读 »

关于安卓离线本地打包。本人使用的android studio,
因为要将app转化为桌面app,所以打包的时候要加几个属性。没办法,只能本地打包。
我之前用的是线上最新2.4的版本SDK,之后学着百度到的博客去创建本地打包。一直出现io.dcloud.PandoraEntry为空的问题,后来试了好几遍。才发现是版本问题。换成了之前的1.9。然后才算是成功了的。
分享几个前辈的博客文章以及用到的代码,都可以尝试下。:
https://blog.csdn.net/yafo00/article/details/98844535
https://ask.dcloud.net.cn/article/216
因为要将app转化为桌面app,所以打包的时候要加几个属性。没办法,只能本地打包。
我之前用的是线上最新2.4的版本SDK,之后学着百度到的博客去创建本地打包。一直出现io.dcloud.PandoraEntry为空的问题,后来试了好几遍。才发现是版本问题。换成了之前的1.9。然后才算是成功了的。
分享几个前辈的博客文章以及用到的代码,都可以尝试下。:
https://blog.csdn.net/yafo00/article/details/98844535
https://ask.dcloud.net.cn/article/216

多年MUI开发经验,精通5+app 开发,有任何问题可以QQ我
多年MUI开发经验,精通5+app 开发,有任何问题可以QQ我,有偿解决各种疑难BUG 419761282
多年MUI开发经验,精通5+app 开发,有任何问题可以QQ我,有偿解决各种疑难BUG 419761282

Monokai Dimmed ——Hbuilder X主题
1、设置主题为雅兰,配置设置代码、保存后,重启Huilder X
"workbench.colorCustomizations" : {
"[Atom One Dark]" : {
"ab.unfocusedHoverBackground" : "#272727",
"button.background" : "#0381ff",
"button.foreground" : "#CCCCCC",
"button.hoverBackground" : "#0381ff",
"console.background" : "#252525",
"crollbarSlider.hoverBackground" : "#8c8c8c",
"debug.foreground" : "#CCCCCC",
"editor.background" : "#252525",
"editor.foreground" : "#CCCCCC",
"editorGroupHeader.tabsBackground" : "#282828",
"editorSuggestWidget.background" : "#252525",
"editorSuggestWidget.border" : "#444444",
"editorSuggestWidget.link" : "#0381ff",
"editorSuggestWidget.selectedBackground" : "#707070",
"extensionButton.border" : "#454545",
"extensionButton.checkColor" : "#CCCCCC",
"extensionButton.prominentBackground" : "#454545",
"extensionButton.prominentForeground" : "#CCCCCC",
"extensionButton.prominentHoverBackground" : "#454545",
"focusBorder" : "#CCCCCC",
"input.background" : "#454545",
"input.border" : "#CCCCCC",
"input.foreground" : "#CCCCCC",
"inputList.border" : "#505050",
"inputList.foreground" : "#a49f9f",
"inputList.hoverBackground" : "#707070",
"inputList.titleColor" : "#CCCCCC",
"inputOption.activeBorder" : "#505050",
"inputValidation.infoBackground" : "#505050",
"list.activeSelectionBackground" : "#505050",
"list.activeSelectionForeground" : "#CCCCCC",
"list.foreground" : "#CCCCCC",
"list.highlightForeground" : "#CCCCCC",
"list.hoverBackground" : "#414040",
"list.inactiveSelectionBackground" : "#272727",
"list.inactiveSelectionForeground" : "#CCCCCC",
"minimap.handle.background" : "#707070",
"notification.buttonBackground" : "#252525",
"notification.buttonBorder" : "#707070",
"notification.buttonForeground" : "#707070",
"notification.buttonPressedBackground" : "#707070",
"notification.buttonPressedForeground" : "#252525",
"notificationLink.foreground" : "#707070",
"notifications.background" : "#252525",
"notifications.border" : "#707070",
"notifications.foreground" : "#CCCCCC",
"outlineBackground" : "#252525",
"panelTitle.activeForeground" : "#CCCCCC",
"scrollbarSlider.background" : "#424242",
"settings.dropdownBackground" : "#1e1e1e",
"settings.dropdownBorder" : "#707070",
"settings.dropdownListBorder" : "#1e1e1e",
"settings.textInputBackground" : "#1e1e1e",
"settings.textInputBorder" : "#1e1e1e",
"settings.textInputDisableBackground" : "#252525",
"sideBar.background" : "#272727",
"sideBar.border" : "#272727",
"statusBar.background" : "#505050",
"statusBar.foreground" : "#CCCCCC",
"tab.activeBackground" : "#1e1e1e",
"tab.activeBorder" : "#1e1e1e",
"tab.activeForeground" : "#CCCCCC",
"tab.border" : "#282828",
"tab.hoverBackground" : "#1e1e1e",
"tab.inactiveBackground" : "#404040",
"tab.inactiveForeground" : "#CCCCCC",
"tab.unfocusedActiveForeground" : "#CCCCCC",
"tab.unfocusedInactiveForeground" : "#CCCCCC",
"terminal.background" : "#252525",
"titleBar.activeBackground" : "#641f22",
"titleBar.activeForeground" : "#CCCCCC",
"toolBar.background" : "#454545",
"toolBar.border" : "#454545",
"toolBar.hoverBackground" : "#454545"
}
}
2、效果如图
1、设置主题为雅兰,配置设置代码、保存后,重启Huilder X
"workbench.colorCustomizations" : {
"[Atom One Dark]" : {
"ab.unfocusedHoverBackground" : "#272727",
"button.background" : "#0381ff",
"button.foreground" : "#CCCCCC",
"button.hoverBackground" : "#0381ff",
"console.background" : "#252525",
"crollbarSlider.hoverBackground" : "#8c8c8c",
"debug.foreground" : "#CCCCCC",
"editor.background" : "#252525",
"editor.foreground" : "#CCCCCC",
"editorGroupHeader.tabsBackground" : "#282828",
"editorSuggestWidget.background" : "#252525",
"editorSuggestWidget.border" : "#444444",
"editorSuggestWidget.link" : "#0381ff",
"editorSuggestWidget.selectedBackground" : "#707070",
"extensionButton.border" : "#454545",
"extensionButton.checkColor" : "#CCCCCC",
"extensionButton.prominentBackground" : "#454545",
"extensionButton.prominentForeground" : "#CCCCCC",
"extensionButton.prominentHoverBackground" : "#454545",
"focusBorder" : "#CCCCCC",
"input.background" : "#454545",
"input.border" : "#CCCCCC",
"input.foreground" : "#CCCCCC",
"inputList.border" : "#505050",
"inputList.foreground" : "#a49f9f",
"inputList.hoverBackground" : "#707070",
"inputList.titleColor" : "#CCCCCC",
"inputOption.activeBorder" : "#505050",
"inputValidation.infoBackground" : "#505050",
"list.activeSelectionBackground" : "#505050",
"list.activeSelectionForeground" : "#CCCCCC",
"list.foreground" : "#CCCCCC",
"list.highlightForeground" : "#CCCCCC",
"list.hoverBackground" : "#414040",
"list.inactiveSelectionBackground" : "#272727",
"list.inactiveSelectionForeground" : "#CCCCCC",
"minimap.handle.background" : "#707070",
"notification.buttonBackground" : "#252525",
"notification.buttonBorder" : "#707070",
"notification.buttonForeground" : "#707070",
"notification.buttonPressedBackground" : "#707070",
"notification.buttonPressedForeground" : "#252525",
"notificationLink.foreground" : "#707070",
"notifications.background" : "#252525",
"notifications.border" : "#707070",
"notifications.foreground" : "#CCCCCC",
"outlineBackground" : "#252525",
"panelTitle.activeForeground" : "#CCCCCC",
"scrollbarSlider.background" : "#424242",
"settings.dropdownBackground" : "#1e1e1e",
"settings.dropdownBorder" : "#707070",
"settings.dropdownListBorder" : "#1e1e1e",
"settings.textInputBackground" : "#1e1e1e",
"settings.textInputBorder" : "#1e1e1e",
"settings.textInputDisableBackground" : "#252525",
"sideBar.background" : "#272727",
"sideBar.border" : "#272727",
"statusBar.background" : "#505050",
"statusBar.foreground" : "#CCCCCC",
"tab.activeBackground" : "#1e1e1e",
"tab.activeBorder" : "#1e1e1e",
"tab.activeForeground" : "#CCCCCC",
"tab.border" : "#282828",
"tab.hoverBackground" : "#1e1e1e",
"tab.inactiveBackground" : "#404040",
"tab.inactiveForeground" : "#CCCCCC",
"tab.unfocusedActiveForeground" : "#CCCCCC",
"tab.unfocusedInactiveForeground" : "#CCCCCC",
"terminal.background" : "#252525",
"titleBar.activeBackground" : "#641f22",
"titleBar.activeForeground" : "#CCCCCC",
"toolBar.background" : "#454545",
"toolBar.border" : "#454545",
"toolBar.hoverBackground" : "#454545"
}
}
2、效果如图
收起阅读 »
iOS平台打包提交AppStore报WARNING ITMS-90703错误的解决方法
部分开发者反馈提交AppStore可能会报以下错误:
WARNING ITMS-90703: "Deprecated Xcode Build. Due to resolved app archives issues, we have deprecated Xcode 11.2 on November 5, 2019. Download Xcode 11.2.1 or newer, rebuild your app and resubmit."
ERROR ITMS-90534: "Invalid Toolchain. Your app was built with an unsupported SDK or version of Xcode. If you plan to submit this build to the App Store, make sure you are using the versions listed in https://help.apple.com/xcode/mac/current/#/devf16aefe3b or later."
这是由于使用XCode11.2版本打包生成ipa导致的问题,苹果已紧急发布了XCode11.2.1,需要更新XCode版本
HBuilderX云端打包
2019年11月17日至2019年11月18日,HBuilderX(alpha)版本对应的云端打包机使用XCode版本为11.2,此时间段云端打包提交AppStore会报上述问题。
2019年11月19日开始,HBuilderX(alpha)版对应的云端已更新XCode为11.2.1。
使用HBuilderX(alpha)的开发者请更新到最新版本(2.4.2),重新提交云端打包即可。
使用HBuilderX正式版提交云端打包生成的ipa不受影响
本地离线打包
更新XCode到11.2.1版本重新打包,再提交AppStore。
部分开发者反馈提交AppStore可能会报以下错误:
WARNING ITMS-90703: "Deprecated Xcode Build. Due to resolved app archives issues, we have deprecated Xcode 11.2 on November 5, 2019. Download Xcode 11.2.1 or newer, rebuild your app and resubmit."
ERROR ITMS-90534: "Invalid Toolchain. Your app was built with an unsupported SDK or version of Xcode. If you plan to submit this build to the App Store, make sure you are using the versions listed in https://help.apple.com/xcode/mac/current/#/devf16aefe3b or later."
这是由于使用XCode11.2版本打包生成ipa导致的问题,苹果已紧急发布了XCode11.2.1,需要更新XCode版本
HBuilderX云端打包
2019年11月17日至2019年11月18日,HBuilderX(alpha)版本对应的云端打包机使用XCode版本为11.2,此时间段云端打包提交AppStore会报上述问题。
2019年11月19日开始,HBuilderX(alpha)版对应的云端已更新XCode为11.2.1。
使用HBuilderX(alpha)的开发者请更新到最新版本(2.4.2),重新提交云端打包即可。
使用HBuilderX正式版提交云端打包生成的ipa不受影响
本地离线打包
更新XCode到11.2.1版本重新打包,再提交AppStore。
收起阅读 »
文件误删,所有恢复软件全部尝试过了,结果恢复的都是乱码,这时想起了HBuilder 历史记录,恢复了!!!
HBuilder X不要太厉害,
一直习惯使用这个编辑器,包括后端,
今天一个误操作,导致半个多月开发的文件全部被删除,
用了很多恢复软件没有一个能恢复出来,全乱码,
病急乱投医,最后连文件都找不到了,
把乱码文件恢复到原来目录,
编辑器中右键点击了一个历史记录,,
每一次保存的文件全出来了,,,,
本来还挺烦历史记录这个功能偶尔弹出,,,还找过在哪里关闭,,,感谢官方

HBuilder X不要太厉害,
一直习惯使用这个编辑器,包括后端,
今天一个误操作,导致半个多月开发的文件全部被删除,
用了很多恢复软件没有一个能恢复出来,全乱码,
病急乱投医,最后连文件都找不到了,
把乱码文件恢复到原来目录,
编辑器中右键点击了一个历史记录,,
每一次保存的文件全出来了,,,,
本来还挺烦历史记录这个功能偶尔弹出,,,还找过在哪里关闭,,,感谢官方

HBuildeX完美的一次升级!Dcloud太给力了!!!!!
哈哈哈哈哈
2.4.1.20191114
- 新增 迷你地图(右侧缩略图,可在滚动条右键菜单开启关闭,快捷键 win: Alt+o;mac: Ctrl+o)
- 新增 鼠标悬停在滚动条或迷你地图的非当前页区域时,小窗预览指示文档
- 新增 JSON文件 支持文档结构图。包括uni-app的pages.json的文档结构图(快捷键 win: Alt+w;mac: Ctrl+w)
- 新增 编辑器标签卡超出一屏时,支持鼠标滚轮横向滚动标签卡
- 新增 底部状态栏新增文档结构图、终端两个快捷按钮
本次更新完美的不要不要的!尤其是滚轮和悬停小窗预览文档,啊啊啊!Dcloud永远支持!这才是真正的代码编辑器啊
哈哈哈哈哈
2.4.1.20191114
- 新增 迷你地图(右侧缩略图,可在滚动条右键菜单开启关闭,快捷键 win: Alt+o;mac: Ctrl+o)
- 新增 鼠标悬停在滚动条或迷你地图的非当前页区域时,小窗预览指示文档
- 新增 JSON文件 支持文档结构图。包括uni-app的pages.json的文档结构图(快捷键 win: Alt+w;mac: Ctrl+w)
- 新增 编辑器标签卡超出一屏时,支持鼠标滚轮横向滚动标签卡
- 新增 底部状态栏新增文档结构图、终端两个快捷按钮
本次更新完美的不要不要的!尤其是滚轮和悬停小窗预览文档,啊啊啊!Dcloud永远支持!这才是真正的代码编辑器啊
收起阅读 »
iOS证书类型介绍及快速申请介绍
iOS证书有多种类型,在开发iOS APP中一定要清楚了解各种iOS证书的作用。
下面介绍iOS常用的几种证书的作用和申请方法。
1、iOS开发证书
iOS开发证书是用于测试APP,在开发过程中安装到苹果手机真机测试APP的运行情况。
2、iOS发布证书
当APP开发测试好后上线就需要用到iOS发布证书,用iOS发布证书打包的ipa才能上传到App Store审核。
3、iOS推送证书
iOS推送证书是用于推送通知的,平时我们在手机的系统栏下拉看到的那些消息就是推送通知,如果要做这个功能就需要配置推送证书。
常用的就是以上这三种iOS证书,当你需要什么功能的时候就知道用哪个类型的iOS证书。
iOS证书有多种类型,在开发iOS APP中一定要清楚了解各种iOS证书的作用。
下面介绍iOS常用的几种证书的作用和申请方法。
1、iOS开发证书
iOS开发证书是用于测试APP,在开发过程中安装到苹果手机真机测试APP的运行情况。
2、iOS发布证书
当APP开发测试好后上线就需要用到iOS发布证书,用iOS发布证书打包的ipa才能上传到App Store审核。
3、iOS推送证书
iOS推送证书是用于推送通知的,平时我们在手机的系统栏下拉看到的那些消息就是推送通知,如果要做这个功能就需要配置推送证书。
常用的就是以上这三种iOS证书,当你需要什么功能的时候就知道用哪个类型的iOS证书。
收起阅读 »