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

Closed
danieldunderfelt opened this Issue Jul 12, 2016 · 29 comments

Comments

Projects
None yet
@danieldunderfelt

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.

@geof90

This comment has been minimized.

Show comment
Hide comment
@geof90

geof90 Jul 12, 2016

Member

@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?

Member

geof90 commented Jul 12, 2016

@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?

@danieldunderfelt

This comment has been minimized.

Show comment
Hide comment
@danieldunderfelt

danieldunderfelt Jul 12, 2016

Hi!

No, that was created when I copied the release config and made the staging config.

Hi!

No, that was created when I copied the release config and made the staging config.

@geof90

This comment has been minimized.

Show comment
Hide comment
@geof90

geof90 Jul 13, 2016

Member

@danieldunderfelt Unfortunately I was unable to repro the error you were seeing.
After duplicating the release config and calling it staging + setting up the CODEPUSH_KEY config, all I did was go to Product > Scheme > Edit Scheme then set the Build Configuration to Staging. After that I ran the app and it was sync-ing against CodePush with the Staging key just fine.

What version of XCode are you on? I don't know if that matters but I'm using v7.1.1.
Also are you using CocoaPods for dependency management?

Member

geof90 commented Jul 13, 2016

@danieldunderfelt Unfortunately I was unable to repro the error you were seeing.
After duplicating the release config and calling it staging + setting up the CODEPUSH_KEY config, all I did was go to Product > Scheme > Edit Scheme then set the Build Configuration to Staging. After that I ran the app and it was sync-ing against CodePush with the Staging key just fine.

What version of XCode are you on? I don't know if that matters but I'm using v7.1.1.
Also are you using CocoaPods for dependency management?

@danieldunderfelt

This comment has been minimized.

Show comment
Hide comment
@danieldunderfelt

danieldunderfelt Jul 14, 2016

@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.

@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.

@geof90

This comment has been minimized.

Show comment
Hide comment
@geof90

geof90 Jul 14, 2016

Member

@danieldunderfelt no I only asked because I wasn't using CocoaPods and I was wondering if you were.

Member

geof90 commented Jul 14, 2016

@danieldunderfelt no I only asked because I wasn't using CocoaPods and I was wondering if you were.

@danieldunderfelt

This comment has been minimized.

Show comment
Hide comment
@danieldunderfelt

danieldunderfelt Jul 14, 2016

@geof90 oh, good good!

Maybe your xcode made staging config for your third-party packages, and my xcode glitched out and didn't?

@geof90 oh, good good!

Maybe your xcode made staging config for your third-party packages, and my xcode glitched out and didn't?

@Thorbenandresen

This comment has been minimized.

Show comment
Hide comment
@Thorbenandresen

Thorbenandresen Jul 15, 2016

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

screen shot 2016-07-15 at 1 20 49 pm

When i build my release config everything works, but not when I build the debug or staging config. In these cases I get the following errors:

screen shot 2016-07-15 at 11 22 42 am

I have tried to fix it by

  • set Target => Info => Executable file to $(PRODUCT_NAME)
  • set Target => Bundler Loader to => $(BUILT_PRODUCTS_DIR)/$(PRODUCT_NAME).app/$(PRODUCT_NAME)

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)

Thorbenandresen commented Jul 15, 2016

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

screen shot 2016-07-15 at 1 20 49 pm

When i build my release config everything works, but not when I build the debug or staging config. In these cases I get the following errors:

screen shot 2016-07-15 at 11 22 42 am

I have tried to fix it by

  • set Target => Info => Executable file to $(PRODUCT_NAME)
  • set Target => Bundler Loader to => $(BUILT_PRODUCTS_DIR)/$(PRODUCT_NAME).app/$(PRODUCT_NAME)

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)

@FernandoMorais

This comment has been minimized.

Show comment
Hide comment
@FernandoMorais

FernandoMorais Jul 19, 2016

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!

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!

@FernandoMorais

This comment has been minimized.

Show comment
Hide comment
@FernandoMorais

FernandoMorais Aug 16, 2016

really nice @huitsing! Much more complete solution!

really nice @huitsing! Much more complete solution!

@jm555jm

This comment has been minimized.

Show comment
Hide comment
@jm555jm

jm555jm Aug 18, 2016

I have the same issue, too. I use xcode 8 beta 6.
library not found for -lCodePush with build configuration "Staging".

I have fix just re-add libCodePush.a at Linked Framework and Libraries.
Now everything works fine =).

jm555jm commented Aug 18, 2016

I have the same issue, too. I use xcode 8 beta 6.
library not found for -lCodePush with build configuration "Staging".

I have fix just re-add libCodePush.a at Linked Framework and Libraries.
Now everything works fine =).

@flavordaaave

This comment has been minimized.

Show comment
Hide comment
@flavordaaave

flavordaaave Nov 14, 2016

@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 Link Binary with Libraries section finally solved the issue and my builds are succeeding again.

@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 Link Binary with Libraries section finally solved the issue and my builds are succeeding again.

@bernatfortet

This comment has been minimized.

Show comment
Hide comment
@bernatfortet

bernatfortet Feb 1, 2017

@jm555jm @flavordaaave thanks for the tip!
It took me a couple minutes to figure out exactly how to do that, so for others:

  1. Select your app target
  2. Make sure you are in the General Tab
  3. Scroll down until Link Binary with Libraries
  4. Select libCodePush
  5. Press - minus button at the bottom left
  6. Press + plus button and search for libCodePush
    👍

@jm555jm @flavordaaave thanks for the tip!
It took me a couple minutes to figure out exactly how to do that, so for others:

  1. Select your app target
  2. Make sure you are in the General Tab
  3. Scroll down until Link Binary with Libraries
  4. Select libCodePush
  5. Press - minus button at the bottom left
  6. Press + plus button and search for libCodePush
    👍
@bernatfortet

This comment has been minimized.

Show comment
Hide comment
@bernatfortet

bernatfortet Feb 1, 2017

Actually after trying that I found that I was still with the Release scheme.
After changing it to staging, and after removing and re-adding the library it still doesn't work 😞
Same exact error.

Actually after trying that I found that I was still with the Release scheme.
After changing it to staging, and after removing and re-adding the library it still doesn't work 😞
Same exact error.

@Amurmurmur

This comment has been minimized.

Show comment
Hide comment
@Amurmurmur

Amurmurmur Feb 2, 2017

+1 Same error, with the header, when on Staging Scheme :(

+1 Same error, with the header, when on Staging Scheme :(

@sergey-akhalkov

This comment has been minimized.

Show comment
Hide comment
@sergey-akhalkov

sergey-akhalkov Feb 8, 2017

Member

@bernatfortet, could you please try to apply instructions from this PR #690 and let me know if it helps?

Member

sergey-akhalkov commented Feb 8, 2017

@bernatfortet, could you please try to apply instructions from this PR #690 and let me know if it helps?

@sergey-akhalkov

This comment has been minimized.

Show comment
Hide comment
@sergey-akhalkov

sergey-akhalkov Feb 13, 2017

Member

Closing this due to #690 has been merged and fixed similar issue #688, please feel free to reopen in case of any questions or issues.

Member

sergey-akhalkov commented Feb 13, 2017

Closing this due to #690 has been merged and fixed similar issue #688, please feel free to reopen in case of any questions or issues.

@ndbroadbent

This comment has been minimized.

Show comment
Hide comment
@ndbroadbent

ndbroadbent Apr 19, 2017

Hi, I also ran into an issue, and came straight here. But for me, I just had to run pod install, and then everything worked after that.

Hi, I also ran into an issue, and came straight here. But for me, I just had to run pod install, and then everything worked after that.

@ndbroadbent

This comment has been minimized.

Show comment
Hide comment
@ndbroadbent

ndbroadbent Apr 19, 2017

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 $(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME).)

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.

ndbroadbent commented Apr 19, 2017

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 $(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME).)

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.

@fannt

This comment has been minimized.

Show comment
Hide comment
@fannt

fannt May 24, 2017

I had a trouble with cocoapods overriding this config settings, used this as a workaround:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'YourTarget'
      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['CONFIGURATION_BUILD_DIR'] = '$(PROJECT_TEMP_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)'
        end
      end
    end
  end
end

fannt commented May 24, 2017

I had a trouble with cocoapods overriding this config settings, used this as a workaround:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'YourTarget'
      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['CONFIGURATION_BUILD_DIR'] = '$(PROJECT_TEMP_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)'
        end
      end
    end
  end
end
@mtt87

This comment has been minimized.

Show comment
Hide comment
@mtt87

mtt87 Sep 16, 2017

In my case after following the instructions on the official documentation I had to change this as well to be $PODS_BUILD_DIR/Release$(EFFECTIVE_PLATFORM_NAME)
screen shot 2017-09-16 at 17 38 37

mtt87 commented Sep 16, 2017

In my case after following the instructions on the official documentation I had to change this as well to be $PODS_BUILD_DIR/Release$(EFFECTIVE_PLATFORM_NAME)
screen shot 2017-09-16 at 17 38 37

@wprater

This comment has been minimized.

Show comment
Hide comment
@wprater

wprater Nov 19, 2017

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 commented Nov 19, 2017

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?)

@MyGuySi

This comment has been minimized.

Show comment
Hide comment
@MyGuySi

MyGuySi Feb 6, 2018

@wprater I'm having the same issue, it works fine if I build Release first. Did you happen to get it working?

MyGuySi commented Feb 6, 2018

@wprater I'm having the same issue, it works fine if I build Release first. Did you happen to get it working?

@aligfl

This comment has been minimized.

Show comment
Hide comment
@aligfl

aligfl May 10, 2018

@wprater did you get it working on your CI system ? aka buddybuild or App Center?
Did you try the solution proposed by @huitsing ?

aka: https://zeemee.engineering/how-to-set-up-multiple-schemes-configurations-in-xcode-for-your-react-native-ios-app-7da4b5237966

aligfl commented May 10, 2018

@wprater did you get it working on your CI system ? aka buddybuild or App Center?
Did you try the solution proposed by @huitsing ?

aka: https://zeemee.engineering/how-to-set-up-multiple-schemes-configurations-in-xcode-for-your-react-native-ios-app-7da4b5237966

@jpaolini

This comment has been minimized.

Show comment
Hide comment
@jpaolini

jpaolini May 11, 2018

Not sure if this helps, but I had to do something similar to @fannt. Cocopods was overwriting the configurations:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name.downcase == 'YourTargetName
      target.build_configurations.each do |config|
        if config.name.downcase == 'staging'
          config.build_settings['CONFIGURATION_BUILD_DIR'] = '$(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)'
        end
      end
    end
  end
end

Not sure if this helps, but I had to do something similar to @fannt. Cocopods was overwriting the configurations:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name.downcase == 'YourTargetName
      target.build_configurations.each do |config|
        if config.name.downcase == 'staging'
          config.build_settings['CONFIGURATION_BUILD_DIR'] = '$(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)'
        end
      end
    end
  end
end
@aligfl

This comment has been minimized.

Show comment
Hide comment
@aligfl

aligfl May 11, 2018

Someone posted a solution on another thread. Which has worked for me locally + CI (buddybuild)

Solution: facebook/react-native#11813 (comment)

aligfl commented May 11, 2018

Someone posted a solution on another thread. Which has worked for me locally + CI (buddybuild)

Solution: facebook/react-native#11813 (comment)

@Amurmurmur

This comment has been minimized.

Show comment
Hide comment
@Amurmurmur

Amurmurmur Jun 23, 2018

Any one having an issue when using tipsi-stripe and having multiple deployments?
My pod file

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

workspace 'appname'

target 'targetNameTests' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for targetName
  pod 'AppCenter/Crashes', '~> 1.6.1'
  pod 'AppCenter/Analytics', '~> 1.6.1'
  pod 'AppCenterReactNativeShared', '~> 1.5.1'
  # Stripe
  pod 'Stripe', '~> 11.2.0'

    target 'targetNameTests' do
        inherit! :search_paths
        # Pods for testing
    end
end

post_install do |installer|
    installer.pods_project.targets.each do |target|
      if target.name == 'targetName'
        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['CONFIGURATION_BUILD_DIR'] = '$(PROJECT_TEMP_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)'
          end
        end
      end
    end
  end

I've set Per-configuration Build Products Path for Staging to $(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)
Also I've updatedPODS_CONFIGURATION_BUILD_DIR for Staging to ${PODS_BUILD_DIR}/Release$(EFFECTIVE_PLATFORM_NAME)

Im getting the following:

ld: library not found for -lStripe
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Amurmurmur commented Jun 23, 2018

Any one having an issue when using tipsi-stripe and having multiple deployments?
My pod file

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

workspace 'appname'

target 'targetNameTests' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for targetName
  pod 'AppCenter/Crashes', '~> 1.6.1'
  pod 'AppCenter/Analytics', '~> 1.6.1'
  pod 'AppCenterReactNativeShared', '~> 1.5.1'
  # Stripe
  pod 'Stripe', '~> 11.2.0'

    target 'targetNameTests' do
        inherit! :search_paths
        # Pods for testing
    end
end

post_install do |installer|
    installer.pods_project.targets.each do |target|
      if target.name == 'targetName'
        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['CONFIGURATION_BUILD_DIR'] = '$(PROJECT_TEMP_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)'
          end
        end
      end
    end
  end

I've set Per-configuration Build Products Path for Staging to $(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)
Also I've updatedPODS_CONFIGURATION_BUILD_DIR for Staging to ${PODS_BUILD_DIR}/Release$(EFFECTIVE_PLATFORM_NAME)

Im getting the following:

ld: library not found for -lStripe
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@NickToropov

This comment has been minimized.

Show comment
Hide comment
@NickToropov

NickToropov Jun 25, 2018

Member

Hi @Amurmurmur, I'm sure that problem is still in CONFIGURATION_BUILD_DIR and CONFIGURATION_TEMP_DIR settings. I've just created new ReactNative application, copied your Podfile, actualized it to this:

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

workspace 'appname'

target 'Issue426' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # React Native requirements
pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge', # Include this for RN >= 0.47
    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket', # Needed for debugging
    'RCTAnimation', # Needed for FlatList and animations running on native UI thread
    # Add any other subspecs you want to use in your project
 ]
 # Explicitly include Yoga if you are using RN >= 0.42.0
 pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
 pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
 pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
 pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  # Pods for targetName
  pod 'AppCenter/Crashes', '~> 1.6.1'
  pod 'AppCenter/Analytics', '~> 1.6.1'
  pod 'AppCenterReactNativeShared', '~> 1.5.1'
  # Stripe
  pod 'Stripe', '~> 11.2.0'

end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == 'Issue426'
            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['CONFIGURATION_BUILD_DIR'] = '$(PROJECT_TEMP_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)'
                end
            end
        end
    end
end

then executed pod install, opened generated appname.xcworkspace in XCode, added new Staging configuration (based on Release configuration), added new Staging scheme, updated Pre-configuration Build Files Path and Pre-configuration Intermediate Build Files Path for both Issue426 and Pods project. After this steps my demo project built successfully.

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.

Member

NickToropov commented Jun 25, 2018

Hi @Amurmurmur, I'm sure that problem is still in CONFIGURATION_BUILD_DIR and CONFIGURATION_TEMP_DIR settings. I've just created new ReactNative application, copied your Podfile, actualized it to this:

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

workspace 'appname'

target 'Issue426' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # React Native requirements
pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge', # Include this for RN >= 0.47
    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket', # Needed for debugging
    'RCTAnimation', # Needed for FlatList and animations running on native UI thread
    # Add any other subspecs you want to use in your project
 ]
 # Explicitly include Yoga if you are using RN >= 0.42.0
 pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
 pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
 pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
 pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  # Pods for targetName
  pod 'AppCenter/Crashes', '~> 1.6.1'
  pod 'AppCenter/Analytics', '~> 1.6.1'
  pod 'AppCenterReactNativeShared', '~> 1.5.1'
  # Stripe
  pod 'Stripe', '~> 11.2.0'

end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == 'Issue426'
            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['CONFIGURATION_BUILD_DIR'] = '$(PROJECT_TEMP_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)'
                end
            end
        end
    end
end

then executed pod install, opened generated appname.xcworkspace in XCode, added new Staging configuration (based on Release configuration), added new Staging scheme, updated Pre-configuration Build Files Path and Pre-configuration Intermediate Build Files Path for both Issue426 and Pods project. After this steps my demo project built successfully.

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.

@jerson

This comment has been minimized.

Show comment
Hide comment
@jerson

jerson Jul 7, 2018

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

jerson commented Jul 7, 2018

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment