Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

(osx) Make Cordova OSX build successfully on AppleSilicon target. #105

Merged
merged 1 commit into from
Feb 1, 2022

Conversation

bpresles
Copy link
Contributor

@bpresles bpresles commented Jul 5, 2020

Platforms affected

macOS ARM64 (AppleSilicon).

Motivation and Context

Build failed when targeting AppleSilicon because of using old prototype for objc_msgSend.

Description

Closes #104

  • Added "arm64" as valid architecture
  • Changed calls to objc_msgSend() to use new cast based prototype.

Testing

  • Built the library on XCode 12 with support for Universal Binaries and AppleSilicon
  • Tested the universal binary build of the library on a Cordova OS X project

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@bpresles bpresles changed the title (osx) Fix #104: Make Cordova OSX build successfully on AppleSilicon target. (osx) Make Cordova OSX build successfully on AppleSilicon target. Jul 5, 2020
@motla
Copy link

motla commented Jan 8, 2021

@erisu could you please merge this one then make a release?
otherwise it is blocking compilation fail for every dev using the updated XCode....
thanks

cordova platform add https://github.com/bpresles/cordova-osx.git#AppleSilicon

@brodybits
Copy link

I highly recommend that you followup on Slack and on the dev mailing list, please follow links from the footer of cordova.io or cordova.apache.org, and try again if you don't hear anything. Unfortunately the maintainers have been pretty overloaded over the past couple years.

Copy link
Member

@NiklasMerz NiklasMerz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds fine on M1 for me. I am not deep enough into ObjC to judge the code but it looks good to me.

@fortuna
Copy link

fortuna commented Feb 1, 2022

@bpresles are you able to merge the PR? It's been approved.

@NiklasMerz NiklasMerz merged commit 9b1480d into apache:master Feb 1, 2022
@fortuna fortuna mentioned this pull request Feb 5, 2022
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build error when building for Apple Silicon (Universal binary)
5 participants