Reputation: 31
I'm trying to import MKStoreKit 4.0 to be used in Swift files. I've already made my bridging header file which imports MKStoreKit.h, and the build settings point to it. However, as I try to call it in Swift, Xcode sometimes (not on my latest build attempt) says that it is undefined, the same error as if you were trying to use an Objective C class, in Objective C, that you have not imported. I mention this because it might be important to the real issue.
I've searched up the exact text and tried basically every build settings/build phases change and I'm not sure what the issue might be. Below is the error directly from the build attempt:
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)**
The highlighted lines are what Xcode highlights in red. Let me know if you have any ideas or if you'd like more information. Thank you.
Upvotes: 1
Views: 807