i think solution is with the file i find :
so i finaly get this famous file mentioned in : http://support.apple.com/kb/HT5068 ,
Apple provide a tutor without providing the file to achieve it.., did you said amateurish ?
So, i find it decompiling the iBooks.app,
go on your iTunes/Mobile Applications/ Folder,
duplicate the iBooks.ipa,and rename it with .zip extension and decompress the archive,
in iBooks Folder, open Payload folder and right-click on iBooks app to show package content,
you'll find an AppleWidgetController.js file,
despite the name, this is the AppleWidget.js mentioned in tutor because inside there the function i need (and others really interesting)
--
* notifyContentExited
* Notifies native widget controller that js widget is closing down.
* Called when the user ends the slideshow
* ------------------------------------------------------------------ */
notifyContentExited : function() {
window.location = 'apb:///do?c=exited';
},
Michi.
then itshould be as is :
in main.html load :
<script type="text/javascript" src="AppleClasses/AppleWidget.js"> </script>
add in info.plist:
<key>IBNotifiesOnExit</key> |
<true/> |
and javascript call :
widget.notifyContentExited()
can a real developper give us a working example with that
Thanks