Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Store Rejection Due to Non-Public APIs in PyArrow (libarrow.1900.dylib) #45642

Open
lukedg97 opened this issue Feb 27, 2025 · 1 comment
Open

Comments

@lukedg97
Copy link

Describe the bug, including details regarding any error messages, version, and platform.

When submitting our app containing pyarrow to the app store we get the following rejection:

Your app uses or references the following non-public or deprecated APIs:
Contents/Resources/app_packages/pyarrow/libarrow.1900.dylib

Symbols:
• _CCCryptorGCMFinalize
• _CCCryptorGCMAddAAD
• _CCCryptorGCMSetIV

The use of non-public or deprecated APIs is not permitted on the App Store, as they can lead to a poor user experience should these APIs change and are otherwise not supported on Apple platforms.

For some further context we are embedding python into a swift app via PythonKit. We are using arrow Flight as part of the app. Our app is about the enter alpha and we are trying to pass beta app review for external TestFlight distribution.

I found an issue in another project that seems similar: awslabs/aws-crt-swift#206

Workaround?

We are attempting to build a version without these symbols, following the instructions on this page: https://arrow.apache.org/docs/developers/python.html#building-on-linux-and-macos

However, we are not sure if we are setting the correct build flags or if we are setting the build flags correctly.

venv_name="pyarrow-dev"

if [ ! -d "$venv_name" ]; then
  echo "Creating virtual environment: $venv_name"
  python3.13 -m venv "$venv_name"
else
  echo "Virtual environment '$venv_name' already exists."
fi

source "$venv_name/bin/activate"

python3.13 -m pip install -r arrow/python/requirements-build.txt

pushd arrow/python
git clean -Xfd .
popd

rm -rf dist

mkdir dist

export ARROW_HOME=$(pwd)/dist
export LD_LIBRARY_PATH=$(pwd)/dist/lib:$LD_LIBRARY_PATH
export CMAKE_PREFIX_PATH=$ARROW_HOME:$CMAKE_PREFIX_PATH

export ARROW_FLIGHT=ON
export ARROW_PARQUET=ON
export PARQUET_REQUIRE_ENCRYPTION=OFF
export ARROW_BUILD_TYPE=release

cmake -S arrow/cpp -B arrow/cpp/build \
        -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
        --preset ninja-release-python
cmake --build arrow/cpp/build --target install

pushd arrow/python
export PYARROW_PARALLEL=4
python3.13 setup.py build_ext --build-type=$ARROW_BUILD_TYPE \
         --bundle-arrow-cpp bdist_wheel
popd

Component(s)

Python

@amoeba
Copy link
Member

amoeba commented Feb 28, 2025

Hi @lukedg97, I think your best bet is to try to build a wheel without S3 like you're trying to do here. Can you share the output you get from your script above? I think the only issue I see is that the first cmake command needs to be changed to actually pass the options you want. Can you try this instead?

cmake \
    -S arrow/cpp \
    -B arrow/cpp/build \
    -GNinja \
    -DCMAKE_BUILD_TYPE=Release \
    -DARROW_FLIGHT=ON \
    -DARROW_PARQUET=ON \
    -DARROW_MIMALLOC=OFF \
    -DPARQUET_REQUIRE_ENCRYPTION=OFF

I disable mimalloc in the above command since I'm not sure mimalloc works on iOS and we enable mimalloc by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants