iOS icons must be square (but mine are!)

Hi!

I’m trying to deatch to expokti using yarn detach and this the error I keep getting:

Your iOS ExpoKit project will not contain an .entitlements file by default. If you need specific Apple entitlements, enable them manually via Xcode or the Apple Developer website.
Configuring iOS Launch Screen…
14:24:21 [exp] iOS icons must be square, the dimensions of AppIcon76x76~ipad.png are 1,76,76
14:24:21 [exp] Set EXPO_DEBUG=true in your env to view the stack trace.
./scripts/detach.sh: line 12: pod: command not found
error Command failed with exit code 127.
info Visit yarn run | Yarn for documentation about this command.

I’m stuck because the icon is square and the system shows that it is (76x76)

Any shot I could get some help figuring out whats going on/

Thanks

What is ‘./scripts/detach.sh’ – is that some script that you’d written? It seems to be trying to run the ‘pod’ command (which is from CocoaPods). Is this a result of running exp detach?

For the icon thing

14:24:21 [exp] iOS icons must be square, the dimensions of AppIcon76x76~ipad.png are 1,76,76

It looks like it’s getting three numbers back (1, 76, 76) from the utility we run to check the icon dimensions, when it expects two (76, 76). Can you let me know the following?

  1. What’s your operating system platform and version?
  2. What’s the output of this command?
sips -g pixelWidth -g pixelHeight <path to your AppIcon76x76x~ipad.png>
  1. What version of sips does it show if you run sips --help?

Hi Niki,

Its a result of running yarn detach. Here is the script:

#!/bin/sh
BLUE=‘\033[0;34m’
NC=‘\033[0m’ # No Color

echo “${BLUE}==>1. Install Expo command line${NC}”
npm install -g exp

echo “${BLUE}==>2. Detaching ${NC}”
cp scripts/app.json ./app.json
exp detach
cd ios
pod install

Where did you get this script from? In any case – it seems this tries to run pod install (which is directly referenced in your error message from earlier). That is CocoaPods: https://cocoapods.org/

I don’t think you need to run pod install after exp detach though – you could just remove that line.

Update: Ok it turns out you do need pod install. So yeah, just make sure to install and set up CocoaPods ^

1 Like

You will eventually need CocoaPods to manage your dependencies. But I don’t know what that script detach.sh is or where it came from.

Documentation about ExpoKit + CocoaPods is here.

1 Like

Hi ben,

I’m using macOS High Sierra 10.13.3

I get this for the sips command sips help

hari:Source hari$ sips -g pixelWidth -g pixelHeight /Users/hari/Desktop/ListApp 1.3.1/Source/ios/listapp/Assets.xcassets/AppIcon.appiconset/AppIcon76x76@2x~ipad.png
Warning: /Users/hari/Desktop/ListApp not a valid file - skipping
Warning: 1.3.1/Source/ios/listapp/Assets.xcassets/AppIcon.appiconset/AppIcon76x76@2x~ipad.png not a valid file - skipping
Error 4: no file was specified
Try ‘sips --help’ for help using this tool
hari:Source hari$ sips --help
sips 10.4.4 - scriptable image processing system.

Oh Just saw this thank you! I’ll take a look and see if it helps

Ok, I think it’s generating an error because you have a space in your project path (“ListApp 1.3.1”) and we aren’t quoting the path properly, so it’s trying to analyze the directory “/Users/hari/Desktop/ListApp” instead of your icon, and returning the wrong result. I’ll open a ticket to track this. Thanks!

Actually, I looked at our code and this would not be an issue. Can you first navigate to the icon’s directory and try again? i.e.

cd ~/Desktop/ListApp\ 1.3.1/Source/ios/listapp/Assets.xcassets/AppIcon.appiconset
sips -g pixelWidth -g pixelHeight AppIcon76x76@2x~ipad.png

This is what it spits out:

hari:~ hari$ cd ~/Desktop/ListApp\ 1.3.1/Source/ios/listapp/Assets.xcassets/AppIcon.appiconset
hari:AppIcon.appiconset hari$ sips -g pixelWidth -g pixelHeight AppIcon76x76@2x~ipad.png
/Users/hari/Desktop/ListApp 1.3.1/Source/ios/listapp/Assets.xcassets/AppIcon.appiconset/AppIcon76x76@2x~ipad.png
pixelWidth: 152
pixelHeight: 152
hari:AppIcon.appiconset hari$

Interesting. Your copy prints out the full file path in its output (which happens to have more numbers in the path). Ok I think I can fix this in a later release. The workaround to prevent this warning would be kind of annoying, you’d want to change your path not to contain “1.3.1” I believe. Sorry about that.

awesome, sounds great! I’ll make the path change and see if that works.

Also, I’m new to the Expo world but you guys are doing great work, coming from a web development background expo really helps the transition to react native. Props!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.