Setup iOS icon from Qt - ios

Because of this unsolved problem I have to assemble my Qt Creator projects to Xcode projects and run it there. So, I need to setup icon for iOS app version. I tried two ways:
1.
I can add icons and Info.plist inside ready Xcode project. It works pretty well, but I have no desire to do that every time I assemble Qt project to Xcode project.
2.
Thus, I tried to add icons and plist to pro-file:
ios {
ios_icon.files = $$files($$PWD/ios/AppIcon*.png)
QMAKE_BUNDLE_DATA += ios_icon
QMAKE_INFO_PLIST = ios/Info.plist
}
This way I get incorrect Xcode project. There is no Info.plist in the files of project tree, however I have references to that file (in the folder of Qt project, it's not copied) in Target -> Build Settings -> Packaging -> Info.plist file. App icons of different size are presented in Xcode project, but they are references, not copies. When trying to run, I get:
Installation failed. Invalid argument.
After coping icons and plist to that project, it runs well, but application title is ${PRODUCT_NAME}.
I also tried to setup copying of Info.plist in pro-file these ways, but got the same results.
Does anybody know what is going on here??

Open the Xcode bulid file and go to build Settings>product bundle identifier . Now set any bundle id in the field . Now run the project , it will automatically create info.plist file and other set up like standard .

Related

Xcode Version 14.1 is removing custom keys from info.plist once url updated?

I've noticed recently in xCode Version 14.1 , when i update Targets -> Info -> URL Types , any custom field in info.plist i've added early is being removed by xCode such as ATT or Facebook client token etc .
I've tried to close and reopen the project , also I've removed the xCode completely from my mac and reinstalled it still same issue .
is it possible a bug ! it is very risky to upload the app with missing info.plist keys to store .
I've already reported this issue to apple still no response , but if anyone has same issue and managed to fixed!
The Packaging collection of build settings has the build settings for automatically generating an Info.plist file.
To access the build settings,
Select your project from the left side of the project window to open the project editor.
Select the app target from the left side of the project editor.
Click the Build Settings button at the top of the project editor.
Typing Info.plist in the search field in the build settings list will show the build settings that deal with the Info.plist file.

Xcode 13 - The project at '/Users/test.xcodeproj' cannot be opened because it is in a future Xcode project file format

When opening in Xcode 12.5 a project created with Xcode13, I get this error message:
"The project at '/Users/[...].xcodeproj' cannot be opened because it is in a future Xcode project file format. Adjust the project format using a compatible version of Xcode to allow it to be opened by this version of Xcode."
how am I supposed to adjust the project?
It is easy to change the project format in the Xcode file inspector:
But this is not the whole picture.
Another issue is the missing plist file in Xcode13 created projects.
To make the new project compatible in Xcode 12 you need to add a plist file. The best and quicker solution is to make a new project in Xcode 12 and copy and drop the plist file in the new Xcode13 project. Then make add the necessary changes for your project.
You will need to stop Xcode 13 to generate new plist files when you make changes. So return to the project in Xcode13 and set generate plist file to no under packaging in Build Settings:
I found very helpful information about this in a very good article on useyourloaf.com
I solved it selecting the target in the project settings, opening the identity and type window and changing to Xcode 12.0. Then open the project workspace again and done!
Check also the command line tools you are using in Xcode preferences --> locations

Crashlytics Framework doesn't detect the Info plist on iOS

I am trying to add Crashlytics framework in my project, however, when I go through the process and reach the point where I add the framework to the project. The "Fabric" script plugin on the Mac doesn't detect that the frame work has been add to the project, and I think because the it doesn't detect the Info.plist in my project as I have changed the name of the Info.plist to something else. I have tried to change it back to Info.plist but still doesn't work.
How can I make the framework to detect the info.plist in my project.
Thanks
I'm not sure if what I encountered was the same thing, but when trying to archive my project, I received the following error:
❌ error: Fabric: Info.plist Error
I poked through the output in XCode which mentioned it could be a timing issue and to make sure that I made the "Fabric" build phase one of the last build phases. So I updated the XCode configuration and made the Fabric step run just before the "Upload Symbols to Fabric" step, and this cleared up the issue. See the image below.
The root cause for me was an empty Bundle Identifier (although the key was set in info.plist).
After setting up a new XCode-project as a copy of another one i copied the info.plist with all keys into the new project. But it uses variables like $(PRODUCT_BUNDLE_IDENTIFIER), which was assigned somewhere else (maybe in the project file, that i haven't copied also)
In the screenshot the field with the round oval was empty then as a result. After applying the correct bundle identifier, everything has built fine.
Xcode 10 only:
Add your app's built Info.plist location to the Build Phase's Input Files field:
$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
Move the RunScript in Target -> Build Phase to the last and give it a try:
Did you add the Fabric NSDictionary entry to your .plist(s)?
Set absolute path of Info.plist in "Input Files"
Add/Change "Input Files" value in Run Script added for Fabric under "Build Phases"
From "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)" To "new path*/Info.plist"
*new path: You can also get Info.plist path from Build Settings -> Packaging -> Info.plist File
Add your app's built Info.plist location to the Build Phase's Input Files field:
$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
Note: Put exact same lines as given above to resolve this issue I am using Xcode_10.1 and this is working perfectly fine for me and on Fabric official website they specifically mention the same solution as given abovePlease refer this image to see attached screenshots of Xcode to get more details about where to put this line
Xcode 10 only:
Add your app's built Info.plist location to the Build Phase's Input Files field:
$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
at the same time, Move the runscript to the last row.

Must I make icons for iPad if it's an iPhone only app?

Must I make icons for iPad if it's an iPhone only app? Apple says, that it's not required. When I try to send my game using Application Loader, I see this.
Can I just delete CFBundleIconFiles(iPad) from info.plist ?
You do not need iPad icon files if your app is an iPhone-only one. Those errors can occur sometimes if the project isn't cleaned or if the resource files aren't copied into the project properly.
Make sure you've marked the app for iPhone only, and remove the iPad icon files from your info.plist, and also make sure all the files are copied in your copy bundle sources. To check this, go to
Your project target > Build Phases > Copy Bundle Sources
and clean your project pressing cmd ⌘+alt ⌥+Shift ⇧+K.
If that didn't work, delete the images from your project, drag and drop them again, and repeat the steps above.

Xcode target icon not displayed

Whilst trying the AFNetworking iOS example project I noticed that Xcode was displaying the target icon. Xcode does not do the same for my own projects/targets however.
AFNetworking iOS example project that shows the target icon:
A project that does not show the target icon:
The only difference I can see between both projects is that the AFNetworking iOS example target has an 'Icon files (iOS 5)' ('CFBundleIcons' raw key) dictionary within *-Info.plist. Surely this cant be the source of the problem though given that my example project is targeting iOS 7? Both targets do have an 'Icon files' ('CFBundleIconFiles' raw key) array within *-Info.plist.
Please could someone help to shed light on where Xcode is looking for the target icon?
I tried all the above and did not fixed the icon issue. I was using assets catalog for the project and X-Code version was 5.0.2.
Following steps fixed my issue:
Select the Project file from the navigator and select the target which you do not have the icons
Then select Build Phases and expand and Copy Bundle Resources
Add the *.xcassets file to the bundle resources (In my project the file name was Images.xcassets)
Clean and build the target.
To get the icon to appear you have to have the App Icon (Icon-72.png) in the root directory of your project.
If you've changed the App Icon name, you must change the correct properties (CFBundleIconFile, CFBundleIconFiles, and CFBundleIcons) in the Info.plist to the changed App Icon file name.
(This part doesn't matter, but I've found it works much better if you do.)
Fully qualify your info plist file in your target build settings with the following variable name: $(SRCROOT)/your_plist_file_name.plist (of course changing "your_plist_file_name" to the correct name)
I've also found you have to change your target's info plist to a different plist, then back to the correct plist file in order for the icon to show in the build settings. You'll also have to click away from the project file and then back in order for it to show in the list of targets.
I'm using Xcode 5, but this should work on Xcode 4 and above.
Good Luck.
Please flow the step
1)Click on the app icon arrow
2) drag the app icon 120*120 px
3) fisrt time click on the scheme then show the app icon or rest the simulator and again run
See this screenshot:
Here Blue are dimensions and red are icon names. Like 57-57 is actually 57-57.png. Put all these icons in the root of the project with .xcodeproj file. Add them into the project. Then set them all accordingly in Target > Project Name > General
Doing this will start showing every icon at its place in XCode automatically.
If using the Asset Catalog, select Images.xcassets and look in File Inspector. Check the target membership and make sure your target is selected.

Resources