maxkomarychev / react-native-ultimate-config

Config that works
MIT License
262 stars 31 forks source link

iOS - Implicit declaration of function getValues is invalid in C99 #45

Closed hanifmhd closed 3 years ago

hanifmhd commented 3 years ago

Describe the bug

Error when building ios from xcode

Steps to Reproduce

in xcode click product -> build

Expected behavior

sucess building iOS

Stacktraces, logs, screenshots

Post stacktraces, logs or screenshots. The more information is available is better.

Environment

Integration option

Env file

Example of env file that is causing problems

APP_HOST=<link_url>
APP_STORAGE_TAG=<@tag>

AUTODETECT_LOCATION=true
ENABLE_CUSTOM_URL=false
ENABLE_FEATURE_APPLEPAY=true
ENABLE_FEATURE_ONESIGNAL=true

ANDROID_APP_NAME=<app_name>
ANDROID_VERSION_NAME=1.0.0
ANDROID_VERSION_CODE=13
ANDROID_URL=<link_url>

IOS_APP_NAME=<app_name>
IOS_VERSION_NAME=1.0.0
IOS_VERSION_CODE=13
IOS_URL=<link_url>

DISCOVERY_SERVICE_URL=<link_url>

SENTRY_DSN=<link_url>

WEBVIEW_LANG=en-ae,ar-sa,id-id
WEBVIEW_USERAGENT=Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.96 Mobile Safari/537.36

DEEPLINK_TAG_APPLEPAY=APPLEPAY
DEEPLINK_TAG_TELEMEDICINE=VIDEO_URL
DEEPLINK_HOST_TELEMEDICINE=teleconference

ONESIGNAL_APP_ID=<app_id>

OS

Packages

Run react-native info and post below:

System:
    OS: macOS 11.2
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Memory: 219.96 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 15.4.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.0.15 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      Android NDK: 22.0.7026061
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.6953283
    Xcode: 12.3/12C33 - /usr/bin/xcodebuild
  Languages:
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0 
    react-native: 0.62.2 => 0.62.2 
  npmGlobalPackages:
    *react-native*: Not Found

[UPDATE]

Additional context

error screenshot

Screen Shot 2021-02-02 at 10 35 52
maxkomarychev commented 3 years ago

hi @hanifmhd,

can you please attach a screenshot from xcode or piece of log where error appears? thanks

hanifmhd commented 3 years ago

hi @hanifmhd,

can you please attach a screenshot from xcode or piece of log where error appears? thanks

Iā€™m sorry it is solved. After i re-build xcode, the error is not showing error anymore

hanifmhd commented 3 years ago

hi @maxkomarychev, i just got error from xcode

Screen Shot 2021-02-02 at 10 35 52
maxkomarychev commented 3 years ago

@hanifmhd hi, it looks like you have not injected environment. Does it show you a file if you CMD+click on "ConfigValues.h" in the 2nd line of this file? Btw, look at the 1st error - it tells me the environment was not injected.

I do not know why this error reoccurring but I can speculate you have reinstalled cocoapods or node_modules. Try to simply run yarn rnuc <env> every time you reinstall pods or node_modules.

hanifmhd commented 3 years ago

@hanifmhd hi, it looks like you have not injected environment. Does it show you a file if you CMD+click on "ConfigValues.h" in the 2nd line of this file? Btw, look at the 1st error - it tells me the environment was not injected.

I do not know why this error reoccurring but I can speculate you have reinstalled cocoapods or node_modules. Try to simply run yarn rnuc <env> every time you reinstall pods or node_modules.

i already run yarn rnuc <env> every time i reinstall my pods/node_modules, but it still got error. when i click CMD + click on "ConfigValues.h", it is already completed all configuration for env

hanifmhd commented 3 years ago

thank you @maxkomarychev for the instruction, sometimes i need to run yarn rnuc <env> more than once to inject the environment configuration. now, it's solved