-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Example React Native App - React Native 0.77 (#1069)
* 0.77 rc6 update, building * breaking changes in react native API * rn 0.77 full release * add missed file with comment change
- Loading branch information
1 parent
a9e8378
commit eea22df
Showing
16 changed files
with
552 additions
and
680 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
195 changes: 5 additions & 190 deletions
195
examples/example-react-native-app/ios/ExampleApp.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
examples/example-react-native-app/ios/ExampleApp/AppDelegate.h
This file was deleted.
Oops, something went wrong.
133 changes: 0 additions & 133 deletions
133
examples/example-react-native-app/ios/ExampleApp/AppDelegate.mm
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
examples/example-react-native-app/ios/ExampleApp/AppDelegate.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import UIKit | ||
import React | ||
import React_RCTAppDelegate | ||
import ReactAppDependencyProvider | ||
|
||
@main | ||
class AppDelegate: RCTAppDelegate { | ||
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { | ||
self.moduleName = "ExampleApp" | ||
self.dependencyProvider = RCTAppDependencyProvider() | ||
|
||
// You can add your custom initial props in the dictionary below. | ||
// They will be passed down to the ViewController used by React Native. | ||
self.initialProps = [:] | ||
|
||
return super.application(application, didFinishLaunchingWithOptions: launchOptions) | ||
} | ||
|
||
override func sourceURL(for bridge: RCTBridge) -> URL? { | ||
self.bundleURL() | ||
} | ||
|
||
override func bundleURL() -> URL? { | ||
#if DEBUG | ||
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") | ||
#else | ||
Bundle.main.url(forResource: "main", withExtension: "jsbundle") | ||
#endif | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
66 changes: 0 additions & 66 deletions
66
examples/example-react-native-app/ios/ExampleAppTests/ExampleAppTests.m
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
examples/example-react-native-app/ios/ExampleAppTests/Info.plist
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,36 @@ | ||
require_relative '../node_modules/react-native/scripts/react_native_pods' | ||
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' | ||
# Resolve react_native_pods.rb with node to allow for hoisting | ||
require Pod::Executable.execute_command('node', ['-p', | ||
'require.resolve( | ||
"react-native/scripts/react_native_pods.rb", | ||
{paths: [process.argv[1]]}, | ||
)', __dir__]).strip | ||
|
||
platform :ios, '12.4' | ||
install! 'cocoapods', :deterministic_uuids => false | ||
platform :ios, min_ios_version_supported | ||
prepare_react_native_project! | ||
|
||
linkage = ENV['USE_FRAMEWORKS'] | ||
if linkage != nil | ||
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green | ||
use_frameworks! :linkage => linkage.to_sym | ||
end | ||
|
||
target 'ExampleApp' do | ||
config = use_native_modules! | ||
|
||
# Flags change depending on the env values. | ||
flags = get_default_flags() | ||
|
||
use_react_native!( | ||
:path => config[:reactNativePath], | ||
# Hermes is now enabled by default. Disable by setting this flag to false. | ||
# Upcoming versions of React Native may rely on get_default_flags(), but | ||
# we make it explicit here to aid in the React Native upgrade process. | ||
:hermes_enabled => true, | ||
:fabric_enabled => flags[:fabric_enabled], | ||
# Enables Flipper. | ||
# | ||
# Note that if you have use_frameworks! enabled, Flipper will not work and | ||
# you should disable the next line. | ||
:flipper_configuration => FlipperConfiguration.enabled, | ||
# An absolute path to your application root. | ||
:app_path => "#{Pod::Config.instance.installation_root}/.." | ||
) | ||
|
||
target 'ExampleAppTests' do | ||
inherit! :complete | ||
# Pods for testing | ||
end | ||
|
||
post_install do |installer| | ||
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 | ||
react_native_post_install( | ||
installer, | ||
# Set `mac_catalyst_enabled` to `true` in order to apply patches | ||
# necessary for Mac Catalyst builds | ||
:mac_catalyst_enabled => false | ||
config[:reactNativePath], | ||
:mac_catalyst_enabled => false, | ||
# :ccache_enabled => true | ||
) | ||
__apply_Xcode_12_5_M1_post_install_workaround(installer) | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.