facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.58k stars 24.37k forks source link

Build with own configuration in wrong Build/Products folder #17650

Closed lukaszgoworko closed 6 years ago

lukaszgoworko commented 6 years ago

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment:

OS: macOS High Sierra 10.13.2 Node: 9.3.0 Yarn: 1.3.2 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 2.3 AI-162.3764568

Packages: (wanted => installed)

react: 16.0.0 => 16.0.0 react-native: 0.50.3 => 0.50.3

dependencies
"apisauce": "^0.14.1",
"babel-core": "^6.26.0",
"babel-plugin-transform-builtin-extend": "^1.1.2",
"hoist-non-react-statics": "^2.3.1",
"immutability-helper": "^2.4.0",
"lodash": "^4.17.4",
"moment": "^2.19.1",
"prop-types": "^15.6.0",
"react": "16.0.0",
"react-native": "0.50.3",
"react-native-config": "^0.10.0",
"react-native-device-info": "^0.12.1",
"react-native-elements": "^0.16.0",
"react-native-fetch-blob": "^0.10.8",
"react-native-fs": "^2.9.6",
"react-native-html-to-pdf": "^0.4.0",
"react-native-icon-badge": "^1.1.3",
"react-native-message-bar": "^2.0.1",
"react-native-offline": "^3.2.0",
"react-native-print": "^0.3.0",
"react-native-radio-buttons": "^1.0.0",
"react-native-router-flux": "4.0.0-beta.24",
"react-native-sha256": "^1.1.1",
"react-native-vector-icons": "^4.4.0",
"react-navigation": "^1.0.0-beta.15",
"react-redux": "^5.0.5",
"redux": "^3.7.0",
"redux-persist": "^5.2.0",
"redux-thunk": "^2.2.0",
"tcomb-form-native": "^0.6.8",
"uuid": "^3.1.0"
devDependencies
"babel-eslint": "^8.0.1",
"babel-jest": "21.2.0",
"babel-preset-react-native": "4.0.0",
"eslint": "^4.9.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-flowtype": "^2.39.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"flow-bin": "^0.56.0",
"jest": "21.2.1",
"nock": "^9.0.14",
"react-test-renderer": "16.0.0-beta.5",
"redux-devtools": "^3.4.0",
"redux-mock-store": "^1.3.0"

Target Platform: iOS (8.0)

Steps to Reproduce

Creating new configuration and scheme in Xcode with own icons, name, and app-ID. Change debug configuration.

(Write your steps here:)

  1. Dublicate Configuration "Release" => Named Staging
  2. Add new IconsSets => AppIconStaging and AppIconDebug
  3. Change Target Build Settings
    1. ASSETCATALOG_COMPILER_APPICON_NAME
      • Debug: AppIconDebug
      • Staging: AppIconStaging
      • Release: AppIconRelease
    2. PRODUCT_BUNDLE_IDENTIFIER
      • different for every configuration
    3. PRODUCT_NAME
      • different for every configuration
  4. Dublicate Scheme => named: ProjectDebug and ProjectStaging
  5. Edit Schemes
    1. Set Build Settings for Run, Profile and Archive
      • ProjectDebug => Debug
      • ProjectStaging => Staging

At this Point trying to run ProjectStaging on Simulator fails because the build fails. I have noticed, that when building ProjectStaging with Staging configuration on an fresh git clone of my project, some files are build in ios/build/Build/Products/Release-iphonesimulator.

Because of this files the build fails, they can't be found in the Staging-iphonesimulator folder.

There are some links to solutions by changing some build settings for Staging configuration

Changing: Header Search Paths, Framework Search Paths, Library Search Paths and User Header Search Paths to $(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)

Now all scheme builds failing when trying to run from Xcode: /Volumes/Workspace/Projects/Project/ios/ProjectTests/ProjectTests.m:11:9: 'XCTest/XCTest.h' file not found

Running from console: node node_modules/react-native/local-cli/cli.js run-ios --device --scheme ProjectStaging --configuration Staging Build fails because of same issue, but App is installed and running well (cant find any errors for now)

Building archive always working

Expected Behavior

Project files for a configuration are in their own folder, so the build is always ok.

Actual Behavior

Correct Build with all files in the right place

react-native-bot commented 6 years ago

Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version?

I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer.

How to ContributeWhat to Expect from Maintainers

salmanwaheed commented 6 years ago

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its recipients. This is a temporary error. The following address(es) deferred:

mkdirenv@gmail.com Domain salmanwaheed.info has exceeded the max emails per hour (180/150 (120%)) allowed. Message will be reattempted later

------- This is a copy of the message, including all the headers. ------ Received: from github-smtp2-ext5.iad.github.net ([192.30.252.196]:45529 helo=github-smtp2a-ext-cp1-prd.iad.github.net) by box1177.bluehost.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from noreply@github.com) id 1epQVu-003Je9-4Q for hello@salmanwaheed.info; Fri, 23 Feb 2018 20:28:42 -0700 Date: Fri, 23 Feb 2018 19:24:40 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1519442893; bh=GUYxIoL5mjQS0YsLvxqcCBdJ+sQ3Os2wy1XwOHeeWGg=; h=From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=tGBd+wFxIIJs1VDl4lmEF4RxN/sZE/k8gE/fLSTW0eliT8endo0AxY10kKNG5cVtq cFFQ1fDYwXRIDbXdBeo/MLK8Xqmt6eWh+A3P7Feb3oWskT0UGaftoyIglbxh2ZjB5h k1+GhKn6dDSte8lAFEKs2zV7h4jCPOtexoMqhbVI= From: React Native Bot notifications@github.com Reply-To: facebook/react-native reply@reply.github.com To: facebook/react-native react-native@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Message-ID: facebook/react-native/issue/17650/issue_event/1490268388@github.com In-Reply-To: facebook/react-native/issues/17650@github.com References: facebook/react-native/issues/17650@github.com Subject: Re: [facebook/react-native] Build with own configuration in wrong Build/Products folder (#17650) Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--==_mimepart_5a90daf84acb5_2df23fc30e9c0f34279995"; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: list X-GitHub-Sender: react-native-bot X-GitHub-Recipient: salmanwaheed X-GitHub-Reason: subscribed List-ID: facebook/react-native List-Archive: https://github.com/facebook/react-native List-Post: mailto:reply@reply.github.com List-Unsubscribe: mailto:unsub+00ef1b38a3d0e4cb5e19471f7eeede920f56b460a4f29fb792cf0000000116a89cf892a169ce1142bdca@reply.github.com, https://github.com/notifications/unsubscribe/AO8bOBwQpFHpqBY3ouDjoPy_lqRZPhJ0ks5tX4D4gaJpZM4RivUm X-Auto-Response-Suppress: All X-GitHub-Recipient-Address: hello@salmanwaheed.info X-Spam-Status: No, score=0.8 X-Spam-Score: 8 X-Spam-Bar: / X-Ham-Report: Spam detection software, running on the system "box1177.bluehost.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see root\@localhost for details.

Content preview: Closed #17650. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/facebook/react-native/issues/17650#event-1490268388 [...]

Content analysis details: (0.8 points, 5.0 required)

pts rule name description


0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: github.com] -0.5 SPF_PASS SPF: sender matches SPF record 1.3 HTML_IMAGE_ONLY_24 BODY: HTML: images with 2000-2400 bytes of words 0.0 HTML_MESSAGE BODY: HTML included in message 2.5 DCC_CHECK No description available. -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -2.3 AWL AWL: Adjusted score from AWL reputation of From: address X-Spam-Flag: NO

----==_mimepart_5a90daf84acb5_2df23fc30e9c0f34279995 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit

Closed #17650.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/facebook/react-native/issues/17650#event-1490268388 ----==_mimepart_5a90daf84acb5_2df23fc30e9c0f34279995 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Closed #17650.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

----==_mimepart_5a90daf84acb5_2df23fc30e9c0f34279995--

lukaszgoworko commented 6 years ago

now I updated my react native

Environment: OS: macOS High Sierra 10.13.5 Node: 10.4.0 Yarn: 1.7.0 npm: 6.1.0 Watchman: 4.9.0 Xcode: Xcode 9.4.1 Build version 9F2000 Android Studio: 2.3 AI-162.3764568

Packages: (wanted => installed) react: 16.3.1 => 16.3.1 react-native: ^0.55.4 => 0.55.4

So this is still a problem in newer. Should I create a new issue or can this be open again?