TypeError: requiredElementsArray is not iterable

when i sync ios,

[capacitor] ✔ Updating iOS native dependencies with pod install in 11.30s
[capacitor] [fatal] TypeError: requiredElementsArray is not iterable
[capacitor]     at doesContainElements (/node_modules/@capacitor/cli/dist/cordova.js:358:51)
[capacitor]     at doesContainElements (/node_modules/@capacitor/cli/dist/cordova.js:380:45)
[capacitor]     at doesContainElements (/node_modules/@capacitor/cli/dist/cordova.js:380:45)
[capacitor]     at doesContainElements (/node_modules/@capacitor/cli/dist/cordova.js:380:45)
[capacitor]     at doesContainElements (/node_modules/@capacitor/cli/dist/cordova.js:380:45)
[capacitor]     at logiOSPlist (/Users/lionelli/Desktop/IonicProjects/ionic-demos/node_modules/@capacitor/cli/dist/cordova.js:394:22)
[capacitor] ✔ update ios in 12.47s
[capacitor] [info] Sync finished in 14.701s

what are your cordova plugins?

my custom plugins,I found out why。
In my plugin’s plugin.xml file,

        <config-file parent="NSAppTransportSecurity" target="*-Info.plist">
            <dict>
                <key>NSAllowsArbitraryLoads</key>
                <true/>
            </dict>
        </config-file>

Remove this code and no errors will be reported。

But it worked in Cordova。
How do I change the configuration?

I’ve tried adding that to a plugin and can’t reproduce.
But looks like a bug in Capacitor CLI, you should report the issue and provide a sample app where it can be reproduced.