在使用ionic cordova build ios
或ionic cordova platform add ios
构建或添加ios时出现以下错误。该版本适用于Android。
IOS project now has deployment target set as: 8.0
IOS project Code Sign Entitlements now set to: App/Resources/App.entitlements
Entitlements file is not in references section, adding it
{ Error: ENOENT: no such file or directory, open '/Users/cipriancirstea/Documents/ionic_app/ul_web_hooks/ios/https:/t4edc.app.goo.gl/#apple-app-site-association'
at Object.fs.openSync (fs.js:667:18)
at Object.fs.writeFileSync (fs.js:1326:33)
at saveContentToFile (/Users/cipriancirstea/Documents/ionic_app/plugins/cordova-universal-links-plugin/hooks/lib/ios/appleAppSiteAssociationFile.js:118:8)
at /Users/cipriancirstea/Documents/ionic_app/plugins/cordova-universal-links-plugin/hooks/lib/ios/appleAppSiteAssociationFile.js:72:5
at Array.forEach (<anonymous>)
at createNewAssociationFiles (/Users/cipriancirstea/Documents/ionic_app/plugins/cordova-universal-links-plugin/hooks/lib/ios/appleAppSiteAssociationFile.js:70:27)
at Object.generate (/Users/cipriancirstea/Documents/ionic_app/plugins/cordova-universal-links-plugin/hooks/lib/ios/appleAppSiteAssociationFile.js:45:3)
at activateUniversalLinksInIos (/Users/cipriancirstea/Documents/ionic_app/plugins/cordova-universal-links-plugin/hooks/afterPrepareHook.js:85:29)
at /Users/cipriancirstea/Documents/ionic_app/plugins/cordova-universal-links-plugin/hooks/afterPrepareHook.js:50:11
at Array.forEach (<anonymous>)
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/cipriancirstea/Documents/ionic_app/ul_web_hooks/ios/https:/t4edc.app.goo.gl/#apple-app-site-association' }
config.xml中
<universal-links>
<host name="https://t4edc.app.goo.gl/" scheme="https" />
<host name="example-902cc.firebaseapp.com" scheme="https">
<path url="/__/auth/callback" />
</host>
</universal-links>
答案 0 :(得分:0)
答案 1 :(得分:0)
发生此错误是因为您将https://
放在主机name
之前。
要摆脱该错误,只需替换为:
<host name="https://t4edc.app.goo.gl/" scheme="https" />
与此:
<host name="t4edc.app.goo.gl/" scheme="https" />
该错误背后的原因是,该插件会自动在ul_web_hooks/ios/
下创建文件,并且这些文件均由相应的主机名命名。在MacO(通常在* nix平台上)上,不允许冒号(:
)成为文件路径的一部分。
希望有帮助!祝你好运!