UITest:架构armv7的未定义符号

时间:2015-12-18 11:55:07

标签: ios swift uitest

我正试图从我的UITest目标中调用一个快速的单例。我正在导入主模块:<?php if (isset($_GET['hash'])&&!empty($_GET['hash'])){ $hash = $_GET['hash']; $message_query = "SELECT from_id, message FROM message WHERE hash='$hash'"; $run_messages = mysqli_query($con,$message_query); while($row_messages = mysqli_fetch_array($con,$run_messages)){ $form_id = $row_messages['from_id']; $message = $row_messages['message']; $user_query = "SELECT username FROM admins WHERE id='$from_id'"; $run_user = mysqli_fetch_array($con,$user_query); $from_username = $run_user['username']; echo "<p><strong>$from_username</strong></p></br>"; } }else{ header('Location: messages.php'); } ?> 但是当我尝试构建它时说:

@testable import Ary

语法高亮显示有效(单例没有访问修饰符,所以它被标记为内部,对于从测试目标的访问应该非常好)...

我正在调用的函数是[在XCTestCase中]:

Undefined symbols for architecture armv7:
  "Ary.DataModelLayerOperation.getter : Ary.DataModelLayer", referenced from:
      AryUITests.AryUITests.setUp (AryUITests.AryUITests)() -> () in AryUITests.o

d: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 个答案:

答案 0 :(得分:1)

我害怕你想要实现的目标是不可能的。我遇到过类似的问题并问了我的问题here。我很快就会接受这样的答案:

  

UI测试是与应用程序分开的模块,因此无法运行   在你的应用程序里面作为逻辑测试。

我希望在下一个Xcode版本中有所改进。