ismaeldcom / react-native-build-config Goto Github PK
View Code? Open in Web Editor NEWExpose native build config to JS
License: MIT License
Expose native build config to JS
License: MIT License
Hello. Is it possible to modify Info.plist file with this module? When Im changing some key and then console.log it, key is changed but does it really update Info.plist file?
Hi, @ismaeldcom thanks for the package :)
I receive these warning, when I tried to start my project
I think that problem is with the versions into the android section in the build.gradle
in your package
When I replace the 23
version on the 27
then everything works well
I have done everything but I am getting BuildConfig is undefined.
When i try to install this package using command "npm i ismaeldcom/react-native-build-config", receive the message:
npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://[email protected]/ismaeldcom/react-native-build-config.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lproenca\AppData\Roaming\npm-cache_logs\2019-07-17T17_27_35_687Z-debug.log
When starting the bundler, this message is displayed:
warn The following packages use deprecated "rnpm" config that will stop working from next release:
- react-native-build-config: https://github.com/ismaeldcom/react-native-build-config
Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide.
It's a fairly straightforward fix, I'd be glad to contribute if I find some open time in the near future
Getting below errors
`
❌ /Users/[REDACTED]/git/node_modules/react-native/React/Base/RCTBridgeModule.h:151:56: expected ';' at end of declaration list
@Property (nonatomic, weak, readonly) RCTBridge *bridge RCT_DEPRECATED;
^
❌ /Users/[REDACTED]/git/node_modules/react-native/React/Base/RCTBridgeModule.h:151:57: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
@Property (nonatomic, weak, readonly) RCTBridge *bridge RCT_DEPRECATED;
^
❌ /Users/[REDACTED]/git/node_modules/react-native/React/Base/RCTBridgeModule.h:164:69: expected ';' at end of declaration list
@Property (nonatomic, strong, readonly) dispatch_queue_t methodQueue RCT_DEPRECATED;
^
❌ /Users/[REDACTED]/git/node_modules/react-native/React/Base/RCTBridgeModule.h:164:70: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
@Property (nonatomic, strong, readonly) dispatch_queue_t methodQueue RCT_DEPRECATED;
^
❌ /Users/[REDACTED]/git/node_modules/react-native/React/Base/RCTBridgeModule.h:151:57: cannot declare variable inside @interface or @protocol
@Property (nonatomic, weak, readonly) RCTBridge *bridge RCT_DEPRECATED;
^
❌ /Users/[REDACTED]/git/node_modules/react-native/React/Base/RCTBridgeModule.h:164:70: cannot declare variable inside @interface or @protocol
@Property (nonatomic, strong, readonly) dispatch_queue_t methodQueue RCT_DEPRECATED;
^
❌ /Users/[REDACTED]/git/node_modules/react-native/React/Base/RCTBridgeModule.h:366:1: duplicate interface definition for class 'RCTModuleRegistry'
@interface RCTModuleRegistry : NSObject
❌ /Users/[REDACTED]/git/node_modules/react-native/React/Base/RCTBridgeModule.h:382:1: duplicate interface definition for class 'RCTViewRegistry'
@interface RCTViewRegistry : NSObject
❌ /Users/[REDACTED]/git/node_modules/react-native/React/Base/RCTBridgeModule.h:400:1: duplicate interface definition for class 'RCTCallableJSModules'
@interface RCTCallableJSModules : NSObject`
Autolinking is working properly, on Android i do have the gradle config that is shown but for ios BuildConfig returns a null object.
import BuildConfig from 'react-native-build-config';
....
// In render
console.log('BUILD CONFIG', BuildConfig);
Output:
'BUILD CONFIG', null
ios version: 13.2
xcode version: 11.2 beta (11B41)
It works perfectly in debug mode but when I made an apk of the application in release mode and then run it, the BuildConfig comes as "undefined".
BuildConfig information under 'default' element
I have following code in my application
const BuildConfig = require('react-native-build-config');
console.log(BuildConfig.APPLICATION_ID);
console.log(BuildConfig.default.APPLICATION_ID);
As per documentation the line 'console.log(BuildConfig.APPLICATION_ID);' shall output APPLICATION_ID, but indeed the config variables appear as part of default object and only the second version console.log(BuildConfig.default.APPLICATION_ID); works.
This is new application build with ReactNative 0.60.4, in my old app (ReactNative 0.59.x) all seem to be working fine.
Any recomendation why it will happen?
I'm unable to create a mock for this package. Is there a way to write tests to cover branches based off of values coming from this package?
The Android OS versions used in the build.gradle file of this project are very outdated.
This has the effect that this library cannot be used in certain conditions.
The gradle error is:
uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [com.facebook.react:react-native:0.64.0] /Users/teddekoning/.gradle/caches/transforms-2/files-2.1/334b1b05ea5dadaf84bbec314981d992/jetified-react-native-0.64.0/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 21,
or use tools:overrideLibrary="com.facebook.react" to force usage (may lead to runtime failures)
> Configure project :react-native-build-config
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
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.