Generating quantum entanglement is not only an important scientific endeavor, but will be essential to realizing quantum-enhanced technologies, in particular, quantum-enhanced measurements with precision beyond classical limits. We investigate the heralded generation of multiphoton entanglement for quantum metrology using a reconfigurable integrated waveguide device in which projective measurement of auxiliary photons heralds the generation of path-entangled states. We use four and six-photon inputs, to analyze the heralding process of two- and four-photon NOON states-a superposition of N photons in two paths, capable of enabling phase supersensitive measurements at the Heisenberg limit. Realistic devices will include imperfections; as part of the heralded state preparation, we demonstrate phase superresolution within our chip with a state that is more robust to photon loss.