docs에서 forge.event.connectionStateChange.addListener
을 사용하려고합니다. 내가 작성했고 완전히 빈 응용 프로그램은 config.json
구성에 "event":true
을 추가하고 main.js
에 다음 비트를 추가 :Trigger.io forge.event.connectionStateChange.addListener를 사용할 때 응용 프로그램이 손상됩니다.
forge.logging.info("Add JavaScript to js/main.js!");
forge.event.connectionStateChange.addListener(
function() {
alert('Device ' + (forge.is.connection.connect() ? "is" : "is not") + 'connected.');
},
function(){
alert('Erorr');
}
);
내가 응용 프로그램을 실행하면 내 컴퓨터의 무선 랜, 응용 프로그램이 충돌을 끕니다. 필요한 경우 더 많은 로그를 제공 할 수 있습니다. 죄송합니다
[DEBUG] Native call: {
[DEBUG] callid = "9B3DBB44-870E-438B-8128-07E88474DDAB";
[DEBUG] method = "launchimage.hide";
[DEBUG] params = {
[DEBUG] };
[DEBUG] }
[DEBUG] Returning to javascript: {
[DEBUG] callid = "9B3DBB44-870E-438B-8128-07E88474DDAB";
[DEBUG] content = "<null>";
[DEBUG] status = success;
[DEBUG] }
[INFO] No reload update available.
[INFO] 2013-03-04 16:59:54.725 Forge[68603:c07] +[BorderControl returnResult:]: unrecognized selector sent to class 0x2fb4a4
[INFO] 2013-03-04 16:59:54.725 Forge[68603:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[BorderControl returnResult:]: unrecognized selector sent to class 0x2fb4a4'
[INFO] *** First throw call stack:
[INFO] (0x33b6012 0x2e55e7e 0x34412ad 0x33a5bbc 0x33a594e 0x2e695c8 0x2895765 0x3339f3f 0x333996f 0x335c734 0x335bf44 0x335be1b 0x33107e3 0x3310668 0x1d99ffc 0x26e6 0x2625)
[INFO] libc++abi.dylib: terminate called throwing an exception
또한, 문서에서 언급 한 것처럼 앱 시작시 알림 메시지가 표시되지 않습니다. – Mark
나는 동일한 문제를 겪고 있으며 청취자조차 사용하지 않습니다. iOS 6.1이 설치된 iPhone 5에서 Wi-Fi로 전환하면 백그라운드에서 충돌이 발생합니다. –
@ JohnClarkeMills 맞습니다. 청취자를 내려 놓고 새로 만든 프로젝트를 사용할 때도 똑같은 충돌이 발생합니다. – Mark