Commit 58a385ea by Takatoshi Miura

iosデータ送受信用js追加

parent 27be2101
// 名前空間
var CHK_iOS = {};
// iOS用
function callNativeApp(iosKey, jsonData) {
console.log("callNativeApp called jsonData %s", jsonData);
var result;
try {
var key = iosKey;
var data = jsonData;
var payload = { key: key, data: data };
// payloadの形 {"type":"SJbridge","data":{"name":"abc","role":"dev"}}
// resにObjective-cからのレスポンスが返る
result = prompt(JSON.stringify(payload));
console.log(result);
} catch (err) {
console.log("The native context does not exist yet");
}
return result;
}
// CHK_iOS.getBeforeRoomType = function () {
// return callNativeApp(NATIVE_KEY_IOS.getBeforeRoomType, {});
// };
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment