Select only Iphone as Targeted devices

Hello,

I have tried to select only iphone by adding this in Info.plist

<key>UIDeviceFamily</key>
<array>
<integer>1</integer>

But I get this error


 User supplied UIDeviceFamily key in the Info.plist will be overwritten. Please use the build setting TARGETED_DEVICE_FAMILY and remove UIDeviceFamily from your Info.plist. (in target 'App' from project 'App')

I tried to add TARGETED_DEVICE_FAMILY as an env variable inside AppFlow dashboard but still the same message.

No luck.

How can I achieve this ?

Thank you.

This forum seems dead as I have 0 view after more than a day.

The solution was in the file “project.pbxproj”.

There is two times the field “TARGETED_DEVICE_FAMILY”, which needs to be set to 1.