Skip to content

Commit

Permalink
Support for RN 72
Browse files Browse the repository at this point in the history
  • Loading branch information
keerthika-priya authored Apr 10, 2024
1 parent 7e0d747 commit 0c287f0
Show file tree
Hide file tree
Showing 7 changed files with 23,662 additions and 3,948 deletions.
36 changes: 36 additions & 0 deletions Example/ios/NowYouSeeReact.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
00E356EB1AD99517003FC87E /* Frameworks */,
00E356EC1AD99517003FC87E /* Resources */,
5CF3B5B44F4AFD0A728F7891 /* [CP] Copy Pods Resources */,
1EC371C2DCD10AC359EB6686 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand All @@ -233,6 +234,7 @@
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
D873C73998F8A691FAEA94DA /* [CP] Copy Pods Resources */,
1C3743FEF6076BEF0BDF47F9 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -337,6 +339,36 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
1C3743FEF6076BEF0BDF47F9 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NowYouSeeReact-Demo/Pods-NowYouSeeReact-Demo-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
1EC371C2DCD10AC359EB6686 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NowYouSeeReact-Demo-NowYouSeeReactTests/Pods-NowYouSeeReact-Demo-NowYouSeeReactTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
5CF3B5B44F4AFD0A728F7891 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -500,6 +532,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = arm64;
INFOPLIST_FILE = NowYouSeeReact/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
Expand Down Expand Up @@ -528,6 +561,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
EXCLUDED_ARCHS = arm64;
INFOPLIST_FILE = NowYouSeeReact/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
Expand Down Expand Up @@ -577,6 +611,7 @@
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
EXCLUDED_ARCHS = arm64;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -637,6 +672,7 @@
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
EXCLUDED_ARCHS = arm64;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand Down
7 changes: 5 additions & 2 deletions Example/ios/NowYouSeeReact/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
#ifdef FB_SONARKIT_ENABLED
InitializeFlipper(application);
#endif


// TODO: Changes related to new Architecture should be added
// https://raw.githubusercontent.com/react-native-community/rn-diff-purge/release/0.68.1/RnDiffApp/ios/RnDiffApp/AppDelegate.mm

RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"NowYouSeeReact"
Expand All @@ -61,7 +64,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
Expand Down
18 changes: 13 additions & 5 deletions Example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,32 @@ system('echo "Fetching npm dependencies..."; npm install')
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'
platform :ios, '13.0'
install! 'cocoapods', :disable_input_output_paths => true

target 'NowYouSeeReact-Demo' do
config = use_native_modules!

use_react_native!(:path => config["reactNativePath"])
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false,
:fabric_enabled => false,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)

target 'NowYouSeeReactTests' do
inherit! :complete
# Pods for testing
end

# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
# you should disable the next line.
use_flipper!()
post_install do |installer|
flipper_post_install(installer)
installer.pods_project.root_object.attributes["ORGANIZATIONNAME"] = "Flipkart"
Expand Down
Loading

0 comments on commit 0c287f0

Please sign in to comment.