-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] Third-party libraries not found for "staging" config: Solution! #426
Comments
@danieldunderfelt Thanks for the feedback. I will see how we can improve the documentation. When you created the staging project configuration, did you also manually create a Staging scheme? |
Hi! No, that was created when I copied the release config and made the staging config. |
@danieldunderfelt Unfortunately I was unable to repro the error you were seeing. What version of XCode are you on? I don't know if that matters but I'm using v7.1.1. |
@geof90 No, not using CocoaPods. Does it manage these things for me? When I figured out why my builds weren't working, that the third-party packages didn't have a staging config, I thought having cocoapods wouldn't matter. |
@danieldunderfelt no I only asked because I wasn't using CocoaPods and I was wondering if you were. |
@geof90 oh, good good! Maybe your xcode made staging config for your third-party packages, and my xcode glitched out and didn't? |
Nice, this did also fix it for me. I omitted the Step 3 (changing the project.pbxproj) and my Fabric.framework does still work fine. However when I use different PRODUCT_NAMES for the different build environment, I am getting now a build error. I am have setup the names according to this article When i build my I have tried to fix it by
I have cleaned my build folder before each build. This did not happen before, so it could be related to this issue. (For now my workaround is to use different app icons in order to distinguish my different build environment - as outlines in the article above) |
Here I solved the staging problem by correcting the TEST_HOST which is pointing to a fixed value despite the new PRODUCT_NAME. I've changed the scheme to use the staging variation for tests builds. I hope it helps! |
Our solution might be helpful here as well: https://zeemee.engineering/how-to-set-up-multiple-schemes-configurations-in-xcode-for-your-react-native-ios-app-7da4b5237966#.pxa41apg1 |
really nice @huitsing! Much more complete solution! |
I have the same issue, too. I use xcode 8 beta 6. I have fix just re-add libCodePush.a at Linked Framework and Libraries. |
@jm555jm THX for the hint. I had quite a few external libraries and I was desperately trying to unlink and re-link them without any luck. But manually removing and re-adding them in the |
@jm555jm @flavordaaave thanks for the tip!
|
Actually after trying that I found that I was still with the Release scheme. |
+1 Same error, with the header, when on Staging Scheme :( |
@bernatfortet, could you please try to apply instructions from this PR #690 and let me know if it helps? |
Hi, I also ran into an issue, and came straight here. But for me, I just had to run |
Argh I still struggled with this for quite a while, but then I realized that you need to build a Release version first, before building Staging. (Because I changed the 'build products path' to So if you run a clean, or delete derived data, make sure you switch to your Release scheme and press cmd+B to run a build, before you try to build Staging. Because your Staging build depends on some things that need to be in that Release folder. |
I had a trouble with cocoapods overriding this config settings, used this as a workaround:
|
These fixes don't seem to work on CI servers, since the Release build path won't have any build or header files in it. Any thoughts on fixes or running on a CI (Buddy Build or MSFT App Center?) |
@wprater I'm having the same issue, it works fine if I build Release first. Did you happen to get it working? |
Not sure if this helps, but I had to do something similar to @fannt. Cocopods was overwriting the configurations:
|
Someone posted a solution on another thread. Which has worked for me locally + CI (buddybuild) Solution: facebook/react-native#11813 (comment) |
Any one having an issue when using tipsi-stripe and having multiple deployments?
I've set Im getting the following:
|
Hi @Amurmurmur, I'm sure that problem is still in
then executed Please try my steps and if the issue won't be solved provide me with sample project that I could able to reproduce your situation and help to fix it. |
for me worked with post_install do |installer|
installer.pods_project.build_configurations.each do |config|
if config.name == 'Staging'
config.build_settings['CONFIGURATION_TEMP_DIR'] = '$(PROJECT_TEMP_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)'
config.build_settings['CONFIGURATION_BUILD_DIR'] = '$(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)'
end
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.name == 'Staging'
config.build_settings['CONFIGURATION_TEMP_DIR'] = '$(PROJECT_TEMP_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)'
config.build_settings['PODS_CONFIGURATION_BUILD_DIR'] = '${PODS_BUILD_DIR}/Release$(EFFECTIVE_PLATFORM_NAME)'
end
end
end
end |
for me i just need set like this
|
If anybody is still struggling with this issue - there is a simple way to differentiate between Codepush staging and release keys using the same "Release" configuration if you already do your builds with Fastlane. You basically need to have these lines in your Info.plist:
and then, assuming you already have different Fastlane lanes for staging and release, add appropriate Codepush key for each lane in form of a gym param:
The key will be inserted during build process and that's about it! |
I got it solved and implemented for several projects.
Set Staging value for Per-configuration Build Products Path and Per-configuration intermediate Build Files path to
From project root:
NOTE: In AppCenter I was having build failures when it's archiving successfully locally for staging target. I got it solved by removing build config from that branch and adding it back, seems like it has some kind of caching issues idk |
can anyone tell me where I can find my |
@JimmyDLA You can find it in Xcode |
none of these answers solve my problem. |
Just an FYI what worked in my case: After creating the new configuration Staging, simply run Staging Build -> Success Release Build -> Success |
For what it's worth, there are a few easier ways to handle this issue, after attempting without success to add a configuration, I decided it was overkill for a single value change. Method 1: Use info.plist variable substitution, xcargs a and a default value (post xcode 11.4)
Method 2: Use a Run Script
Method 3: Set in JavaScript
Voila, it works. And you can go back to hating Apple, Xcode and everything associated with them in peace. |
i had the same problem but went away after i ran |
After following the Multi-Deployment Testing guide we encounter similar errors. They were fixed by |
Hi!
I installed CodePush in my app today and followed the instructions for multi-environments, where the docs say to create a "staging" project configuration. After doing that, the project would not build at all when the scheme was set to "staging", complaining that no libraries could be found. Re-linking with rnpm didn't help, but I figured out that the issue was that no third-party libraries (including code-push!) include the staging configuration, making the build fail.
The solution was this stackoverflow answer: http://stackoverflow.com/questions/30884778/how-to-compile-a-project-with-app-and-library-in-the-same-workspace-with-differe/30884779#30884779
I had to change it a bit, using the same string for "header search paths" as "framework search paths" (functionally omitting the
/include
part of that string), but now everything works.I think this should be mentioned in the documentation right where the user is instructed to create the "staging" configuration.
The text was updated successfully, but these errors were encountered: