While there had been plenty of rumors about the RAM and battery sizes in the new iPhone XS, iPhone XS Max, and the iPhone XR, a new filing with TENAA confirms that both of the flagship phones have 4GB of RAM while the XR has 3GB.
TENAA is the China Ministry of Industry and Information Technology. It is effectively like the FCC here in the United States and is where devices that are going to be sold in China have to have regulatory approval. TENAA is often a great source of information about devices and the new iPhones are no exception.
The filings indicate that both the iPhone XS and XS Max have 4GB of RAM while the iPhone XR has 3GB of RAM. Battery wise, the XS has a 2658 mAh battery which is slightly smaller than the 2716 mAh battery in the iPhone X. As for the iPhone XS Max, it has a larger 3174 mAh battery which is somewhat in line with expectations given the larger size of the phone compared to the others. On the iPhone XR, the battery built into this 6.1″ iPhone is 2942 mAh. That is larger than the iPhone X and the iPhone XS.
Apple touts that all three of the iPhones have gained significantly in battery life thanks to optimizations and improvements in iOS itself. The company was clear that the iPhone XS would last up to 30 minutes longer than the iPhone X despite the slightly smaller battery in it.