ios - iRate 使用 Swift 编译错误

标签 ios swift irate

我正在使用最新版本的 iRate 和 Swift,尝试编译我的项目以提交 App Store。

iRate 安装 isn't very complicated - 将两个(可选 3 个)文件拖到项目中,然后将 iRate.h 文件包含在桥接 header 中。

但是,当我去编译时,我遇到了关于编译 iRate.m 文件的 Apple LLVM 6.0 错误

我已经检查并且iRate.m在目标成员资格下分配给我的项目。

有人可以帮忙吗?

CompileC /Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/Objects-normal/armv7/iRate.o DA/iRate.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd "/Users/Dan/Projects/learn/DA"
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-cache-path=/Users/Dan/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -fprofile-instr-use=/Users/Dan/Projects/learn/DA/OptimizationProfiles/DA.profdata -miphoneos-version-min=8.1 -iquote /Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/DA-generated-files.hmap -I/Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/DA-own-target-headers.hmap -I/Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/DA-all-non-framework-target-headers.hmap -ivfsoverlay /Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/all-product-headers.yaml -iquote /Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/DA-project-headers.hmap -I/Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/BuildProductsPath/Release-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/DerivedSources/armv7 -I/Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/DerivedSources -F/Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/BuildProductsPath/Release-iphoneos -MMD -MT dependencies -MF /Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/Objects-normal/armv7/iRate.d --serialize-diagnostics /Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/Objects-normal/armv7/iRate.dia -c /Users/Dan/Projects/learn/DA/DA/iRate.m -o /Users/Dan/Library/Developer/Xcode/DerivedData/DA-hizhzqckxkpqjxafuimctebfhwho/Build/Intermediates/ArchiveIntermediates/DA/IntermediateBuildFilesPath/DA.build/Release-iphoneos/DA.build/Objects-normal/armv7/iRate.o
error: Could not read profile: No such file or directory
1 error generated.

最佳答案

按照 Michael Dautermann 的建议,删除 Apple LLVM 6.0 下 Xcode > Project > Build SettingsOptimization Profile File 键下的引用 - 代码生成部分。

我是 Xcode 新手,有一次选择了 Product > Perform Action > Generate Optimization Profile 菜单选项。

虽然我最终中止(阅读:我从未完成优化配置文件的生成),但它显然填充了 Optimization Profile File 键,这导致我在转到存档时出错。

关于ios - iRate 使用 Swift 编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27735688/

相关文章:

iphone - 在我的 iOS 应用程序中添加写评论率功能

ios - 使用 Facebook 的 FirebaseSimpleLogin 后,Firebase observeEventType 没有触发?

ios - 导航栏标题更改

ios - 即使内容/压缩设置为 1,图像也会增长

ios - 当我从 Realm 中删除一个对象时,tableview 是如何隐式重新加载的?

swift - 快速和身份验证挑战中的 SSL Pinning

iphone - 如何知道用户是否在应用商店对应用程序进行了评分

ios - iOS 上的 sendSubviewToBack 不起作用

ios - 由于缺少主屏幕图标,无法提交到 iTunes

objective-c - 用户接受后,iRate 会自动停止征求评论吗?