I need to develop an iOS app with the objective c as base code and to include a CPP library with .so as extension. For that i created a cpp file with a simple program and converted it into .so extension using the following commands given at the link: https://iq.opengenus.org/create-shared-library-in-cpp/
The command which i executed to generate .so file is given as:
// Convert library code to Object file
g++ -c -o library.o library.c
// Create shared .SO library
gcc -shared -o libfoo.so library.o
However if i tried to use this libfoo.so file in xcode it gives me the error built for macOS.**"
How can i build it for iOS simulator and devices?