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

This library contains code that will lead to a permanent rejection of apps binary by apple #58

Closed
JAStanton opened this issue Sep 25, 2018 · 4 comments

Comments

@JAStanton
Copy link

JAStanton commented Sep 25, 2018

You should not base64 / obfuscate a private library call:
https://github.com/c19354837/react-native-system-setting/blob/master/ios/RTCSystemSetting.m#L70-L73

Originally filed and "fixed" here: #28

If it's not caught now it will be caught soon. Calling a private library is one thing, but getting a notice about it and then obfuscating the call and trying again is a sure fire way to get permanently rejected.

I do not advise anyone include this library or risk getting your app banned. The warning from apple mentioned doing exactly what you decided as safe, saying it in fact is not safe:

Continuing to use or conceal non-public APIs in future submissions of this app may result in the termination of your Apple Developer account, as well as removal of all associated apps from the App Store.

@c19354837
Copy link
Owner

Thanks for you feedback.

I consider to solve it by preprocessor macros which can remove codes in compiling, so it's safe for App Store.

I keep these private APIs for enterprise account to get better experience.

@JAStanton
Copy link
Author

JAStanton commented Sep 26, 2018

I don't think the warnings you have in place in your documentation is good enough, and the code as it is today will lead to accounts being banned and should be removed until at very least a macro can be put in place.

A preprocessor macro that is removing this code by default may be the way to go if you want to use this for enterprise accounts only... I would name the flag: ENABLE_ENTERPRISE_ONLY_DANGEROUS_FLAG_THAT_WILL_GET_YOUR_APP_BANNED_IF_SUBMIT_TO_APP_STORE = 0

@c19354837
Copy link
Owner

What an impressive name!

I would implement it in the next version.

@c19354837
Copy link
Owner

V1.7.0 is available. It's a AppStore-friendly version.

I remove some dangerous codes by preprocessor macros,
see detail

I name it PRIVATE_API. You have to add it by reading the doc which I think you already know what you are doing.

thehale added a commit to SpeedcuberOSS/speedcuber-timer that referenced this issue Dec 9, 2022
The package `react-native-system-setting` was the only one I found which
offered a method to check if a device's location services were enabled
(required for Android Bluetooth to work in API 23+). However, that
library maintainer also has a track record of choosing implementations
which violate Apple's policies, resulting in threats of termination of
Apple Developer Accounts. [1][2]

I don't need any of the other functionality in that library, and I
really don't want to expose myself to that author's implementation
whims. As such, I found it prudent to take this opportunity to learn how
to build a Native Module for React Native applications (at least for Android).

I largely followed the official guide [3], and the only hiccups I had
resulted from Android Studio selectively auto-saving files, causing
confusing, but temporary compilation errors.

[1] c19354837/react-native-system-setting#28
[2] c19354837/react-native-system-setting#58
[3] https://reactnative.dev/docs/native-modules-android
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