Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After upgrading to react-native 0.60.x schemes other than production (default) do not work. #76

Closed
xeroxoid opened this issue Jul 22, 2019 · 28 comments

Comments

@xeroxoid
Copy link

Steps to reproduce the behavior

  1. Upgrade to react-native 0.60.x
  2. Adapt code & configuration of packages to conform with auto-linking, etc.
  3. Run the ios version of the app using a configured scheme

Expected behavior

The app should install and run with the defines scheme

Actual behavior

When using cli (i.e. react-native run-ios --scheme \"TheSampleApp-Development\" --configuration Debug.Development) the command compiles successfully, the app is installed but opens with a blank black screen (after showing the splash screen) on the simulator.

On the other hand when using xcode to build the development scheme, the app again installs and runs, reaches the splash screen and after that we get a white blank screen. In xcode the output is the following:

2019-07-22 21:02:18.412065+0300 TheSampleApp[22447:687268] Attempted to override non-null API key with nil - ignoring.
WARN : BSG_KSCrashSentry.c (109): BSG_KSCrashType bsg_kscrashsentry_installWithContext(BSG_KSCrash_SentryContext *, BSG_KSCrashType, void (*)(char, char *)): KSCrash: App is running in a debugger. Only user reported events will be handled.
2019-07-22 21:02:18.451 [fatal][tid:main] No bundle URL present.

Make sure you're running a packager server or have included a .jsbundle file in your application bundle.
2019-07-22 21:02:18.451125+0300 TheSampleApp[22447:687268] No bundle URL present.

Make sure you're running a packager server or have included a .jsbundle file in your application bundle.
2019-07-22 21:02:18.467287+0300 TheSampleApp[22447:687268] *** Terminating app due to uncaught exception 'RCTFatalException: No bundle URL present.

Make sure you're running a packager server or have included a .jsbundle file in your application bundle.', reason: 'No bundle URL present.

Make sure you're running a packager server or have included a .jsbundle file in your application bundle.'
*** First throw call stack:
(
	0   CoreFoundation                      0x00000001072d96fb __exceptionPreprocess + 331
	1   libobjc.A.dylib                     0x00000001053aaac5 objc_exception_throw + 48
	2   TheSampleApp             0x0000000101f860dc RCTGetFatalHandler + 0
	3   TheSampleApp             0x0000000101f9e39e __28-[RCTCxxBridge handleError:]_block_invoke + 685
	4   libdispatch.dylib                   0x0000000109835d7f _dispatch_call_block_and_release + 12
	5   libdispatch.dylib                   0x0000000109836db5 _dispatch_client_callout + 8
	6   libdispatch.dylib                   0x0000000109844080 _dispatch_main_queue_callback_4CF + 1540
	7   CoreFoundation                      0x00000001072408a9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
	8   CoreFoundation                      0x000000010723af56 __CFRunLoopRun + 2310
	9   CoreFoundation                      0x000000010723a302 CFRunLoopRunSpecific + 626
	10  GraphicsServices                    0x000000010d52a2fe GSEventRunModal + 65
	11  UIKitCore                           0x0000000110edaba2 UIApplicationMain + 140
	12  TheSampleApp             0x0000000101e752a0 main + 112
	13  libdyld.dylib                       0x00000001098ab541 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

The bundler is already running separately in both occasions via yarn start as for some reason it stopped running automatically after/during building the app.

@thekevinbrown
Copy link
Owner

I suspect we'll need to release a new version to support 0.60.x.

My suspicion is that the react-native-xcode.sh script has changed compared to the one we bundle, and that's likely the best place to start looking.

Here's theirs:
https://github.com/facebook/react-native/blob/master/scripts/react-native-xcode.sh
Here's ours:
https://github.com/thekevinbrown/react-native-schemes-manager/blob/master/lib/react-native-xcode.sh

I don't currently have a React Native 60 project to test on, so a minimal reproduction case would really help me so I can get in and start looking at this efficiently. Otherwise I will absolutely accept pull requests if you're able to get this working with 60.

@thekevinbrown
Copy link
Owner

Also please have a go with this branch to see if it solves your problem: #74

@xeroxoid
Copy link
Author

I tried with both the PR branch and with master which now seems to have the PR as well as other changes merged but it still doesn't work. I still get the same error i.e. the app cannot see the bundle after launching.

@hstorz
Copy link

hstorz commented Jul 23, 2019

I can confirm, I have the same problem: default scheme works and on the other schemes I get a black screen. Tried with current master.

@ninjz
Copy link

ninjz commented Jul 30, 2019

@thekevinbrown Any ideas how we can go about supporting the latest changes from 0.60.4?

@thekevinbrown
Copy link
Owner

@ninjz, I don't have a project on v60 yet, so I'm not sure what exactly is broken.

I'd be happy to accept a pull request and release a new major version to support v60 if someone else has time to debug this.

@doomsower
Copy link

I've tried to debug this. here is the minimal reproduction repo. I initialized a project from scratch with 0.59, added react-native-schemes-manager and checked that custom debug scheme works. Then I tried the same steps with 0.60, one commit per step.

Custom debug scheme doesn't work. Tracked it down to this line. For some reason, RCT_DEV macro is not defined. I can see that RCTDefines.h sets it based on DEBUG, and I can see that DEBUG is true in preprocessor macros settings in XCode. But my understanding of objC is not good enough to go deeper.

Custom release scheme doesn't work too. However I managed to make it work by deleting tests. This PR should fix it.

@doomsower
Copy link

I managed to fix debug config too. RN0.60 uses cocoapods to build the project, and in cocoapods you have to explicitly specify if your custom build configuration is based on debug configuration. So I had to add the following line to my repro project linked in previous post:

project 'schemes60', 'DebugCopy' => :debug

and then reinstall pods. And it worked.

@bericp1
Copy link

bericp1 commented Aug 13, 2019

Today react-native 0.60.5 dropped but it doesn't seem to include that PR for fixing custom release scheme. I had to manually make the changes in that PR to my project.

When I made the change @doomsower recommended, I was able to build and run release builds and debug builds with custom schemes and build configurations without installing this library at all.

The specific change to ios/Podfile I made was just adding that project call right after require_relative at the top level. Then I just ran rm -rf Pods && pod install (EDIT: in the ios/ directory)

project 'MyProject',
    'DevDebug' => :debug,
    'StagingDebug' => :debug,
    'Debug' => :debug,
    'DevRelease' => :release,
    'StagingRelease' => :release,
    'Release' => :release

(where MyProject is the name of your XCode project without the extension).

EDIT: You'll also need to change the hash/map there. The keys (i.e. DevDebug, etc.) should be the name of the build configurations you clones from Debug/Release and the values are the type of configuration they are. See my comment farther down here.

So as far as the react-native core 0.60+ goes, this library isn't needed it seems. For third-party deps though that don't use cocoapods it probably will be? I'm not familiar enough to say for sure.

@bericp1
Copy link

bericp1 commented Aug 13, 2019

I tried installing this library to see what would happen and it fails on react-native 0.60.5 and I'm not 100% sure why.

Steps:

  1. On a base RN 0.60.5 install, create custom build configuration(s), create custom scheme(s), and assign the configurations to the schemes appropriately
    • I created the following schemes: MyAppDev, MyAppStaging
    • I created the following Debug duplicate build configurations: DevDebug, StagingDebug
    • I created the following Release duplicate build configurations: DevRelease, StagingRelease
  2. Run yarn add --dev react-native-schemes-manager
  3. Add scheme mapping to package.json under the xcodeSchemes key
    • I added the following:
      "xcodeSchemes": {
        "Debug": [
          "DevDebug",
          "StagingDebug"
        ],
        "Release": [
          "DevRelease",
          "StagingRelease"
        ],
        "projectDirectory": "ios"
      }
  4. Run yarn run react-native-schemes-manager fix-libraries

(I only ran fix-libraries since fix-script doesn't seem to be necessary anymore)

That command fails on this line of fix-scripts.js:

if (!configList) throw new Error(`Unable to find config list for build configuration: ${sourceConfig.name}`);

With this error:

yarn run v1.16.0
$ PROJECT_PATH_OMITTED/node_modules/.bin/react-native-schemes-manager fix-libraries
 ✔ [fix-libraries]: Debug -> DevDebug created in node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj
 ✔ [fix-libraries]: Debug -> StagingDebug created in node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj
 ✔ [fix-libraries]: Release -> DevRelease created in node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj
 ✔ [fix-libraries]: Release -> StagingRelease created in node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj
 ✔ [fix-libraries]: Debug -> DevDebug created in node_modules/react-native/Libraries/ART/ART.xcodeproj
 ✔ [fix-libraries]: Debug -> StagingDebug created in node_modules/react-native/Libraries/ART/ART.xcodeproj
 ✔ [fix-libraries]: Release -> DevRelease created in node_modules/react-native/Libraries/ART/ART.xcodeproj
 ✔ [fix-libraries]: Release -> StagingRelease created in node_modules/react-native/Libraries/ART/ART.xcodeproj
 ✔ [fix-libraries]: Debug -> DevDebug created in node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj
 ✔ [fix-libraries]: Debug -> StagingDebug created in node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj
 ✔ [fix-libraries]: Release -> DevRelease created in node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj
 ✔ [fix-libraries]: Release -> StagingRelease created in node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj
 ✔ [fix-libraries]: Debug -> DevDebug created in node_modules/react-native/Libraries/CameraRoll/RCTCameraRoll.xcodeproj
 ✔ [fix-libraries]: Debug -> StagingDebug created in node_modules/react-native/Libraries/CameraRoll/RCTCameraRoll.xcodeproj
 ✔ [fix-libraries]: Release -> DevRelease created in node_modules/react-native/Libraries/CameraRoll/RCTCameraRoll.xcodeproj
 ✔ [fix-libraries]: Release -> StagingRelease created in node_modules/react-native/Libraries/CameraRoll/RCTCameraRoll.xcodeproj
 ✔ [fix-libraries]: Debug -> DevDebug created in node_modules/react-native/Libraries/Image/RCTImage.xcodeproj
 ✔ [fix-libraries]: Debug -> StagingDebug created in node_modules/react-native/Libraries/Image/RCTImage.xcodeproj
 ✔ [fix-libraries]: Release -> DevRelease created in node_modules/react-native/Libraries/Image/RCTImage.xcodeproj
 ✔ [fix-libraries]: Release -> StagingRelease created in node_modules/react-native/Libraries/Image/RCTImage.xcodeproj
 ✔ [fix-libraries]: Debug -> DevDebug created in node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj
 ✔ [fix-libraries]: Debug -> StagingDebug created in node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj
 ✔ [fix-libraries]: Release -> DevRelease created in node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj
 ✔ [fix-libraries]: Release -> StagingRelease created in node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj
 ✔ [fix-libraries]: Debug -> DevDebug created in node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj
 ✔ [fix-libraries]: Debug -> StagingDebug created in node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj
 ✔ [fix-libraries]: Release -> DevRelease created in node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj
 ✔ [fix-libraries]: Release -> StagingRelease created in node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj
 ✔ [fix-libraries]: Debug -> DevDebug created in node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj
 ✔ [fix-libraries]: Debug -> StagingDebug created in node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj
 ✔ [fix-libraries]: Release -> DevRelease created in node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj
 ✔ [fix-libraries]: Release -> StagingRelease created in node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj
 ✔ [fix-libraries]: Debug -> DevDebug created in node_modules/react-native/Libraries/PushNotificationIOS/RCTPushNotification.xcodeproj
 ✔ [fix-libraries]: Debug -> StagingDebug created in node_modules/react-native/Libraries/PushNotificationIOS/RCTPushNotification.xcodeproj
 ✔ [fix-libraries]: Release -> DevRelease created in node_modules/react-native/Libraries/PushNotificationIOS/RCTPushNotification.xcodeproj
 ✔ [fix-libraries]: Release -> StagingRelease created in node_modules/react-native/Libraries/PushNotificationIOS/RCTPushNotification.xcodeproj
 ✔ [fix-libraries]: Debug -> DevDebug created in node_modules/react-native/Libraries/Sample/Sample.xcodeproj
 ✔ [fix-libraries]: Debug -> StagingDebug created in node_modules/react-native/Libraries/Sample/Sample.xcodeproj
 ✔ [fix-libraries]: Release -> DevRelease created in node_modules/react-native/Libraries/Sample/Sample.xcodeproj
 ✔ [fix-libraries]: Release -> StagingRelease created in node_modules/react-native/Libraries/Sample/Sample.xcodeproj
 ✔ [fix-libraries]: Debug -> DevDebug created in node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj
 ✔ [fix-libraries]: Debug -> StagingDebug created in node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj
 ✔ [fix-libraries]: Release -> DevRelease created in node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj
 ✔ [fix-libraries]: Release -> StagingRelease created in node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj
 ✔ [fix-libraries]: Debug -> DevDebug created in node_modules/react-native/Libraries/Text/RCTText.xcodeproj
 ✔ [fix-libraries]: Debug -> StagingDebug created in node_modules/react-native/Libraries/Text/RCTText.xcodeproj
 ✔ [fix-libraries]: Release -> DevRelease created in node_modules/react-native/Libraries/Text/RCTText.xcodeproj
 ✔ [fix-libraries]: Release -> StagingRelease created in node_modules/react-native/Libraries/Text/RCTText.xcodeproj
 ✔ [fix-libraries]: Debug -> DevDebug created in node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj
 ✔ [fix-libraries]: Debug -> StagingDebug created in node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj
 ✔ [fix-libraries]: Release -> DevRelease created in node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj
 ✔ [fix-libraries]: Release -> StagingRelease created in node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj
PROJECT_PATH_OMITTED/node_modules/react-native-schemes-manager/src/fix-libraries.js:47
					if (!configList) throw new Error(`Unable to find config list for build configuration: ${sourceConfig.name}`);
					                 ^

Error: Unable to find config list for build configuration: Debug
    at updateProject (PROJECT_PATH_OMITTED/node_modules/react-native-schemes-manager/src/fix-libraries.js:47:29)
    at utilities.updateProjectsMatchingGlob PROJECT_PATH_OMITTED/node_modules/react-native-schemes-manager/src/fix-libraries.js:86:10)
    at getFilesMatchingGlob (PROJECT_PATH_OMITTED/node_modules/react-native-schemes-manager/src/utilities.js:70:8)
    at glob (PROJECT_PATH_OMITTED/node_modules/react-native-schemes-manager/src/utilities.js:45:5)
    at f (PROJECT_PATH_OMITTED/node_modules/once/once.js:25:25)
    at Glob.<anonymous> (PROJECT_PATH_OMITTED/node_modules/glob/glob.js:151:7)
    at Glob.emit (events.js:189:13)
    at Glob._finish (PROJECT_PATH_OMITTED/node_modules/glob/glob.js:197:8)
    at done (PROJECT_PATH_OMITTED/node_modules/glob/glob.js:182:14)
    at Glob._processGlobStar2 (PROJECT_PATH_OMITTED/node_modules/glob/glob.js:637:12)
error Command failed with exit code 1.

@hans0low
Copy link

@bericp1 Did you have to do anything else for the duplicated debug schemes? When trying to build it runs into an error with the Tests target:
file not found: .../Build/Products/SchemeName-iphonesimulator/MyProject.app/MyProject

@salvariable
Copy link

@bericp1 you said you made the change @doomsower recommended... did you mean editing as well the Test file he referred to? (the one in react-native) ... or did you just edit the Podfile?

@bericp1
Copy link

bericp1 commented Aug 14, 2019

@salvariable

Yep to get it to work with 0.60.5, all I had to do was:

  1. Create my build configurations and schemes in XCode
  2. Not install this library
  3. Manually apply the changes in this diff
  4. Add a project call with my scheme/configuration mappings to the top-level of my ios/Podfile.
  5. Run cd ios && pod install && cd ../

@hans0low

Not that I remember. Did you apply the changes from this diff? Not sure what else would cause that error.

@thekevinbrown
Copy link
Owner

@BericP, are you able to bring up the debug menu in schemes that aren't called, "Debug"?

You could use schemes with React Native before 0.60, but debugging produced a release build in them.

If you can bring up the debug menu in your custom schemes, then there is no need for this library.

@influx6
Copy link

influx6 commented Aug 15, 2019

@thekevinbrown I followed @bericp1 except for applying this Manually apply the changes in this diff, I am able to bring up debug menu in other configurations apart from debug.

@thekevinbrown
Copy link
Owner

@influx6, awesome, in that case we don't need this library for 60. The other things it does are window dressing, as the main reason I created it was for debugging other schemes.

I'd be happy to merge a PR to update the Readme to say so.

@TylerNRobertson
Copy link

TylerNRobertson commented Aug 16, 2019

@bericp1 regarding 0.60.5 . I made my react native project changes but am stuck at this issue:

node_modules/react-native-schemes-manager/src/fix-libraries.js:47
					if (!configList) throw new Error(`Unable to find config list for build configuration: ${sourceConfig.name}`);
Error: Unable to find config list for build configuration: Release

any idea how to fix? I saw your comments above about the pod file with the project/scheme mappings. Just wondering if you have an example of this that worked for you?

@bericp1
Copy link

bericp1 commented Aug 16, 2019

@TylerNRobertson --

Per the convo here, if you're on or upgrade to 0.60.5 and you make the changes in your ios/Podfile described above, this library is likely not necessary anymore (can't really speak to non-cocoapods dependencies at this point, all of our deps right now have a podspec). So if you upgrade, you should uninstall react-native-schemes-manager which is where that error is coming from.

The update you need to make in ios/Podfile depends on what build configurations you created.

Based off the docs here, you generally need to add something like the following near the top of the file, right after require_relative.

project 'TheNameOfYourProjectWithoutTheXprojExtension',
    'Debug' => :debug,
    'Release' => :release,
    'FooDebug' => :debug,
    'FooRelease' => :release

Where:

  • Debug and Release are the built-in build configurations
  • FooDebug is a build configuration you cloned from Debug
  • FooRelease is a build configuration you cloned from Release

And then you need to run cd ios/Pods && pod install && cd ../ to update your project.

What you're essentially doing is converting your json build configuration map you had in your package.json for xcodeSchemes into ruby code in your Podfile to tell cocoapods about the build configurations now that RN core uses cocoapods.

@TylerNRobertson
Copy link

@bericp1 thanks for the response. Had everything correct except for not including this project anymore.

Works great now!

@basbase
Copy link

basbase commented Aug 21, 2019

I have set up my project with schemes manager the same way as I did as before RN 0.60.5, but with these changes to get it working:

diff --git a/node_modules/react-native-schemes-manager/src/fix-libraries.js b/node_modules/react-native-schemes-manager/src/fix-libraries.js
index d587997..a2a878a 100644
--- a/node_modules/react-native-schemes-manager/src/fix-libraries.js
+++ b/node_modules/react-native-schemes-manager/src/fix-libraries.js
@@ -44,7 +44,10 @@ function updateProject (project) {
 					const sourceConfig = sourceConfigs[key];
 					const configList = configListForConfig(configLists, key);

-					if (!configList) throw new Error(`Unable to find config list for build configuration: ${sourceConfig.name}`);
+					if (!configList) {
+						console.log(`Unable to find config list for build configuration: ${sourceConfig.name}`);
+						continue;
+					}

 					// Copy that bad boy.
 					const clone = JSON.parse(JSON.stringify(sourceConfig));

And the podfile addition mentioned by @bericp1 :

project 'TheNameOfYourProjectWithoutTheXprojExtension',
    'Debug' => :debug,
    'Release' => :release,
    'FooDebug' => :debug,
    'FooRelease' => :release

This way it satisfies both the pods and the non-pods dependencies

@ofiron01
Copy link

@TylerNRobertson --

Per the convo here, if you're on or upgrade to 0.60.5 and you make the changes in your ios/Podfile described above, this library is likely not necessary anymore (can't really speak to non-cocoapods dependencies at this point, all of our deps right now have a podspec). So if you upgrade, you should uninstall react-native-schemes-manager which is where that error is coming from.

The update you need to make in ios/Podfile depends on what build configurations you created.

Based off the docs here, you generally need to add something like the following near the top of the file, right after require_relative.

project 'TheNameOfYourProjectWithoutTheXprojExtension',
    'Debug' => :debug,
    'Release' => :release,
    'FooDebug' => :debug,
    'FooRelease' => :release

Where:

  • Debug and Release are the built-in build configurations
  • FooDebug is a build configuration you cloned from Debug
  • FooRelease is a build configuration you cloned from Release

And then you need to run cd ios/Pods && pod install && cd ../ to update your project.

What you're essentially doing is converting your json build configuration map you had in your package.json for xcodeSchemes into ruby code in your Podfile to tell cocoapods about the build configurations now that RN core uses cocoapods.

This solved our issue , thanks!

@romk1n
Copy link

romk1n commented Oct 22, 2019

@ofiron01 i have tried the same and it stills failing for me any other hints on how to debug it, also what version of the manager i should be using ?

@xeroxoid
Copy link
Author

Closing as this issue has been mitigated by removing the package and using the appropriate CocoaPods configuration instead, as described by various solutions above.

@kg-currenxie
Copy link

The specific change to ios/Podfile I made was just adding that project call right after require_relative at the top level. Then I just ran rm -rf Pods && pod install (EDIT: in the ios/ directory)

project 'MyProject',
    'DevDebug' => :debug,
    'StagingDebug' => :debug,
    'Debug' => :debug,
    'DevRelease' => :release,
    'StagingRelease' => :release,
    'Release' => :release

(where MyProject is the name of your XCode project without the extension).

EDIT: You'll also need to change the hash/map there. The keys (i.e. DevDebug, etc.) should be the name of the build configurations you clones from Debug/Release and the values are the type of configuration they are. See my comment farther down here.

This worked for me. Thanks!!!

@renatobenks
Copy link

Today react-native 0.60.5 dropped but it doesn't seem to include that PR for fixing custom release scheme. I had to manually make the changes in that PR to my project.

When I made the change @doomsower recommended, I was able to build and run release builds and debug builds with custom schemes and build configurations without installing this library at all.

The specific change to ios/Podfile I made was just adding that project call right after require_relative at the top level. Then I just ran rm -rf Pods && pod install (EDIT: in the ios/ directory)

project 'MyProject',
    'DevDebug' => :debug,
    'StagingDebug' => :debug,
    'Debug' => :debug,
    'DevRelease' => :release,
    'StagingRelease' => :release,
    'Release' => :release

(where MyProject is the name of your XCode project without the extension).

EDIT: You'll also need to change the hash/map there. The keys (i.e. DevDebug, etc.) should be the name of the build configurations you clones from Debug/Release and the values are the type of configuration they are. See my comment farther down here.

So as far as the react-native core 0.60+ goes, this library isn't needed it seems. For third-party deps though that don't use cocoapods it probably will be? I'm not familiar enough to say for sure.

it's working for me as well 🏆

thank you so much for that @bericp1, you solved it for gooood! 🙏🏻 🎉

@jack-ayoka
Copy link

Going forward, the solution to this should probably be listed at the top of the readme... spent a while trying to get this to work only to realize I'm using RN >0.60, and most people that come across this package will be using newer versions of RN

@thekevinbrown
Copy link
Owner

@jack-ayoka would you be willing to make a PR for the readme?

@sangameshsomawar
Copy link

@TylerNRobertson --

Per the convo here, if you're on or upgrade to 0.60.5 and you make the changes in your ios/Podfile described above, this library is likely not necessary anymore (can't really speak to non-cocoapods dependencies at this point, all of our deps right now have a podspec). So if you upgrade, you should uninstall react-native-schemes-manager which is where that error is coming from.

The update you need to make in ios/Podfile depends on what build configurations you created.

Based off the docs here, you generally need to add something like the following near the top of the file, right after require_relative.

project 'TheNameOfYourProjectWithoutTheXprojExtension',
    'Debug' => :debug,
    'Release' => :release,
    'FooDebug' => :debug,
    'FooRelease' => :release

Where:

  • Debug and Release are the built-in build configurations
  • FooDebug is a build configuration you cloned from Debug
  • FooRelease is a build configuration you cloned from Release

And then you need to run cd ios/Pods && pod install && cd ../ to update your project.

What you're essentially doing is converting your json build configuration map you had in your package.json for xcodeSchemes into ruby code in your Podfile to tell cocoapods about the build configurations now that RN core uses cocoapods.

Thank you sooo much, Really Appreciate it 😄.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests