sendGroupImageMessage老是送不成功, 收到[JMSGMediaAbstractContent]Media data should not be empty - nil or 0 size length
使用iOS版本的cordova plugin的sendGroupImageMessage送群組圖片時,
老是拋[JMSGMediaAbstractContent] Media data should not be empty - nil or 0 size length
不曉得是不是iOS的bug, 還是我使用方式不對
手機iOS版本:iPod Touch iOS 10.3
Cordova Platform iOS : 4.3.1
Xcode: 8.3.3
cordova-plugin-jcore 1.1.4
jmessage-phonegap-plugin 2.4.4
source code來源:https://github.com/jpush/jmessage-phonegap-plugin
window.JMessage.sendGroupImageMessage (groupId, imageUrl, successCallback, errorCallback);
搭配下列 corodva plugin :
cordova-plugin-file
cordova-plugin-file-transfer
cordova-plugin-camera
cordova-plugin-compat
cordova-plugin-ios-camera-permissions
嘗試測試過各種的圖片路徑表達方式:
**http://XXXX/a.png**
**https://XXXX/a.png**
**../www/img/urgent.png**
**../img/urgent.png**
**img/urgent.png**
**urgent.png**
**file:///var/mobile/Containers/Data/Application/7DC5CDFF-6581-4AD3-B165-B604EBAB1250/tmp/cdv_photo_002.jpg**
**assets-library://asset/asset.JPG?id=2487E5F3-7E8C-4555-9FC8-71AC6EBF509E&ext=JPG**
皆無法透過 sendGroupImageMessage 成功上傳圖片, 在 xcode 皆出現下列訊息
[JMSGMediaAbstractContent] Media data should not be empty - nil or 0 size length.
[JMSGConversation] Content should not be nil.
*** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInvalidArgumentException> *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]
[NSError+JMSGInner] [JMSGError] - code: 865002, desc: no message for sending error
{"respone":"send message fail","errorDscription":"Error Domain=jmsg_error Code=865002 "no message for sending error" UserInfo={NSLocalizedDescription=no message for sending error}","errorCode":865002}
onSendMessage SyntaxError: JSON Parse error: Expected '}'
不曉得有沒有人也遇過這種現象?