簡體   English   中英

cycript TypeError(“undefined在跟隨教程時不是對象

[英]cycript TypeError("undefined is not an object when following tutorial

我正在嘗試按照本教程 - http://resources.infosecinstitute.com/ios-application-security-part-8-method-swizzling-using-cycript/#article

靠近文章的底部,我在你輸入的部分:

ViewController.messages['validateLogin'] = function() { return true;}

但是我沒有得到作者得到的回復,而是得到了一個TypeError

throw new TypeError("undefined is not an object (evaluating 'ViewController.messages.validateLogin=function(){return 1}')"

我正在運行iOS 9.0.2並且有Cycript 0.9.594

這是因為語法已更改。 消息不再是Cycript中的有效調用。 而是使用.prototype。

ViewController.prototype.isDeviceJailbroken = function () { return false; }

參考:

在此輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM