ios - Submit to App Store issues: Unsupported Architecture x86 -


so trying use shopify api. when archive app , validate there no issues when submit app store gives me following issues.

  1. error itms-90087: "unsupported architecture. executable contains unsupported architecture '[x86_64, i386]'."
  2. error itms-90209: "invalid segment alignment. app binary @ sjapp.app/frameworks/buy.framework/buy not have proper segment alignment. try rebuilding app latest xcode version." (i using latest version.)
  3. error itms-90125: "the binary invalid. encryption info in lc_encryption_info load command either missing or invalid, or binary encrypted. binary not seem have been built apple's linker."
  4. warning itms-90080: "the executable payload/..../buy.framework not position independent executable. please ensure ur build settings configured create pie executables."

the problem buy framework contains build both simulator (x86_64) , actual devices (arm).

of course, aren't allowed submit app store binary unsupported architecture, solution "manually" remove unneeded architectures final binary, before submitting it.

daniel kennett came a nice solution , provides script add build phase:

app_path="${target_build_dir}/${wrapper_name}"  # script loops through frameworks embedded in application , # removes unused architectures. find "$app_path" -name '*.framework' -type d | while read -r framework     framework_executable_name=$(defaults read "$framework/info.plist" cfbundleexecutable)     framework_executable_path="$framework/$framework_executable_name"     echo "executable $framework_executable_path"      extracted_archs=()      arch in $archs             echo "extracting $arch $framework_executable_name"         lipo -extract "$arch" "$framework_executable_path" -o "$framework_executable_path-$arch"         extracted_archs+=("$framework_executable_path-$arch")     done      echo "merging extracted architectures: ${archs}"     lipo -o "$framework_executable_path-merged" -create "${extracted_archs[@]}"     rm "${extracted_archs[@]}"      echo "replacing original executable thinned version"     rm "$framework_executable_path"     mv "$framework_executable_path-merged" "$framework_executable_path"  done 

i used , worked perfectly.

edit: make sure @ modified script posted varry, 1 has minor issues.


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -