HBuilderX

HBuilderX

极客开发工具
uni-app

uni-app

开发一次,多端覆盖
uniCloud

uniCloud

云开发平台
HTML5+

HTML5+

增强HTML5的功能体验
MUI

MUI

上万Star的前端框架

使用最新的HBuilderx3.6.14打包IOS正式包提交到APP store connect时出现问题

iOS打包

Dear Developer,
We identified one or more issues with a recent delivery for your app, "xxxxxx" 4.4.0 (40405). Your delivery was successful, but you may wish to correct the following issues in your next delivery:
ITMS-90683: Missing purpose string in Info.plist - Your app’s code references one or more APIs that access sensitive user data, or the app has one or more entitlements that permit such access. The Info.plist file for the “HBuilder.app” bundle should contain a NSLocationWhenInUseUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you’re using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources.
After you’ve corrected the issues, you can upload a new binary to App Store Connect.
Best regards,
The App Store Team

继续阅读 »

Dear Developer,
We identified one or more issues with a recent delivery for your app, "xxxxxx" 4.4.0 (40405). Your delivery was successful, but you may wish to correct the following issues in your next delivery:
ITMS-90683: Missing purpose string in Info.plist - Your app’s code references one or more APIs that access sensitive user data, or the app has one or more entitlements that permit such access. The Info.plist file for the “HBuilder.app” bundle should contain a NSLocationWhenInUseUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you’re using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources.
After you’ve corrected the issues, you can upload a new binary to App Store Connect.
Best regards,
The App Store Team

收起阅读 »

uniapp没有小程序长期订阅消息的API. wx.requestSubscribeDeviceMessage(Object object)

uniapp 有小程序的一次性消息订阅功能requestSubscribeMessage,但是长期消息的订阅功能requestSubscribeDeviceMessage,有没有考虑加入订阅长期设备消息的功能。

wx.requestSubscribeDeviceMessage(Object object)
基础库 2.20.0 开始支持,低版本需做兼容处理。

以 Promise 风格 调用:支持

小程序插件:不支持

相关文档: 设备消息

功能描述
订阅设备消息接口,调用后弹出授权框,用户同意后会允许开发者给用户发送订阅模版消息。当用户点击“允许”按钮时,模板消息会被添加到用户的小程序设置页,通过 wx.getSetting 接口可获取用户对相关模板消息的订阅状态。

继续阅读 »

uniapp 有小程序的一次性消息订阅功能requestSubscribeMessage,但是长期消息的订阅功能requestSubscribeDeviceMessage,有没有考虑加入订阅长期设备消息的功能。

wx.requestSubscribeDeviceMessage(Object object)
基础库 2.20.0 开始支持,低版本需做兼容处理。

以 Promise 风格 调用:支持

小程序插件:不支持

相关文档: 设备消息

功能描述
订阅设备消息接口,调用后弹出授权框,用户同意后会允许开发者给用户发送订阅模版消息。当用户点击“允许”按钮时,模板消息会被添加到用户的小程序设置页,通过 wx.getSetting 接口可获取用户对相关模板消息的订阅状态。

收起阅读 »

wordpress项目找个人开发合作

外包 WordPress

wordpress项目,有专用模版,可基本套用。要求熟悉wordpress搭建的个人,费用看项目具体聊。wx:jonathanfu

wordpress项目,有专用模版,可基本套用。要求熟悉wordpress搭建的个人,费用看项目具体聊。wx:jonathanfu

分享一枚 HBuilderX 的图标,适配 BigSur 及 Ventura

HBuilderX 图标

高清版本,适配最新系统的圆角矩形图标。
HBuilderX图标参考

高清版本,适配最新系统的圆角矩形图标。
HBuilderX图标参考

大家有没发现,某次更新之后HbuilderX就变得怪怪的

代码提示

应该是代码提示重构的那次更新,
代码提示很别扭,甚至代码跳转也会失效。。。

应该是代码提示重构的那次更新,
代码提示很别扭,甚至代码跳转也会失效。。。

uniCloud实战项目-数购优惠券项目

自己摸索,不如直接通过视频学习,数购优惠券项目为你提供了快捷学习uniCloud方法,帮大家踩过不少坑。该项目可以直接运营。

该课程通过项目实战,能完全掌握unicloud项目开发到部署,使用该课程的思路能一个人快速完成项目,相似项目快至3-7天,慢至15天。课程里讲解云函数设计多种方法,包括自动生成代码,自己封装unicloud客户端api.还详细讲解了vkcloud的使用方法。还讲解前端使用uni-starter模板开发,并讲解各种官方常用组件与第三方组件的使用并修改。后台管理系统介绍了vkcloudadmin框架的一些高级技巧。同时课程中讲解了开发中遇到的各种bug该怎么解决

课程学习地址:
https://study.163.com/course/courseMain.htm?courseId=1213169818&share=2&shareId=480000002289465

继续阅读 »

自己摸索,不如直接通过视频学习,数购优惠券项目为你提供了快捷学习uniCloud方法,帮大家踩过不少坑。该项目可以直接运营。

该课程通过项目实战,能完全掌握unicloud项目开发到部署,使用该课程的思路能一个人快速完成项目,相似项目快至3-7天,慢至15天。课程里讲解云函数设计多种方法,包括自动生成代码,自己封装unicloud客户端api.还详细讲解了vkcloud的使用方法。还讲解前端使用uni-starter模板开发,并讲解各种官方常用组件与第三方组件的使用并修改。后台管理系统介绍了vkcloudadmin框架的一些高级技巧。同时课程中讲解了开发中遇到的各种bug该怎么解决

课程学习地址:
https://study.163.com/course/courseMain.htm?courseId=1213169818&share=2&shareId=480000002289465

收起阅读 »

看图猜成语-uniCloud - 素材和数据包下载

看图猜成语-uniCloud应用是基于 uniCloud 的 云端一体化看图猜成语游戏。该游戏是一款益智小游戏,是用一幅画或几个字的组合来猜一个成语。该游戏巧妙地使用图与字的结合,能够让玩家在休闲娱乐的同时能够了解到成语的趣味。

插件地址:https://ext.dcloud.net.cn/plugin?id=5045

素材和数据包请下载附件zip压缩文件

文档附件

继续阅读 »

看图猜成语-uniCloud应用是基于 uniCloud 的 云端一体化看图猜成语游戏。该游戏是一款益智小游戏,是用一幅画或几个字的组合来猜一个成语。该游戏巧妙地使用图与字的结合,能够让玩家在休闲娱乐的同时能够了解到成语的趣味。

插件地址:https://ext.dcloud.net.cn/plugin?id=5045

素材和数据包请下载附件zip压缩文件

文档附件

收起阅读 »

关于Android 部分手机NotificationManagerCompat.from 返回null 解决办法

NJS

在做一个检查应用是否拥有通知权限功能的时候发现部分手机(Redmi Note 5A 【Android 7.1.2】)调用NotificationManagerCompat.from(context) 会返回null
查阅了Android Dev 文档,官方描述NotificationManagerCompat.from 的返回值是 NonNull的 理应不会返回null

尝试修复方式如下,我自己去看了NotificationManagerCompat.from + NotificationManagerCompat.areNotificationsEnabled源代码手撸的;
相当于给NotificationManagerCompat.from 添加了个Polyfill;

const activity = plus.android.runtimeMainActivity();  
const NotificationManagerCompat = plus.android.importClass('androidx.core.app.NotificationManagerCompat');  
const manager = NotificationManagerCompat.from(activity) || {  
    /** 手动实现 NotificationManagerCompat,因为部分手机NotificationManagerCompat.from会返回null */  
    areNotificationsEnabled() {  
        const Build = plus.android.importClass('android.os.Build');  

        if (Build.VERSION.SDK_INT >= 24) {  
            plus.android.importClass('android.app.NotificationManager');  
            const notificationManager = activity.getSystemService(activity.NOTIFICATION_SERVICE);  
            const areNotificationsEnabled = notificationManager.areNotificationsEnabled();  

            plus.android.autoCollection(notificationManager);  

            return areNotificationsEnabled;  
        } else if (Build.VERSION.SDK_INT >= 19) {  
            const AppOpsManager = plus.android.importClass('android.app.AppOpsManager');  
            const ApplicationInfo = plus.android.importClass('android.content.pm.ApplicationInfo');  

            const appOps = activity.getSystemService(activity.APP_OPS_SERVICE);  
            const appInfo = activity.getApplicationInfo();  

            try {  
                const isEnabled = appOps.checkOpNoThrow(  
                    AppOpsManager.OP_POST_NOTIFICATION,  
                    plus.android.getAttribute(appInfo, 'uid'), //直接appInfo.uid 返回的是undefined  
                    activity.getApplicationContext().getPackageName()  
                ) === AppOpsManager.MODE_ALLOWED;  

                plus.android.autoCollection(appOps);  
                plus.android.autoCollection(appInfo);  
                return isEnabled;  
            } catch (e) {  
                return true;  
            }  
        }  

        return true;  
    }  
};  

console.log(manager.areNotificationsEnabled())
继续阅读 »

在做一个检查应用是否拥有通知权限功能的时候发现部分手机(Redmi Note 5A 【Android 7.1.2】)调用NotificationManagerCompat.from(context) 会返回null
查阅了Android Dev 文档,官方描述NotificationManagerCompat.from 的返回值是 NonNull的 理应不会返回null

尝试修复方式如下,我自己去看了NotificationManagerCompat.from + NotificationManagerCompat.areNotificationsEnabled源代码手撸的;
相当于给NotificationManagerCompat.from 添加了个Polyfill;

const activity = plus.android.runtimeMainActivity();  
const NotificationManagerCompat = plus.android.importClass('androidx.core.app.NotificationManagerCompat');  
const manager = NotificationManagerCompat.from(activity) || {  
    /** 手动实现 NotificationManagerCompat,因为部分手机NotificationManagerCompat.from会返回null */  
    areNotificationsEnabled() {  
        const Build = plus.android.importClass('android.os.Build');  

        if (Build.VERSION.SDK_INT >= 24) {  
            plus.android.importClass('android.app.NotificationManager');  
            const notificationManager = activity.getSystemService(activity.NOTIFICATION_SERVICE);  
            const areNotificationsEnabled = notificationManager.areNotificationsEnabled();  

            plus.android.autoCollection(notificationManager);  

            return areNotificationsEnabled;  
        } else if (Build.VERSION.SDK_INT >= 19) {  
            const AppOpsManager = plus.android.importClass('android.app.AppOpsManager');  
            const ApplicationInfo = plus.android.importClass('android.content.pm.ApplicationInfo');  

            const appOps = activity.getSystemService(activity.APP_OPS_SERVICE);  
            const appInfo = activity.getApplicationInfo();  

            try {  
                const isEnabled = appOps.checkOpNoThrow(  
                    AppOpsManager.OP_POST_NOTIFICATION,  
                    plus.android.getAttribute(appInfo, 'uid'), //直接appInfo.uid 返回的是undefined  
                    activity.getApplicationContext().getPackageName()  
                ) === AppOpsManager.MODE_ALLOWED;  

                plus.android.autoCollection(appOps);  
                plus.android.autoCollection(appInfo);  
                return isEnabled;  
            } catch (e) {  
                return true;  
            }  
        }  

        return true;  
    }  
};  

console.log(manager.areNotificationsEnabled())
收起阅读 »

HBuilderX

IDE

动不动就闪退,史上最垃圾ide

动不动就闪退,史上最垃圾ide

uniapp编译小程序typeof不支持的问题

uniapp

使用uniapp框架,编译后发现出现如下报错。

对 wxml 文档进行格式化,使用删代码调试的方法最终定位到了报错的内容为以下代码引起

<block wx:if="{{typeof 'a'==='string'&&item.m1==='object'}}">

再进一步排查,发现是对行内判断 typeof 不支持微信小程序造成的。

在 JavaScript 中,typeof 是一个运算符,用于返回一个表示操作数的类型的字符串。它可以用于检查一个值的数据类型,例如:

typeof 5 // 返回 "number" typeof "hello" // 返回 "string"
typeof 运算符可以用于检查任何数据类型,包括原始类型(如数字、字符串、布尔值等)和复杂类型(如对象、数组、函数等)。

然而,由于各个平台对 JavaScript 的支持情况不同,因此 UniApp 中的 JavaScript 代码并不能在所有平台上运行。例如,在微信小程序中,您可能无法使用某些 JavaScript 特性,包括行内 typeof 运算符。

最终解决办法为定义一个方法,在行内调用方法而避免直接调用 typeof。如下所示

<block wx:if="{{getType('a')==='string'&&item.m1==='object'}}">

在页面中定义函数

export default{  
  // ...  
  methods: {  
    getType(v){  
      return typeof v;  
    }  
  }  
  // ...  
}
继续阅读 »

使用uniapp框架,编译后发现出现如下报错。

对 wxml 文档进行格式化,使用删代码调试的方法最终定位到了报错的内容为以下代码引起

<block wx:if="{{typeof 'a'==='string'&&item.m1==='object'}}">

再进一步排查,发现是对行内判断 typeof 不支持微信小程序造成的。

在 JavaScript 中,typeof 是一个运算符,用于返回一个表示操作数的类型的字符串。它可以用于检查一个值的数据类型,例如:

typeof 5 // 返回 "number" typeof "hello" // 返回 "string"
typeof 运算符可以用于检查任何数据类型,包括原始类型(如数字、字符串、布尔值等)和复杂类型(如对象、数组、函数等)。

然而,由于各个平台对 JavaScript 的支持情况不同,因此 UniApp 中的 JavaScript 代码并不能在所有平台上运行。例如,在微信小程序中,您可能无法使用某些 JavaScript 特性,包括行内 typeof 运算符。

最终解决办法为定义一个方法,在行内调用方法而避免直接调用 typeof。如下所示

<block wx:if="{{getType('a')==='string'&&item.m1==='object'}}">

在页面中定义函数

export default{  
  // ...  
  methods: {  
    getType(v){  
      return typeof v;  
    }  
  }  
  // ...  
}
收起阅读 »