In order to define who is the woman in ch 12, we have to read the verses closely.
1) The woman gave birth to Man-child who is going to rule the world with Iron Rod.
2) The woman liveth on the earth until the End-times
3) The woman had the crown of 12 stars, clothed with the sun, and the moon, and 12 stars reminds us of the Israelite tribes.
4) The church didn't give birth to Jesus, but Jesus gave birth to the church. However, we must note that there was the church in the primitive form since Adam and Eve since they were saved after they committed sins. The Lord must have given them the leather coats after the sinless animals were killed and shed the blood ( Gen 3:21) This was taught to Cain and Abel as well, but only Abel obeyed this truth.
There was the church in the wilderness ( Acts 7:38). However, the visible and clearer church started only after the death and resurrection of Jesus, starting from the Pentecost.
Now we must recognize the NT church was formed by the Holy Spirit.
5) When we think about the birth of Jesus Christ who created all things at the time of Creation, and whom Moses served and valued more precious than all the treasures of Egypt ( Heb 11:26) and King David served and called " Lord" ( Psalm 110:1), we must remember that He was not produced by Mary, but that Jesus was BORN by the HOly Spirit ( Mt 1:20). The word used in Mt 1:20 is not Sulambanow ( Conceive as in Luke 1:31) but genao ( beget, begotten, born). Jesus was born by the Holy Spirit before He came out of Mary ( Mt 1:26, Gal 4:4). This coincides with Heb 1:5 as we notice the continuation of the same person, Son of God which was mentioned in John 8:58. Jesus identified Himself as the same person who existed before Abraham. Mary was a creature created by Jesus as we read Col 1:16-18, Joh 1:3.
6) Therefore it is very much likely that the woman indicates the Holy Spirit dwelling in the church of Christ.
7) If we keep in mind such understanding, then we can check further as the following.
The woman has been protected in the wilderness ( world), she has been there for 1,260 days since the Ascension of Jesus until the end times. This 1260 days are 3 and a half years and the same period during which Jesus proclaimed the Gospel as a prophet, until he offered Himself as the Priest after the Melchizedek.
Satan tried to swallow her with a huge flood, but the Earth ( New Earth and New Heaven) assisted Her, then she disappeared, and only the Remnants are left at the end of the ch 12.
This means, I believe, there will be the Rapture of the Believers who have the Holy Spirit in their hearts. This can be confirmed with Rev 11. because Rev 11 and Rev 12 are the same summary of 1260 days of witnessing.
In Rev 11:11-13, the 2 witnesses finish their ministry after 1260 years, then were killed but after 3 and half days, they were resurrected and brought up( ascended up) to the heaven ( Re 11:12) and the Remnants gave glory to the God.
ch 11 describes the same period as ch 12, and they are like Gospel Luke and Gospel Matthew for the same period. Those key people, 2 Olive Trees, 2 Candlesticks, 2 Witnesses are all explained well in Zechariah 4 which explains 2 Witnesses are the people serving the Lord all over the world, not the specific 2 persons like Elijah and Moses, or Elijah and Enoch.
The key and true believers of the church will be the 2 witnesses and they will be raptured, and there will be Remnants of the Woman's seed.
The rapture is well described in 11:11-13.
The rest of the chapters are focusing on the struggle between the Dragon, Beast, Harlot and the Remnants of the Woman's seed.
Rev 11 starts from verse 3, and Rev 11:1 and 2 belongs to ch 10 as the division was wrong which was done around 16 century. chapter 10 is the same as Rev 11 and 12. Therefore Rev 10, 11,12 are like Gospel Matthew, Mark, and Luke.
Then we can understand that the Holy Spirit had the glory of 12 stars since He worked for the church of Israel in the wilderness, He worked since the Creation ( Genesis 1:2)
The man-child was born by the Holy Spirit ( was brought into the world by the Holy Spirit) When Jesus was tested by Satan, He was brought to the wilderness by the Holy Spirit.
Then it is clear that the woman mean the Holy Spirit dwelling in the Believers ( church).