简体   繁体   English

Ionic 3-添加或构建iOS应用时出错

[英]Ionic 3 - Error when adding or building iOS app

I get the following error when building or adding ios with ionic cordova build ios or ionic cordova platform add ios . 在使用ionic cordova build ios或添加ios时出现以下错误ionic cordova build iosionic cordova platform add ios The build works fine for Android. 该版本适用于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 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>

Based on the output it looks like you are trying to build on a Windows operating system. 根据输出,您似乎正在尝试在Windows操作系统上构建。

Unfortunately You need an apple or Mac Operating System with Xcode in order to do a proper build for IOS devices. 不幸的是,您需要具有Xcode的Apple或Mac操作系统才能为IOS设备进行适当的构建。

For Reference 以供参考

This is error occurs because you have https:// prepended to the host name . 发生此错误是因为您在主机name前面加上了https://

To get rid of the error, simply replace this: 要消除该错误,只需替换为:

<host name="https://t4edc.app.goo.gl/" scheme="https" />

with this: 有了这个:

<host name="t4edc.app.goo.gl/" scheme="https" />

The reason behind the error is that the plugin automatically creates files under ul_web_hooks/ios/ and the files are named by the corresponding host name. 该错误背后的原因是,该插件会自动在ul_web_hooks/ios/下创建文件,并且这些文件均由相应的主机名命名。 On MacOs (on *nix platforms in general), colon ( : ) is not allowed to be a part of the file path. 在Mac OS(在一般* nix平台),冒号( : )不允许在文件路径的一部分。

Hope that helps! 希望有帮助! Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM