ios App Icon is missing in the simulator using react native - ios

I added the script that I found in another post but no luck. I cleaned the build folder hundred times but nothing is working.

Actually in my case the target has been set correctly. All I needed to do was to turn off the simulator and let it get started by the build again.

Have you checked the "Target Membership" in the right-side pane?
Go to "images.xcassets" under your project
Click "AppIcon" or any image asset you have for your project
Show the Inspector on the right
See if "Target Membership" is checked correctly for your app.

Select Target from Xcode then navigate to General Tab and under "App Icon and Launch Images" section select "App Icons Source" -> AppIcon

It was greyed out in the Target membership. I fixed that and it worked.

Related

Is this an Xcode 9 GM bug? Images "Add to target" checkbox don't actually work

When adding an image to my project, Xcode shows the check box "Add to target". Even if I enable it, the image doesn't actually get added to the target and the image doesn't show in the app.
When I click on the image and then look at the "File Inspector" on the right pane, I can see the "Target membership" stays unchecked. If I enable it here now, then it works fine and shows in the app.
Shouldn't the "add to target" mean it should enable the "Target membership" automatically?
It is XCode 9 bug.
Opened Radar: https://openradar.appspot.com/33577678

In Xcode, how do I use a different AppIcon for each target iOS App?

I have one Xcode project (in Xcode 6.1) with a 4 targets for 4 different apps that share a lot of the same source code.
I'm trying to have each one of them show a different app icon.
Going into Project > General > [select target] > App Icons and Launch Images, I see this:
But clicking on each AppIcon, I get to the exact same app icons - not the ones that I would like for each project.
Is this just a bug in Xcode? How can I use different app icons for different targets?
Click on your already existing xcassets File, where you have defined the Appicons for your first target and add a new Appicon.:
You can give the new Appicon a meaningfull name (In my case Appicon-Debug):
Go to your targets and select the new target:
choose the new AppIcon under General -> "App Icons and Launch Images" -> "App Icons Source":
Clean the project and rebuild it.
Go to your app's Assets.xcassets and create a new iOS App Icon by clicking on the + button in the bottom left corner of target's section
Name it AppIcon-Test or Debug or whatever name suits you.
Go to xcassets folder and in the utilities panel allow target membership to both in the File Inspector View. Make sure the all target membership's are enabled for both AppIcon sets.
Select the target for which you want to change icon in the project settings. In "General" Scroll down to App Icons and Launch Images. Select your appicon set for the respective target in App Icons source
Happy coding :)
I had a similar issue when using multiple targets. Trying to change which asset set is used just didn't work, it would always just auto select the first one in the list. The way I solved this was to rename the AppIcon in each asset set e.g. AppIconMobile and AppIconTablet.
CLick on the Arrow at right most, which will take you to Xc-assets screen, where you can set images.
Similarly click on other target and set images. If you open your project in finder window, you can notice ProjectName.xcassets where you can see different app icons set. you can copy directly to this folder aswell
I think you just need to create Assets.xcassets for each target
Then create an AppIcon in Asset, no need to give it a different name in each asset
Select the AppIcon on the general section of each target
On top of every other suggestions, you also need to clear Build Folder (top menu Project -> Clean Build Folder), close Xcode, remove app from device / simulator, close simulator, open Xcode and run it again. Otherwise, Xcode will keep cache of your old App Icon.

I get an error "None of the input catalogs contained a matching launch image" in xCode5-iOS7

I'm trying to define launch images. Probably only one image is missing.
I'm following the instructions from this site Create launch images in different sizes for different devices
So I have 7 images with the required size.
But when I drag them to LaonchImages sheet it requires 8 images...the one that is missing is called "iPhone Portrait 2x" and according to the details pane I found its size 640x960 and I added it.
sill I'm getting the error - and the compilation fails...
Select your project, go to Build Settings, search for AppIcon-2 and change it into AppIcon and you will be fine.
Select project file and then select target in question. In General tab there is in app icons and launch images launch image source should be "Use assets category"
My LaunchImage file had been deleted and I had to add a new one in my xcassets.
Go to your images.xcassets. If there is no LaunchImage listed on the left, click the plus button at the bottom and navigate to new iOS launch image.
The Launch Image asset has been deprecated. I deleted the Launch Image asset but then I was getting compilation error.
In order to fix the error, the Launch Image asset catalog name has to be removed from Build Settings.
I could solve this by going to Build Settings of my target, searching for word "launch", then removing (using Backspace) "Asset Catalog Launch Image Set Name", that was set to LaunchImage.
In my case the problem was solved by removing the reference to Images.xcassets and then add it to the project again.
I'm not sure what caused the problem, but it may have something to do with the fact that I moved the assets "file" from one Xcode group to another, which would be weird as the file's path remained the same, but that was also the only thing I did with the file...
We had our Asset Catalog Launch Image Set Name set in our project target. After removing this from the target and instead setting it in our project it compiled fine.
For me the problem occurred when i have added a new watch target. Even though i had AppIcon set i was getting the error, i fixed it by removing the reference of asset catalog and added it back, you can do it by deleting the reference and add it back.
This generally happens when you have accidentally deleted Assets.xcassets. You need to follow the below steps.
Right click on Assets.xcassets and select Show File
Inspector.
Check if the desired target has been checked under
Target Membership.
If its unchecked, Please select the target for which you need the
Assets to be used.
Clean and Build the App.
With xcode 11.3.1 you have to select the project file and after that, select the target in question, and in the General tab under "App Icons and Launch Images" select as shown bellow.

can't run iOS project in simulator nor device

I made some changes in my xcode project, which somehow, causes me to not be able to run the app in the simulator nor device. The only option that I can see now is My Mac 64 bit. How do I fix this? The target is correct.
Try this:
Go to Edit scheme (Drop down near the stop button), then select Excecutable as "yourapp.app".
If you open the project in XCode (4.4.1), on the left top click the folder icon, then select your project icon to bring up the project settings page. Click on the "Summary" tab, then you should see "Devices" where you can select the device you want to target.
If that doesn't work (you don't see "iOS Application Target") you may need to go into "Build Settings" and select a different "Base SDK" -- I usually select "Latest iOS". You may have selected a Mac OS X SDK. Also check "Supported Platforms" to select "iOS".
Another Way which did it for me ...
go to manage Schemes and click Autocreate schemes now on the upper left side ..
hope it helps

Build section not found in Xcode4

i was working with Xcode3, since i moved to Xcode4, i didn't find where is the Build in the settings section in Xcode as it looks like this in Xcode3:
Not sure to understand your question, the 'Build Settings' is still there in XCode4, simply click on your project itself and it's there
Click on the project at the top of the left pane in XCode and you will find a 'Build Settings' pane...

Resources