Skip to content

Commit

Permalink
fix(ios): use python3, fixes issues on macOS 12.3+
Browse files Browse the repository at this point in the history
  • Loading branch information
Star-dev325 committed May 12, 2022
1 parent 1a4b0eb commit 46665de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ios_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ if [[ ${_SEARCH_RESULT} ]]; then
_RN_ROOT_EXISTS=$(ruby -e "require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]" || echo '')

if [[ ${_RN_ROOT_EXISTS} ]]; then
_JSON_OUTPUT_BASE64=$(python -c 'import json,sys,base64;print(base64.b64encode(json.dumps(json.loads(open('"'${_SEARCH_RESULT}'"').read())['${_JSON_ROOT}'])))' || echo "e30=")
if ! python3 --version >/dev/null 2>&1; then echo "python3 not found, app.json file processing error." && exit 1; fi
_JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('"'${_SEARCH_RESULT}'"', '"'rb'"').read())['${_JSON_ROOT}']), '"'utf-8'"')).decode())' || echo "e30=")
fi

_PLIST_ENTRY_KEYS+=("google_mobile_ads_json_raw")
Expand Down

0 comments on commit 46665de

Please sign in to comment.