NativeScript / ios-jsc

NativeScript for iOS using JavaScriptCore
http://docs.nativescript.org/runtimes/ios
Apache License 2.0
298 stars 59 forks source link

Update nativescript-build.xcconfig #1279

Closed facetious closed 3 years ago

facetious commented 3 years ago

This updates the EXCLUDED_ARCHS build variable to remove ARM architectures from the iPhone Simulator build.

I tested this locally with a device attached and a simulator open. Executing ns run ios built and ran on both the iPhone and simulator simultaneously.

Note: I am not convinced that the additional ARCH_64 specification needs to be there, but I don't have a 32-bit simulator to build for, so maybe it doesn't even matter anymore?

rigor789 commented 3 years ago

@facetious I was originally thinking to do this in the CLI, but I think adding it here is perhaps easier, and faster to fix if something needs changing down the line.

If I understand the changes correctly - this will exclude all archs but x86_64 for the simulator builds - unless the native arch from NATIVE_ARCH_64_BIT is not x86_64 - so in theory on arm macs, it would not exclude anything.

facetious commented 3 years ago

@rigor789 Yes, it won't affect the builds for arm macs. My comment was more directed towards the possibility of an i386 existing somewhere that would probably want arm stripped out, too. 🤷

bmacdonald commented 3 years ago

@facetious This is ignorance on my part. Can I update the platforms without migrating to nativescript 7? We are stuck because of the inappbrowser plugin.

rigor789 commented 3 years ago

@bmacdonald generally yes, but if for some reason - it's not possible, you can add the same lines in your App_Resources folder, and build with any runtime - this would just ease the fix without requiring changes to the projects.

bmacdonald commented 3 years ago

@bmacdonald generally yes, but if for some reason - it's not possible, you can add the same lines in your App_Resources folder, and build with any runtime - this would just ease the fix without requiring changes to the projects.

@rigor789 Thank you for the response. This is how I've been handling the issue with the .xxconfig. I just never knew if there was a dependency of the platforms on @nativescript/core.

Thank you both for your time.

facetious commented 3 years ago

@rigor789 Thank you for the response. This is how I've been handling the issue with the .xxconfig. I just never knew if there was a dependency of the platforms on @nativescript/core.

Thank you both for your time.

The nativescript-inappbrowser plugin has been updated to work with @nativescript/core, but you'd have to build it locally and link to the file since there's no recent release. You can do this with:

%> cd ${your_project_dir}/..
%> git clone git@github.com:proyecto26/nativescript-inappbrowser.git
%> cd nativescript-inappbrowser/src
%> npm i
%> cd ../publish
%> ./pack.sh
%> mkdir ${your_project_dir}/lib
%> mv nativescript-inappbrowser-2.3.0.tar.gz ${your_project_dir}/lib
%> cd ${your_project_dir}
%> npm i lib/nativescript-inappbrowser-2.3.0.tar.gz
rigor789 commented 3 years ago

I guess we should do the same for the v8 runtime: https://github.com/NativeScript/ns-v8ios-runtime