react-native-photos-framework icon indicating copy to clipboard operation
react-native-photos-framework copied to clipboard

Unable to install due to incorrect xcodeproj being picked up

Open christophrowley opened this issue 8 years ago • 2 comments

My install kept failing with this error on [email protected]:

/Users/chris.rowley/rn-project/node_modules/react-native-photos-framework/install.js:23
    if (!plist.NSPhotoLibraryUsageDescription) {
              ^

TypeError: Cannot read property 'NSPhotoLibraryUsageDescription' of null
    at Object.<anonymous> (/Users/chris.rowley/rn-project/node_modules/react-native-photos-framework/install.js:23:15)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:427:7)
    at startup (bootstrap_node.js:151:9)
    at bootstrap_node.js:542:3

I've done some digging, and the issue seems to be that findProject in react-native-photos-framework/local-cli/core/config/ios/findProject.js takes the first *.pbxproj file it finds... In my case, that was

ios/build/Build/Products/Debug-iphonesimulator/rn-project/LinkingIOS/RCTLinking.xcodeproj

which has no INFOPLIST_FILE field... Removing the ios/build dir fixes the issue, but it'd be great if findProject could be more specific in the file it picks up?

christophrowley avatar Jul 02 '17 14:07 christophrowley

Will take a look this week!

olofd avatar Sep 03 '17 14:09 olofd

I've got the same issue

monolithed avatar Jan 16 '18 16:01 monolithed