How to regenerate an iPhone Xcode info.plist file
Asked Answered
R

4

12

I have moved my iPhone app from one machine to another. In the process my info.plist file seems to have a bad bundle identifier and is not working. I want to create an entirely new info.plist file for my project.

How can I do this?

Ropedancer answered 26/8, 2009 at 20:50 Comment(2)
useyourloaf.com/blog/xcode-13-missing-info.plistPaganize
for new swiftUI projects, it's actually not required any more. everything is in the project configurationPaganize
O
12

Here's a clean info.plist for you. Don't forget to replace xxx.yyy, and rename xib file (if required)

<?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>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleDisplayName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundleExecutable</key>
    <string>${EXECUTABLE_NAME}</string>
    <key>CFBundleIconFile</key>
    <string>Icon.png</string>
    <key>CFBundleIdentifier</key>
    <string>xxx.yyy.${PRODUCT_NAME:rfc1034identifier}</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>NSMainNibFile</key>
    <string>MainWindow</string>
</dict>
</plist>
Ossieossietzky answered 26/8, 2009 at 21:38 Comment(0)
T
6

If you just want an empty info.plist file, then just select "New File..." on the "File" menu in XCode.

In the "New File" window you pick "Other" on the left hand and then "Property List" on the right hand.

Tonometer answered 26/8, 2009 at 21:14 Comment(0)
C
4

I had problem finding "Info.plist" file too, especially that some C++ test application target doesn't have "Info" tab, so modification in this file had to be done manually.

To find it:

  1. Select project in project navigator
  2. Select desired target (project can have multiple targets)
  3. Select tab "build Settings"
  4. Search for entry "Info.plist File". There you should find path of this file

Tested on Xcode 7.3.

In my case I had to "Allow Arbitrary Load" in "App Transport Security Settings" to restore insecure HTTP protocol.

Coupler answered 26/4, 2016 at 13:3 Comment(0)
H
0

I did it this way: Proj Navigator --> Info --> add a line 'Scripting definition file name' 'Info.plist'. Now you can find and edit the file.

Holster answered 26/1 at 12:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.