1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

react-native(iOS) で Date() まわりの処理が、リリースビルド の時のみおかしいことがある

Posted at

現象

const someDate = new Date('2018-07-01 11:22:33')
みたいな処理がデバッグビルドでデバッガー動かしながらでは動くのに、実機リリースビルドでは動かない(日付が入らない?)

確認したversion

RN 0.50.4 ちょっと古い
iOS

原因

リリースビルドではJavaScriptCoreを使用していが、それが対応していない形式の日付文字列だとだめな模様

取り急ぎの解決策

momentを使う

その他

最新のRNのversionだとどうなんでしょう。。未確認。

ここ以外にもJSCoreの挙動の違いによる不具合とかはいろいろありそう。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?