在向项目中添加app.entitlements文件以启用推送通知(aps-环境)之后,侧翼云构建会产生一个错误,指示云构建服务器无法定位app.entitlements文件。
The following build commands failed:
\tCheck dependencies
(1 failure)
Code Signing Error: The file \"/tmp/builds/_/146cf62166c1319ab4a033cc9caf241a3f6550f1/4.2.4/4.2.0/AngusConsumerMobileAppv3/platforms/ios/AngusConsumerMobileAppv3\\app.entitlements\" could not be opened. Verify the value of the CODE_SIGN_ENTITLEMENTS build setting for target \"AngusConsumerMobileAppv3\" and build configuration \"Release\" is correct and that the file exists on disk.在构建过程中,app.entitlements文件位置将自动包含在build.xcconfig文件中。从build.xcconfig文件中删除这一行将导致重新添加相同的位置。
build.xcconfig
CODE_SIGN_ENTITLEMENTS = AngusConsumerMobileAppv3\app.entitlementsapp.entitlements
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>production</string>
</dict>
</plist>环境:
Version: 1.13.0-v.2018.10.5.2 (latest)
NativeScript CLI version: 4.2.4
CLI extension nativescript-cloud version: 1.14.2
CLI extension nativescript-starter-kits version: 0.3.5发布于 2018-11-17 16:59:54
看起来这是一个简单的路径问题,我认为这是基于使用反斜杠的windows路径约定与使用云服务器上需要的前斜杠的linux约定(确实不确定原因,但下面的工作似乎是修复它),这导致构建失败时,它无法找到app.entitlements文件,因为一个坏的路径。
看起来,您还必须声明自己的文件名。允许系统使用默认的app.entitlements文件似乎总是导致我在build.xcconfig中的手动条目被注释掉,并被反斜线路径所取代。
所以-我只是为自定义命名的myapp.entitlements文件做了一个条目。
build.xcconfig
CODE_SIGN_ENTITLEMENTS = myapp_local_folder/myapp.entitlementsmyapp.entitlements
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>production</string>
</dict>
</plist>这为生产提供了推送通知,构建并发布到iOS应用程序商店的工作也如愿以偿。
https://stackoverflow.com/questions/53353454
复制相似问题