ios - BrainTree test flight upload unsupported architecture error -
xcode version 7.2 braintreeframework 3.9.7
when try upload build test flight getting unsupported architecture. spent many hours on this.but no success. appreciated. in advance
the problem braintreeframework contains build both simulator (x86_64) , actual devices (arm).
you need "manually" remove unnedeed architectures final binary, before submitting it.
daniel kennett given 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 go through link once work me.
Comments
Post a Comment