Skip to content

Commit

Permalink
debug包
Browse files Browse the repository at this point in the history
  • Loading branch information
xiewei05 committed Mar 30, 2021
1 parent bc3e53c commit 41f27a1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ platform :ios do
export_method: "development",
configuration: "Debug",
clean: true,
xcargs: "GCC_PREPROCESSOR_DEFINITIONS='$(inherited) DEBUG_TaroRN=1'",
export_options: {
method: "development",
compileBitcode: false,
Expand Down
8 changes: 4 additions & 4 deletions ios/taroDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -464,15 +464,15 @@
/* Begin PBXShellScriptBuildPhase section */
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 8;
buildActionMask = 12;
files = (
);
inputPaths = (
);
name = "Bundle React Native code and images";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 1;
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
};
Expand Down Expand Up @@ -500,7 +500,7 @@
};
FD10A7F022414F080027D42C /* Start Packager */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 8;
buildActionMask = 12;
files = (
);
inputFileListPaths = (
Expand All @@ -512,7 +512,7 @@
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 1;
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
showEnvVarsInLog = 0;
Expand Down
5 changes: 5 additions & 0 deletions ios/taroDemo/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
// Github action打debug包
#ifdef DEBUG_TaroRN
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif

#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
Expand Down

0 comments on commit 41f27a1

Please sign in to comment.