2013-04-23 3 views
0

2.4에서 phonegap 2.6으로 업그레이드 한 후 navigator.notification.prorompt 메소드가 작동을 멈췄습니다.Phonegap 2.6 - iOS 용 업그레이드 후 알림 프롬프트가 작동하지 않습니다.

ERROR: Method 'prompt:' not defined in Plugin 'Notification' 
-[CDVCommandQueue executePending] [Line 103] FAILED pluginJSON = ["Notification1135621647","Notification","prompt",["Are you sure you want to permanently delete this code?","Delete Tracking Code FFHFDCVHHGG",["Delete","Cancel"]]] 

이 내가 그것의 거의 똑바로 폰갭 문서에서 확인하도록 전화를 설정하는 방법입니다 : 엑스 코드는이 오류를 뱉어. 이 이벤트는 백본을 통해 클릭 이벤트에서 트리거됩니다.

navigator.notification.prompt(
    'Are you sure you want to permanently delete this code?', // message 
    onPrompt,             // callback to invoke with index of button pressed 
    'Delete Tracking Code ' + self2.options.parentModel.toJSON().track_code.toUpperCase(),   // title 
    ['Delete','Cancel']   // buttonLabels 
); 

function onPrompt(button) { 
    if (button === 1) { 
     self2.options.parentModel.clear(); // Remove the item from local storage 
    nzp.router.navigate('tracking', {trigger: true}); // Navigate to the tracking page 
    } else { 
     return false; 
    } 
} 

confrim 메서드가 작동하지 않지만 경고가 발생합니다.

브라우저에서 사이트를 볼 때 cordova_plugins.json 404 (찾을 수 없음)라는 새로운 오류 메시지가 나타납니다. 나는 이것이 무엇을위한 것인지 내 문제와 관련이 있는지 확신하지 못한다.

답변

0

알림이 정상적으로 작동하는 것으로 나타났습니다. 문제는 이전 버전을 가리 키도록 프로젝트를 업데이트 할 때 CordovaLib.xcodeproj에 대한 내 경로가 업데이트되지 않음과 관련된 문제입니다.

관련 문제