【问题标题】:Nativescript throwing Thread 1: EXC_BAD_ACCESS (code=1, address=0x1edf38) in Xcode onlyNativescript throwing Thread 1: EXC_BAD_ACCESS (code=1, address=0x1edf38) 仅在 Xcode
【发布时间】:2021-03-16 19:24:15
【问题描述】:

升级到 NS 7 并在 xcode 中构建后出现错误。我可以从 CLI 成功构建,运行应用程序,一切都很好,但是当我在 xCode 中构建并在物理设备或模拟器上运行并尝试登录时,我收到了这个错误。

在日志输出中 self = (SAMKeychainQuery*)password = (NSSTRING *) nil 所以它没有获取密码值但是为什么从 CLI 而不是 Xcode 构建时它可以访问它?

我正在运行“@nativescript/core”:“^7.0.13”、“@nativescript/ios”:“7.0.6”、Xcode 12。

这是我的密码文本字段:

 <TextField
              :isEnabled="!processing"
              ref="password"
              class="input placeholderColor"
              hint="Password"
              secure="true"
              v-model="user.password"
              @loaded="passwordTextField"
              :returnKeyType="isLoggingIn ? 'done' : 'next'"
              fontSize="18"
            />

//login function
 async login(user) {
    try {
      console.log("in login() in authservice")
      const loginRequest = await firebase.login({
        type: firebase.LoginType.PASSWORD,
        passwordOptions: {
          email: user.email,
          password: user.password,
        },
      });

      const handleLogin = await this.handleLogin(loginRequest);

      return handleLogin;
    } catch (error) {
      return error;
    }
  }

当我从 Xcode 构建时,我的 login() 函数甚至没有触发,但在 CLI 中一切正常。

【问题讨论】:

  • 你可以尝试用nativescript-vue/vue-cli-template 创建一个空白项目吗?这样您就可以确保安装正确。
  • @cemkaan 是的,新项目构建良好,甚至这个项目构建良好,直到我尝试登录时才会发生错误。此外,这是一个正在生产中的项目,因此它已经运行了一年,并且从 CLI 构建时运行良好。我只有在xcode中构建时无法登录。

标签: nativescript nativescript-vue


【解决方案1】:

完全删除@nativescript/secure-storage 插件然后ns clean 并重新安装安全存储插件工作。

如果插件不能正常运行,仍然不知道为什么它是从 CLI 而不是 Xcode 运行的。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-21
    • 2020-01-10
    • 2018-12-12
    相关资源
    最近更新 更多