Post

Replies

Boosts

Views

Activity

Reply to iOS 14 .onAppear() is called on DISappear instead of appear
Our app has also been affected by this strange behavior of onAppear since 14 beta 1. (Others have reported similar case: https://developer.apple.com/forums/thread/652257 ) Our first view reads the QR code from camera and opens second view. Since the read QR code data needs to be reset when back from second view, the initialization process of first view is set to be triggered when the view is (re)appeared. The current behavior of onAppear is serious problem because the initialization process of first view invalidates the content of second view. AFAIK until beta 2, first view's onAppear was triggered when back from second view. As it was gone in beta 3, we may need to observe visibility of first view in background or to workaround some other way. Apple says "work reliably" in beta 3, but we still hope onAppear behave as it names.
Aug ’20