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

App not running when linking react-native-local-notifications v0.60.5 #31

Open
ahmadallo1 opened this issue Oct 30, 2019 · 8 comments
Open

Comments

@ahmadallo1
Copy link

ahmadallo1 commented Oct 30, 2019

@wumke I'm using react native v0.60.5 "react native link" is not used anymore to link component, when trying to run it in xcode the following error appears:
'RCTBridgeModule.h' file not found

is there any way to link react-native-local-notifications using cocoapods or how can we fix this issue?

react-native": "0.60.5",
"react-native-local-notifications": "2.0.0"

@mrblgn
Copy link

mrblgn commented Nov 13, 2019

hi @ahmadallo1
i had faced same problem at IOs

Binaries:
Node: 12.4.0 - /usr/local/bin/node
Yarn: 1.17.0 - /usr/local/bin/yarn
npm: 6.12.1 - /usr/local/bin/npm
Watchman: 4.9.1 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
Android SDK:
API Levels: 23, 26, 27, 28, 8
Build Tools: 23.0.1, 26.0.3, 27.0.3, 28.0.1, 28.0.2, 28.0.3, 29.0.2
System Images: android-22 | Google APIs Intel x86 Atom, android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.4
Xcode: 10.3
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.3 => 0.61.3
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1

"react-native": "0.61.3",
"react-native-local-notifications": "2.0.0"
and
i found a workaround like this:
i have unlinked and uninstalled react-native-local-notifications

i have installed react-native-local-notifications (like a fresh start)
then i have added
RNLocalNotifications.podspec file to
node_modules/react-native-local-notifications/

my RNLocalNotifications.podspec file is like :
https://gist.github.com/mrblgn/f480aa4a0bf515ea373939fdb0788e6f

then i run
cd ios && pod install & cd ..
command on terminal, like other libraries that have added for RN > 0.60

@wumke should add 'RNLocalNotifications.podspec' file to the project for React Native > 0.60 projects at next release.

@wumke
Copy link
Owner

wumke commented Nov 20, 2019

Merged PR #32
Should work now (Use direct repo link npm version not yet updated!)

Since I do not use RN0.60+ yet, can anyone confirm that this issue can be closed?

@SaeedZhiany
Copy link
Contributor

@wumke
PR #32 is not enough, this repository has to migrate and use Androidx packages instead of support libraries. please read this section

@wumke
Copy link
Owner

wumke commented Dec 9, 2019

I've had great success with the Android Studio migration tool, that fixed AndroidX migration of all libraries in a project which I needed to migrate.
You can use that as a temporary workaround, and if you like you can check what changed and create a PR (I'm not into RN at the moment... upgrading and refactoring a huge backend)

@SaeedZhiany
Copy link
Contributor

I've had great success with the Android Studio migration tool, that fixed AndroidX migration of all libraries in a project which I needed to migrate.

This could not be used in a build CI and it's needed to migrate the repository itself. I'll submit a PR as soon as I can.

@wumke
Copy link
Owner

wumke commented Dec 9, 2019

Thank you (in the name of all users of this library)!

Place a reference to this thread when you create the new pull request...

@SaeedZhiany
Copy link
Contributor

@wumke

I have submitted the PR.

@ahmadallo1
since I'm not using RN V60+ yet, I can not test if everything is OK or not, can you test it on your project and give me feedback?

for using the PR on your project change your package.json like below

{
  "react-native-local-notifications": "git://github.com/SaeedZhiany/react-native-local-notifications.git#MigrateToAndroidx"
}

@SugumarParthi
Copy link

@wumke For linking issue i have fixed by adding these path in to the XCode project file.

try these steps:

  1. Go to Project navigator > Libraries > RNLocalNotifications.xcodeproj
  2. lick on Build Settings and then the first item under "Targets"
  3. Scroll down to 'Search Paths'
  4. Double click to edit the 'Header Search Paths'
  5. Add the following entry (click '+'): ${SRCROOT}/../../../ios/Pods/Headers. Make sure to set it to recursive.
  6. Clean (cmd + shift + K) and re-build (cmd + B)

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

5 participants