Clang not emit LC_VERSION_MIN when target is Mac Catalyst

Hi,


Clang not emit LC_VERSION_MIN when target is Mac Catalyst.


Example:


  1. /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang hello.c -o myapp -mmacosx-version-min=10.15 -target x86_64-apple-ios13.0-macabi
  2. otool -l myapp | grep LC_VERSION
  3. OUTPUT: EMPTY


But if i compile without target and min sdk 10.9 this information is emitted tto binary, example:


  1. /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang test_package/hello.c -o ***** -mmacosx-version-min=10.9
  2. otool -l myapp | grep LC_VERSION
  3. OUTPUT: cmd LC_VERSION_MIN_MACOSX


Can anyone help me?


Thanks.

The LC_VERSION family of load commands are no longer emitted when targeting the latest versions of the operating systems. Those commands are superseded by LC_BUILD_VERSION.

Hi,


Yes, eskimo1 from apple give me the same answer. But the problem is when i upload new binary of Mac Catalyst application to Apple Store from XCode.


See:


Coulnd't find CFBundleSupportedPlatforms in the Info.plist or LC_VERSION_MIN in the Mach-O for path "/Users/paulo/Library/Developer/Xcode/Archives/2020-01-02/Sample 02-01-20 15.58.xcarchive/Products/Applications/Sample.app/Contents/Frameworks/Ezored.framework/Versions/A".


Screenshot:

https://www.dropbox.com/s/gyzvmnpq3x0zyp7/xcode-lc-version-error.png?dl=1


How can i upload now?

You should move to compiling from an Xcode project configured to support Mac Catalyst. Your command line invocation doesn't contain the correct set of options.


Speaking generally and not specifically about Mac Catalyst, the exact compiler arguments used to compile a project evolve over time. For example, the flags in your example may have worked to compile some types of macOS executables in the past, but a Mac Catalyst executable is different from a macOS executable in a few ways, such as the load commands, as you've discovered.


Rather than trying to chase down all of the exact arguments to duplicate what Xcode is doing, use an Xcode project to ensure the project is built to meet the requirements of the App Store, which includes the exact compiler options required to tie everything together. If the compiler arguments required change in a future version of Xcode, compiling from an Xcode project will continue to work.

I understand you.


It not use xcode commands but use clang from xcode.


The problem is that my framework is compiled with open source software from community. It has only C++ code and i used ezored (https://github.com/ezored/ezored) to generate the framework that use conan C++ dependency manager and otther tools.


If you help me what left with params you will help the community to solve this problem.


Today im using only two params:

mmacosx-version-min=10.15 -target x86_64-apple-ios13.0-macabi


Can you help me what left?


Only to you understand, my application is already done for Mac Catalyst and running without problems. You can check here:

https://www.youtube.com/watch?v=ro2WVX_wHuQ


My problem is only when archive from xcode and upload from xcode.


Thanks.

Hey,


I have found the problem alone. Into the plist left one tag "CFBundleSupportedPlatforms" with value "MacOSX".


The archive now validate the app but when upload the PROFILE is not enabled for Mac Catalyst -,-


Can Apple enable it to my account please?


Screenshot:


https://www.dropbox.com/s/sai8gt2ja49t8sn/Screenshot%202020-01-02%2020.09.32.png?dl=1


Thanks.

Clang not emit LC_VERSION_MIN when target is Mac Catalyst
 
 
Q