App distribution issue.
ChandanDeshmukh opened this issue · comments
Hi!. The user docs does say the library should not be used while distribution. But I have following questions. Our build process has two different steps
- Archive and distribute a debug build
- Archive and distribute a release build
So if I follow the steps and add code in the app target behind # if debug, everything works well for a release build distribution.
But build fails for Debug as the library is needed for Debug app to build. The only solution that comes to my mind is a write a script to remove the library and also update the code in APPDelegate class so as to remove the # if DEBUG block of code and build the debug app.
Code in AppDelegate
#if DEBUG
SBTUITestTunnelServer.takeOff()
SBTUITestTunnelServer.registerCustomCommandNamed("getConfigurationValue") { injectedObject in
guard let key = injectedObject as? String else {
return "ConfigReadError" as NSObject
}
let config = self.remoteConfig.string(for: key)
return config as NSObject
}
#endif
What would be the ideal way/ options to get this working?
Also I am trying to understand how having a separate target solves the issue in the above scenario?
Thank you.