发行时未保护安全密码字段

时间:2018-09-14 19:10:45

标签: react-native

所以我有一种形式似乎在iOS版本上的行为不同于调试版本。这是显示的屏幕截图:

release vs debug

<React.Fragment>
  <View>
    <FormInput
      label="username"
      value={values.username}
      name="username"
      onChange={setFieldValue}
      onTouch={setFieldTouched}
      error={touched.username && errors.username}
    />
    <FormInput
      label="password"
      secureTextEntry={true}
      value={values.password}
      textContentType='password'
      name="password"
      onChange={setFieldValue}
      onTouch={setFieldTouched}
      error={touched.password && errors.password}
    />
    <Button
      block
      style={styles.loginButton}
      onPress={handleSubmit}
      disabled={!isValid || isSubmitting}
    >
      <Text>Submit</Text>
    </Button>
  </View>
</React.Fragment>

不会混淆密码字段,看不到文本提示,并且提交按钮不起作用。任何人都知道是否有一些时髦的标志会改变功能?

1 个答案:

答案 0 :(得分:0)

我不熟悉这个特定问题,但是我可以提供一些一般性建议。

每当我的发行版和调试版本中有差异时,我都会按照以下步骤进行操作,并且效果会很好:

in Xcode:
  do cmd+shift+alt+k  (cleans build folder)

in terminal:
  watchman watch-del-all
  rm -rf $TMPDIR/metro-*
  rm -rf node_modules
  yarn cache clean
  yarn install

有时您需要完全退出Xcode,并且还可以尝试重新启动系统。希望这会有所帮助,祝你好运!