Closed jda5 closed 3 years ago
Hi, I'm on macOS Catalina and I keep getting these errors during the validation of my archives: The first error (when I'd disabled iPad support): Second error (when I'd enabled iPad support): Third error (when I'd deleted the ~/Library/Developer/Xcode/DerivedData/ModuleCache.noindex directory): May I know if you encountered these issues too? If so, may I know what you did to fix them?
Hi @Python3-8
This isn’t at all related to my issue, but no I’ve not encountered the above.
However, having a brief look through your error message it reads “.../YourApp/.buildozer/android/platform/...”
This strikes me as a problem. Xcode is exclusively for iOS, so perhaps there are some crossed wires from when you built your app for Android using buildozer. Are you using a virtual environment for kivy-iOS?
Like I’ve said I’ve not had this issue, but I’d investigate the above.
I don't get what you mean by virtual environment for kivy-ios but to install packages, I used ./toolchain.py pip install <package>
and ./toolchain.py build <package>
. And you're right, I was wondering why Xcode was using my buildozer
stuff.
@Python3-8
On the main kivy-ios page it advises people to install the toolchain in a virtual environment. This prevents frameworks from “overlapping”. The way I do this is by running the following commands in the terminal:
sudo mkdir kivy-ios
cd kivy-ios
sudo python3 -m venv venv
. venv/bin/activate
Then install Cython and kivy-ios
sudo pip3 install Cython==0.29.17
sudo pip3 install kivy-ios
At this point you’ll be ready to build the toolchain. You won’t need the .py suffix either simply run:
sudo toolchain build python3 kivy
Then create the Xcode project. All this information, including the prerequisites, can be found on the main kivy-ios page
Will this stop Xcode from using my .buildozer
folder?
I think yes but don’t hold me to that. Try it and let me know.
If it doesn’t work, do you mind creating a separate post for people to comment on? Your issue is not related to the one I’ve posted, but I am still happy to help you. I just think that each post should focus only on one issue. Tag me in your new post and I’ll carry on helping you as best as I can. Thanks
Thank you very much for your help. Before I try it with a virtual environment, I'll see if people have come up with other solutions because I don't want to have to rebuild my whole project without knowing if it's gonna work.
@jda5 I just had an App verified by Apple, by using latest kivy-ios
master and Xcode 12.2
Can you please try to upgrade and also try to use latest kivy-ios master and report back if the issue persists?
Hi @misl6,
Thanks for getting back to me, and taking the time to respond. So happy that you managed to get the app onto App Store Connect, that is really positive news, as I was starting to think that it wasn't possible.
The update will take some time, and will try it tomorrow (it is 12:45 am where I am at the moment). Do you mind giving me a little more information on what Python version you are running, what iOS version, what recipes you built and how you built your app? I used the older version of Kivy (not 2.0.0, the one that came before that - 2.0.0 came out after I finished building the app). I also used pipenv to create a virtual environment for my project, though am more than happy to change things around to align my specs with yours.
Thanks
@misl6
Now that I have upgraded to Xcode 12.2 I am unable to build recipes. Running sudo toolchain build python3 openssl kivy
eventually leads to the following error:
[DEBUG ] /Users/jacobstrauss/Documents/Python/kivy-ios/build/hostpython3/x86_64/Python-3.8.2/Modules/posixmodule.c:9058:13: error:
[DEBUG ] implicit declaration of function 'preadv' is invalid in C99
[DEBUG ] [-Werror,-Wimplicit-function-declaration]
[DEBUG ] n = preadv(fd, iov, cnt, offset);
[DEBUG ] ^
[DEBUG ] /Users/jacobstrauss/Documents/Python/kivy-ios/build/hostpython3/x86_64/Python-3.8.2/Modules/posixmodule.c:9629:18: error:
[DEBUG ] implicit declaration of function 'pwritev' is invalid in C99
[DEBUG ] [-Werror,-Wimplicit-function-declaration]
[DEBUG ] result = pwritev(fd, iov, cnt, offset);
[DEBUG ] ^
[DEBUG ] 4 warnings and 2 errors generated.
[DEBUG ] make: *** [Modules/posixmodule.o] Error 1
[DEBUG ] make: *** Waiting for unfinished jobs....
Exception in thread background thread for pid 56224:
Traceback (most recent call last):
File "/Users/jacobstrauss/.pyenv/versions/3.8.2/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/Users/jacobstrauss/.pyenv/versions/3.8.2/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/sh.py", line 1637, in wrap
fn(*rgs, **kwargs)
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/sh.py", line 2561, in background_thread
handle_exit_code(exit_code)
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/sh.py", line 2265, in fn
return self.command.handle_command_exit_code(exit_code)
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/sh.py", line 865, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_2:
RAN: /usr/bin/make -C /Users/jacobstrauss/Documents/Python/kivy-ios/build/hostpython3/x86_64/Python-3.8.2/native-build -j4
STDOUT:
clang -Qunused-arguments -fcolor-diagnostics -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -arch x86_64 -mmacosx-version-min=10.12 -I/Users/jacobstrauss/Documents/Python/kivy-ios/dist/hostlibffi/usr/local/include --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -arch x86_64 -mmacosx-version-min=10.12 -I/Users/jacobstrauss/Documents/Python/kivy-ios/dist/hostlibffi/usr/local/include -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -I/User... (130061 more, please see e.stdout)
STDERR:
Traceback (most recent call last):
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/bin/toolchain", line 8, in <module>
sys.exit(main())
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 1497, in main
ToolchainCL()
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 1270, in __init__
getattr(self, args.command)()
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 1323, in build
build_recipes(args.recipe, ctx)
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 1121, in build_recipes
recipe.execute()
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 700, in execute
self.build_all()
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 85, in _cache_execution
f(self, *args, **kwargs)
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 794, in build_all
self.build(arch)
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 85, in _cache_execution
f(self, *args, **kwargs)
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 781, in build
self.build_arch(arch)
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 833, in build_arch
getattr(self, build)()
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/kivy_ios/recipes/hostpython3/__init__.py", line 71, in build_x86_64
shprint(sh.make, "-C", build_subdir, self.ctx.concurrent_make,
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/kivy_ios/toolchain.py", line 67, in shprint
for line in cmd:
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/sh.py", line 911, in next
self.wait()
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/sh.py", line 841, in wait
self.handle_command_exit_code(exit_code)
File "/Users/jacobstrauss/Documents/Python/kivy-ios/venv/lib/python3.8/site-packages/sh.py", line 865, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_2:
RAN: /usr/bin/make -C /Users/jacobstrauss/Documents/Python/kivy-ios/build/hostpython3/x86_64/Python-3.8.2/native-build -j4
STDOUT:
clang -Qunused-arguments -fcolor-diagnostics -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -arch x86_64 -mmacosx-version-min=10.12 -I/Users/jacobstrauss/Documents/Python/kivy-ios/dist/hostlibffi/usr/local/include --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -arch x86_64 -mmacosx-version-min=10.12 -I/Users/jacobstrauss/Documents/Python/kivy-ios/dist/hostlibffi/usr/local/include -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -I/User... (130061 more, please see e.stdout)
Any idea what the problem could be?
@jda5 I assume you're not using latest kivy-ios==master
, but the pip installable version.
The pip installable version is outdated, can you please clone the kivy-ios repo and install it from source? (be sure to uninstall the pip installed version before)
@misl6 I installed kivy-ios
master and Xcode 12.2! This worked great, and I've even managed to get my app onto my iPhone running iOS 14.2 (instead of a device running an older version of iOS) - so thanks for that!
Unfortunately, when I archive the project, even though it passes the validation checks, upon distributing it I still receive the same rejection email saying:
ITMS-90338: Non-public API usage - The app references non-public symbols in ccc-graphs-14: _ffi_call, _ffi_closure_alloc, _ffi_closure_free, _ffi_prep_cif, _ffi_prep_closure_loc, _ffi_type_double, _ffi_type_float, _ffi_type_pointer, _ffi_type_sint16, _ffi_type_sint32, _ffi_type_sint64, _ffi_type_sint8, _ffi_type_uint16, _ffi_type_uint32, _ffi_type_uint64, _ffi_type_uint8, _ffi_type_void. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed.
Would it be possible to change these method names before compiling the toolchain?
You could try using this method to build kivy-ios
. I didn't use a virtual environment, but I'm at the stage where my app is available on TestFlight.
@Python3-8 thanks, will give that go soon. May I ask what recipes did you build and what modules did you install?
My app didn't require many modules since it was really basic and was the second ever app that I'd tried to publish. I built python3
, kivy
, and plyer
. I used pip
to install kivymd
because my app was a material design app.
@Python3-8 Thanks for the tip but sadly this didn't work for me. Glad to hear that you managed to get in on TestFlight though. This could potentially be an error with OpenSSL but my gut tells me its something to do with ffilib. Still though I want to know what you did, that I didn't. What iOS are you running? Which version of Python? etc.
Sorry to hear it didn’t work for you.
I'm using iOS 14.1, Xcode 12.1, Python 3.8.3, Kivy 2.0.0, KivyMD 0.104.2.dev0, Cython 0.29.17, and macOS Catalina (iMac, 27" Late 2009). I know that it's not a problem with OpenSSL because a person that I know got this error while submitting an app that doesn't use OpenSSL.
@jda5 can you please list and describe all the steps you're doing? (from the very first step to the latest). I need something very detailed, in order to be able to reproduce your issue.
@misl6 Sure thing, here is what I did:
requests
library I built the app by making use of Kivy's UrlRequest
module. The app uses custom fonts and makes use a screen manager to navigate between several .kv files. Save the principle Python file as main.py
. --- Note: I have reproduced this error with and without the use of the requests
library.xcode-select --install
followed by brew install autoconf automake libtool pkg-config
and finally brew link libtool
pyenv global 3.8.2
--- Note: I have reproduced this error with and without this stepsudo git clone https://github.com/kivy/kivy-ios.git
cd kivy-ios/
sudo python3 -m venv venv
to create a virtual environment and activate it with . venv/bin/activate
sudo pip install -e .
sudo pip install Cython==0.29.17
sudo python toolchain.py build python3 openssl kivy
sudo python toolchain.py pip install requests
--- Note: I have reproduced this error with and without this stepsudo python toolchain.py create <app_name> ~/path/to/app/files
open .
and right click on the folder called kivy-ios
. Then change the permission for all users to read & write
, then select to apply the changes to all enclosing files.Warnings
then select Update to recommended settings
--- Note: I have reproduced this error with and without this step.Build Phases -> Run Script
add -O —no-perm
Signing & Capabilities
add your team.<app_name>-Info.plist
file specify why you need the camera or that you don't use it, as is explained here.Sources -> main.m
change #include "Python.h"
to an absolute path, i.e. #include "/path/to/kivy-ios/dist/root/python3/include/python3.8/Python.h"
as is explained here.pystate.h
change #include "cpython/initconfig.h"
to #include "/path/to/kivy-ios/dist/root/python3/include/python3.8/cpython/initconfig.h"
Architectures
add arm64
to the excluded architectures
.arm64
from the excluded architectures
.Generic iOS Device
in Build Settings
General
page of the app settings tick Requires full screen
Build -> Archive
Validate
- there are a few options to select here, I just went with the default settings each time.Distribute
- again there are a few option, but I went with the default.After this I receive the aforementioned rejection email.
Hope this helps. Let me know if there is any other information you would like to see.
@jda5 Can you please redo the whole thing, starting from step 5, by not using sudo
at all?
Hi @misl6, I followed each step to the letter, but without including sudo
in any of my commands and unfortunately got the same error.
The only new thing I can think of (that I haven't previously mentioned) is that in a directory /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/include
is a folder called ffi
with a bunch of .h files. These files contain some of the aforementioned variable names, such as ffi_call
etc. Could this be the issue?
I'm experiencing exactly the same issues as jda5 when I try and archive my app. Running on MacOS Catalina and Xcode12.2.
@nikosgrikos Can you also please try to write down a step by step guide on how to reproduce your issue? Have you changed anything into the xcode project settings?
@misl6 Yesterday I did a clean reinstall. I removed Xcode and all the accompanying files (including the command line tools), removed all kivy-ios files and removed every single file that mentions ffi (such as a brew formula). I then installed Xcode 12.3, and the Kivy-ios master... and still got the same issue. The only related issue I could possibly find is a warning when building to a simulator which reads:
could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
I don't know how helpful that is, but I really don't know where to go with this anymore.
@jda5 Can you join us over here? : https://chat.kivy.org/ (#ios-support) We will report back here what We have found out after a chat.
Versions
Python : 3.7.9 MacOS version : 10.15.5 XCode Version : 12.2 Cython version : 0.29.21
The steps listed are after the Kivy-ios folder has been created. If you need the steps beforehand, then let me know and I’ll start all over, but they are pretty similar to the way @jda5 has implemented them. My app includes references to AdMob
After following above, I end up with exactly the same issues as @jda5 in an email from Apple support
ITMS-90338: Non-public API usage - The app references non-public symbols in numberbuster3: _ffi_call, _ffi_closure_alloc, _ffi_closure_free, _ffi_prep_cif, _ffi_prep_closure_loc, _ffi_type_double, _ffi_type_float, _ffi_type_pointer, _ffi_type_sint16, _ffi_type_sint32, _ffi_type_sint64, _ffi_type_sint8, _ffi_type_uint16, _ffi_type_uint32, _ffi_type_uint64, _ffi_type_uint8, _ffi_type_void. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/
ITMS-90683: Missing Purpose String in Info.plist - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSCameraUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).
Granted, the second one has a workaround, but the first is an issue.
For completeness (since my build has changed, and since I have posted this in Discord and want to share this with anyone who is not in the group) below is every command/action I have done to create the Xcode project and upload to TestFlight
In the terminal
git clone https://github.com/kivy/kivy-ios.git
cd kivy-ios/
python3 -m venv venv
. venv/bin/activate
pip install -e .
pip install Cython==0.29.17
python toolchain.py build python3 openssl kivy
python toolchain.py pip install requests
python toolchain.py create <app_name> ~/path/to/python/files
Once the project has been created
Open the Xcode project
Test on simulator
Test on device
Upload to TestFlight
REASON:
/path/to/folder/kivy-ios/ccc-graphs-22-ios/main.m:8:10: 'Python.h' file not found
In “main.m” file, line 8, change #include "Python.h”
to #include “/path/to/folder/kivy-ios/dist/root/python3/include/python3.8/Python.h”
Select “Products > Archive” — FAILED
REASON:
/path/to/folder/kivy-ios/dist/root/python3/include/python3.8/cpython/pystate.h:9:10: 'cpython/initconfig.h' file not found
In “pystate.h” file, line 9, change #include "cpython/initconfig.h”
to #include “/path/to/folder/kivy-ios/dist/root/python3/include/python3.8/cpython/initconfig.h”
Select “Products > Archive” — PASSED
In Organiser window
After waiting about 5 minutes I receive the aforementioned rejection email
@nikosgrikos you no longer need to include -O --no-perms
in the Build Phases by not running sudo
in the toolchain build and Xcode creation. This doesn't solve our problem but its I think its a neat observation.
After experimenting, I've noticed you can upload a 'Debug' version to the App Store instead of a 'Release' version. This stops the ITMS-90338 message being invoked. To do this, under the product menu select 'Scheme' and then 'Edit Scheme', press 'Archive' and then choose 'Debug' instead of 'Release'. Whether this is the correct approach or not, I don't know, but it gets around the problem. Perhaps someone can with some knowledge on this can comment.
@nikosgrikos It works! All good on my end, have uploaded a build to App Store connect. Thank you!
That's good to hear! I hope the approach is acceptable when publishing an app. Waiting for @misl6 to comment.
Uhm, the headers that were not found + the Debug/Release thing ringed the bell. Thank you @nikosgrikos for finding the workaround.
Can you please try this PR(https://github.com/kivy/kivy-ios/pull/582) and check if all the process works flawlessly? When using this PR over master you should be able to avoid the following steps:
Hi @nikosgrikos , @jda5
You had the chance to test the provided PR?
@misl6 not yet, but am more than happy to test it soon. I must confess though I am quite new to GitHub and am not sure how to test your PR. Do you mind sending me some instructions on how to properly test your PR, and I'll try it out, writing output logs at each stage.
Same here. I am a newbie.
On Thu, 31 Dec 2020 12:09 pm Mirko, notifications@github.com wrote:
@nikosgrikos https://github.com/nikosgrikos Can you also please try to write down a step by step guide on how to reproduce your issue? Have you changed anything into the xcode project settings?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kivy/kivy-ios/issues/572#issuecomment-752912841, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASF25RS4FB7BETHGG7HLAI3SXREURANCNFSM4UXBDVHA .
The process is pretty the same as building kivy-ios
on top of master.
Given that you have successfully cloned the kivy-ios
repo via git clone https://github.com/kivy/kivy-ios.git
, inside the kivy-ios
folder you have to launch the two following commands:
git fetch origin pull/582/head:test-pr-582
git checkout test-pr-582
In order to be sure that you did it right, a git log
should show "Fixes header and library search paths on Release" as the topmost commit.
If it's ok, then you can start by creating the venv and continue to follow the standard procedure.
As mentioned here, you can avoid doing the following steps thanks to this PR:
Uhm, the headers that were not found + the Debug/Release thing ringed the bell. Thank you @nikosgrikos for finding the workaround.
Can you please try this PR(#582) and check if all the process works flawlessly? When using this PR over master you should be able to avoid the following steps:
- In “Build Settings > Architectures” add “arm64” to “excluded architectures”
- In “main.m” file, line 8, change #include "Python.h” to #include “/path/to/folder/kivy-ios/dist/root/python3/include/python3.8/Python.h”
- In “pystate.h” file, line 9, change #include "cpython/initconfig.h” to #include “/path/to/folder/kivy-ios/dist/root/python3/include/python3.8/cpython/initconfig.h”
At the end of the test, you can revert to the repo master
by doing git checkout master
inside the kivy-ios
folder.
@misl6 Thanks, I will test it either tonight or tomorrow.
@misl6 Good news, the PR works perfectly, and have uploaded a build to App Store Connect! Below are all the steps I took and the output logs.
In the terminal
git clone https://github.com/kivy/kivy-ios.git
cd kivy-ios
git fetch origin pull/582/head:test-pr-582
remote: Enumerating objects: 8, done. remote: Counting objects: 100% (8/8), done. remote: Compressing objects: 100% (2/2), done. remote: Total 8 (delta 6), reused 8 (delta 6), pack-reused 0 Unpacking objects: 100% (8/8), done. From https://github.com/kivy/kivy-ios
- [new ref] refs/pull/582/head -> test-pr-582
git checkout test-pr-582
Switched to branch 'test-pr-582'
git log
commit f9ac7712f40461c4732503f78ec1db0930b3b83b (HEAD -> test-pr-582) Author: Mirko Galimberti me@mirkogalimberti.com Date: Tue Jan 5 18:01:47 2021 +0100
Fixes header and library search paths on Release
python3 -m venv venv
pip install -e .
pip install Cython==0.29.17
python toolchain.py build python3 openssl kivy
[DEBUG ] New State: kivy.install at 2021-01-20 22:42:36.218754 [DEBUG ] New State: kivy.build_all at 2021-01-20 22:42:36.226161
python toolchain.py pip install requests
python toolchain.py create <app_name> ~/path/to/python/files
Once the project is created
In Xcode
Interestingly, at this stage, in previous builds, an error message would pop up saying something about a permission error regarding the icon images. I always ignored it as it didn't actually bear any consequences to my project. However, I didn't receive the error message this time.
Test on simulator
Test on device
Upload to TestFlight
In Organiser window
Dear Jacob,
The following build has completed processing:
Platform: iOS App Name: Build Number: Version Number: App SKU: App Apple ID: *****
You can now use this build for TestFlight testing or submit it to the App Store.
If you have any questions regarding your app, click Contact Us in App Store Connect.
Regards,
The App Store team
Sure enough the build is on App Store Connect! Should I revert back to the repo master, or am I okay to leave the PR as is?
Lastly, I want to say a massive thank you for all you have done to support me and @nikosgrikos!
@jda5 It's a pleasure. Thank you for getting a try on the recent changes.
You can revert back to master, BTW, meanwhile, kivy-ios==1.2.1
got released and contains these changes.
I just want to say (this might help people) that I think this error is Mac-specific. Because I was having issues with validating my archive in December so I asked an experienced Flutter iOS developer for help. When he built my app, archived it, and tried distributing the archive he did get some errors but he managed to fix them. When he actually distributed it, he got the non-public API usage error. His Mac is an Apple Mac Mini that runs Catalina. When I managed to fix the errors on my Mac and distributed the package to App Store Connect I did NOT get the non-public API usage error. My Mac is a 27" Late 2009 iMac that runs a patched version of Catalina.
Versions
Describe the bug
My app runs fine on the simulators and on a device, but when I archive the project and distribute it to App Store Connect I receive an email from Apple saying that my app has been rejected. The email reads:
To Reproduce
#include "Python.h"
to an absolute path, i.e."/path/to/kivy-ios/dist/root/python3/include/python3.8/Python.h"
as is explained here.<yourapp>-Info.plist
file specify why you need the camera or that you don't use it, as is explained here.At this point, the project should be ready to upload. Build for "Any iOS Device" and click on Products --> Archive. After going through all the steps in the archive window, I am shown a message saying that the upload has been successful. This is shortly followed by the aforementioned rejection email.
Logs
No logs provided. However, the following may be of use:
Running
toolchain status
returns:Additionally, following the steps listed here, I navigated to the archive I uploaded to Apple and I ran the following commands in the terminal:
nm <App Name> | grep ffi_call
nm <App Name> | grep ffi_closure_alloc
nm <App Name> | grep ffi_closure_free
etc.
The only only unique output of the above commands was that for
nm <App Name> | grep ffi_call
which returned:The remaining command all returned
U _ffi_closure_alloc
etc.Additional information
You can find Apple's private API here.
Things I have tried in vain:
libffi
andhostlibffi
. This just causes the app to crash.ffilib.a
from the project. This is interesting, more on this below._ffi_
in the kivy-ios folder and deleting all the files that came up. This did nothing._ffi_call
to__ffi_call
, etc. in all the kivy-ios files. This didn't make a difference. To be he honest, I don't know why I ever thought this would work.Unlinking
ffilib.a
from the projectNow doing so causes the build to fail on the simulators, but the errors I receive are:
This makes me think that the error lies with the
libffi.a
static library, though I can't be too sure.Anyway, thanks for taking the time out to read this. I am at the end of my wits, so any insight into the problem or suggestion - seriously anything at all - is hugely appreciated.