accedentlyy deleted info.plist

hey I accidentally deleted my info.plist with holds my app version and other critical things and I don't know how to get it back or how to recode it

Answered by DTS Engineer in 843603022

If you have an older copy of your .app around somewhere, In the Finder command-click (or right-click) on it and choose "Show Package Contents". Then, you can scrounge around in there to find a copy of the last Info.plist that you built into your app.

Hope you have a recent backup somewhere. You should.

To create an info.plist:

  • In Xcode, File > File > File from template (or cmd N)
  • select Property List in Resource section
  • name it info (Info.plist)

Then populate it as needed.

Typical content, in source code format:

<?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>$(DEVELOPMENT_LANGUAGE)</string>
	<key>CFBundleDisplayName</key>
	<string>YourAppName</string>
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>1.0</string>
	<key>CFBundleName</key>
	<string>$(PRODUCT_NAME)</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>$(MARKETING_VERSION)</string>
	<key>CFBundleVersion</key>
	<string>$(CURRENT_PROJECT_VERSION)</string>
	<key>ITSAppUsesNonExemptEncryption</key>
	<false/>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>NSCameraUsageDescription</key>
	<string>Text to authorise camera access.</string>
	<key>NSPhotoLibraryUsageDescription</key>
	<string>Text to authorise album access.</string>
	<key>UIApplicationSceneManifest</key>
	<dict>
		<key>UIApplicationSupportsMultipleScenes</key>
		<true/>
		<key>UISceneConfigurations</key>
		<dict>
			<key>UIWindowSceneSessionRoleApplication</key>
			<array>
				<dict>
					<key>UISceneConfigurationName</key>
					<string>Default Configuration</string>
					<key>UISceneDelegateClassName</key>
					<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
					<key>UISceneStoryboardFile</key>
					<string>Main</string>
				</dict>
			</array>
		</dict>
	</dict>
	<key>UILaunchStoryboardName</key>
	<string>LaunchScreen</string>
	<key>UIMainStoryboardFile</key>
	<string>Main</string>
	<key>UIRequiredDeviceCapabilities</key>
	<array>
		<string>armv7</string>
	</array>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
		<string>UIInterfaceOrientationPortraitUpsideDown</string>
	</array>
	<key>UISupportedInterfaceOrientations~ipad</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationPortraitUpsideDown</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
</dict>
</plist>

what if I just made a new project and set the bundle id the same as this one and stuff and just imported the files from my current project to that one? would that auto have a fixed info.plist? as well win I set like the bundle id and stuff the same would it connect to the same App Store Connect "app" or would it make a new one

or actully would someone be able to send them in normal property list mode

what's this mean

Accepted Answer

If you have an older copy of your .app around somewhere, In the Finder command-click (or right-click) on it and choose "Show Package Contents". Then, you can scrounge around in there to find a copy of the last Info.plist that you built into your app.

accedentlyy deleted info.plist
 
 
Q