Giter Site home page Giter Site logo

issues when using on M1 laptop about issh2 HOT 4 OPEN

frugghi avatar frugghi commented on August 26, 2024 1
issues when using on M1 laptop

from issh2.

Comments (4)

Jan-E avatar Jan-E commented on August 26, 2024

What is the exact error message you get when trying to run your app in the simulator?

Wild guess: maybe you should try to build the (fat) libraries with the x86_64 version for macOSX, not the one for iPhoneSimulator. I am doing something like that in my fork of this repo for building Mac Catalyst libraries:
Jan-E@f9f6d1f#commitcomment-49456294

In a Mac Catalyst app (on an Intel Mac) it is a similar case. The app does not run in the simulator, but runs OK on 'My Mac'. Error message:

in /Users/tfr/Documents/myAPP/Pods/NMSSH/NMSSH-iOS/Libraries/lib/libcrypto.a(aes_cbc.o), building for iOS Simulator, but linking in object file built for Mac Catalyst, file '/Users/tfr/Documents/myAPP/Pods/NMSSH/NMSSH-iOS/Libraries/lib/libcrypto.a' for architecture x86_64

from issh2.

Jan-E avatar Jan-E commented on August 26, 2024

Even wilder guess: try linking with the libraries for macOSX.

from issh2.

Jan-E avatar Jan-E commented on August 26, 2024

Or test you app as a Mac Catalyst app on 'My Mac'. That is what I am doing with my own iPad apps that have 3 use cases:

  1. iPhone
  2. iPad (9.3.6 - 14.4.1)
  3. Mac Catalyst

I am testing the app on 'My Mac'. There also is a build target Any Mac (Apple Silicon, Intel), which suggests that the Catalyst version should also run on an Apple M1.

For the catalyst apps I am using the libs from my fork of this repo:

% git clone -b catalyst https://github.com/Jan-E/iSSH2 iSSH2-catalyst
% cd iSSH2-catalyst
% ./catalyst.sh

And grab a coffee or two.

from issh2.

Jan-E avatar Jan-E commented on August 26, 2024

Here is a quite elaborate description of the problem you are running into:
https://apontious.com/2020/08/23/arm-wrestling-your-ios-simulator-builds/
Near the end of the article there is this description of a solution:

Instead, don’t build for ARM at all.

Go to your Target build settings, go to Architectures, and then go to the new setting Excluded Architectures (EXCLUDED_ARCHES), which Apple recommends you use instead of the older setting Valid Architectures (VALID_ARCHS).

There, hover over it with your mouse and click the + button that appears, and it will give you the option of adding a subheading called “Any iOS Simulator SDK”. Do that, and add an arm64 entry to the build setting’s list of values.

If this is not feasible for some reason my recommendation would be to add a Mac (Catalyst) build option to your app and test the app on your Mac as Catalyst app.

from issh2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.