I'm trying to learn Xcode and iOS development with swift. I'm going through the PyTorch tutorial
to configure the Xcode env and I'm unable to get it working.
Specifically I'm just doing the simple helloWorld project. The
installation of the libraries seems to have gone fine as has the pytorch
pod install command.
However when I try to build, it fails with this error:
ld: in /Users/user/Development/mobileTorch/ios-demo-app/HelloWorld/HelloWorld/Pods/LibTorch/install/lib/libtorch.a(empty.cpp.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/user/Development/mobileTorch/ios-demo-app/HelloWorld/HelloWorld/Pods/LibTorch/install/lib/libtorch.a' for architecture arm64
clang: error: linker command failed with exit code 1
System: 2020 Macbook Air Apple M1 silicon
Steps taken:
Installed libtorch 1.7 with sudo gem install ffi and then pod install
Tried to build with various different iOS emulators
Installing the gems both with Rosetta and natively
I presume the issue lies somewhere in the apple silicon but I'm not sure what else to try.