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

13 Коммитов

Автор SHA1 Сообщение Дата
Chaoshuai Lu d70d7fd0b3 Adopt UIGraphicsImageRenderer API
Summary:
Apple suggested to this new API on iOS 10+.

> // Any new bitmap drawing code is encouraged to use UIGraphicsImageRenderer in lieu of this API.

WWDC18 Reference: https://developer.apple.com/videos/play/wwdc2018/219/
> Use UIGraphicsImageRenderer to create and draw to an image buffer
Supports Wide Color, unlike UIGraphicsBeginImageContext()
Combine with UIImageView for efficient offscreen rendering

Per https://nshipster.com/image-resizing/#performance-benchmarks, the new API runs even faster than the C version, probably due to more smart context reuses/management.

Changelog:
[iOS][Changed] - Adopt UIGraphicsImageRenderer API

Reviewed By: philIip

Differential Revision: D35699584

fbshipit-source-id: 7a1e2109d5e121fb396c1014f4ed0a892211b0cc
2022-04-22 17:02:51 -07:00
Phillip Pan 982ca30de0 bump iOS and tvOS from 11.0 to 12.4 in cocoapods
Summary:
Changelog: [iOS][Deprecated] Deprecating support for iOS/tvOS SDK 11.0, 12.4+ is now required

allow-large-files

Reviewed By: sammy-SC

Differential Revision: D34547333

fbshipit-source-id: a24bb09d03939a092de4198efb1aa4a44c69f718
2022-03-16 21:08:01 -07:00
Danilo Bürger 42b01a32a1 Use relative installation root instead of absolute to avoid embedding absolute paths in pods project (#33187)
Summary:
Use relative installation root instead of absolute to avoid embedding absolute paths in pods project
Also removes a leading space from each path.

Before:

<img width="799" alt="155846827-94c474b7-8a79-45fc-a900-8860a94fb318" src="https://user-images.githubusercontent.com/996231/155847731-de128759-bff5-4d1f-a59a-377298055d85.png">

After:

<img width="745" alt="Screenshot 2022-02-26 at 15 58 32" src="https://user-images.githubusercontent.com/996231/155847739-b783debc-a805-4ce7-a88a-33f764dc5985.png">

## Changelog

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

[iOS] [Fixed] - Remove absolute paths from pods project

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

Test Plan: Pod install and view in Xcode FBReactNativeSpec -> Build Phases -> [CP-User] Generate Specs

Reviewed By: ShikaSD

Differential Revision: D34549541

Pulled By: dmitryrykun

fbshipit-source-id: 2926b093fb87f50ef9988e23fce593348f00077d
2022-03-07 06:44:25 -08:00
Paige Sun b13e41d98e Migrate ScreenshotManager from NativeModule to TurboModule
Summary:
Changelog: [JS] Migrate ScreenshotManager from NativeModule to TurboModule. Fix SnapshotExample in rn-tester.

`const ScreenshotManager = NativeModules.ScreenshotManager;` makes all of RNTesterAppRoute render blank in Bridgeless, because we throw a jsi::JSError when JS calls `NativeModule.get` while in Bridgeless.

Reviewed By: RSNara

Differential Revision: D33640935

fbshipit-source-id: 124a3b43e1440a7ca0071c95c4388350d2e4affa
2022-01-19 14:19:13 -08:00
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
Nicola Corti aa4da248c1 Do not opt-out fbsource/xplat/js/react-native-github/packages from CLANGFORMAT
Summary:
As we're working on C++ code for RNTester to integrate Fabric, we should enable CLANGFORMAT for the files over there.

Changelog:
[Internal] [Changed] - Enable CLANGFORMAT on fbsource/xplat/js/react-native-github/packages

Reviewed By: ShikaSD

Differential Revision: D32493605

fbshipit-source-id: 7b5d63f6d2fae1a1aa1e782738953c8cd2cdbe4b
2021-11-18 04:44:46 -08:00
Sota Ogo f7e4c07c84 Move codegen output out of node_modules
Summary:
In this diff, it moves the codegen output location out of node_modules and to build/generated/ios folder.

A temp pod spec will be created so that those files will be included in the Xcode project.

Changelog: [Internal]

Reviewed By: hramos, cortinico

Differential Revision: D31809012

fbshipit-source-id: ba1c884c8024306ba0fd2102837b7dbebc6e18ac
2021-10-25 20:48:24 -07:00
Kevin Gozali b0c8a4eee8 Link RCT-Folly against libc++abi
Summary:
Folly now depends on libc++abi. This solves linker error for RCT-Folly.podspec like this:

```
Undefined symbols for architecture arm64:
  "___cxa_increment_exception_refcount", referenced from:
      folly::exception_ptr_get_type(std::exception_ptr const&) in libRCT-Folly.a(Exception.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

See https://github.com/react-native-community/releases/issues/251

Note: RNTester was not affected by this bug for some reason, so the only way to verify is via the new app generated via `npx react-native init`.

Changelog: [Fixed][iOS] Unbreak Folly linker error

Reviewed By: lunaleaps

Differential Revision: D30950944

fbshipit-source-id: 3eb146e23faa308a02363761d08849d6801e21ca
2021-09-16 22:24:10 -07:00
Héctor Ramos ef6ad1f2d6 Codegen: Remove generate-specs.sh
Summary:
First part of the codegen script cleanup effort. Everything that was done in generate-specs.sh is now part of the CocoaPods recipe (e.g. codegen method in `react_native_pods.rb`).

Now that `generate-specs.sh` has been removed, the codegen may still be invoked manually for test purposes like so:

```
cd react-native

# Generate Schema - do this whenever your JS specs change
node packages/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js <output_file_schema_json> <javascript_sources_dir>

# Generate native interfaces for iOS (use schema.json generated by previous step)
node scripts/generate-specs-cli.js ios <output_file_schema_json> <output_dir> <library_name>
```

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D30648067

fbshipit-source-id: 29688e0aac5496886657db82becb05bc8da076c9
2021-09-10 17:28:55 -07:00
Héctor Ramos 6651d8c346 Enable codegen in RNTester's NativeModuleExample
Summary:
Create a ScreenshotManager.podspec (codegen recipe included) and add ScreenshotManager Pod to the Podfile.

Changelog:
[Internal]

Reviewed By: fkgozali

Differential Revision: D30623054

fbshipit-source-id: be20880a53ba8a08f8b42b8d81c868c8a21960e1
2021-08-31 16:26:52 -07:00
Micha Reiser 93377ff508 Remove "use strict" directive from ES Modules
Summary:
ES Modules implicitly enable strict mode. Adding the "use strict" directive is, therefore, not required.

This diff removes all "use strict" directives from ES modules.

Changelog:

[Internal]

Reviewed By: motiz88

Differential Revision: D26172715

fbshipit-source-id: 57957bcbb672c4c3e62b1db633cf425c1c9d6430
2021-02-02 11:12:56 -08:00
Nick Gerleman 4d247fe058 Avoid Repo Structure Assumptions in RNTester Imports (#30141)
Summary:
RNTester has some imports left over that operate on directory traversal, assuming it is contained within react-native sources. This change makes these imports relative to react-native, enabling usage outside of the RN repo.

Relates to https://github.com/microsoft/react-native-windows/issues/6210

## Changelog

[Internal] [Fixed] - Avoid File Structure Assumptions in RNTester Imports

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

Test Plan: Validated we can bundle and flow-check both iOS + Android

Reviewed By: cpojer

Differential Revision: D24259628

Pulled By: appden

fbshipit-source-id: 0c21b5d354b01785d8402599da3b0a5be81b4c6d
2020-10-12 19:56:09 -07:00
stealthanthrax 63992c0b96 Migrating RNTester to Packages Directory (#29567)
Summary:
## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
This PR aims to migrate the RNTester App to `packages` directory. But is currently, open to inspect the CI issues and resolve the merge conflicts.

Currently done
 - Working on iOS
 - Working on Android
 - Detox Tests working on iOS

Need to work on
 - Errors generated by the CI builds

[General] [Changed] - Migrated the RNTester App to the packages directory.

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

Test Plan: It runs on both ios and android for now and the detox iOS builds are working.

Reviewed By: cpojer

Differential Revision: D23034761

Pulled By: rickhanlonii

fbshipit-source-id: e04bb06e1c7ef15d340206090d1575a871b9e6f5
2020-08-19 17:57:08 -07:00