feat: Implement Firebase push notifications with support for flavor-specific configurations.
This commit is contained in:
1 parent
744b7b7ca8
commit
e129be5a59
26 files changed
+974
-124
No files matched your search
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
# Copy the correct GoogleService-Info.plist based on build configuration
|
||||
# This script is run as a build phase in Xcode
|
||||
|
||||
# Determine flavor from build configuration name
|
||||
FLAVOR=""
|
||||
if [[ "${CONFIGURATION}" == *"local"* ]]; then
|
||||
FLAVOR="local"
|
||||
elif [[ "${CONFIGURATION}" == *"demo"* ]]; then
|
||||
FLAVOR="demo"
|
||||
elif [[ "${CONFIGURATION}" == *"dev"* ]]; then
|
||||
FLAVOR="dev"
|
||||
else
|
||||
# Default to dev
|
||||
FLAVOR="dev"
|
||||
fi
|
||||
|
||||
PLIST_SRC="${PROJECT_DIR}/config/${FLAVOR}/GoogleService-Info.plist"
|
||||
PLIST_DEST="${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist"
|
||||
|
||||
if [ -f "$PLIST_SRC" ]; then
|
||||
echo "Copying GoogleService-Info.plist for flavor: ${FLAVOR}"
|
||||
cp "$PLIST_SRC" "$PLIST_DEST"
|
||||
else
|
||||
echo "Warning: GoogleService-Info.plist not found for flavor: ${FLAVOR} at ${PLIST_SRC}"
|
||||
echo "Using default from Runner/"
|
||||
fi
|
||||
Reference in new issue
Block a user