Guest User

Untitled

a guest
Dec 12th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. # Name of the resource we're selectively copying
  2. GOOGLESERVICE_INFO_PLIST=GoogleService-Info.plist
  3.  
  4. # Get references to dev and prod versions of the GoogleService-Info.plist
  5. # NOTE: These should only live on the file system and should NOT be part of the target (since we'll be adding them to the target manually)
  6. GOOGLESERVICE_INFO_DEV=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Debug/${GOOGLESERVICE_INFO_PLIST}
  7. GOOGLESERVICE_INFO_STAGING=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Staging/${GOOGLESERVICE_INFO_PLIST}
  8. GOOGLESERVICE_INFO_PROD=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Release/${GOOGLESERVICE_INFO_PLIST}
  9.  
  10. # Make sure the dev version of GoogleService-Info.plist exists
  11. echo "Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_DEV}"
  12. if [ ! -f $GOOGLESERVICE_INFO_DEV ]
  13. then
  14. echo "No Development GoogleService-Info.plist found. Please ensure it's in the proper directory."
  15. exit 1
  16. fi
  17.  
  18. # Make sure the prod version of GoogleService-Info.plist exists
  19. echo "Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_PROD}"
  20. if [ ! -f $GOOGLESERVICE_INFO_PROD ]
  21. then
  22. echo "No Production GoogleService-Info.plist found. Please ensure it's in the proper directory."
  23. exit 1
  24. fi
  25.  
  26. # Get a reference to the destination location for the GoogleService-Info.plist
  27. PLIST_DESTINATION=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app
  28. echo "Will copy ${GOOGLESERVICE_INFO_PLIST} to final destination: ${PLIST_DESTINATION}"
  29.  
  30. # Copy over the prod GoogleService-Info.plist for Release builds
  31. if [ "${CONFIGURATION}" == "Release" ]
  32. then
  33. echo "Using ${GOOGLESERVICE_INFO_PROD}"
  34. cp "${GOOGLESERVICE_INFO_PROD}" "${PLIST_DESTINATION}"
  35. elif [ "${CONFIGURATION}" == "Staging" ]
  36. then
  37. echo "Using ${GOOGLESERVICE_INFO_STAGING}"
  38. cp "${GOOGLESERVICE_INFO_STAGING}" "${PLIST_DESTINATION}"
  39. else
  40. echo "Using ${GOOGLESERVICE_INFO_DEV}"
  41. cp "${GOOGLESERVICE_INFO_DEV}" "${PLIST_DESTINATION}"
  42. fi
Add Comment
Please, Sign In to add comment