yeah I guess that would work… so you keep the file in different sub folders then copy it in… Seems like a lot of hassle though for something that would be very simple it auth0 just used the normal Info.plist rather than their own…
The way I resolved this problem is by including a Run Script in the Build Phases underneath the Copy Bundle Resources phase. It looks like this:
![Run Script][1]
The script itself is fairly simple:
RESOURCE_PATH=$SRCROOT/PathToAuth0Plists
FILENAME_IN_BUNDLE=Auth0.plist
BUILD_APP_DIR=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app
if "$CONFIGURATION" == "Debug" ]; then
cp $RESOURCE_PATH/Auth0Debug.plist $BUILD_APP_DIR/$FILENAME_IN_BUNDLE
else
cp $RESOURCE_PATH/Auth0Release.plist $BUILD_APP_DIR/$FILENAME_IN_BUNDLE
fi
The only thing that needs to be changed for the above script is RESOURCE_PATH=$SRCROOT/PathToAuth0Plists. You should make this the path to the Auth0Debug.plist and Auth0Release.plist.
Then you need to add a Auth0Debug.plist and an Auth0Release.plist each defining the appropriate clientID and domain.
This isn’t ideal, but it works. Hopefully Auth0 will support this need in the future.