Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support iOS 15 #2895

Closed
alon-ha opened this issue Jul 14, 2021 · 55 comments
Closed

Support iOS 15 #2895

alon-ha opened this issue Jul 14, 2021 · 55 comments

Comments

@alon-ha
Copy link
Contributor

alon-ha commented Jul 14, 2021

We need to support iOS 15, check if anything broke

@alon-ha alon-ha changed the title support iOS 15 Support iOS 15 Jul 14, 2021
@alon-ha alon-ha self-assigned this Jul 14, 2021
@d4vidi
Copy link
Collaborator

d4vidi commented Jul 14, 2021

@alon-ha does this include Applesimutils?

@alon-ha
Copy link
Contributor Author

alon-ha commented Jul 15, 2021

Yes, in case we need to update there something as well

@gabimoncha
Copy link

gabimoncha commented Aug 26, 2021

I tried running detox on the beta release for MacOS 12, iOS 15.

The app launches and then crashes with the following error report

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Incident Identifier: 41F9CAE1-D12A-43E9-B164-EA2DD3F6CD29
CrashReporter Key:   2F74569F-74CF-DFB6-7136-263A59844873
Hardware Model:      MacBookPro14,1
Process:             SelfapyStaging [70247]
Path:                /Users/USER/Library/Developer/CoreSimulator/Devices/02088BF2-0053-4650-A282-D97D3562ADBF/data/Containers/Bundle/Application/BB21F9DF-1D2F-4818-90AD-0DBC7537EC69/SelfapyStaging.app/SelfapyStaging
Identifier:          com.selfapy.app.staging
Version:             1.1.0 (18)
Code Type:           X86-64 (Native)
Role:                Foreground
Parent Process:      launchd_sim [42467]
Coalition:           com.apple.CoreSimulator.SimDevice.02088BF2-0053-4650-A282-D97D3562ADBF [9244]
Responsible Process: SimulatorTrampoline [2495]

Date/Time:           2021-08-27 02:25:17.4319 +0300
Launch Time:         2021-08-27 02:25:16.4603 +0300
OS Version:          macOS 12.0 (21A5304g)
Release Type:        User
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Subtype: KERN_PROTECTION_FAILURE at 0x00007fff8039b650
Exception Codes: 0x0000000000000002, 0x00007fff8039b650
VM Region Info: 0x7fff8039b650 is in 0x7fff8039b5f0-0x7fff803e8b08;  bytes after start: 96  bytes before end: 316599
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      unused shlib __TEXT      7fff80397c20-7fff8039b5f0 [   14K] r--/rwx SM=COW  ... this process
--->  __DATA_CONST             7fff8039b5f0-7fff803e8b08 [  309K] r--/rwx SM=COW  ...ork/CFNetwork
      unused shlib __TEXT      7fff803e8b08-7fff803e8b10 [     8] r--/rwx SM=COW  ... this process
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: SIGNAL 10 Bus error: 10
Terminating Process: exc handler [70247]

Triggered by Thread:  0

Application Specific Information:
CoreSimulator 775 - Device: iPhone 12 (02088BF2-0053-4650-A282-D97D3562ADBF) - Runtime: iOS 15.0 (19A5307d) - DeviceType: iPhone 12
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_INSERT_LIBRARIES=/Users/gabi/Library/Detox/ios/300f6225479bfc863124d36831a653487ebe6106/Detox.framework/Detox
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_INSERT_LIBRARIES=/Users/gabi/Library/Detox/ios/300f6225479bfc863124d36831a653487ebe6106/Detox.framework/Detox


Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   DetoxSync                     	       0x10662a828 0x106621000 + 38952
1   DetoxSync                     	       0x10662a491 0x106621000 + 38033
2   dyld_sim                      	       0x10672ca19 0x106714000 + 100889
3   dyld_sim                      	       0x1067190b5 0x106714000 + 20661
4   dyld_sim                      	       0x10672c91a 0x106714000 + 100634
5   DetoxSync                     	       0x10662a575 0x106621000 + 38261
6   DetoxSync                     	       0x10662a0e6 0x106621000 + 37094
7   libobjc.A.dylib               	    0x7fff2018cd65 0x7fff2017f000 + 56677
8   dyld_sim                      	       0x10671d910 0x106714000 + 39184
9   dyld_sim                      	       0x10672234f 0x106714000 + 58191
10  dyld_sim                      	       0x10672233d 0x106714000 + 58173
11  dyld_sim                      	       0x1067223f8 0x106714000 + 58360
12  dyld_sim                      	       0x106730e2e 0x106714000 + 118318
13  dyld_sim                      	       0x106715920 0x106714000 + 6432
14  dyld_sim                      	       0x106715d3f 0x106714000 + 7487
15  dyld                          	       0x10e446ae3 0x10e440000 + 27363
16  dyld                          	       0x10e4456b5 0x10e440000 + 22197
17  dyld                          	       0x10e4454b4 0x10e440000 + 21684

Thread 1:
0   libsystem_pthread.dylib       	    0x7fff6bb950b0 0x7fff6bb93000 + 8368


Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000106629bc9  rbx: 0x0000000000000000  rcx: 0x000000010666dd78  rdx: 0xffffffffffffffff
  rdi: 0x00007fff8039b5f0  rsi: 0x000000000000000c  rbp: 0x00007ff7ba773310  rsp: 0x00007ff7ba773240
   r8: 0x0000000000000000   r9: 0x0000000000000920  r10: 0x0000000000000001  r11: 0x0000000000000207
  r12: 0x0000000000000001  r13: 0x0000000000000001  r14: 0x00007fffd4df4656  r15: 0x0000600002fbc4a0
  rip: 0x000000010662a828  rfl: 0x0000000000010202  cr2: 0x00007fff8039b650
  
Logical CPU:     1
Error Code:      0x00000007 (invalid protections for user data write)
Trap Number:     14


Binary Images:
       0x106621000 -        0x10664cfff com.wix.DetoxSync (1.0) <56006f1c-e9db-36d8-86ad-393fc6e1252e> /Users/USER/Library/Detox/*/Detox.framework/Frameworks/DetoxSync.framework/DetoxSync
       0x106714000 -        0x106760fff dyld_sim (*) <4b882de9-4cab-3f20-bff2-f473fe52b431> /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
    0x7fff2017f000 -     0x7fff201b0fff libobjc.A.dylib (*) <767f25ca-5ad3-3305-91c9-230f453e6ac0> /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib
       0x10e440000 -        0x10e4a7fff dyld (*) <e604d5fb-9cec-336f-945b-cbda1a199e67> /usr/lib/dyld
    0x7fff6bb93000 -     0x7fff6bb9efff libsystem_pthread.dylib (*) <0e16c43a-453b-38c1-aa87-aab7edde0ad3> /usr/lib/system/libsystem_pthread.dylib
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???

EOF

-----------
Full Report
-----------

{"app_name":"SelfapyStaging","timestamp":"2021-08-27 02:25:28.00 +0300","app_version":"1.1.0","slice_uuid":"2d54bd8a-f922-3e7d-8e82-45c664b26f0c","build_version":"18","platform":7,"bundleID":"com.selfapy.app.staging","share_with_app_devs":1,"is_first_party":0,"etl_key":"3","bug_type":"309","os_version":"macOS 12.0 (21A5304g)","incident_id":"41F9CAE1-D12A-43E9-B164-EA2DD3F6CD29","name":"SelfapyStaging"}
{
  "uptime" : 80000,
  "procLaunch" : "2021-08-27 02:25:16.4603 +0300",
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 209,
  "modelCode" : "MacBookPro14,1",
  "procStartAbsTime" : 80447281709398,
  "coalitionID" : 9244,
  "osVersion" : {
    "train" : "macOS 12.0",
    "build" : "21A5304g",
    "releaseType" : "User"
  },
  "captureTime" : "2021-08-27 02:25:17.4319 +0300",
  "incident" : "41F9CAE1-D12A-43E9-B164-EA2DD3F6CD29",
  "bug_type" : "309",
  "pid" : 70247,
  "procExitAbsTime" : 80447996736470,
  "cpuType" : "X86-64",
  "procName" : "SelfapyStaging",
  "procPath" : "\/Users\/USER\/Library\/Developer\/CoreSimulator\/Devices\/02088BF2-0053-4650-A282-D97D3562ADBF\/data\/Containers\/Bundle\/Application\/BB21F9DF-1D2F-4818-90AD-0DBC7537EC69\/SelfapyStaging.app\/SelfapyStaging",
  "bundleInfo" : {"CFBundleShortVersionString":"1.1.0","CFBundleVersion":"18","CFBundleIdentifier":"com.selfapy.app.staging"},
  "storeInfo" : {"deviceIdentifierForVendor":"310AA378-9B84-5B44-AC4D-5F11B77E8F02","thirdParty":true},
  "parentProc" : "launchd_sim",
  "parentPid" : 42467,
  "coalitionName" : "com.apple.CoreSimulator.SimDevice.02088BF2-0053-4650-A282-D97D3562ADBF",
  "crashReporterKey" : "2F74569F-74CF-DFB6-7136-263A59844873",
  "responsiblePid" : 2495,
  "responsibleProc" : "SimulatorTrampoline",
  "wakeTime" : 53863,
  "sleepWakeUUID" : "551F03FD-3E52-4C32-A144-F948DDB5B868",
  "sip" : "enabled",
  "vmRegionInfo" : "0x7fff8039b650 is in 0x7fff8039b5f0-0x7fff803e8b08;  bytes after start: 96  bytes before end: 316599\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      unused shlib __TEXT      7fff80397c20-7fff8039b5f0 [   14K] r--\/rwx SM=COW  ... this process\n--->  __DATA_CONST             7fff8039b5f0-7fff803e8b08 [  309K] r--\/rwx SM=COW  ...ork\/CFNetwork\n      unused shlib __TEXT      7fff803e8b08-7fff803e8b10 [     8] r--\/rwx SM=COW  ... this process",
  "isCorpse" : 1,
  "exception" : {"codes":"0x0000000000000002, 0x00007fff8039b650","rawCodes":[2,140735344653904],"type":"EXC_BAD_ACCESS","signal":"SIGBUS","subtype":"KERN_PROTECTION_FAILURE at 0x00007fff8039b650"},
  "termination" : {"flags":0,"code":10,"namespace":"SIGNAL","indicator":"Bus error: 10","byProc":"exc handler","byPid":70247},
  "vmregioninfo" : "0x7fff8039b650 is in 0x7fff8039b5f0-0x7fff803e8b08;  bytes after start: 96  bytes before end: 316599\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      unused shlib __TEXT      7fff80397c20-7fff8039b5f0 [   14K] r--\/rwx SM=COW  ... this process\n--->  __DATA_CONST             7fff8039b5f0-7fff803e8b08 [  309K] r--\/rwx SM=COW  ...ork\/CFNetwork\n      unused shlib __TEXT      7fff803e8b08-7fff803e8b10 [     8] r--\/rwx SM=COW  ... this process",
  "asi" : {"libsystem_sim_platform.dylib":["CoreSimulator 775 - Device: iPhone 12 (02088BF2-0053-4650-A282-D97D3562ADBF) - Runtime: iOS 15.0 (19A5307d) - DeviceType: iPhone 12"],"dyld_sim":["dyld4 config: DYLD_ROOT_PATH=\/Applications\/Xcode-beta.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS.simruntime\/Contents\/Resources\/RuntimeRoot DYLD_INSERT_LIBRARIES=\/Users\/gabi\/Library\/Detox\/ios\/300f6225479bfc863124d36831a653487ebe6106\/Detox.framework\/Detox"],"dyld":["dyld4 config: DYLD_ROOT_PATH=\/Applications\/Xcode-beta.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS.simruntime\/Contents\/Resources\/RuntimeRoot DYLD_INSERT_LIBRARIES=\/Users\/gabi\/Library\/Detox\/ios\/300f6225479bfc863124d36831a653487ebe6106\/Detox.framework\/Detox"]},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":844301,"instructionState":{"instructionStream":{"bytes":[193,76,139,101,168,76,139,109,176,76,139,77,184,72,139,117,152,235,103,72,255,5,222,233,2,0,73,139,7,72,131,124,216,16,0,72,139,125,160,72,139,117,152,116,46,72,255,5,220,233,2,0,72,139,12,247,73,139,7,72,59,76,216,8,116,25,72,255,5,191,233,2,0,72,139,4,247,73,139,15,72,139,76,217,16,72,137,1,73,139,7,72,139,68,216,8,72,137,4,247,76,141,5,173,233,2,0,76,137,193,76,139,101,168,76,139,109,176,76,139,77,184,72,141,29,71,233,2,0,72,255,1,255,198,73,139,68,36,40,72,193,232,3,72,57,240,15,135,82,254,255,255,131,125,196,0,117,70,72,255,5,123,233,2,0,49,210,139,69,212,168,1,116,12,72,255,5,115,233,2,0,186,1,0,0,0,168,2,72,139,125,160],"offset":96}},"threadState":{"r13":{"value":1},"rax":{"value":4402093001},"rflags":{"value":66050},"cpu":{"value":1},"r14":{"value":140736764790358},"rsi":{"value":12},"r8":{"value":0},"cr2":{"value":140735344653904},"rdx":{"value":18446744073709551615},"r10":{"value":1},"r9":{"value":2336},"r15":{"value":105553166320800},"rbx":{"value":0},"trap":{"value":14,"description":"(invalid protections for user data write)"},"err":{"value":7},"r11":{"value":519},"rip":{"value":4402096168,"matchesCrashFrame":1},"rbp":{"value":140701962023696},"rsp":{"value":140701962023488},"r12":{"value":1},"rcx":{"value":4402371960},"flavor":"x86_THREAD_STATE","rdi":{"value":140735344653808}},"queue":"com.apple.main-thread","frames":[{"imageOffset":38952,"imageIndex":0},{"imageOffset":38033,"imageIndex":0},{"imageOffset":100889,"imageIndex":1},{"imageOffset":20661,"imageIndex":1},{"imageOffset":100634,"imageIndex":1},{"imageOffset":38261,"imageIndex":0},{"imageOffset":37094,"imageIndex":0},{"imageOffset":56677,"imageIndex":2},{"imageOffset":39184,"imageIndex":1},{"imageOffset":58191,"imageIndex":1},{"imageOffset":58173,"imageIndex":1},{"imageOffset":58360,"imageIndex":1},{"imageOffset":118318,"imageIndex":1},{"imageOffset":6432,"imageIndex":1},{"imageOffset":7487,"imageIndex":1},{"imageOffset":27363,"imageIndex":3},{"imageOffset":22197,"imageIndex":3},{"imageOffset":21684,"imageIndex":3}]},{"id":844343,"frames":[{"imageOffset":8368,"imageIndex":4}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4402057216,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.wix.DetoxSync",
    "size" : 180224,
    "uuid" : "56006f1c-e9db-36d8-86ad-393fc6e1252e",
    "path" : "\/Users\/USER\/Library\/Detox\/*\/Detox.framework\/Frameworks\/DetoxSync.framework\/DetoxSync",
    "name" : "DetoxSync",
    "CFBundleVersion" : "1"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4403052544,
    "size" : 315392,
    "uuid" : "4b882de9-4cab-3f20-bff2-f473fe52b431",
    "path" : "\/Applications\/Xcode-beta.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS.simruntime\/Contents\/Resources\/RuntimeRoot\/usr\/lib\/dyld_sim",
    "name" : "dyld_sim"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140733731827712,
    "size" : 204800,
    "uuid" : "767f25ca-5ad3-3305-91c9-230f453e6ac0",
    "path" : "\/Applications\/Xcode-beta.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS.simruntime\/Contents\/Resources\/RuntimeRoot\/usr\/lib\/libobjc.A.dylib",
    "name" : "libobjc.A.dylib"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4534304768,
    "size" : 425984,
    "uuid" : "e604d5fb-9cec-336f-945b-cbda1a199e67",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 140735000686592,
    "size" : 49152,
    "uuid" : "0e16c43a-453b-38c1-aa87-aab7edde0ad3",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  }
],
  "sharedCache" : {
  "base" : 140733730258944,
  "size" : 3272769536,
  "uuid" : "bb190d77-0e6b-3e12-86f9-c6fada660120"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=954.5M resident=0K(0%) swapped_out_or_unallocated=954.5M(100%)\nWritable regions: Total=559.2M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=559.2M(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nActivity Tracing                   256K        1 \nKernel Alloc Once                    8K        1 \nMALLOC                           164.3M       18 \nMALLOC guard page                   16K        4 \nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nSTACK GUARD                       56.0M        2 \nStack                             8712K        2 \nVM_ALLOCATE                          8K        2 \n__DATA                            17.7M      437 \n__DATA_CONST                      35.6M      432 \n__DATA_DIRTY                        22K       10 \n__FONT_DATA                          4K        1 \n__LINKEDIT                       537.1M       10 \n__LLVM_COV                         144K        4 \n__OBJC_RO                         61.4M        1 \n__OBJC_RW                         3024K        1 \n__TEXT                           417.4M      443 \n__UNICODE                          588K        1 \ndyld private memory               2048K        2 \nmapped file                       28.3M        2 \nshared memory                       32K        3 \n===========                     =======  ======= \nTOTAL                              1.7G     1378 \nTOTAL, minus reserved VM space     1.3G     1378 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "607844aa04477260f58a8077",
      "factorPackIds" : {
        "SIRI_MORPHUN_ASSETS" : "60ef663fa2f864203caf575c"
      },
      "deploymentId" : 250000055
    },
    {
      "rolloutId" : "5fc94383418129005b4e9ae0",
      "factorPackIds" : {

      },
      "deploymentId" : 250000110
    },
    {
      "rolloutId" : "60356660bbe37970735c5624",
      "factorPackIds" : {

      },
      "deploymentId" : 250000016
    },
    {
      "rolloutId" : "60da5e84ab0ca017dace9abf",
      "factorPackIds" : {

      },
      "deploymentId" : 250000007
    },
    {
      "rolloutId" : "602ad4dac86151000cf27e46",
      "factorPackIds" : {
        "SIRI_DICTATION_ASSETS" : "610c869137f5d11121dcd114"
      },
      "deploymentId" : 250000156
    },
    {
      "rolloutId" : "601d9415f79519000ccd4b69",
      "factorPackIds" : {
        "SIRI_TEXT_TO_SPEECH" : "611ad37537f5d11121dcd81b"
      },
      "deploymentId" : 250000164
    }
  ],
  "experiments" : [

  ]
}
}

Model: MacBookPro14,1, BootROM 429.140.8.0.0, 2 processors, Dual-Core Intel Core i5, 2,3 GHz, 8 GB, SMC 2.43f11
Graphics: Intel Iris Plus Graphics 640, Intel Iris Plus Graphics 640, Built-In
Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online
Memory Module: BANK 0/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C3531324D3332443250462D3039
Memory Module: BANK 1/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C3531324D3332443250462D3039
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x170), Broadcom BCM43xx 1.0 (7.77.111.1 AirPortDriverBrcmNIC-1703.9)
AirPort: 
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Network Service: iPhone, Ethernet, en5
USB Device: USB30Bus
USB Device: USB2.0 Hub
USB Device: USB-C multiport device
USB Device: iPhone
USB Device: USB3.0 Hub
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.5

@mickmaccallum
Copy link

mickmaccallum commented Aug 27, 2021

I'm seeing this as well using the latest Xcode 13 beta (and running Detox 18.20.2, macOS 11.5.2). It seems that the app crashes during the device.launchApp call and the promise never resolves or rejects, which eventually leads to a timeout.

Here are the logs I'm seeing after calling launchApp: It looks like what's happening is app installs -> looks like device respring -> app launches -> app crashes.

detox[27133] DEBUG: [EXEC_CMD, #5] /usr/bin/xcrun simctl terminate AF4AAFA7-6B2F-4C30-B842-A19758DA77DA com.company.appname
detox[27133] DEBUG: [EXEC_TRY, #5] Terminating com.company.appname...
detox[27133] DEBUG: [EXEC_SUCCESS, #5] com.company.appname terminated
detox[27133] DEBUG: [EXEC_CMD, #6] applesimutils --byId AF4AAFA7-6B2F-4C30-B842-A19758DA77DA --bundle com.company.appname --restartSB --setPermissions notifications=YES,microphone=YES,camera=YES,photos=YES
detox[27133] DEBUG: [EXEC_TRY, #6] Trying to set permissions...
detox[27133] DEBUG: [EXEC_SUCCESS, #6] Permissions are set
detox[27133] DEBUG: [EXEC_CMD, #7] SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/mick/Library/Detox/ios/98ed4482b9fb85c37af35487edfbb47d1215b31a/Detox.framework/Detox" /usr/bin/xcrun simctl launch AF4AAFA7-6B2F-4C30-B842-A19758DA77DA com.company.appname --args -detoxServer ws://localhost:50910 -detoxSessionId 19e3dedb-e4ee-0c35-b6e4-89d2c29de30b -DTXEnableVerboseSyncSystem YES -DTXEnableVerboseSyncResources YES -detoxPrintBusyIdleResources YES -detoxDebugVisibility YES -detoxDisableHierarchyDump YES
detox[27133] DEBUG: [EXEC_TRY, #7] Launching com.company.appname...
detox[27133] DEBUG: [EXEC_TRY, #7] Launching com.company.appname...
detox[27133] DEBUG: [EXEC_CMD, #8] /usr/bin/xcrun simctl get_app_container AF4AAFA7-6B2F-4C30-B842-A19758DA77DA com.company.appname
detox[27133] INFO: [AppleSimUtils.js] com.company.appname launched. To watch simulator logs, run:
/usr/bin/xcrun simctl spawn AF4AAFA7-6B2F-4C30-B842-A19758DA77DA log stream --level debug --style compact --predicate 'process == "AppName"'

Crash Report:

Date/Time: 2021-08-26 16:13:11.018 -0400
OS Version: macOS 11.5.2 (20G95)
Report Version: 12
Bridge OS Version: 5.5 (18P4759a)
Anonymous UUID: 95F4846E-BEF6-6781-D82C-4A12B295777B

Sleep/Wake UUID: 415C3161-7F90-487E-91FD-DEDE5F42D5C5

Time Awake Since Boot: 390000 seconds
Time Since Wake: 110000 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00007fff8039b8e0
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Bus error: 10
Termination Reason: Namespace SIGNAL, Code 0xa
Terminating Process: exc handler [86510]

VM Regions Near 0x7fff8039b8e0:
__DATA_CONST 7fff80397eb0-7fff8039b880 [ 14K] r--/rwx SM=COW /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/SharedWebCredentials.framework/SharedWebCredentials
--> __DATA_CONST 7fff8039b880-7fff803e8de8 [ 309K] r--/rwx SM=COW /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework/CFNetwork
unused shlib __TEXT 7fff803e8de8-7fff803e8df0 [ 8] r--/rwx SM=COW system shared lib __TEXT not used by this process

Application Specific Information:
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_INSERT_LIBRARIES=/Users/mick/Library/Detox/ios/98ed4482b9fb85c37af35487edfbb47d1215b31a/Detox.framework/Detox
CoreSimulator 776.1 - Device: iPhone 12 (AF4AAFA7-6B2F-4C30-B842-A19758DA77DA) - Runtime: iOS 15.0 (19A5318f) - DeviceType: iPhone 12

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.wix.DetoxSync 0x0000000111dee828 perform_rebinding_with_section + 649
1 com.wix.DetoxSync 0x0000000111dee491 rebind_symbols_for_image + 548
2 dyld_sim 0x000000011136ee19 invocation function for block in dyld4::APIs::_dyld_register_func_for_add_image(void ()(mach_header const, long)) + 175
3 dyld_sim 0x000000011135b0b5 dyld4::RuntimeState::withLoadersReadLock(void () block_pointer) + 41
4 dyld_sim 0x000000011136ed1a dyld4::APIs::_dyld_register_func_for_add_image(void ()(mach_header const, long)) + 116
5 com.wix.DetoxSync 0x0000000111dee575 rebind_symbols + 157
6 com.wix.DetoxSync 0x0000000111dee0e6 +[NSTimer(DTXSpy) load] + 145
7 libobjc.A.dylib 0x00007fff2018cd65 load_images + 970
8 dyld_sim 0x000000011135f9da dyld4::RuntimeState::notifyObjCInit(dyld4::Loader const*) + 170
9 dyld_sim 0x00000001113648cd dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 167
10 dyld_sim 0x00000001113648bb dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 149
11 dyld_sim 0x0000000111364976 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 102
12 dyld_sim 0x000000011137323a dyld4::APIs::runAllInitializersForMain() + 222
13 dyld_sim 0x0000000111357920 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 2306
14 dyld_sim 0x0000000111357d3f _dyld_sim_prepare + 379
15 dyld 0x000000011e75dc27 dyld::useSimulatorDyld(int, macho_header const*, char const*, int, char const**, char const**, char const**, unsigned long*, unsigned long*) + 2093
16 dyld 0x000000011e75b15e dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 1191
17 dyld 0x000000011e755224 dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*) + 450
18 dyld 0x000000011e755025 _dyld_start + 37
19 ??? 0x0000000000000010 0 + 16

Thread 1:
0 libsystem_pthread.dylib 0x00007fff6c0a7420 start_wqthread + 0

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000111dedbc9 rbx: 0x0000000000000000 rcx: 0x0000000111e31d78 rdx: 0xffffffffffffffff
rdi: 0x00007fff8039b880 rsi: 0x000000000000000c rbp: 0x00007ffee45182f0 rsp: 0x00007ffee4518220
r8: 0x0000000000000000 r9: 0x0000000000000920 r10: 0x0000000000000001 r11: 0x0000000000000207
r12: 0x0000000000000001 r13: 0x0000000000000001 r14: 0x00007fffd3b398ea r15: 0x0000600000ee0020
rip: 0x0000000111dee828 rfl: 0x0000000000010202 cr2: 0x00007fff8039b8e0

Logical CPU: 8
Error Code: 0x00000007 (invalid protections for user data write)
Trap Number: 14

Thread 0 instruction stream:
c1 4c 8b 65 a8 4c 8b 6d-b0 4c 8b 4d b8 48 8b 75 .L.e.L.m.L.M.H.u
98 eb 67 48 ff 05 de e9-02 00 49 8b 07 48 83 7c ..gH......I..H.|
d8 10 00 48 8b 7d a0 48-8b 75 98 74 2e 48 ff 05 ...H.}.H.u.t.H..
dc e9 02 00 48 8b 0c f7-49 8b 07 48 3b 4c d8 08 ....H...I..H;L..
74 19 48 ff 05 bf e9 02-00 48 8b 04 f7 49 8b 0f t.H......H...I..
48 8b 4c d9 10 48 89 01-49 8b 07 48 8b 44 d8 08 H.L..H..I..H.D..
[48]89 04 f7 4c 8d 05 ad-e9 02 00 4c 89 c1 4c 8b H...L......L..L. <==
65 a8 4c 8b 6d b0 4c 8b-4d b8 48 8d 1d 47 e9 02 e.L.m.L.M.H..G..
00 48 ff 01 ff c6 49 8b-44 24 28 48 c1 e8 03 48 .H....I.D$(H...H
39 f0 0f 87 52 fe ff ff-83 7d c4 00 75 46 48 ff 9...R....}..uFH.
05 7b e9 02 00 31 d2 8b-45 d4 a8 01 74 0c 48 ff .{...1..E...t.H.
05 73 e9 02 00 ba 01 00-00 00 a8 02 48 8b 7d a0 .s..........H.}.

Thread 0 last branch register state not available.

@d4vidi
Copy link
Collaborator

d4vidi commented Aug 29, 2021

@alon-ha something to look into this week?

@alon-ha
Copy link
Contributor Author

alon-ha commented Aug 29, 2021

@alon-ha something to look into this week?

I think so, it will be good time to check it

@mickmaccallum
Copy link

👋 Hello everyone! I just wanted to call attention to the fact that the Apple event where the iOS 15 release date is expected to be announced is next week. If anyone at Detox could find time to look into this it would be much appreciated.

@d4vidi
Copy link
Collaborator

d4vidi commented Sep 9, 2021

Thanks @mickmaccallum, we will do our best!

@Kudo
Copy link

Kudo commented Sep 13, 2021

had some investigation for xcode 13.0 beta5 + ios 15 simulator today. there was a detox crash like this:

2021-09-13 18:17:46.144 Df BareExpoDetox[51267:2b20a1] (CoreFoundation) *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<_NSMainThread 0x6000025c42c0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key private.'
*** First throw call stack:
(
        0   CoreFoundation                      0x000000011adb88a8 __exceptionPreprocess + 242
        1   libobjc.A.dylib                     0x00000001135ecbe7 objc_exception_throw + 48
        2   CoreFoundation                      0x000000011adb8549 -[NSException init] + 0
        3   Foundation                          0x000000011614d38e -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 225
        4   Foundation                          0x00000001161fba76 -[NSThread valueForUndefinedKey:] + 85
        5   Foundation                          0x000000011614c16e -[NSObject(NSKeyValueCoding) valueForKey:] + 307
        6   Foundation                          0x000000011614cba8 -[NSObject(NSKeyValueCoding) valueForKeyPath:] + 244
        7   Detox                               0x00000001136bfd02 __DTXHandleCrash + 130
        8<…>

after further xcode debugging, the root cause is here to access private api UIWindowScene._keyWindowScene which is not available in ios 15. i am not sure where the change is in the ios 15 sdk, but looks like the symbol did exist.

$ nm -C /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore |grep 'UIWindowScene _keyWindowScene'
0000000000e94324 t +[UIWindowScene _keyWindowScene]

just for reference, hopefully to help with ios 15 support for detox.
thanks for your great work for the detox framework 🔥

@alon-ha
Copy link
Contributor Author

alon-ha commented Sep 19, 2021

Will check it this week. Im sure there will be more issues with iOS 15.
Everyone please keep adding stack traces of crashes you are having on iOS 15.
Thanks

@mikehardy
Copy link
Contributor

@alon-ha I just bumped into Detox not working on iOS15 and I wonder if following the Apple documentation you could move past your crash if you locally patched to use

	UIWindowScene* scene = UIWindowScene.keyWindow;

In place of

	UIWindowScene* scene = UIWindowScene._keyWindowScene;

c.f. https://developer.apple.com/documentation/uikit/uiwindowscene/3750932-keywindow?language=objc

Seems like it would be taking the relevant changes from the iOS13 PR here and implementing them in a slightly different way but not using hidden symbols ? ac73949#diff-7920fa2275d13d2229e29a25293f7ba57440fa87c8e57fcb7b9ff9053faa26d6

@mikehardy
Copy link
Contributor

mikehardy commented Sep 23, 2021

🤔 I thought I was on to something with the ios15 changes to key window detection and this diff (based on this https://stackoverflow.com/a/58447461/9910298):

diff --git a/detox/ios/Detox/Utilities/UIWindow+DetoxUtils.m b/detox/ios/Detox/Utilities/UIWindow+DetoxUtils.m
index 1a067fe0..de91ca1d 100644
--- a/detox/ios/Detox/Utilities/UIWindow+DetoxUtils.m
+++ b/detox/ios/Detox/Utilities/UIWindow+DetoxUtils.m
@@ -138,19 +138,34 @@ static NSString* _DTXNSStringFromUISceneActivationState(UISceneActivationState s
 
 + (UIWindow*)dtx_keyWindow
 {
-       return UIWindowScene._keyWindowScene._keyWindow;
+    UIWindow        *foundWindow = nil;
+    NSArray         *windows = [[UIApplication sharedApplication]windows];
+    for (UIWindow   *window in windows) {
+        if (window.isKeyWindow) {
+            foundWindow = window;
+            break;
+        }
+    }
+    return foundWindow;
+}
+
++ (UIWindowScene*)dtx_keyWindowScene
+{
+       UIWindow* keyWindow = [self dtx_keyWindow];
+       UIWindowScene* scene = keyWindow ? keyWindow.windowScene :  nil;
+       return scene;
 }
 
 + (NSArray<UIWindow *> *)dtx_allKeyWindowSceneWindows
 {
-       UIWindowScene* scene = UIWindowScene._keyWindowScene;
+       UIWindowScene* scene = [self dtx_keyWindowScene];
        return [self dtx_allWindowsForScene:scene];
 }
 
 + (NSArray<UIWindow*>*)dtx_allWindowsForScene:(UIWindowScene*)scene
 {
        NSMutableArray<UIWindow*>* windows = [[self dtx_allWindows] mutableCopy];
-       scene = scene ?: UIWindowScene._keyWindowScene;
+       scene = scene ?: [self dtx_keyWindowScene];
        if(scene != nil)
        {
                NSPredicate* predicate = [NSPredicate predicateWithFormat:@"windowScene == %@", scene];
@@ -193,7 +208,7 @@ static NSString* _DTXNSStringFromUISceneActivationState(UISceneActivationState s
 
 + (void)dtx_enumerateKeyWindowSceneWindowsUsingBlock:(void (NS_NOESCAPE ^)(UIWindow* obj, NSUInteger idx, BOOL *stop))block
 {
-       UIWindowScene* scene = UIWindowScene._keyWindowScene;
+       UIWindowScene* scene = [self dtx_keyWindowScene];
        [self dtx_enumerateWindowsInScene:scene usingBlock:block];
 }

But now I'm crashing deep in Detox innards, with a fishhook crash while it's trying to rebind symbols 😞

EXC_BAD_ACCESS here while doing a dyld load on something
https://github.com/facebook/fishhook/blob/8ef82f0711494ecc78d16bf6ce76f5ad92e5f67b/fishhook.c#L137

I'm just an Objective-C dilettante so this is really hard + slow going for me, any chance this will see attention some time soon by someone that actually knows Objective-C + iOS 🙏 😆

@calebmackdavenport
Copy link
Contributor

For anyone who has updated to iOS 15 but needs to work on detox in the meantime

In your detox configurations:
if you're generically pointing at a name like "name": "iPhone 11 Pro Max"
you can instead use "device": { "name": "iPhone 11 Pro Max", "os": "iOS 14.5". }

where 14.5 is whatever version you select & download in xcode -> preferences -> components
image

@mikehardy
Copy link
Contributor

@calebmackdavenport this is great and true, I will mention for people interested in keeping configs cleaner, are not using iOS15 symbols (so Xcode 12.5 would still work for you) and focusing more on environment constraint you can also just ensure that Xcode 12.5 + iOS 14.5 are the defaults by using xcode-select for local dev to choose a side-by-side install of Xcode (handy guides available a quick search away) and/or using github action "xcode-select" in combination with macos-11 (which will be macos-current in a month or so, but defaults to xcode-12.5.1 right now vs xcode-13)

The side-by-side install takes up a huge chunk of disk in a local environment vs downloading the ios 14.5 simulator so I think that's best, but it's all tradeoffs so I thought I'd mention it was possible to switch the whole Xcode too in case people needed it

Wish I was better at obj-c and could have just knocked out ios15 support, but I'll have to wait I suppose :-)

@calebmackdavenport
Copy link
Contributor

calebmackdavenport commented Sep 28, 2021

@mikehardy

But now I'm crashing deep in Detox innards, with a fishhook crash while it's trying to rebind symbols 😞

what was the scenario that led to the fishhook crash? I am not experiencing this problem

@mklb
Copy link

mklb commented Oct 12, 2021

@mklb is there any way for you to grab the crash trace like ☝️ #2895 (comment) ?

Sorry but I downgraded to iOS 14.5..I had no idea how to get the trace back then. Maybe I can try it the next days.

@mikehardy @calebmackdavenport thanks for the true effort on this. Yes - we will give this a few more days or otherwise fork fishhook.

Ever tried patch-package ? Love this. There is no need to go through forking. Just make the changes, hook up the package as a postinstall hook. Makes it easy to propose changes to the original library as well. This way we would all benefit ;)

@mikehardy
Copy link
Contributor

I use patch-package everywhere, always, but there's no easy way to patch Pods that are transitive dependencies except via gross (in my opinion) post_install sed hacks (or similar) in Podfiles (which I nevertheless hold my nose and do: facebook/react-native@ac4ddec#diff-adcf572f001c2b710d14f409c14763f1a50b08369b3034548f1602685d21f67fR219-R248)

@mikehardy
Copy link
Contributor

@d4vidi success! Fishhook merged the apparently-needed PR. If the Fishhook dependency were bumped to this commit ios15 may work facebook/fishhook@aadc161

There are still unrelated issues about DetoxSync added in v18 of course, but this could remove the ios15 hard block

@asafkorem
Copy link
Contributor

v18.23.1 was released, this version includes the required update for the fishhook dependency.

@asafkorem asafkorem self-assigned this Oct 21, 2021
@d4vidi
Copy link
Collaborator

d4vidi commented Oct 21, 2021

Thanks to @asafkorem, we've gained pretty high confidence with this fix, so far.
@mikehardy @calebmackdavenport we can't thank you enough for your work and support here 🙏🏻

yogevbd added a commit to wix/react-native-navigation that referenced this issue Oct 24, 2021
Based to this discussion: wix/Detox#2895 (comment)
This version should fix issues with iOS 15

Co-authored-by: Yogev Ben David <[email protected]>
Co-authored-by: Yogev Ben David <[email protected]>
@asafkorem asafkorem unpinned this issue Nov 1, 2021
@d4vidi d4vidi removed this from the Q4/2021 Bugathon milestone Nov 21, 2021
@MaxJadav
Copy link

MaxJadav commented Apr 28, 2022

"detox": "^19.6.7",
"react-native": "0.67.2",
M1 Xcode Version 13.3 simulator iOS 15.4

Screenshot 2022-04-28 at 2 36 05 PM

@d4vidi Getting this issue. Build was success. When try to test command. throw error.

@mikehardy
Copy link
Contributor

@MaxJadav that looks more like the whole command failed. What happened when you cut out the /usr/bin/xcrun command line and pasted it in + ran it directly? did that work at all?
I have definitely run detox on a mac (intel and m1) and it's working with ios15 no problem.

@bviebahn
Copy link

@MaxJadav I recently had the same error and fixed it by upgrading detox from 19.4.1 to 19.6.4. Not sure if this helps though since you are already on 19.6.7...

@mikehardy
Copy link
Contributor

All I can say is that both these repos use detox and they're both working right now, intel or m1 mac - linking in to their e2e test/example apps in case that helps

https://github.com/invertase/react-native-google-mobile-ads/tree/main/RNGoogleMobileAdsExample
https://github.com/invertase/react-native-firebase/blob/main/tests/

The github workflows for both projects exercise them all the time (within the last day, during my work certainly) on intel macs and I have intel and m1 in the house, running them from time to time. No issues with those sets of dependencies / CI order-of-operations+versions

@d4vidi
Copy link
Collaborator

d4vidi commented Apr 28, 2022

@MaxJadav your report is painfully short of information. Please reach out either through a separate issue, providing more details, or join our Discord.

@frenberg
Copy link

"detox": "^19.6.7", "react-native": "0.67.2", M1 Xcode Version 13.3 simulator iOS 15.4

Screenshot 2022-04-28 at 2 36 05 PM

@d4vidi Getting this issue. Build was success. When try to test command. throw error.

Are you sure about what version of detox you acctually have in your node_modules? did you run npm ls detox to se what that says?

@dbilgin
Copy link
Contributor

dbilgin commented Apr 29, 2022

Also getting the issue @MaxJadav is experiencing somehow all of a sudden but it seems to happen on other versions of iOS as well, not just 15. The app doesn't even get installed and it seems to fail on the termination step. Also it's not on M1 macs only. I also have one where the same tests run just fine, but so far I couldn't figure out what the problem could be.

@MaxJadav
Copy link

"detox": "^19.6.7", "react-native": "0.67.2", M1 Xcode Version 13.3 simulator iOS 15.4
Screenshot 2022-04-28 at 2 36 05 PM
@d4vidi Getting this issue. Build was success. When try to test command. throw error.

Are you sure about what version of detox you acctually have in your node_modules? did you run npm ls detox to se what that says?

Thank you. This error happen when upgrade detox version. After remove from node module and reinstall, clean. Working fine now.

@d4vidi
Copy link
Collaborator

d4vidi commented May 1, 2022

After remove from node module and reinstall, clean. Working fine now.

@asafkorem does that make sense?

@asafkorem
Copy link
Contributor

asafkorem commented May 1, 2022

@d4vidi it's the same issue I reported here: https://developer.apple.com/forums/thread/699615

It was resolved here, way before v19.6.7, so I guess that the Detox version listed in your package.json wasn't really installed at the time of the bug report @MaxJadav.

rahulfancode pushed a commit to ds-fancode/react-native-navigation that referenced this issue Mar 1, 2023
* tst

* sdfsdf

* bk

* builder

* Update pipeline.yml

* Update pipeline.yml

* Update pipeline.yml

* Update pipeline.yml

* Update pipeline.yml

* Update pipeline.yml

* Move remx to optional peer dependencies (#7230)

* PlatformColor Support (#7216)

Following the discussion here: #6618.

## Android
- Colours are parsed natively.
- Creating custom colour when a PlatformColor is passed to native.
- Both light/dark values have the same res attribute resolved when `get` is called.

## IOS
- Added a custom colour.
- Changed storyboard splash screen.
- Using `labelColor` as a test.


CC: @yogevbd 
closes: #6618

Co-authored-by: Yogev Ben David <[email protected]>

* Update api-events.mdx (#7224)

When testing the `registerModalAttemptedToDismissListener` event, I noticed that I had to set the `swipeToDismiss` flag to false. The docs currently falsely indicate it should be `true`

* reduce sim count

* Update test-e2e.js

* Update pipeline.yml

* Update pipeline.yml

* fix pipe

* Update ApplicationLifecycleTest.test.js

* Avoid calling AppRegistry.registerComponent in mocked mode (#7234)

* Status bar updates causes ui freeze on some devices (#7231)

Modify flags for DecorView in the global main thread handler caused ui to freeze when calling `mergeOptions` inside useEffect.
This happens on Samsung devices with Android 9, that seems it has issues internally since it is not reproduce on emulator and other devices including Samsungs with new android versions.

The workaround was to set the flags in a task to run in the DecorView MessageQueue in order to ensure flags are set when the DecorView is ready internally to accept changes.

Co-authored-by: Yogev Ben David <[email protected]>

* Update pipeline.yml

* Update pipeline.yml

* Update pipeline.yml

* add studio npm shortcut

* Component Lifecycle events fix onPause/onResume (#7235)

* Add test cases for new issues

* handle pause/resume in modal stack

* Delete OverlayManager.java

* pass pause/resume to modals/overlayes

- overlays should always get the events since they are on top
- modals basically covers the whole view behind
- all other layers can handle events in this order

* Update OverlayManager.kt

* Update Navigator.java

* add tests for overCurrentContext mode

* add peekDisplayedOverCurrentContext

* call root when top modal is overCurrentContext

Co-authored-by: Guy Carmeli <[email protected]>

* Changing StatusBar when unrelated mergeOptions Fix (#7237)

# Issue:

Each time `mergeOptions` is called, even with non `StatusBar` related options, the status bar state will change without taking defaults or static options into consideration.

# Fix

Check if options for `StatusBar` are present and then apply them on merge options. 


https://user-images.githubusercontent.com/7227793/131662099-09a91198-2033-4f50-a6f0-a29b70b5c5e5.mov


Closing: #7232.

* Change bottom tabs height constants value calculation to the dimen-based one (#7238)

Co-authored-by: Ward Abbass <[email protected]>

* Add support to change the search bar's cancel button text on iOS (#7240)

* Add support to change the search bar's cancel button text on iOS

* Replace incorrectly used test option

* Pop to root when tapping on active bottom tab on Android (#7239)

* Pop to root when tapping on active bottom tab

* Add missing imports

* Add stack type checking before popping to root

* Fix remx optional dependency (#7241)

Currently, remx is an optional peer dependency that is required for our mock consumers only. But it is actually being imported from our main `index.ts` which break users who don't import it even though they are not using mocks.
The solution is to change the way users import our mocks and make it explicit. 

Mocks now should be imported from `react-native-navigation/Mock`.


Co-authored-by: Carl-Gerhard Lindesvärd <[email protected]>

* Add popToRoot option to bottomTab on Android (#7244)

* Support DynamicColorIOS (#7248)

* Support DynamicColorIOS

* Update OptionsProcessor.ts

* docs: updated community libraries. (#7245)

Couldn't find a ready-to-use solution for a bottom sheet component that would work seamlessly with react-native-navigation, so decided to write my own - [React Native Navigation Bottom Sheet Extension](https://github.com/CursedWizard/react-native-navigation-bottom-sheet). Added it to community libraries in docs.

Also made the list of packages a little bit more organized.

Co-authored-by: Yogev Ben David <[email protected]>

* Fix color processing on iOS (#7250)

* Fix [RNNEnterExitAnimation elementTransitions] crash (#7249)

Fix a crash caused by #7194 on `[RNNEnterExitAnimation elementTransitions]`.
This is happening when trying to customize the modal animations.

```
EXCEPTION
NSInvalidArgumentException
MESSAGE
-[RNNEnterExitAnimation elementTransitions]: unrecognized selector sent to instance 0x29d8f8720
```

* Update package.json version to 7.20.0 [ci skip]

* Apply back button icon changes to scroll edge appearance (#7257)

* Fix left and right top bar buttons with component crash on Android (#7253)

* Replace incorrect title bar react button view height measure spec

* Fix right button with component incorrect ID while measuring its size

* Add missing View import

* Update TitleBarReactButtonView.java

Co-authored-by: Ward Abbass <[email protected]>
Co-authored-by: Ward Abbass <[email protected]>

* Update package.json version to 7.21.0 [ci skip]

* Fix sideMenu docs (#7275)

Updated the example using `Navigation.mergeOptions` to open the side menu with the correct first argument.

* Remove default splash layout color on Android (#7276)

Co-authored-by: Ward Abbass <[email protected]>

* Fix iOS 15 bars appearance (#7270)

Following #7266 and especially [my comment there](https://github.com/wix/react-native-navigation/issues/7266#issuecomment-925706532), I'm opening this PR to provide a quick fix to people experiencing issues when building RNN using Xcode 13.

This should be considered a fix PR rather than a feature PR, as what it's doing is basically duplicating the already set `standardAppearance` to a `scrollEdgeAppearance`. What this means is that the bars will have the same visual aspect whether they're displayed alongside the edge of a scroll view.

In a future, more elaborate PR, we could imagine a way to be able to provide `scrollEdgeAppearance` values from JS for more control over the native bars.

Fixes #7266
Fixes #7268

Co-authored-by: Yogev Ben David <[email protected]>

* Add callback as optional parameter to updateProps (#7277)

* Add callback as optional parameter to updateProps

* Add optional callback to NavigationDelegate

* Add tests to Store and ComponentWrapper

Co-authored-by: Ward Abbass <[email protected]>

* use HMSegmentedControl from pod instead of standalone file (#7279)

https://github.com/HeshamMegid/HMSegmentedControl
is available as a Pod and many libraries and frameworks use it from there. Using them along with ReactNativeNavigation causes duplicate symbols error when building the app. I have updated the library to use the class from pod instead of the standalone files embedded within the library.

* [Android][Accessibility] Prevent overwrite accessibilityLabel of BackButton  (#7282)

* [Android] Prevent overwrite accessibilityLabel of BackButton #7221

* Prevent overwrite topBar.backButton.accessibilityLabel after setDefaultOptions on Android

* Add unit tests

Co-authored-by: Ward Abbass <[email protected]>

* Declarative modals on Android (#7260)

* run modals and test overlays temp

* tmp

* modal component return null when not visible

* temp

* tmp

* use react context instead of activity

* Update DeclaredLayoutHost.kt

* showing modal + dismiss changing visible

* tmpo

* add events

* make children collapsable (native managed)

* Squashed commit of the following:

commit 9a975b4c55776ba3512e50caae1d7861a8feb1a4
Author: wixmobile <[email protected]>
Date:   Tue Sep 14 05:26:23 2021 -0400

    Update package.json version to 7.21.0 [ci skip]

commit 0f61d3ffcd0231785d212f7e4c1202c5bec98f96
Author: Sergei Butko <[email protected]>
Date:   Tue Sep 14 06:18:01 2021 +0300

    Fix left and right top bar buttons with component crash on Android (#7253)

    * Replace incorrect title bar react button view height measure spec

    * Fix right button with component incorrect ID while measuring its size

    * Add missing View import

    * Update TitleBarReactButtonView.java

    Co-authored-by: Ward Abbass <[email protected]>
    Co-authored-by: Ward Abbass <[email protected]>

commit 7351d0dd32170a81c5e5c06a2d253b4985e602f6
Author: Sergei Butko <[email protected]>
Date:   Mon Sep 13 23:08:31 2021 +0300

    Apply back button icon changes to scroll edge appearance (#7257)

commit 396879a655672cc0484e5a2a42c3483ac0a0642b
Author: wixmobile <[email protected]>
Date:   Sun Sep 5 07:14:47 2021 -0400

    Update package.json version to 7.20.0 [ci skip]

commit be858f8db9b49dd8a1761fc5c8453610d9db7c8e
Author: Yogev Ben David <[email protected]>
Date:   Sun Sep 5 13:09:30 2021 +0300

    Fix [RNNEnterExitAnimation elementTransitions] crash (#7249)

    Fix a crash caused by #7194 on `[RNNEnterExitAnimation elementTransitions]`.
    This is happening when trying to customize the modal animations.

    ```
    EXCEPTION
    NSInvalidArgumentException
    MESSAGE
    -[RNNEnterExitAnimation elementTransitions]: unrecognized selector sent to instance 0x29d8f8720
    ```

commit 1cd25e6f694ba0c8bd6bfe2c44ad507dabfff3fb
Author: Yogev Ben David <[email protected]>
Date:   Sun Sep 5 12:45:26 2021 +0300

    Fix color processing on iOS (#7250)

commit 8b4d03322ecda05b68d1ac04a43d3aed07e19a93
Author: CursedWizard <[email protected]>
Date:   Sun Sep 5 10:55:51 2021 +0200

    docs: updated community libraries. (#7245)

    Couldn't find a ready-to-use solution for a bottom sheet component that would work seamlessly with react-native-navigation, so decided to write my own - [React Native Navigation Bottom Sheet Extension](https://github.com/CursedWizard/react-native-navigation-bottom-sheet). Added it to community libraries in docs.

    Also made the list of packages a little bit more organized.

    Co-authored-by: Yogev Ben David <[email protected]>

commit ba722f8c36fb7675f7916c7d8be97e194645ff66
Author: Yogev Ben David <[email protected]>
Date:   Sun Sep 5 09:47:14 2021 +0300

    Support DynamicColorIOS (#7248)

    * Support DynamicColorIOS

    * Update OptionsProcessor.ts

commit 67b5798aa795235576f56c63ef7053247ba0a377
Author: Sergei Butko <[email protected]>
Date:   Fri Sep 3 14:14:17 2021 +0300

    Add popToRoot option to bottomTab on Android (#7244)

commit e19ff8ce7790dbb450e3e2928ff407f8cad24ccc
Author: Yogev Ben David <[email protected]>
Date:   Thu Sep 2 15:38:03 2021 +0300

    Fix remx optional dependency (#7241)

    Currently, remx is an optional peer dependency that is required for our mock consumers only. But it is actually being imported from our main `index.ts` which break users who don't import it even though they are not using mocks.
    The solution is to change the way users import our mocks and make it explicit.

    Mocks now should be imported from `react-native-navigation/Mock`.

    Co-authored-by: Carl-Gerhard Lindesvärd <[email protected]>

commit bb2b09eed05280d83abf1d850a856041c43a6afa
Author: Sergei Butko <[email protected]>
Date:   Thu Sep 2 14:46:34 2021 +0300

    Pop to root when tapping on active bottom tab on Android (#7239)

    * Pop to root when tapping on active bottom tab

    * Add missing imports

    * Add stack type checking before popping to root

commit 74c09f4f8ea0eb4a234a35dd8e0dc95c5ab98d8b
Author: Sergei Butko <[email protected]>
Date:   Thu Sep 2 14:30:02 2021 +0300

    Add support to change the search bar's cancel button text on iOS (#7240)

    * Add support to change the search bar's cancel button text on iOS

    * Replace incorrectly used test option

commit 8831ccf1fd7d6b95fed269f88e9a9613b01e0b28
Author: Sergei Butko <[email protected]>
Date:   Thu Sep 2 13:53:18 2021 +0300

    Change bottom tabs height constants value calculation to the dimen-based one (#7238)

    Co-authored-by: Ward Abbass <[email protected]>

commit d48e3d5bfeaa1ef45e837ccee99d6f28e58dc7d1
Author: Ward Abbass <[email protected]>
Date:   Wed Sep 1 21:36:45 2021 +0300

    Changing StatusBar when unrelated mergeOptions Fix (#7237)

    # Issue:

    Each time `mergeOptions` is called, even with non `StatusBar` related options, the status bar state will change without taking defaults or static options into consideration.

    # Fix

    Check if options for `StatusBar` are present and then apply them on merge options.

    https://user-images.githubusercontent.com/7227793/131662099-09a91198-2033-4f50-a6f0-a29b70b5c5e5.mov

    Closing: #7232.

commit 537eb08c8e2111afeac4c179cd20033fe7cb951e
Author: Ward Abbass <[email protected]>
Date:   Wed Sep 1 14:34:56 2021 +0300

    Component Lifecycle events fix onPause/onResume (#7235)

    * Add test cases for new issues

    * handle pause/resume in modal stack

    * Delete OverlayManager.java

    * pass pause/resume to modals/overlayes

    - overlays should always get the events since they are on top
    - modals basically covers the whole view behind
    - all other layers can handle events in this order

    * Update OverlayManager.kt

    * Update Navigator.java

    * add tests for overCurrentContext mode

    * add peekDisplayedOverCurrentContext

    * call root when top modal is overCurrentContext

    Co-authored-by: Guy Carmeli <[email protected]>

commit 97dd091cbf9922f060b3764c1dadad1a4ad0f01f
Author: Ward Abbass <[email protected]>
Date:   Wed Sep 1 12:38:13 2021 +0300

    add studio npm shortcut

commit 3d10758d0c6315fddac4317aa1ef646a9c4e6a55
Author: Ward Abbass <[email protected]>
Date:   Tue Aug 31 11:34:53 2021 +0300

    Status bar updates causes ui freeze on some devices (#7231)

    Modify flags for DecorView in the global main thread handler caused ui to freeze when calling `mergeOptions` inside useEffect.
    This happens on Samsung devices with Android 9, that seems it has issues internally since it is not reproduce on emulator and other devices including Samsungs with new android versions.

    The workaround was to set the flags in a task to run in the DecorView MessageQueue in order to ensure flags are set when the DecorView is ready internally to accept changes.

    Co-authored-by: Yogev Ben David <[email protected]>

commit ec34501fb99a6bac070d692e9a36be618874f06c
Author: Yogev Ben David <[email protected]>
Date:   Tue Aug 31 10:09:34 2021 +0300

    Avoid calling AppRegistry.registerComponent in mocked mode (#7234)

commit dfdb451a7d6621d1af24149b02161b44226dd908
Author: VNDRN <[email protected]>
Date:   Sun Aug 29 15:55:21 2021 +0200

    Update api-events.mdx (#7224)

    When testing the `registerModalAttemptedToDismissListener` event, I noticed that I had to set the `swipeToDismiss` flag to false. The docs currently falsely indicate it should be `true`

commit 1db86ce376f677255196aa774c6d6cf4ae58c98b
Author: Ward Abbass <[email protected]>
Date:   Sun Aug 29 16:01:27 2021 +0300

    PlatformColor Support (#7216)

    Following the discussion here: #6618.

    ## Android
    - Colours are parsed natively.
    - Creating custom colour when a PlatformColor is passed to native.
    - Both light/dark values have the same res attribute resolved when `get` is called.

    ## IOS
    - Added a custom colour.
    - Changed storyboard splash screen.
    - Using `labelColor` as a test.

    CC: @yogevbd
    closes: #6618

    Co-authored-by: Yogev Ben David <[email protected]>

commit 00936844c8a21cb9a89272203c29cda5c565c0d3
Author: Yogev Ben David <[email protected]>
Date:   Sun Aug 29 13:27:12 2021 +0300

    Move remx to optional peer dependencies (#7230)

commit e3e7812b3169a460aa2f928a07d69a01c4a79ae0
Author: wixmobile <[email protected]>
Date:   Mon Aug 23 05:38:37 2021 -0400

    Update package.json version to 7.19.0 [ci skip]

* Rename and Refactor Declared to Modal

* Update NavigationReactInitializer.java

* Update ReactGateway.java

* Update NavigationReactInitializer.java

* Update NavigationReactInitializer.java

* Update CoordinatorLayoutUtils.java

* Update ModalStack.java

* Update ModalStack.java

* Update ModalStack.java

* Update Navigator.java

* Update TouchablePreview.tsx

* Update LayoutsScreen.tsx

* Update testIDs.ts

* Update TouchablePreview.tsx

* Update ModalScreen.tsx

* Update ModalScreen.tsx

* Update testIDs.ts

* add more e2e tests

* Update NavigationActivity.java

* fix tests

* Update build.gradle

* Squashed commit of the following:

commit 102b7184fc0cf1a1dfd177a8766cc463a72dfeb5
Author: Sergei Butko <[email protected]>
Date:   Thu Sep 30 12:59:05 2021 +0300

    Add callback as optional parameter to updateProps (#7277)

    * Add callback as optional parameter to updateProps

    * Add optional callback to NavigationDelegate

    * Add tests to Store and ComponentWrapper

    Co-authored-by: Ward Abbass <[email protected]>

commit 92bbcc17c50d079617d2b8a03e8682faffd278aa
Author: Jordan Becker <[email protected]>
Date:   Thu Sep 30 10:32:22 2021 +0200

    Fix iOS 15 bars appearance (#7270)

    Following #7266 and especially [my comment there](https://github.com/wix/react-native-navigation/issues/7266#issuecomment-925706532), I'm opening this PR to provide a quick fix to people experiencing issues when building RNN using Xcode 13.

    This should be considered a fix PR rather than a feature PR, as what it's doing is basically duplicating the already set `standardAppearance` to a `scrollEdgeAppearance`. What this means is that the bars will have the same visual aspect whether they're displayed alongside the edge of a scroll view.

    In a future, more elaborate PR, we could imagine a way to be able to provide `scrollEdgeAppearance` values from JS for more control over the native bars.

    Fixes #7266
    Fixes #7268

    Co-authored-by: Yogev Ben David <[email protected]>

commit f87e1ca6b34e0942ee0826e72d25efd0c45edc55
Author: Sergei Butko <[email protected]>
Date:   Thu Sep 30 01:06:36 2021 +0300

    Remove default splash layout color on Android (#7276)

    Co-authored-by: Ward Abbass <[email protected]>

commit a207f62db83a496c7648c6bb66869946ad3bb545
Author: Tom Spencer <[email protected]>
Date:   Wed Sep 29 15:44:15 2021 +0100

    Fix sideMenu docs (#7275)

    Updated the example using `Navigation.mergeOptions` to open the side menu with the correct first argument.

* revert local changes

* remove unused event

When changing state of RNNModal to not visible the props got unbound to native and the dismiss event will not be received in JS, suggested to call dismiss block after calling setState in RequestDismiss.

* add missing props

* Update ModalViewManager.kt

* rename

* rename

* Update ModalLayoutController.kt

* Update NavigationModule.java

* update docs

* Fix empty dynamic colors object when using PlatformColors on iOS (#7259)

Fixes the original error mentioned here: https://github.com/wix/react-native-navigation/pull/7216#issuecomment-918975922

Co-authored-by: Ward Abbass <[email protected]>

* Fix dot indicator location on iOS (#7274)

- Fixes #6411 
- Fixes the crash if `dotIndicator` is applied without `icon` in tab

<img width="502" alt="image" src="https://user-images.githubusercontent.com/14828004/135261158-eec0d640-9220-4e1c-bbd1-46939b7b54de.png">

* Add SF Symbols support to bottom tab and top bar's back button (#7271)

Since SF Symbols are built in starting from iOS 13 it makes sense to use them as icons rather than creating PNGs which will increase app size.

<img width="502" alt="image" src="https://user-images.githubusercontent.com/14828004/134523928-2a5d19ff-a42a-445e-abf7-d4d64d222025.png">

<img width="502" alt="image" src="https://user-images.githubusercontent.com/14828004/134523961-24a521b1-bb69-43c6-9324-c91b64a4342c.png">


Co-authored-by: Yogev Ben David <[email protected]>
Co-authored-by: Ward Abbass <[email protected]>

* Fix Android project warnings (#7288)

* Rename o to others to fix problems when calling this function with named arguments

* Suppress unused parameters of TopBarAnimator

* Suppress unchecked cast of PropertyAnimatorCreator

* Remove unused import from ReactImageBoundsAnimator

* Remove redundant SAM-constructor

* Remove unused imports

* Remove unused imports

* Remove unused constant

* Fix raw use of ViewController

* Fix raw use of ViewController

* Fix raw use of ViewController

* Fix raw use of ViewController, remove unused imports

* Remove unused import

* Fix raw use of ViewController

* Fix raw use of ViewController

* Fix raw use of ViewController

* Fix raw use of ViewController

* Remove unused import

* Fix raw ViewController use

* Fix raw ViewController use

* Fix raw ViewController use

* Fix raw ViewController use

* Fix raw ViewController use

* Fix raw ViewController use

* Fix raw ViewController use

* Fix raw ViewController use

* Remove wrong return type condition

* Remove unused import

* Remove unused import

* Remove unused import

* Remove redundant semicolon

* Fix raw ViewController use

* Fix raw ViewController use

* Fix raw ViewController use

* Fix raw ViewController use, remove unused imports

* Remove unused import

* Return TypeEvaluator

* Use View from React Native (#7286)

* Fix nullable dispatcher (#7287)

Co-authored-by: Ward Abbass <[email protected]>

* Update package.json version to 7.22.1 [ci skip]

* Remove hack

Now it does not cause infinite measurements

* Fix Null activity when having initial modal at startup (#7292)

* pass ReactContext instead of activity's navigator

It seems that ReactNative can call createViewManagers in a point that current activity is null, which can lean to null exception

* Use reactContext and navigator on demand

Since Navigator is bound to activity, which is the right thing to do since it's the UI component to do ui stuff not application, navigator will be determined on demand from the current activity checking for nulls and valid lifecycle state

* Update ModalViewManager.kt

* Update ModalViewManager.kt

* Fix documentation build in CI (#7293)

* Fix hardware back button event button id in docs (#7294)

Actual buttonId for hardware back button event is `RNN.hardwareBackButton`, not `RNN.hardwareBack` :-)

* Fix documentation build (#7296)

* Build docusaurus before releasing to npm

* Fix documentation build

* documentation build - npm install before creating docs

* Update package.json version to 7.22.3 [ci skip]

* Expose the testID to black-box testing frameworks on Android (#7298)

* Fix JS tests (#7297)

* Fix JS tests

* Fix tests

* Avoid processing undefined colors (#7310)

When passing undefined colors, we don't want to parse that as Null as it will reset the current visible colors.

* Update package.json version to 7.23.0 [ci skip]

* Small typo fix (#7308)

Adds a "to" in the sentence.

* Update style-statusbar.mdx

* Revert "Remove hack" (#7314)

This reverts commit ef60d316c1fc18f9ee48254704ce7cf2c2fc7777.

* Update package.json version to 7.23.1 [ci skip]

* Add react-native-template-strong to starter kits (#7309)



Co-authored-by: Ward Abbass <[email protected]>

* Add SF Symbols support to left/right top bar buttons (#7318)

![image](https://user-images.githubusercontent.com/14828004/137584651-49043bc7-4180-45d3-9917-f62352fbb7ad.png)

* Add custom component to TopBar when setting it in root on iOS (#7303)

Fixes: https://github.com/wix/react-native-navigation/issues/7301

Co-authored-by: Yogev Ben David <[email protected]>

* hello buildkite (#7326)

* fix merge options mock (#7323)

* Update LayoutStore.ts

* Update LayoutStore.ts

* Update LayoutStore.ts

Co-authored-by: Yogev Ben David <[email protected]>

* iOS Split (#7328)

* Update Detox to support iOS 15 (#7324)

Based to this discussion: https://github.com/wix/Detox/issues/2895#issuecomment-948440467
This version should fix issues with iOS 15

Co-authored-by: Yogev Ben David <[email protected]>
Co-authored-by: Yogev Ben David <[email protected]>

* Allow iOS Unit phase on any agent

* Keyboard demo playground  (#7331)

Adding a simple demo that can be used to demonstrate Keyboard show/dismiss when showing/dismissing modal when clicking on submit

Co-authored-by: Yogev Ben David <[email protected]>

* MergeOptions, buttons got cleared when animation enabled [Android] (#7330)

# Issue:
When having `animateLeftButtons` or `animateRightButtons` enabled, calling `mergeOptions` frequently to update button state like enabled, colour and text etc, caused the menu animation to mess out the views inside the menu.

# Diagnoses:

- Calling `mergeOptions` inside `componentDidUpdate`, which can be called frequently without any options changes deducted from props like calling setState for example or changing a prop that does not have something to do the merge options call.
- Every `mergeOptions` with buttons in it, would remove and re-add buttons to the toolbars which caused the animation to run, even if the change was updating button colour or enabled state.

# Fix:

- Introduce a more efficient way to detect updates and update each button in case there are no structural changes.
- Structural changes can be: reordering, removing, adding buttons or changing buttons with the same `button.id` but a different component with no stable `componentId`.
- Other changes mentioned above will call update buttons in place with no remove and re-add and no animation.
- Refactor the code and enhance single responsibilities for each controller.
- Added more test cases for such flows.

Note:

Android built-in menu, has its limits in terms of updating and rearranging action views inside it, it would be possible if we built a custom menu with an overflow that can support, order changes, and in-place updates, and that is a long road to walk.


Co-authored-by: Yogev Ben David <[email protected]>

* Fix missing props after setRoot for components with identical predefined id (#7329)

* Destroy buttons along with the main react view

* Revert "Destroy buttons along with the main react view"

This reverts commit 27e604db1686a12bfec737a657ad5c033857a887.

* Add pending props

* Fix android button components cache

Co-authored-by: Ward Abbass <[email protected]>
Co-authored-by: Ward Abbass <[email protected]>

* Remove manually dismissing all modals on setRoot (#7340)

Currently we manually dismiss all modals on `setRoot`, we should instead clear it from the modal manager so that those controllers will be automatically released by the reference count system.

* Android context crash when parsing options (#7342)

# Issue:

When parsing options, `ReactInstanceManager.getCurrentContext()` might return null, which caused color parsing to throw null exception since it assumes that context is not null.

# Diagnose:

This can be the case when Activity was killed but the Application still alive (Don't keep activity for example), and since js is bound to the Application lifecycle, opening the activity triggers recreating context in bg, in the meantime calling a command that requires reactContext can cause such crashes to unwanted behaviours when react context is needed.
This happens internally and it looks like it is some flow where calling navigation command when react is not ready. 

# Fix:
 
Since the issue did not happen before, and the crash occurred in parsing options that are independent of `ReactContext`, we can use Activity or Application as the context for such a case.

* React Native 66 (#7305)

* RN 65

React Native upgrade + babel unit tests running as expected

* RN66

- Normal unit tests working
- Upgrade to RN66.
- Move jest to jest config file.
- Use babel-test transformer to make unit tests working
- e2e tests that can run as unit wont work.

* disable running e2es as units

* use Hermes + Fix Reanimated

* update reanimated and use babel plugin

* Enable coverage

* Upgrade jest and babel to 27

* enable JS e2e add animatable to transform ignore

* use babel jest as transformer instead of the react native one

* update android to 30

* Fix overlay insets and use non deprecated methods

* Kotlin convert

* tmp status

* Update Detox to support iOS 15

* Fix e2e

* Revert "tmp status"

This reverts commit aff2b87bf8837f18abdf1164e415342c1376c04a.

* prevent ReactRootViews from having ids

* status bar utils static fields

* Squashed commit of the following:

commit 59596385b86af1b39417c14425af488b09250bf6
Author: Ward Abbass <[email protected]>
Date:   Wed Oct 27 13:04:00 2021 +0300

    Keyboard demo playground  (#7331)

    Adding a simple demo that can be used to demonstrate Keyboard show/dismiss when showing/dismissing modal when clicking on submit

    Co-authored-by: Yogev Ben David <[email protected]>

* wait for stack/modal to be shown to send didAppear

this happens since RN 64

* Fix tests

* Ensure modal is not already presented

* use 0.66.2

Co-authored-by: svbutko <[email protected]>
Co-authored-by: Yogev Ben David <[email protected]>

* Fix default font handling on android (#7333)

* Pass null font family into typeface loader if not set

ReactTypefaceUtils handles null font families to fall back to the default typeface

* Provide the default typeface when calling typeface loader

* Feed paint typeface as default typeface into typeface loader to support default fonts

* Support default font face via AHTextView in bottom tabs

* Move defaultTypeFace to typeFace loader

Co-authored-by: Ward Abbass <[email protected]>

* Fix Android unit tests (#7345)

- Mock default typeface.
- fix buttons adding and removing tests.

Co-authored-by: Yogev Ben David <[email protected]>

* Fix missing curly bracket leftButtons (#7347)

adding curly bracket leftButtons

* Update package.json (#7351)

* destroyAllOverlays crash [Android] (#7354)

* fix units tests

* prevent modifying overlays map while iterating

* fix units

* add enable/disable option to side menu (#7364)

* Timeout (#7356)

Buildkite right now don't have a convenient way to set a global timeout for whole build, so need to set it for every step separately.

* remove merge chance shield (#7325)

Merge chance is going to be deprecated soon.

Co-authored-by: Yogev Ben David <[email protected]>

* [Navigation Mock] Fix bottomTabPressed event (#7368)

* Fix dismissing modals with sideMenu (#7369)

Dismissing a modal that has a `sideMenu` layout exposed a bug we have where we look for the component in the top ViewController presented children, with `sideMenu` it's not enough because its children are not components. 
Instead, We should recursively look for that component in all of the top viewController children tree.

Closes #7367

* Fix fast refresh crash (#7371)

Closes #6176

* Update documentation (#7373)

* Fix statusBar blur option in dark mode (#7372)

* Fix missing options processing (#7370)

We missed `mergeOptions` processing on the following commands: `pop`, `popTo`, `popToRoot`, `dismissModal` and `dismissAllModals`. That resulted in a bug where using the old animations syntax didn't work.

* Fix playground reanimated animations (#7375)

* Upgrade Android unit tests tools (#7379)

* tmp

* Upgrade unit tests dependencies on android

* Android API 30 fixes (#7343)

Upgrading android target SDK to 30, to support android 12 changes.

- Refactor StatusBarUtil to SystemUIUtils to include status and navigation bars.
- Migrate deprecated code using flags to a modern one.
- Calculating WindowInsets per component where all views are laid as full screen.
- Keyboard enhancements to show hide keyboard.
- Fix applying Options of a child taking parent Options into consideration.
- Fix fixed status bar height and use a more elegant way.
- Add more tests for SystemUiUtils.
- Add a SystemUi screen to demonstrate system UI capabilities.
- Migrate Reanimated usage to support Reanimated 2.

Closes #7339.
Closes #7225.
Closes #7358.
Closes #7199.
Closes #7171.
Closes #7111.
Closes #6988.
Closes #4258.
Closes #7360.

Demo:

https://user-images.githubusercontent.com/7227793/142203865-d65b6910-21f8-4617-812e-b5576a6b58e4.mov





Co-authored-by: Ward Abbass <[email protected]>
Co-authored-by: Yogev Ben David <[email protected]>
Co-authored-by: svbutko <[email protected]>
Co-authored-by: Ward Abbass <[email protected]>

* Fix More tab appearance on iOS (#7378)

* Bottom tabs selection stack (HW button Android) (#7380)

* Bottom tabs test to kt

* implement flows of tab selection

* Update BottomTabsControllerTest.kt

* Squashed commit of the following:

commit 3368cda45b92361f398c916c7376e82699bc4382
Author: Ward Abbass <[email protected]>
Date:   Mon Nov 29 09:56:50 2021 +0200

    Upgrade unit tests dependencies on android

commit 7fe8421ee6536fe1e7b774c0059e56296a19cc32
Author: Ward Abbass <[email protected]>
Date:   Mon Nov 29 09:20:55 2021 +0200

    tmp

commit bcf0edb15b81d7d4f809c6902eda478cb31bdcee
Author: Yogev Ben David <[email protected]>
Date:   Thu Nov 25 13:32:27 2021 +0200

    Fix playground reanimated animations (#7375)

commit 623c2393fcbc1dfd9b55a014ca023ffe5ad88bed
Author: Yogev Ben David <[email protected]>
Date:   Thu Nov 25 11:37:42 2021 +0200

    Fix missing options processing (#7370)

    We missed `mergeOptions` processing on the following commands: `pop`, `popTo`, `popToRoot`, `dismissModal` and `dismissAllModals`. That resulted in a bug where using the old animations syntax didn't work.

commit e0da767c9170caf7d993626747eac5d909cdb9cd
Author: Yogev Ben David <[email protected]>
Date:   Thu Nov 25 11:37:13 2021 +0200

    Fix statusBar blur option in dark mode (#7372)

commit 74beb279efddf76507b7d1159463aee32337d769
Author: Yogev Ben David <[email protected]>
Date:   Thu Nov 25 11:36:56 2021 +0200

    Update documentation (#7373)

commit 6452157cef9c62faa2cae4d053e850ddf1d1616e
Author: Yogev Ben David <[email protected]>
Date:   Wed Nov 24 23:20:11 2021 +0200

    Fix fast refresh crash (#7371)

    Closes #6176

commit 709ddb8a5c0ee15fb55efba9b446240d6770f736
Author: Yogev Ben David <[email protected]>
Date:   Wed Nov 24 21:37:22 2021 +0200

    Fix dismissing modals with sideMenu (#7369)

    Dismissing a modal that has a `sideMenu` layout exposed a bug we have where we look for the component in the top ViewController presented children, with `sideMenu` it's not enough because its children are not components.
    Instead, We should recursively look for that component in all of the top viewController children tree.

    Closes #7367

commit 5cc967bf54831eee3eb42a1cb8ed89a6cfbe581d
Author: Yogev Ben David <[email protected]>
Date:   Wed Nov 24 15:26:08 2021 +0200

    [Navigation Mock] Fix bottomTabPressed event (#7368)

* add e2e

* add js option

* add more testing

* docs

* Squashed commit of the following:

commit 29ac5e486dc5f14a280599c45eb0ab6d35155d7e
Author: Ward Abbass <[email protected]>
Date:   Mon Nov 29 10:40:14 2021 +0200

    Upgrade Android unit tests tools (#7379)

    * tmp

    * Upgrade unit tests dependencies on android

commit bcf0edb15b81d7d4f809c6902eda478cb31bdcee
Author: Yogev Ben David <[email protected]>
Date:   Thu Nov 25 13:32:27 2021 +0200

    Fix playground reanimated animations (#7375)

commit 623c2393fcbc1dfd9b55a014ca023ffe5ad88bed
Author: Yogev Ben David <[email protected]>
Date:   Thu Nov 25 11:37:42 2021 +0200

    Fix missing options processing (#7370)

    We missed `mergeOptions` processing on the following commands: `pop`, `popTo`, `popToRoot`, `dismissModal` and `dismissAllModals`. That resulted in a bug where using the old animations syntax didn't work.

commit e0da767c9170caf7d993626747eac5d909cdb9cd
Author: Yogev Ben David <[email protected]>
Date:   Thu Nov 25 11:37:13 2021 +0200

    Fix statusBar blur option in dark mode (#7372)

commit 74beb279efddf76507b7d1159463aee32337d769
Author: Yogev Ben David <[email protected]>
Date:   Thu Nov 25 11:36:56 2021 +0200

    Update documentation (#7373)

commit 6452157cef9c62faa2cae4d053e850ddf1d1616e
Author: Yogev Ben David <[email protected]>
Date:   Wed Nov 24 23:20:11 2021 +0200

    Fix fast refresh crash (#7371)

    Closes #6176

commit 709ddb8a5c0ee15fb55efba9b446240d6770f736
Author: Yogev Ben David <[email protected]>
Date:   Wed Nov 24 21:37:22 2021 +0200

    Fix dismissing modals with sideMenu (#7369)

    Dismissing a modal that has a `sideMenu` layout exposed a bug we have where we look for the component in the top ViewController presented children, with `sideMenu` it's not enough because its children are not components.
    Instead, We should recursively look for that component in all of the top viewController children tree.

    Closes #7367

commit 5cc967bf54831eee3eb42a1cb8ed89a6cfbe581d
Author: Yogev Ben David <[email protected]>
Date:   Wed Nov 24 15:26:08 2021 +0200

    [Navigation Mock] Fix bottomTabPressed event (#7368)

* Update BottomTabs.test.js

* Update BottomTabs.test.js

* Update lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsController.java

Co-authored-by: aliraza-noon <[email protected]>

* Squashed commit of the following:

commit eae58312ce997ed580163e2f1d5cb6c3ea1ec086
Author: Ward Abbass <[email protected]>
Date:   Tue Nov 30 08:55:13 2021 +0200

    Android API 30 fixes (#7343)

    Upgrading android target SDK to 30, to support android 12 changes.

    - Refactor StatusBarUtil to SystemUIUtils to include status and navigation bars.
    - Migrate deprecated code using flags to a modern one.
    - Calculating WindowInsets per component where all views are laid as full screen.
    - Keyboard enhancements to show hide keyboard.
    - Fix applying Options of a child taking parent Options into consideration.
    - Fix fixed status bar height and use a more elegant way.
    - Add more tests for SystemUiUtils.
    - Add a SystemUi screen to demonstrate system UI capabilities.
    - Migrate Reanimated usage to support Reanimated 2.

    Closes #7339.
    Closes #7225.
    Closes #7358.
    Closes #7199.
    Closes #7171.
    Closes #7111.
    Closes #6988.
    Closes #4258.
    Closes #7360.

    Demo:

    https://user-images.githubusercontent.com/7227793/142203865-d65b6910-21f8-4617-812e-b5576a6b58e4.mov

    Co-authored-by: Ward Abbass <[email protected]>
    Co-authored-by: Yogev Ben David <[email protected]>
    Co-authored-by: svbutko <[email protected]>
    Co-authored-by: Ward Abbass <[email protected]>

* Update BottomTabsControllerTest.kt

Co-authored-by: aliraza-noon <[email protected]>

* Fix lagging keyboard when using autoFocus (#7376)

When using TextInput's `autoFocus`, The keyboard view is trying to animate its slide-in transition within the context of a the screen push animation.
We solved this by swizzling RN code and delay the becomeFirstResponder to after the component is appeared.

Closes #7019

* Update typescript to 4.x.x (#7299)

TODO:
- [x] Update typescript
- [x] Update eslint plugins
- [x] Fix ts errors
- [x] Fix eslint errors


How was changed compilations output:

<details>
  <summary>diff: lib/dist</summary>
  
  ```diff
  index bb7566a47..32be1e8d4 100644
  --- a/lib/dist/Mock/Application.js
  +++ b/lib/dist/Mock/Application.js
  @@ -2,10 +2,10 @@
   Object.defineProperty(exports, "__esModule", { value: true });
   exports.Application = void 0;
   const tslib_1 = require("tslib");
  -const React = tslib_1.__importStar(require("react"));
  +const React = (0, tslib_1.__importStar)(require("react"));
   const react_native_1 = require("react-native");
   const connect_1 = require("./connect");
  -exports.Application = connect_1.connect(class extends React.Component {
  +exports.Application = (0, connect_1.connect)(class extends React.Component {
       constructor(props) {
           super(props);
           props.entryPoint();
  diff --git a/lib/dist/Mock/Components/BottomTabs.js b/lib/dist/Mock/Components/BottomTabs.js
  index 0eacd9f6a..ffd403db7 100644
  --- a/lib/dist/Mock/Components/BottomTabs.js
  +++ b/lib/dist/Mock/Components/BottomTabs.js
  @@ -2,10 +2,10 @@
   Object.defineProperty(exports, "__esModule", { value: true });
   exports.BottomTabs = void 0;
   const tslib_1 = require("tslib");
  -const react_1 = tslib_1.__importStar(require("react"));
  +const react_1 = (0, tslib_1.__importStar)(require("react"));
   const LayoutComponent_1 = require("./LayoutComponent");
   const connect_1 = require("../connect");
  -exports.BottomTabs = connect_1.connect(class extends react_1.Component {
  +exports.BottomTabs = (0, connect_1.connect)(class extends react_1.Component {
       render() {
           return this.props.layoutNode.children.map((child) => {
               return react_1.default.createElement(LayoutComponent_1.LayoutComponent, { key: child.nodeId, layoutNode: child });
  diff --git a/lib/dist/Mock/Components/ComponentScreen.js b/lib/dist/Mock/Components/ComponentScreen.js
  index c23f91d91..d030db91a 100644
  --- a/lib/dist/Mock/Components/ComponentScreen.js
  +++ b/lib/dist/Mock/Components/ComponentScreen.js
  @@ -2,14 +2,14 @@
   Object.defineProperty(exports, "__esModule", { value: true });
   exports.ComponentScreen = void 0;
   const tslib_1 = require("tslib");
  -const react_1 = tslib_1.__importStar(require("react"));
  +const react_1 = (0, tslib_1.__importStar)(require("react"));
   const react_native_1 = require("react-native");
   const __1 = require("../..");
   const constants_1 = require("../constants");
   const LayoutStore_1 = require("../Stores/LayoutStore");
   const connect_1 = require("../connect");
   const TopBar_1 = require("./TopBar");
  -exports.ComponentScreen = connect_1.connect(class extends react_1.Component {
  +exports.ComponentScreen = (0, connect_1.connect)(class extends react_1.Component {
       constructor(props) {
           super(props);
       }
  diff --git a/lib/dist/Mock/Components/LayoutComponent.js b/lib/dist/Mock/Components/LayoutComponent.js
  index f29b2eb52..593382929 100644
  --- a/lib/dist/Mock/Components/LayoutComponent.js
  +++ b/lib/dist/Mock/Components/LayoutComponent.js
  @@ -2,12 +2,12 @@
   Object.defineProperty(exports, "__esModule", { value: true });
   exports.LayoutComponent = void 0;
   const tslib_1 = require("tslib");
  -const react_1 = tslib_1.__importStar(require("react"));
  +const react_1 = (0, tslib_1.__importStar)(require("react"));
   const react_native_1 = require("react-native");
   const BottomTabs_1 = require("./BottomTabs");
   const ComponentScreen_1 = require("./ComponentScreen");
   const Stack_1 = require("./Stack");
  -exports.LayoutComponent = class extends react_1.Component {
  +const LayoutComponent = class extends react_1.Component {
       render() {
           switch (this.props.layoutNode.type) {
               case 'BottomTabs':
  @@ -20,3 +20,4 @@ exports.LayoutComponent = class extends react_1.Component {
           return react_1.default.createElement(react_native_1.View, null);
       }
   };
  +exports.LayoutComponent = LayoutComponent;
  diff --git a/lib/dist/Mock/Components/Modals.js b/lib/dist/Mock/Components/Modals.js
  index 8ac96a790..c6275458f 100644
  --- a/lib/dist/Mock/Components/Modals.js
  +++ b/lib/dist/Mock/Components/Modals.js
  @@ -2,12 +2,12 @@
   Object.defineProperty(exports, "__esModule", { value: true });
   exports.Modals = void 0;
   const tslib_1 = require("tslib");
  -const react_1 = tslib_1.__importStar(require("react"));
  +const react_1 = (0, tslib_1.__importStar)(require("react"));
   const react_native_1 = require("react-native");
   const LayoutComponent_1 = require("./LayoutComponent");
   const LayoutStore_1 = require("../Stores/LayoutStore");
   const connect_1 = require("../connect");
  -exports.Modals = connect_1.connect(class extends react_1.Component {
  +exports.Modals = (0, connect_1.connect)(class extends react_1.Component {
       render() {
           const children = LayoutStore_1.LayoutStore.getModals();
           return (react_1.default.createElement(react_native_1.View, { testID: 'MODALS' }, children.map((child) => {
  diff --git a/lib/dist/Mock/Components/NavigationButton.js b/lib/dist/Mock/Components/NavigationButton.js
  index 2cb32877a..84ce46707 100644
  --- a/lib/dist/Mock/Components/NavigationButton.js
  +++ b/lib/dist/Mock/Components/NavigationButton.js
  @@ -2,15 +2,12 @@
   Object.defineProperty(exports, "__esModule", { value: true });
   exports.NavigationButton = void 0;
   const tslib_1 = require("tslib");
  -const react_1 = tslib_1.__importStar(require("react"));
  +const react_1 = (0, tslib_1.__importStar)(require("react"));
   const react_native_1 = require("react-native");
   const __1 = require("../../");
   const EventsStore_1 = require("../Stores/EventsStore");
  -exports.NavigationButton = class extends react_1.Component {
  -    constructor() {
  -        super(...arguments);
  -        this.ref = undefined;
  -    }
  +const NavigationButton = class extends react_1.Component {
  +    ref = undefined;
       render() {
           const { button, componentId } = this.props;
           if (button.component)
  @@ -38,7 +35,7 @@ exports.NavigationButton = class extends react_1.Component {
                       componentId: componentId,
                   });
               }, testID: button.testID },
  -            react_1.default.createElement(Component, Object.assign({ key: buttonComponentId }, props, { componentId: buttonComponentId, ref: (ref) => (this.ref = ref) }))));
  +            react_1.default.createElement(Component, { key: buttonComponentId, ...props, componentId: buttonComponentId, ref: (ref) => (this.ref = ref) })));
       }
       invokeOnClick(stateNode) {
           if (stateNode.children) {
  @@ -53,3 +50,4 @@ exports.NavigationButton = class extends react_1.Component {
           }
       }
   };
  +exports.NavigationButton = NavigationButton;
  diff --git a/lib/dist/Mock/Components/Overlays.js b/lib/dist/Mock/Components/Overlays.js
  index f20cb399c..f9d336bd9 100644
  --- a/lib/dist/Mock/Components/Overlays.js
  +++ b/lib/dist/Mock/Components/Overlays.js
  @@ -2,13 +2,13 @@
   Object.defineProperty(exports, "__esModule", { value: true });
   exports.Overlays = void 0;
   const tslib_1 = require("tslib");
  -const react_1 = tslib_1.__importStar(require("react"));
  +const react_1 = (0, tslib_1.__importStar)(require("react"));
   const react_native_1 = require("react-native");
   const constants_1 = require("../constants");
   const LayoutComponent_1 = require("./LayoutComponent");
   const LayoutStore_1 = require("../Stores/LayoutStore");
   const connect_1 = require("../connect");
  -exports.Overlays = connect_1.connect(class extends react_1.Component {
  +exports.Overlays = (0, connect_1.connect)(class extends react_1.Component {
       render() {
           const children = LayoutStore_1.LayoutStore.getOverlays();
           return (react_1.default.createElement(react_native_1.View, { testID: constants_1.VISIBLE_OVERLAY_TEST_ID }, children.map((child) => {
  diff --git a/lib/dist/Mock/Components/Stack.js b/lib/dist/Mock/Components/Stack.js
  index d2586c8b5..602089fc1 100644
  --- a/lib/dist/Mock/Components/Stack.js
  +++ b/lib/dist/Mock/Components/Stack.js
  @@ -2,10 +2,10 @@
   Object.defineProperty(exports, "__esModule", { value: true });
   exports.Stack = void 0;
   const tslib_1 = require("tslib");
  -const react_1 = tslib_1.__importStar(require("react"));
  +const react_1 = (0, tslib_1.__importStar)(require("react"));
   const LayoutComponent_1 = require("./LayoutComponent");
   const connect_1 = require("../connect");
  -exports.Stack = connect_1.connect(class extends react_1.Component {
  +exports.Stack = (0, connect_1.connect)(class extends react_1.Component {
       render() {
           const children = this.props.layoutNode.children;
           return children.map((child, i) => {
  diff --git a/lib/dist/Mock/Components/TopBar.js b/lib/dist/Mock/Components/TopBar.js
  index 9482bc4d4..2140a3f3d 100644
  --- a/lib/dist/Mock/Components/TopBar.js
  +++ b/lib/dist/Mock/Components/TopBar.js
  @@ -2,14 +2,14 @@
   Object.defineProperty(exports, "__esModule", { value: true });
   exports.TopBar = void 0;
   const tslib_1 = require("tslib");
  -const react_1 = tslib_1.__importStar(require("react"));
  +const react_1 = (0, tslib_1.__importStar)(require("react"));
   const react_native_1 = require("react-native");
   const __1 = require("../..");
   const LayoutStore_1 = require("../Stores/LayoutStore");
   const NavigationButton_1 = require("./NavigationButton");
   const EventsStore_1 = require("../Stores/EventsStore");
   const DEFAULT_BACK_BUTTON_ID = 'RNN.back';
  -exports.TopBar = class extends react_1.Component {
  +const TopBar = class extends react_1.Component {
       constructor(props) {
           super(props);
       }
  @@ -57,6 +57,7 @@ exports.TopBar = class extends react_1.Component {
           const Component = __1.Navigation.mock.store.getComponentClassForName(name)();
           const props = __1.Navigation.mock.store.getPropsForId(id);
           return (react_1.default.createElement(react_native_1.View, { key: id, testID: testID },
  -            react_1.default.createElement(Component, Object.assign({}, props, { componentId: id }))));
  +            react_1.default.createElement(Component, { ...props, componentId: id })));
       }
   };
  +exports.TopBar = TopBar;
  diff --git a/lib/dist/Mock/Layouts/BottomTabsNode.js b/lib/dist/Mock/Layouts/BottomTabsNode.js
  index 82625609f..97a97df43 100644
  --- a/lib/dist/Mock/Layouts/BottomTabsNode.js
  +++ b/lib/dist/Mock/Layouts/BottomTabsNode.js
  @@ -1,13 +1,13 @@
   "use strict";
   Object.defineProperty(exports, "__esModule", { value: true });
   const tslib_1 = require("tslib");
  -const lodash_1 = tslib_1.__importDefault(require("lodash"));
  +const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
   const LayoutStore_1 = require("../Stores/LayoutStore");
  -const ParentNode_1 = tslib_1.__importDefault(require("./ParentNode"));
  +const ParentNode_1 = (0, tslib_1.__importDefault)(require("./ParentNode"));
   class BottomTabsNode extends ParentNode_1.default {
  +    selectedIndex = 0;
       constructor(layout, parentNode) {
           super(layout, 'BottomTabs', parentNode);
  -        this.selectedIndex = 0;
       }
       mergeOptions(options) {
           super.mergeOptions(options);
  diff --git a/lib/dist/Mock/Layouts/ComponentNode.js b/lib/dist/Mock/Layouts/ComponentNode.js
  index 6ff44f821..50f3629ec 100644
  --- a/lib/dist/Mock/Layouts/ComponentNode.js
  +++ b/lib/dist/Mock/Layouts/ComponentNode.js
  @@ -1,14 +1,14 @@
   "use strict";
   Object.defineProperty(exports, "__esModule", { value: true });
   const tslib_1 = require("tslib");
  -const lodash_1 = tslib_1.__importDefault(require("lodash"));
  +const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
   const EventsStore_1 = require("../Stores/EventsStore");
  -const ParentNode_1 = tslib_1.__importDefault(require("./ParentNode"));
  +const ParentNode_1 = (0, tslib_1.__importDefault)(require("./ParentNode"));
   class ComponentNode extends ParentNode_1.default {
  +    componentDidMountOnce = false;
  +    componentDidAppearPending = false;
       constructor(layout, parentNode) {
           super(layout, 'Component', parentNode);
  -        this.componentDidMountOnce = false;
  -        this.componentDidAppearPending = false;
       }
       componentDidMount() {
           this.componentDidMountOnce = true;
  diff --git a/lib/dist/Mock/Layouts/LayoutNodeFactory.js b/lib/dist/Mock/Layouts/LayoutNodeFactory.js
  index 2a5d9fa1a..1ea4e18b9 100644
  --- a/lib/dist/Mock/Layouts/LayoutNodeFactory.js
  +++ b/lib/dist/Mock/Layouts/LayoutNodeFactory.js
  @@ -1,9 +1,9 @@
   "use strict";
   Object.defineProperty(exports, "__esModule", { value: true });
   const tslib_1 = require("tslib");
  -const BottomTabsNode_1 = tslib_1.__importDefault(require("./BottomTabsNode"));
  -const ComponentNode_1 = tslib_1.__importDefault(require("./ComponentNode"));
  -const StackNode_1 = tslib_1.__importDefault(require("./StackNode"));
  +const BottomTabsNode_1 = (0, tslib_1.__importDefault)(require("./BottomTabsNode"));
  +const ComponentNode_1 = (0, tslib_1.__importDefault)(require("./ComponentNode"));
  +const StackNode_1 = (0, tslib_1.__importDefault)(require("./StackNode"));
   class LayoutNodeFactory {
       static create(layout, parentNode) {
           switch (layout.type) {
  diff --git a/lib/dist/Mock/Layouts/Node.js b/lib/dist/Mock/Layouts/Node.js
  index f03599138..04bc68354 100644
  --- a/lib/dist/Mock/Layouts/Node.js
  +++ b/lib/dist/Mock/Layouts/Node.js
  @@ -1,6 +1,11 @@
   "use strict";
   Object.defineProperty(exports, "__esModule", { value: true });
   class Node {
  +    nodeId;
  +    data;
  +    type;
  +    // options: Options;
  +    parentNode;
       constructor(layout, type, parentNode) {
           this.nodeId = layout.id;
           this.data = layout.data;
  diff --git a/lib/dist/Mock/Layouts/ParentNode.js b/lib/dist/Mock/Layouts/ParentNode.js
  index c446dcd8b..0ba4f703e 100644
  --- a/lib/dist/Mock/Layouts/ParentNode.js
  +++ b/lib/dist/Mock/Layouts/ParentNode.js
  @@ -1,11 +1,12 @@
   "use strict";
   Object.defineProperty(exports, "__esModule", { value: true });
   const tslib_1 = require("tslib");
  -const lodash_1 = tslib_1.__importDefault(require("lodash"));
  +const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
   const LayoutStore_1 = require("../Stores/LayoutStore");
  -const LayoutNodeFactory_1 = tslib_1.__importDefault(require("./LayoutNodeFactory"));
  -const Node_1 = tslib_1.__importDefault(require("./Node"));
  +const LayoutNodeFactory_1 = (0, tslib_1.__importDefault)(require("./LayoutNodeFactory"));
  +const Node_1 = (0, tslib_1.__importDefault)(require("./Node"));
   class ParentNode extends Node_1.default {
  +    children;
       constructor(layout, type, parentNode) {
           super(layout, type, parentNode);
           this.children = layout.children.map((childLayout) => LayoutNodeFactory_1.default.create(childLayout, this));
  diff --git a/lib/dist/Mock/Layouts/StackNode.js b/lib/dist/Mock/Layouts/StackNode.js
  index 2093e7b23..7d78383cf 100644
  --- a/lib/dist/Mock/Layouts/StackNode.js
  +++ b/lib/dist/Mock/Layouts/StackNode.js
  @@ -1,7 +1,7 @@
   "use strict";
   Object.defineProperty(exports, "__esModule", { value: true });
   const tslib_1 = require("tslib");
  -const ParentNode_1 = tslib_1.__importDefault(require("./ParentNode"));
  +const ParentNode_1 = (0, tslib_1.__importDefault)(require("./ParentNode"));
   class StackNode extends ParentNode_1.default {
       constructor(layout, parentNode) {
           super(layout, 'Stack', parentNode);
  diff --git a/lib/dist/Mock/Stores/LayoutStore.js b/lib/dist/Mock/Stores/LayoutStore.js
  index 1aa3bcde3..0bb08f41b 100644
  --- a/lib/dist/Mock/Stores/LayoutStore.js
  +++ b/lib/dist/Mock/Stores/LayoutStore.js
  @@ -2,8 +2,8 @@
   Object.defineProperty(exports, "__esModule", { value: true });
   exports.LayoutStore = void 0;
   const tslib_1 = require("tslib");
  -const lodash_1 = tslib_1.__importDefault(require("lodash"));
  -const LayoutNodeFactory_1 = tslib_1.__importDefault(require("../Layouts/LayoutNodeFactory"));
  +const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
  +const LayoutNodeFactory_1 = (0, tslib_1.__importDefault)(require("../Layouts/LayoutNodeFactory"));
   const remx = require('remx');
   const state = remx.state({
       root: {},
  diff --git a/lib/dist/Mock/connect.js b/lib/dist/Mock/connect.js
  index ca7b3b493..c9fa9cdfa 100644
  --- a/lib/dist/Mock/connect.js
  +++ b/lib/dist/Mock/connect.js
  @@ -4,6 +4,6 @@ exports.connect = void 0;
   const remx_1 = require("remx");
   function connect(component) {
       // @ts-ignore
  -    return remx_1.connect()(component);
  +    return (0, remx_1.connect)()(component);
   }
   exports.connect = connect;
  diff --git a/lib/dist/Mock/index.js b/lib/dist/Mock/index.js
  index 3720f4cf6..26e72e816 100644
  --- a/lib/dist/Mock/index.js
  +++ b/lib/dist/Mock/index.js
  @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
   exports.mockNativeComponents = exports.ApplicationMock = void 0;
   const tslib_1 = require("tslib");
   exports.ApplicationMock = require('./Application').Application;
  -tslib_1.__exportStar(require("./constants"), exports);
  +(0, tslib_1.__exportStar)(require("./constants"), exports);
   function mockNativeComponents() {
       const { NativeCommandsSender } = require('./mocks/NativeCommandsSender');
       const { NativeEventsReceiver } = require('./mocks/NativeEventsReceiver');
  diff --git a/lib/dist/Mock/mocks/NativeCommandsSender.js b/lib/dist/Mock/mocks/NativeCommandsSender.js
  index 145c82361..3d64226dd 100644
  --- a/lib/dist/Mock/mocks/NativeCommandsSender.js
  +++ b/lib/dist/Mock/mocks/NativeCommandsSender.js
  @@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
   exports.NativeCommandsSender = void 0;
   const tslib_1 = require("tslib");
   const LayoutStore_1 = require("../Stores/LayoutStore");
  -const LayoutNodeFactory_1 = tslib_1.__importDefault(require("../Layouts/LayoutNodeFactory"));
  +const LayoutNodeFactory_1 = (0, tslib_1.__importDefault)(require("../Layouts/LayoutNodeFactory"));
   const EventsStore_1 = require("../Stores/EventsStore");
  -const lodash_1 = tslib_1.__importDefault(require("lodash"));
  +const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
   class NativeCommandsSender {
       constructor() { }
       setRoot(_commandId, layout) {
  diff --git a/lib/dist/Mock/mocks/NativeEventsReceiver.js b/lib/dist/Mock/mocks/NativeEventsReceiver.js
  index dcb7de6d1..513cfd44a 100644
  --- a/lib/dist/Mock/mocks/NativeEventsReceiver.js
  +++ b/lib/dist/Mock/mocks/NativeEventsReceiver.js
  @@ -2,7 +2,7 @@
   Object.defineProperty(exports, "__esModule", { value: true });
   exports.NativeEventsReceiver = void 0;
   const tslib_1 = require("tslib");
  -const lodash_1 = tslib_1.__importDefault(require("lodash"));
  +const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
   const EventsStore_1 = require("./../Stores/EventsStore");
   class NativeEventsReceiver {
       registerAppLaunchedListener(callback) {
  diff --git a/lib/dist/Navigation.js b/lib/dist/Navigation.js
  index 200c8e56a..ceabecc4a 100644
  --- a/lib/dist/Navigation.js
  +++ b/lib/dist/Navigation.js
  @@ -2,7 +2,7 @@
   Object.defineProperty(exports, "__esModule", { value: true });
   exports.NavigationRoot = void 0;
   const tslib_1 = require("tslib");
  -const isArray_1 = tslib_1.__importDefault(require("lodash/isArray"));
  +const isArray_1 = (0, tslib_1.__importDefault)(require("lodash/isArray"));
   const UniqueIdProvider_1 = require("./adapters/UniqueIdProvider");
   const Store_1 = require("./components/Store");
   const OptionProcessorsStore_1 = require("./processors/OptionProcessorsStore");
  @@ -24,11 +24,27 @@ const LayoutProcessor_1 = require("./processors/LayoutProcessor");
   const LayoutProcessorsStore_1 = require("./processors/LayoutProcessorsStore");
   const OptionsCrawler_1 = require("./commands/OptionsCrawler");
   class NavigationRoot {
  +    nativeCommandsSender;
  +    nativeEventsReceiver;
  +    appRegistryService;
  +    TouchablePreview = TouchablePreview_1.TouchablePreview;
  +    store;
  +    optionProcessorsStore;
  +    layoutProcessorsStore;
  +    uniqueIdProvider;
  +    componentRegistry;
  +    layoutTreeParser;
  +    layoutTreeCrawler;
  +    commands;
  +    eventsRegistry;
  +    commandsObserver;
  +    componentEventsObserver;
  +    componentWrapper;
  +    optionsCrawler;
       constructor(nativeCommandsSender, nativeEventsReceiver, appRegistryService) {
           this.nativeCommandsSender = nativeCommandsSender;
           this.nativeEventsReceiver = nativeEventsReceiver;
           this.appRegistryService = appRegistryService;
  -        this.TouchablePreview = TouchablePreview_1.TouchablePreview;
           this.componentWrapper = new ComponentWrapper_1.ComponentWrapper();
           this.store = new Store_1.Store();
           this.optionProcessorsStore = new OptionProcessorsStore_1.OptionProcessorsStore();
  @@ -147,7 +163,7 @@ class NavigationRoot {
        * Sets new root component to stack.
        */
       setStackRoot(componentId, layout) {
  -        const children = isArray_1.default(layout) ? layout : [layout];
  +        const children = (0, isArray_1.default)(layout) ? layout : [layout];
           return this.commands.setStackRoot(componentId, children);
       }
       /**
  diff --git a/lib/dist/NavigationDelegate.js b/lib/dist/NavigationDelegate.js
  index 745e950d0..e4b83a973 100644
  --- a/lib/dist/NavigationDelegate.js
  +++ b/lib/dist/NavigationDelegate.js
  @@ -6,6 +6,7 @@ const NativeCommandsSender_1 = require("./adapters/NativeCommandsSender");
   const NativeEventsReceiver_1 = require("./adapters/NativeEventsReceiver");
   const AppRegistryService_1 = require("./adapters/AppRegistryService");
   class NavigationDelegate {
  +    concreteNavigation;
       constructor() {
           this.concreteNavigation = this.createConcreteNavigation(new NativeCommandsSender_1.NativeCommandsSender(), new NativeEventsReceiver_1.NativeEventsReceiver(), new AppRegistryService_1.AppRegistryService());
       }
  diff --git a/lib/dist/adapters/ColorService.d.ts b/lib/dist/adapters/ColorService.d.ts
  index ab3e0ca04..6af546721 100644
  --- a/lib/dist/adapters/ColorService.d.ts
  +++ b/lib/dist/adapters/ColorService.d.ts
  @@ -1,3 +1,3 @@
   export declare class ColorService {
  -    toNativeColor(inputColor: string): number | typeof import("react-native").OpaqueColorValue | null | undefined;
  +    toNativeColor(inputColor: string): import("react-native").ProcessedColorValue | null | undefined;
   }
  diff --git a/lib/dist/adapters/ColorService.js b/lib/dist/adapters/ColorService.js
  index b9ebf7fef..96fdc3fc8 100644
  --- a/lib/dist/adapters/ColorService.js
  +++ b/lib/dist/adapters/ColorService.js
  @@ -4,7 +4,7 @@ exports.ColorService = void 0;
   const react_native_1 = require("react-native");
   class ColorService {
       toNativeColor(inputColor) {
  -        return react_native_1.processColor(inputColor);
  +        return (0, react_native_1.processColor)(inputColor);
       }
   }
   exports.ColorService = ColorService;
  diff --git a/lib/dist/adapters/Constants.js b/lib/dist/adapters/Constants.js
  index dea12936d..114a4c85d 100644
  --- a/lib/dist/adapters/Constants.js
  +++ b/lib/dist/adapters/Constants.js
  @@ -3,12 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
   exports.Constants = void 0;
   const react_native_1 = require("react-native");
   class Constants {
  -    constructor(constants) {
  -        this.statusBarHeight = constants.statusBarHeight;
  -        this.topBarHeight = constants.topBarHeight;
  -        this.backButtonId = constants.backButtonId;
  -        this.bottomTabsHeight = constants.bottomTabsHeight;
  -    }
       static async get() {
           const constants = await react_native_1.NativeModules.RNNBridgeModule.getNavigationConstants();
           return new Constants(constants);
  @@ -16,5 +10,15 @@ class Constants {
       static getSync() {
           return new Constants(react_native_1.NativeModules.RNNBridgeModule.getNavigationConstantsSync());
       }
  +    statusBarHeight;
  +    backButtonId;
  +    t…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests