ข้อมูลอ้างอิงเฟรมเวิร์ก MLKitCommon

ค่าคงที่

ค่าคงที่ต่อไปนี้พร้อมให้บริการทั่วโลก

  • ชื่อ Notification สำหรับการสังเกตงานการดาวน์โหลดโมเดลที่สำเร็จ พจนานุกรมข้อมูลผู้ใช้จะมี {ModelDownloadUserInfoKey.remoteModel : RemoteModel}

    คำประกาศ

    Objective-C

    extern NS_SWIFT_NAME(mlkitModelDownloadDidSucceed) const NSNotificationName
        MLKModelDownloadDidSucceedNotification
  • ชื่อ Notification สำหรับการสังเกตงานการดาวน์โหลดโมเดลที่ล้มเหลว พจนานุกรมข้อมูลผู้ใช้จะประกอบด้วย {ModelDownloadUserInfoKey.remoteModel : RemoteModel} และ {ModelDownloadUserInfoKey.error : NSError}

    คำประกาศ

    Objective-C

    extern NS_SWIFT_NAME(mlkitModelDownloadDidFail) const NSNotificationName
        MLKModelDownloadDidFailNotification
  • คีย์สำหรับการเรียก RemoteModel จากพจนานุกรมข้อมูลผู้ใช้

    คำประกาศ

    Objective-C

    extern const MLKModelDownloadUserInfoKey _Nonnull MLKModelDownloadUserInfoKeyRemoteModel
  • คีย์สำหรับการเรียก NSError จากพจนานุกรมข้อมูลผู้ใช้ ค่าที่เกี่ยวข้องคือ nil หากการดาวน์โหลดโมเดลเสร็จสมบูรณ์

    คำประกาศ

    Objective-C

    extern const MLKModelDownloadUserInfoKey _Nonnull MLKModelDownloadUserInfoKeyError