Ciprian
Ciprian

Reputation: 3226

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. The build works fine for 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>

Upvotes: 1

Views: 773

Answers (2)

Eric Gopak
Eric Gopak

Reputation: 1843

This is error occurs because you have https:// prepended to the host name.

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. On MacOs (on *nix platforms in general), colon (:) is not allowed to be a part of the file path.

Hope that helps! Good luck!

Upvotes: 1

Trevor
Trevor

Reputation: 16116

Based on the output it looks like you are trying to build on a Windows operating system.

Unfortunately You need an apple or Mac Operating System with Xcode in order to do a proper build for IOS devices.

For Reference

Upvotes: 0

Related Questions