自从升级到Xcode 13后,我在Xcode上构建nativescript应用程序时收到错误
./.build_env_vars.sh: line 454: declare: UID: readonly variable
NSLD: Swift bridging header '*-Swift.h' not found under '/Users/gaetan.delsaux/Library/Developer/Xcode/DerivedData/mbwsinventoryapp-egjrwafdujqbnuemdmqazirgunfd/Build/Intermediates.noindex/mbwsinventoryapp.build/Debug-iphonesimulator/mbwsinventoryapp.build/Objects-normal/x86_64'
Generating metadata...~/PhpstormProjects/mbws-inventory-app/platforms/ios/internal/metadata-generator/bin ~/PhpstormProjects/mbws-inventory-app/platforms/ios
Python version: 2.7.18 (v2.7.18:8d21aa21f2, Apr 19 2020, 20:48:48)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
Traceback (most recent call last):
File "./build-step-metadata-generator.py", line 41, in <module>
deployment_target_flag_name = env("DEPLOYMENT_TARGET_CLANG_FLAG_NAME")
File "./build-step-metadata-generator.py", line 14, in env
return os.environ[env_name]
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py", line 40, in __getitem__
raise KeyError(key)
KeyError: 'DEPLOYMENT_TARGET_CLANG_FLAG_NAME'
Command Ld failed with a nonzero exit code
我看了看,我找到的答案都是与目标C有关的。
有没有人遇到过这个问题,并找到了解决方案?
1条答案
按热度按时间ovfsdjhp1#
解决方案是将NativeScript升级到6.5.5或更高版本,其中包含补丁。
如果您对技术细节感兴趣,或者来自其他项目,请继续阅读。
在Xcode 13.3及以上版本中,环境变量
DEPLOYMENT_TARGET_CLANG_NAME
和DEPLOYMENT_TARGET_CLANG_ENV_NAME
不再存在。您可以通过使用
EFFECTIVE_PLATFORM_NAME
手动确定这些值来解决这个问题:感谢https://github.com/NativeScript/ios-jsc/pull/1296的作者演示了这项技术。