Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Phillip Pan b8f0e975b7 use NSInteger for NS_ENUM instead of NSUInteger
Summary:
as title

in practice, this doesn't make any difference, but this is to follow the apple recommendation and for us to have a more consistent codebase.

https://developer.apple.com/library/content/releasenotes/ObjectiveC/ModernizationObjC/AdoptingModernObjective-C/AdoptingModernObjective-C.html

>The NS_ENUM macro helps define both the name and type of the enumeration, in this case named UITableViewCellStyle of type NSInteger. The type for enumerations should be NSInteger.
>Like enumerations, the NS_OPTIONS macro defines both a name and a type. However, the type for options should usually be NSUInteger.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D32641990

fbshipit-source-id: 56e4cd44cdefe54f61c90844665a685ee2d6ffad
2021-11-24 15:45:23 -08:00
Jayme Deffenbaugh cb719a16cc Fix Xcode warnings in React-Core pod (#29622)
Summary:
With the upgrade to React Native 0.63, we started running into nullability warnings that were breaking our build. This PR fixes those nullability warnings as well as a few other warnings in React-Core.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Fixed] - Fix xcodebuild warnings in React-Core

Pull Request resolved: https://github.com/facebook/react-native/pull/29622

Test Plan:
- Nullability annotations should only affect compilation, but even though RNTester compiles, I'm not fully convinced that this won't break projects downstream. It would be good to get another opinion on this.
- The change in `RCTAllocateRootViewTag` is the only real logic change in this PR. We throw an exception if the root view tag is not in the correct format, so this change seems safe after some basic manual testing in RNTester.

Reviewed By: shergin

Differential Revision: D23386678

Pulled By: appden

fbshipit-source-id: a74875195a4614c3248e8f968aa98602e3ee2de0
2020-09-09 12:48:09 -07:00
Samuel Susla ffc90c7f92 Remove requestToken being nil check from [RCTNetworkTask validateRequestToken]
Summary:
Changelog: Fix [TypeError: Network request failed] on file upload

# Problem
In 3198009410 I made method `loadImageForURL` blocking and nil returning since it was no longer cancellable.

However inside `[RCTNetworkTask validateRequestToken]` was a logic counting on request token being non nil.
This diff removes this check and adds `nullable` to `[RCTImageURLLoader loadImageForURL]` making it explicit.

Reviewed By: PeteTheHeat

Differential Revision: D22767174

fbshipit-source-id: 04d5562e381912233b9c14e8156cbf145288f063
2020-07-28 12:00:57 -07:00
Paige Sun 058eeb43b4 Prefetch images using a lower download priority
Reviewed By: fkgozali

Differential Revision: D21881729

fbshipit-source-id: 071a41aef2458df3d9a93a4ab0174af73e85b9fc
2020-06-05 20:55:36 -07:00
Kevin Gozali fdcdca4cfa iOS: Introduced RCTImageURLLoaderWithAttribution
Summary:
Changelog: [iOS] [Changed] - New internal image attribution support, but files importing RCTImageLoader.h must be converted to ObjC++

This new interface is the same as RCTImageURLLoader, but with additional support to pass in optional attribution information. The attribution info is not strictly defined (we may do so in the future though), and it's up to the hosting application and RCTImageURLLoader classes to handle it.

Reviewed By: sammy-SC

Differential Revision: D18492882

fbshipit-source-id: c3870c60e6c2e7c65758fc3235ebf5db369e07dc
2019-11-16 00:13:47 -08:00
Andres Suarez 3b31e69e28 Tidy up license headers [2/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: yungsters

Differential Revision: D17952694

fbshipit-source-id: 17c87de7ebb271fa2ac8d00af72a4d1addef8bd0
2019-10-16 10:06:34 -07:00
Ramanpreet Nara bf78d7969a Migrate RCTImage NativeModules to CoreModules
Summary:
This diff moves RCTImageLoader, RCTImageEditingManager, and RCTImageStoreManager to CoreModules. This is necessary for us to convert all these NativeModules to TurboModules.

**Note:** As a part of this diff, I had to break apart `RCTImageLoader.h`. All the protocols that were in `RCTImageLoader` are now in their own headers. Furthermore, `RCTImageLoader`'s methods are defined in `RCTImageLoaderProtocol`, so that we can call them from classes like `RCTImageViewManager` in `RCTImage`.

Reviewed By: PeteTheHeat

Differential Revision: D16805827

fbshipit-source-id: 89f6728b0766c30b74e25f7af1be8e6b8a7e6397
2019-08-14 13:39:30 -07:00