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

Possible rejection because of private API usage #1091

Closed
badeleux opened this issue Jun 26, 2018 · 4 comments
Closed

Possible rejection because of private API usage #1091

badeleux opened this issue Jun 26, 2018 · 4 comments

Comments

@badeleux
Copy link

Current behavior

Describe what happens when you encounter this issue.

It hasn't happened for me yet ;)

Reproduction steps

Send iOS app to review

Expected behavior

iOS app should pass review

Platform

Which player are you experiencing the problem on:

  • iOS

Video sample

Any

Recently added support for request headers for iOS uses private API. AVURLAssetHTTPHeaderFieldsKey used here: https://github.com/react-native-community/react-native-video/blob/master/ios/RCTVideo.m#L338 is not officialy documented, therefore some apps might be rejected because of it.

@cobarx
Copy link
Contributor

cobarx commented Jun 26, 2018

@badeleux Thank you for catching this. I think you're right that we don't want to take any chances.

@emrah88 Can you take a look at this? There are a couple approaches described at https://stackoverflow.com/questions/15456130/add-custom-header-field-in-request-of-avplayer
that could be workable.

It's unfortunate that it takes a lot of work to overcome this, but there's no clear messaging from Apple on whether using AVURLAssetHTTPHeaderFieldsKey is allowed. There are a huge number of people that depend on react-native-video, so I don't think we can afford to put them at risk.

I'm going to open a PR to comment out the header code on iOS. If anyone knows someone from Apple that could get us an approval to use this approach, that's also a solution.

@c-goettert
Copy link

c-goettert commented Oct 17, 2018

Why cant you use documented setValue function so set header values? I am not a iOS specialist, but it would be nice if someone could check if it could be used instead of the private API call.

For instance, here you find an example from react-native, which sets Content-Length header.

@kesha-antonov
Copy link

@c-goettert Did you have success on this?

@skantus
Copy link

skantus commented Jun 8, 2019

@c-goettert any update on this?

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

No branches or pull requests

5 participants