我正在尝试导入 MKStoreKit 4.0 以在 Swift 文件中使用。我已经制作了导入 MKStoreKit.h 的桥接头文件,并且构建设置指向它。但是,当我尝试在 Swift 中调用它时,Xcode 有时(不是在我最近的构建尝试中)说它是未定义的,就像你试图在 Objective C 中使用一个 Objective C 类一样,你没有进口的。我提到这一点是因为它可能对真正的问题很重要。
我已经搜索了确切的文本并尝试了基本上每个构建设置/构建阶段的更改,但我不确定问题可能是什么。以下是直接来自构建尝试的错误:
Ld DerivedDat/Build/Products/Debug-iphoneos/MathPad\ EDU.app/MathPad\ EDU normal armv7
cd /Developer/MathPadT2
export IPHONEOS_DEPLOYMENT_TARGET=9.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk -L/Developer/MathPadT2/DerivedDat/Build/Products/Debug-iphoneos -F/Developer/MathPadT2/DerivedDat/Build/Products/Debug-iphoneos -filelist /Developer/MathPadT2/DerivedDat/Build/Intermediates.noindex/MathPadT2.build/Debug-iphoneos/MathPad\ EDU.build/Objects-normal/armv7/MathPad\ EDU.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=9.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Developer/MathPadT2/DerivedDat/Build/Intermediates.noindex/MathPadT2.build/Debug-iphoneos/MathPad\ EDU.build/Objects-normal/armv7/MathPad\ EDU_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Developer/MathPadT2/DerivedDat/Build/Intermediates.noindex/MathPadT2.build/Debug-iphoneos/MathPad\ EDU.build/Objects-normal/armv7/MathPad_EDU.swiftmodule -lz -framework StoreKit -Xlinker -dependency_info -Xlinker /Developer/MathPadT2/DerivedDat/Build/Intermediates.noindex/MathPadT2.build/Debug-iphoneos/MathPad\ EDU.build/Objects-normal/armv7/MathPad\ EDU_dependency_info.dat -o /Developer/MathPadT2/DerivedDat/Build/Products/Debug-iphoneos/MathPad\ EDU.app/MathPad\ EDU
Undefined symbols for architecture armv7:
"**_OBJC_CLASS_$_MKStoreKit", referenced from:**
objc-class-ref in ZurAppsLibCollectionCell.o
ld: symbol(s) not found for architecture armv7
clang: error: **linker command failed with exit code 1 (use -v to see invocation)**
突出显示的行是 Xcode 以红色突出显示的内容。如果您有任何想法或想了解更多信息,请告诉我。谢谢你。