Fix Xcode and Java deprecation warnings #752
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request does two things:
NativeAppEventEmitter
withRCTEventEmitter
For the first change, everything is pretty straightforward except for two changes I made to error handling -- in both cases. RNFS was tacitly doing some dangerous/unworkable casts (
NSException
toNSError
,NSString
toNSInteger
). I fixed these, and made the error codes0
in both cases. If they should have different values, that should be changed before merging.In order to accommodate the second change, I also had to change the event names, since iOS must supply an exhaustive list of supported events in the
supportedEvents
method. So, I removed thejobId
from the end of the event name since it's used in the body info of the event anyway. In my testing, this doesn't effect multiple simultaneous uploads/downloads in practice.Deployment target was moved to 8.0 since lots of code was using functionality introduced in 8.0 and thus would've failed anyway on a 7.0 target.
Using Xcode 10.2.1, the project is now free of warnings.
On the Android side, I moved the minimum API version up to 19, since the project was using a method not available until 19 (in conflict with the original min API of 16). This should leave the Android side without warnings and errors as well.