Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to modify info.plist?

Tags:

xcode

ios

plist

So i need to disable ATS in my xcode project by typing

<key>NSAppTransportSecurity</key>
  <dict>
      <key>NSAllowsArbitraryLoads</key>
      <true/>
  </dict>

in my info.plist. However my info.plist file contains only

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>LastAccessedDate</key>
    <date>2022-11-06T09:15:11Z</date>
    <key>WorkspacePath</key>
    <string>/Users/markmarus/Desktop/name/name.xcodeproj</string>
</dict>
</plist>

There also is a scm.plist which contains

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Version</key>
    <integer>5</integer>
</dict>
</plist>

After adding ATS settings and starting simulator up the info.plist file just deletes added lines so it changes nothing.

like image 849
marus Avatar asked Dec 22 '25 21:12

marus


1 Answers

The Info.plist generated by Xcode starts with a uppercase letter and contains much more information than your obviously self-generated one.

If you want to modify the Xcode Info.plist do it the GUI in the Info tab of the target. After adding a custom key-value pair it appears also in the project navigator and you can open it as Source Code to modify the property list text directly.

like image 135
vadian Avatar answered Dec 24 '25 11:12

vadian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!