Quasar Electron build not working on M1 mac mini with arm64 architecture - macos

I have a Quasar/Electron project and simply trying to build the app via yarn build (which equals to quasar build -m electron in package.json). Previous to my M1 Mac mini upgrade I used to get the following folder structure:
/dist/electron/MyApp-darwin-x86
/dist/electron/UnPackaged
Now I'm just getting:
/dist/electron/UnPackaged
I've tried running it with all sorts of flags/configurations but just can't seem to figure out how to build this on the new Mac. Has anyone else had similar issues?
I have the following dependencies:

OK well, I fixed it (sort of).
I basically switched from electron-packager to electron-builder and had to manually update the dmg-builder npm package to: 22.10.3 (latest package on 12/14/20)
Now after building I get my /dist/electron/Packaged folder as expected:

Related

Build Tensorflow lite for Mac Catalyst

I'm fairly new to cross-compilation. I am developping a Swift App with a c++ backend that uses the tensorflow static lib on a Mac M1, I succeeded in compiling my own code to mac catalyst with meson.
But now I am struggling to compile the tensorflow static lib with bazel, and I didn't find any useful resources to help me in my task. I saw that apparently bazel does supports catalyst building.
I tried this command (among others):
bazel build -c opt --apple_platform_type catalyst //tensorflow/lite:libtensorflowlite.so
But I got this error that I don't fully understand:
error bazel build for mac catalyst
Any advice would be welcome !
Building TensorFlow Lite for Mac Catalyst involves several steps.
Install Xcode and the Mac Catalyst SDK:
Download and install Xcode from the Mac App Store.
In Xcode, open the Preferences window and go to the Components tab.
Install the Mac Catalyst SDK.
Clone the TensorFlow repository:
Open a Terminal window.
Clone the TensorFlow repository: git clone https://github.com/tensorflow/tensorflow.git
Navigate to the root directory of the TensorFlow repository: cd tensorflow
Configure the build:
Run the configuration script: ./configure
Select the appropriate options for your environment. For example, you may need to specify the location of the Xcode command line tools.
Build TensorFlow Lite:
Run the build command: bazel build --config=catalyst //tensorflow/lite:tensorflowlite.framework
This will build the TensorFlow Lite framework for Mac Catalyst.
Verify the build:
Navigate to the bazel-bin/tensorflow/lite directory: cd bazel-bin/tensorflow/lite
Verify that the tensorflowlite.framework directory exists.
You can now use the tensorflowlite.framework in your Mac Catalyst project. Note that you may need to modify your project settings to include the TensorFlow Lite framework and any other dependencies that it requires.

How to build Quasar app for ARM64 architecture on M1 Mac

Can anyone help me? I can't figure out how to build an electron quasar app (for production) using the ARM64 Apple Silicon architecture. I've tried everything...
Have same problem with quasar + cordova.
The workaround that works for me is:
Make quasar build ... command - build fails with error related to ARM64
Open scr-cordova/platforms/ios/yourproject.xcworkspace with XCode
Run build on XCode
After these steps I'm able to run app on device and make build for publishing

Flutter desktop embedding

Following these instructions
I tried to run a new project on macOS(desktop) using Android Studio.
I get the following error:
Launching lib/main.dart on macOS in release mode... Finished with
error: Unable to get Xcode project information: xcodebuild: error:
The directory
/Users/current.user/Work/Playground/testout/flutter_app2/macos does
not contain an Xcode project, workspace or package.
I get the same issue if I run in the terminal flutter run --release -d macOS
Running on a simulator/device, works fine.
It doesn't sound like you followed the instructions for running a project other than the FDE example. A newly created Flutter project doesn't have support for running on desktop; you need to add that.
See also flutter.dev/desktop#create for information on the state of create and run for desktop.

How to install all identical versions of its Windows working environment on Mac? (React-Native)

I have my React-native application on my Windows pc.
I would like to install exactly the same working environment on my Mac
with identical versions of each element to build my app on Mac without a hitch.
I don't know at all how to do it or where to start.
What is the easiest way to do this by considering having the same versions?
I am novice, any help would be highly appreciated.
Assuming you have an npm-shrinkwrap.json file in your project the versions should stay the same when you transfer to a different machine. If you don't, you can create one using npm shrinkwrap
There's lots of little things that could cause problems, but generally if you do the following steps it should get you most of the way there:
1) install react native on the mac npm install -g react-native-cli
2) copy your project code to the mac
3) run npm install from the root directory of the react native project
4) run react-native link
5) cd ios and run pod install
6) Double-click the *.xcworkspace file to open up the project in Xcode.
7) cd .. to return to the project directory
8) run npm start -- --reset-cache to launch the bundler
7) try to build in Xcode
Using Git and Github (or equivalent) seems to be a long term solution
Create a repo, commi, push your project and clone it and the Mac.
Every time you do a modification on your PC, you commit, push and then pull it on your Mac.
All the versions are specified in package.json, so after an npm install your project should be exactly the same.

Phonegap/Cordova Build error - Apple Mach-O Linker Error: no such file or directory: libCordova.a

I am getting an error after creating a new Cordova 2.1.0 project and updating the www folder with some code from a previous PhoneGap application.
clang: error: no such file or directory: '/Users/peterbanjo/Library/Developer/Xcode/DerivedData/OpuzMobile-bhwawiqfaptmxvfosawfabudgbkj/Build/Products/Debug-iphoneos/libCordova.a'
The error only occurs when I try and run the application on a device - in the simulator it works fine.
I am running Xcode 4.5 and iOS6 on the target iPad. I have tried a clean build and libCordova.a appears in the Build Phases > Link Library With Libraries tab but it is in red.
What I found confusing with PhoneGap/Cordova 2.1.0 by upgrading from 1.4 is that there are TWO projects in my application. There is MyApplication.xcodeproj and CordovaLib.xcodeproj. The changes to resolve this issue need to be applied to the CordovaLib project.
Change "Build Active Architecture Only" to "YES"
Update the text file project.pbxproj to these values
Toggle between the build schema for the simulator and the device (Use the select menu next to the stop button. Somehow this seems to cause the changes to be detected).
Did this work for you? Did I miss something?
PS: For a better understanding of the problem take a look at this Google Forum thread
I'm using Cordova/Phonegap 2.9 and this solved my issue. Didn't touch any of the arch stuff. Everything is set to armv7 armv7s on mine.
Follow these steps to fix this problem:
Go to project settings and Build Tab.
Search for "Other Linker Flags"
Double click on the linker flags for Release and Change ${TARGET_BUILD_DIR}/libCordova.a to ${BUILT_PRODUCTS_DIR}/libCordova.a
Do the same for Debug Clean and build archive again
I had the same error and fixed it by reverting to an older version of cordova ios.
Steps to fix the issue:
Uninstall cordova-ios first, with npm uninstall cordova-ios
Install old version of cordova-ios with npm install cordova-ios#4.4.0
Remove existing ios platform with ionic cordova platform rm ios or ionic platform rm ios
After that we should add platform with ionic cordova platform add ios#4.4.0 or ionic platform add ios#4.4.0
Run ionic cordova build ios.
Instructions came from here.
Only need to remove armv6 from both YourProject and CordovaLib:
The consequences of doing this? Apparently, it's still working on iPhone 3GS, but not the previous versions..
To make it work I downloaded from http://connect.apple.com stand alone Xcode 4.4.1. With this version I can build my phonegap Application with armv6 :)
Yes, in this case you need to have two Xcode on your computer.
Look at this https://groups.google.com/forum/?fromgroups=#!topic/phonegap/ywoc9wNydZ8
works for me
--
OS X 10.8.2
XCode 4.5
iOS 6.0
PhoneGap 2.1.0
DO NOT assume that having Standard (armv7,armv7s) - $(ARCHS_STANDARD_32_BIT)
is the same as the fix above.
Manually change this value to only armv7 and that fixed it for me.
I was very frustrated.
If you did everything here and it is still not working and you have separate configuration aside from Release and Debug - for this example is Production. Make sure that 'Production' Build Configuration exists in Cordova project. Build the Cordova Project and Build + Archive your main project again.

Resources