IOS - Custom Setting - “No such module”

In my ios application, I am trying to distinguish between environments in order to make web api calls a suitable environment ( Development , Staging and Production ).

To do this, I created a configuration.plist file with different endpoints for each environment and:

  • Duplicate the Debug configuration and name it Development Build .
  • Created a new scheme called Development (duplicated the Debug scheme) and on the Information tab ( Run ) selected Development Build configuration.

When I run Debug mode, everything works fine.

I am using cocoa pods.

If I select the Development schema, I get No such module 'JazzHands'

If I edit the Development schema to use the Debug assembly, it works fine.

So I have to miss something so that it doesn't work.

+5
source share
2 answers

For those who come across this issue, try pod install , this will generate some .xcconfig files with your configuration name. Empty the build folder and create again.

This worked for me with Cocoapods 1.0

+7
source

Decision:

Create the same custom build configuration in JazzHands

The root cause:

  • No such module compilation error was selected because it cannot find JazzHands for your custom build configuration

Background:

  • Each time you compile a folder, it is created in DerivedData .
  • This folder corresponds to your device / simulator and your application.
  • Inside this folder there will be a Build folder that will contain a folder corresponding to each build configuration for your project.
  • In your case, the Development folder will not contain the JazzHands binary framework
  • However, the Debug folder will contain the JazzHands binary framework

Example:

The following is an example:

~/Library/Developer/Xcode/DerivedData/SomeApp-skjahjkdhsakjhdaskjdhaskjlhs/Build/Development-iphonesimulator

  • SomeApp - Application Name
  • Development - custom build customization
0
source

Source: https://habr.com/ru/post/1235187/


All Articles