zoontek / react-native-dev-menu Goto Github PK
View Code? Open in Web Editor NEWAdd custom items to the React Native dev menu.
License: MIT License
Add custom items to the React Native dev menu.
License: MIT License
When app is hot reloaded added menu shows multiple times.
Is there a way to check if menu is already added?
Thanks for putting your time into this project ๐
I didn't want to be presumptive and submit a PR, but would you consider adding a License?
I guess you're familiar with this from elsewhere and it's an oversight, but since there's no license, it seems GitHub considers that this is not an open-source project: https://choosealicense.com/no-permission/
by adding use_frameworks! to the pod file, I faced this issue in the iOS project
Undefined symbols for architecture x86_64
> Symbol: _OBJC_CLASS_$_FIRAnalytics
> Referenced from: objc-class-ref in RNFBAnalyticsModule.o
Note:
the below solution didn't fix the issue
$static_libs = ['RNDevMenu']
pre_install do |installer|
installer.pod_targets.each do |pod|
if $static_libs.include?(pod.name)
puts "Flag #{pod.name} as static_library"
def pod.build_type;
Pod::BuildType.static_library # >= 1.9
end
end
end
end
4.0.2
System:
OS: macOS 12.3.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 215.13 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.19.1 - /usr/local/bin/node
Yarn: 1.22.18 - /usr/local/bin/yarn
npm: 7.24.2 - /usr/local/bin/npm
Watchman: 2022.03.21.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.2 - /Users/flc_user/.rvm/gems/ruby-2.6.8/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
Android SDK: Not Found
IDEs:
Android Studio: Chipmunk 2021.2.1 Chipmunk 2021.2.1
Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
Languages:
Java: 11.0.14.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: ^6.1.0 => 6.1.0
react: 17.0.2 => 17.0.2
react-native: 0.67.3 => 0.67.3
react-native-macos: Not Found
use_frameworks!
Each menu item is called once for the number of items added. If I add 3 menu items and click one, it is called 3 times. If I add another, it's called 4 times.
To reproduce, use the example from the documentation, replacing alert
with console.log
and duplicate it a few times (with a different name and output, for clarity). Upon clicking the menu item, it will be fired as many times as there are menu items.
if (__DEV__) {
const DevMenu = require('react-native-dev-menu');
DevMenu.addItem('Say Hello #1', () => console.log('Hello 1!'));
DevMenu.addItem('Say Hello #2', () => console.log('Hello 2!'));
DevMenu.addItem('Say Hello #3', () => console.log('Hello 3!'));
}
Clicking Say Hello #1
will result in 3x "Hello 1!
" in the console log.
Explain what you did, what you expected to happen, and what actually happens.
Provide some code if needed.
Just run app with this library installed, get yellowbox:
Warning: Async Storage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-community/async-storage' instead of 'react-native'. See https://github.com/react-native-community/react-native-async-storage
Do you know what needs to be done to address this issue? Ideally, provide a pull
request with a fix.
Native dependency needs updating to @react-native-community/async-storage
When adding items within a certain context, we may want to remove the items once that is no longer needed ( for example, the mentioned context was destroyed )
The workaround now is to overwrite the item with an empty handler, but the item is still there anyways
No response
No response
I had red screen saying that native module cannot be null
It seems that after installing and linking, POD file was indeed added but pod install
must be executed after react-native link
as pod install
.
As pod finished, I deleting app completely from emulator and re-run the react-native run-ios
it started to working!
Hello!
Also note the project uses use_frameworks!
Upgrading to RN 0.62.2 broke the build with this error:
Undefined symbols for architecture arm64
> Symbol: _OBJC_CLASS_$_RCTDevMenuItem
> Referenced from: objc-class-ref in RNDevMenu.o
I tried already:
The weird part is if I symlink RNDevMenu.h
and RNDevMenu.m
in the project and make sure it's not installed as a Pod, then it works
Let me know if you need any additional details!
Plase upgrade buildToolsVersion
to 33.0.0
and targetSdkVersion
, compileSdkVersion
to 33
, Currently my app can't compile if these configurations use a version greater than Android SDK 31
No response
buildscript {
// The Android Gradle plugin is only required when opening the android folder stand-alone.
// This avoids unnecessary downloads and potential conflicts when the library is included as a
// module dependency in an application project.
if (project == rootProject) {
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.2.2")
}
}
}
apply plugin: "com.android.library"
android {
compileSdkVersion safeExtGet("compileSdkVersion", 33)
buildToolsVersion safeExtGet("buildToolsVersion", "33.0.0")
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
}
lintOptions {
abortOnError false
}
}
Since this project seems to be a modification of react-native-dev-menu-item, it would be nice if you could give proper attribution.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.