Skip to content

Why is an error reported when an iOS app developed with Unity 4.x SDK is uploaded to the App Store? #161

Closed Answered by icywind
icywind asked this question in Q&A
Discussion options

You must be logged in to vote

Problem causes

The iOS dynamic library inside the Unity 4.x SDK contains a simulator architecture. But the App Store does not allow the SDK of the app to have both device and a simulator architecture. Therefore, you will need to delete the binaries of the simulator.

Solution

  1. In XCode select Add New Run Script Phase
  2. Add the following script to automatically delete the simulator architecture in the SDK when packaging.
#!/bin/sh

# Strip invalid architectures

strip_invalid_archs() {
binary="$1"
echo "current binary ${binary}"
# Get architectures for current file
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
stripped=""
for arch in $archs; do
if ! [[ "${ARCHS}" == *"$arch"* ]]

Replies: 3 comments 1 reply

Comment options

icywind
Apr 6, 2023
Collaborator Author

You must be logged in to vote
1 reply
@jtrue
Comment options

Answer selected by icywind
Comment options

icywind
Apr 17, 2023
Collaborator Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants