You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/09/10 17:13:13 UTC

[GitHub] [cordova-ios] pulpgrinder edited a comment on issue #699: Catalyst for ios platform ?

pulpgrinder edited a comment on issue #699:
URL: https://github.com/apache/cordova-ios/issues/699#issuecomment-917069481


   The suggestion from @Leandropintogit didn't quite work for me (iMac M1, XCode  12.5.1)... 
   
   While it enabled me to build the "My Mac (Designed for iPad)" configuration, it broke the "My Mac" and "My Mac  (Rosetta) builds.
   
   After diffing the script outputs from the three available Mac configurations and looking for different environment variables, I found an EFFECTIVE_PLATFORM_NAME environment variable. Checking whether this is set to "-maccatalyst" seems to do the trick. At least it builds and runs in all three configurations. No idea if this is the official Apple way of distinguishing or not, but it seems promising. Relevant lines from the works-for-me copy-www-build-step.sh file:
   
   ```
   SRC_DIR="www"
   DST_DIR="$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME"
   DST_DIR_WWW="$DST_DIR/www"
   if [[ "$EFFECTIVE_PLATFORM_NAME" == "-maccatalyst" ]]; then
     rm -rf "$DST_DIR_WWW"
     rm -f  "$DST_DIR/config.xml"
     DST_DIR="$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME/Contents/Resources"
   fi
   
   COPY_HIDDEN=
   
   (etc.)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org