I understand your setup consists of
- An NFC Tag emulated by your device (not necessarily an iPhone)
- iPhone acting as a reader
- my device acting as a writer
Sequence of operations
1) Device is in CE mode with NDEF content
2) Device is proximated to iPhone which then reads the tag
3) Device re-writes the tag with a fresh NDEF message
4) iPhone reads the tag
5) Steps 3 and 4 repeat until step 3 is replaced with 'erase tag'
Answers to your query:
First of all, you need a synchronization mechanism between iPhone and your device to serialise step 3 and 4.
Secondly, after reading is complete iPhone needs to deselect the card so that it can select it after the new data is written. Usually, this will not be a standard behavior of iPhone since it expects the tag to move away and be brought back. So, you need to tweak iPhone.
Note: Device for subsequent discussions can be considered as an MCU connected to an N-TAG. In this case, its not in CE-mode, but is a physical Tag.