jordanbyron / react-native-quick-actions

A react-native interface for Touch 3D home screen quick actions
MIT License
1.06k stars 93 forks source link

Installation issue: 'RNQuickActionManager.h' file not found #60

Closed 404sand808s closed 6 years ago

404sand808s commented 6 years ago

Hey, feel like this should be straightforward enough but I actually can't tell what I'm doing wrong.

Followed the installation instructions as per the RN page you linked but I keep getting the error 'RNQuickActionManager.h' file not found in my import of #import "RNQuickActionManager.h" in my AppDelegate.m file.

I did the manual install on iOS. Thanks in advance for any help or insight!

jordanbyron commented 6 years ago

Hey @404sand808s,

My guess is you need to make sure you follow the instructions here which including a step to link your project to react-native-quick-actions. Hopefully that helps. If not give Stack Overflow a try and if you find a bug with our code or documentation open up a ticket here and we'll fix it.

404sand808s commented 6 years ago

I followed those instructions to the T, but perhaps there's something that needs to be done that they're not explicitly stating. I assume there's no bug in your code since I've searched your issues and nobody else brought this up. Thanks for the quick reply, will try SO.

leonid-shevtsov commented 5 years ago

Had the same issue. However I linked the library manually to avoid Cocoapods - then I needed to reference the header file by adding this to "Header Search Paths" (go to your project's file, select "Build Settings" and search for "Header Search Paths")

$(SRCROOT)/../node_modules/react-native-quick-actions/RNQuickAction/RNQuickAction
Paul-Lategan commented 4 years ago

I seem to be running into the same issue ("RNQuickActionManager.h" file not found), although I'm using Cocoapods.

Unfortunately @leonid-shevtsov's solution did not work for me. After adding the header search path Leonid specified, the "RNQuickActionManager.h file not found" error goes away, but I get a new error "Undefined symbol: _OBJCCLASS$_RNQuickActionManager".

Screen Shot 2020-07-07 at 11 12 41 Screen Shot 2020-07-07 at 11 15 57

Has anyone successfully installed this module using Cocoapods? Sorry if I'm missing something obvious. I don't see any mention of Cocoapods in the documentation. Usually React Native module install guides have sections like "do this if cocoapods.. do this otherwise", so I'm unsure if following the install instructions is even relevant/supported in my case. Can the installation instructions still work when modifying AppDelegate.m within the .xcworkspace project (not .xcodproject)?

Environment React-Native-CLI 2.0.1 React-Native 0.61.2

I've tried the following install steps:

Approach A:

  1. npm install --save react-native-quick-actions
  2. react-native link react-native-quick-actions
  3. Open .xcworkspace and update AppDelegate.m with the code specified in the install instructions.
  4. Attempt to run
  5. Build fails with error (not found)
  6. Modify Header Search Paths to include Leonid's solution
  7. Quit XCode, restart XCode, clean build folder and click "Run"
  8. Build fails with error (Undefined symbol)

Approach B:

  1. react-native unlink react-native-quick-actions
  2. manually link via steps 1, 2, and 3 here: https://reactnative.dev/docs/linking-libraries-ios
  3. Open .xcworkspace and update AppDelegate.m with the code specified in the install instructions.
  4. Modify Header Search Paths to include Leonid's solution
  5. Attempt to run
  6. Build fails with error (Undefined Symbol)
Paul-Lategan commented 4 years ago

I managed to fix this for Cocoapods by doing the following:

  1. Unlink/undo any installation steps you've already tried besides npm install --save react-native-quick-actions.
  2. Edit your podfile to include the following line: pod 'RNQuickAction', :podspec => '../node_modules/react-native-quick-actions/RNQuickAction.podspec'
  3. Do cd ios, pod install