清泛IT社区App Inventor 2 中文社区

搜索

扫码访问移动社区 移动社区,您的掌上技术专家

关注我,精彩不错过! 关注我,精彩不错过!

扫码安装最新版AI伴侣 最新版AI伴侣v2.76

Aia StoreApp上架指南 .aia 源码一站式解决方案 发布日志AI2连接测试ai2Starter模拟器

AppInventor2离线版中文教育版接入DeepSeek VIP会员 享专有教程,免费赠送基础版*技术支持服务! AI2入门必读中文文档AI2拓展IoT专题

查看: 31|回复: 0
打印 上一主题 下一主题

[经验分享] 【iOS】有关苹果iOS App的一些进展、BluetoothLE蓝牙拓展等

  • TA的每日心情
    开心
    昨天 06:42
  • 签到天数: 686 天

    [LV.9]以坛为家II

    992

    主题

    1633

    帖子

    4万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    46431

    AI2中文网VIP弹球达人接水果达人撸猫达人

    跳转到指定楼层
    楼主
    发表于 前天 09:43 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    1、iOS由于苹果限制,不能像Android那样使用拓展,只能内置组件适配比如ble功能,经典蓝牙不支持。
    我们正在努力将 BluetoothLE 扩展程序移植到 iOS 平台,使其成为一个组件。由于 Apple 对应用程序的限制,我们无法像在 Android 上那样使用扩展程序的方式。您使用的是哪种型号的 Arduino?这里的一个挑战是,出于功耗方面的考虑,Apple 对我们所说的“经典”蓝牙功能进行了一些限制。不过,他们允许使用低功耗蓝牙(Bluetooth Low Energy),我们计划全面支持这项功能。了解您使用的 Arduino 型号以及它使用的蓝牙版本有助于我们更好地判断您想要实现的功能是否可行。

    We're working on porting the BluetoothLE extension as a component on iOS. Because of the constraints that Apple puts on apps, we cannot use the extensions approach like we do on Android.
    Which particular model of Arduino are you using? One challenge here is that Apple has restricted access somewhat to what I would call "classic" Bluetooth due to energy consumption concerns. They do allow use of Bluetooth low energy without issue, which we do plan to implement full support for. Knowing what kind of Arduino you use and which Bluetooth version it uses might help us better understand whether what you want to do is feasible.
    来源:https://community.appinventor.mit.edu/t/bluetooth-on-ios/32797/13

    2、iOS虽然不支持拓展,但是部分比如ble拓展,兼容安卓模式的拓展导入,内部自动处理,除了少数内置拓展,其余的不支持。
    目前你只需使用任何包含现有 BLE 扩展的项目即可。iOS 版本会自动处理。我目前只实现了一小部分功能,所以如果你有任何特定的应用程序希望我查看并改进其功能覆盖范围,请发送给我。[size=15.008px]For now you just need to use any project with the existing BLE extension. The iOS version will know what to do. I've only implemented a small subset of the functionality so far so if there is a specific app you'd like me to take a look at to improve the coverage please send it to me.

    3、iOS的ble拓展和安卓不一样,iOS 使用由 iOS 设备和 BLE 设备组合生成的 UUID 来识别 BLE 设备,而不是像 Android 那样使用 MAC 地址
    此外,iOS 与 Android 的一个重要区别在于,iOS 使用由 iOS 设备和 BLE 设备组合生成的 UUID 来识别 BLE 设备,而不是像 Android 那样使用 MAC 地址。因此,您不能指望任何通过 MAC 地址连接的模块在不同平台上都能以相同的方式工作。
    Also, an important difference with iOS versus Android is that iOS identifies BLE devices using a UUID derived from a combination of the iOS device and the BLE device rather than using a MAC address like on Android. Therefore, you cannot expect that any of the blocks that connect via MAC address to work the same across platforms.

    来源:https://community.appinventor.mi ... gy-for-ios/122340/3

    App Inventor 2 中文网 - MIT同步更新的中文本土化平台!v2.76 支持Android 15 & iOS 更新日志
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    © 2026 tsingfun.com, Inc.  沪ICP备2020034476号-1  沪公网安备31011702000040号

    GMT+8, 2026-01-08 00:31 , Processed in 0.026321 second(s), 39 queries .