Giter Site home page Giter Site logo

zoontek / react-native-dev-menu Goto Github PK

View Code? Open in Web Editor NEW
204.0 204.0 25.0 1.37 MB

Add custom items to the React Native dev menu.

License: MIT License

Ruby 16.76% Java 54.15% JavaScript 6.45% Objective-C 7.93% Shell 0.34% Objective-C++ 6.08% TypeScript 8.29%
android ios react-native

react-native-dev-menu's People

Contributors

barbosa avatar dependabot[bot] avatar hanno-jonlay avatar iamolegga avatar krisztiaan avatar rwoverdijk avatar svbutko avatar tychota avatar yenbekbay avatar yeomann avatar zoontek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-native-dev-menu's Issues

Consider adding a license?

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/

Undefined symbols for architecture x86_64

Bug summary

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

Library version

4.0.2

Environment info

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

Steps to reproduce

  1. add use_frameworks! to project
  2. pod install
  3. npm run ios

Reproducible sample code

use_frameworks!

Menu items firing as many times as there are menu items

  • React-Native: 0.61.5
  • Platform: iOS
  • Device: simulator
  • OS version: 13.4.1
  • react-native-dev-menu: 4.0.1
  • Devtools: Xcode 11.4.1

How to repeat issue and example

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.

Yellowbox: Warning: Async Storage has been extracted from react-native core and will be removed in a future release

Describe your environment

  • React-Native version
    0.59.9
  • Platform: iOS, Android, both?
    Both
  • Device (which one?), simulator?
    emulator
  • OS version
    macOS 10.15
  • react-native-permissions version
  • Devtools: Xcode? Android Studio version?
    xcode 11.1, android studio 3.5
  • (Android only: buildToolsVersion)
    28.0.3

How to repeat issue and example

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:
image

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

Solution

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

Expose a removeItem method

Why it is needed?

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

Possible implementation

No response

Code sample

No response

native module cannot be null

  • React-Native version
  • Platform: iOS, Android, both
  • Device: simulator: IOS Iphone 10.0
  • OS version Mac OS latest

I had red screen saying that native module cannot be null

Solution

It seems that after installing and linking, POD file was indeed added but pod install must be executed after react-native linkas pod install.
As pod finished, I deleting app completely from emulator and re-run the react-native run-ios it started to working!

Undefined symbols for architecture arm64 on RN 0.62.2

Hello!

Describe your environment

  • React-Native 0.62.2
  • Platform: iOS
  • Device: simulator
  • OS version: macOS 10.15.4
  • react-native-dev-menu version 4.0.1
  • Devtools: XCode 11.4

Also note the project uses use_frameworks!

How to repeat issue and example

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:

  • cleaning project
  • removing derived data
    A clean build on Bitrise also has the same issue, so it mustn't be related to cache or something of the sort

Not really a solution

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!

Upgrade android SDK dependencies

Why it is needed?

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

Possible implementation

No response

Code sample

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
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.