appmotion

Q: TypeError in optimized.js

Hi there,

 

I am creating an iAd at the moment. The Web Inspector keeps telling me:

 

TypeError: 'undefined' is not a function (evaluating 'this.viewController.transitionToViewControllerWithID(this.destinationPage)')

in optimized.js:750 which is:

 

iAd.Class({name:"iAP.TransitionToPageAction",superclass:iAd.ScriptAction,synthes izedProperties:["destinationPage"]});iAP.TransitionToPageAction.prototype.start= function(){if(this.viewController instanceof iAd.ViewController&&this.destinationPage){if(this.destinationPage===iAd.Navigat ionViewProcessor.PREVIOUS_ITEM_ID){var a=iAd.RootViewController.sharedRootViewController.navigationController;if(a){a. popViewControllerAnimated(true)}}else{this.viewController.transitionToViewContro llerWithID(this.destinationPage)}}};iAP.TransitionToPageAction.prototype.summary Text=function(){if(!this.destinationPage){return"None"}else{if(this.destinationP age==iAd.NavigationViewProcessor.PREVIOUS_ITEM_ID){return"Previous Page"}else{return this.destinationPage}}};

 

 

Everything else seems fine. A cosmetic thing for me, but it will get rejected by review team. Can someone tell me how to fix / where to look?

 

Regards,

Martin

iOS 6

Posted on Sep 6, 2013 8:55 AM

Close

Q: TypeError in optimized.js

  • All replies
  • Helpful answers

  • by markmalone,

    markmalone markmalone Sep 6, 2013 9:00 AM in response to appmotion
    Level 2 (210 points)
    Sep 6, 2013 9:00 AM in response to appmotion

    The error is saying that there is a request to transition to a page that doesn't exist. We'd probably need the project to see exactly what's going on before determining if it would effect certification.  Did you delete the the loading page?  Is there a page that should be automatically transitioned to that's been deleted?  

     

    Feel free to log a bug report at bugreport.apple.com describing the issue with the project attached and reply to this message with the bug number provided from the report.

     

    -Mark

  • by appmotion,

    appmotion appmotion Sep 6, 2013 1:45 PM in response to markmalone
    Level 1 (0 points)
    Sep 6, 2013 1:45 PM in response to markmalone

    Hi Mark,

     

    thanks for your reply. The Project has already been rejected by the review team. Not for this point only, but it is mentioned:

    3). On ad startup there is a TypeError: 'undefined' is not a function" ,js exception encountered. Full details =

    errorType = Exception

                 errorMessage = TypeError: 'undefined' is not a function

                   lineNumber = 771

    Loadingpage was not deleted, there is also no page that should be transitioned to. I'll file a bug later today and post the number.

     

    -Martin

     

    <Link Edited by Host>

  • by appmotion,

    appmotion appmotion Sep 8, 2013 3:30 AM in response to markmalone
    Level 1 (0 points)
    Sep 8, 2013 3:30 AM in response to markmalone

    Hi Mark,

     

    filed bug no. 14939824

     

    Regards,
    Martin