大家好,我有一个 expo 管理应用程序,我想使用一个名为 Notifee 的通知库,它有一个 expo 插件。该插件添加了 Expo Go 不支持的本机代码,因此我被迫进入裸工作流程并构建本机 iOS 和 Android 文件夹。
我正在通过运行来构建 iOS 包expo run:ios。由于 ExpoModulesCore 的原因,构建失败:
The following build commands failed:
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project
'Pods')
Run Code Online (Sandbox Code Playgroud)
所以我做了一些研究,发现 Stackoverflow 上其他人也有同样的问题。我尝试更改 pod 文件并更新 ExpoModulesCore,
pod update ExpoModulesCore正如这个答案所示
/sf/answers/4977301381/
更新 ExpoModulesCore 并重新构建后,我收到一个额外的错误:
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/kevin/Library/Developer/Xcode/DerivedData/Addressbook-gmgtddiltntfosevknuexadcwkpt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-BC35D93E0A296DC41D8D893483CBC12F.sh (in target 'FBReactNativeSpec' from project 'Pods')
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project 'Pods')
(2 failures)
Run Code Online (Sandbox Code Playgroud)
那么为什么会发生这种情况呢? …
所以我知道millis() 返回自程序开始运行以来经过的时间,对吗?
现在我遇到了这样的情况,在延迟中使用了 millis():
long dly = millis();
while (millis() - dly < 250) {
yield(); // enough time to send response
}
Run Code Online (Sandbox Code Playgroud)
的值怎么可能millis() - dly大于0?如果关键是无限期让步,为什么有人会使用这样的延迟?