Ahmed Said
Ahmed Said

Reputation: 1315

iOS: PNG file cannot packaged in the .app package

I have a png icon, it's added successfully in my project, but not included in the result .app package when I release-device build my project. Why?

Upvotes: 0

Views: 329

Answers (2)

WrightsCS
WrightsCS

Reputation: 50697

The PNG file may be corrupted. Xcode should five you a warning as well indicating why the .png image could not be added to your bundle.

Another reason could be you did not attach it to the target when you added it to your project. Click on the .png image in question and make sure your target is selected under Target Membership:

enter image description here

Upvotes: 2

Matthias Bauch
Matthias Bauch

Reputation: 90117

  1. Select the file in Xcode
  2. Press command + option + 1 (that's number One, not letter L or I) to open the File Inspector in the right side panel.
  3. see if there is a check mark before your target in the "Target Membership" section. If it's not there select your target and run your app again. If it's there try something else.

Upvotes: 3

Related Questions