Generating resources

ionic cordova platform add ios

results in:

✖ Generating platform resources - failed!
Error: getaddrinfo ENOTFOUND res.ionic.io res.ionic.io:443
    at errnoException (dns.js:28:10)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)

and:
ionic cordova build ios

results in:

[ERROR] An error occurred while running cordova build ios (exit code 1):

        
        (truncated) ... Users/ish3lan/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
             /Applications/Xcode.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices 
        --warnings --export-dependency-info 
        /Users/iSh3lan/Library/Developer/Xcode/DerivedData/أماني-caqoeowuyabyckgqjoznpdyhfjcc/Build/Intermediates.noindex/أماني.build/Debug-iphonesimulator/أماني.build/assetcatalog_dependencies 
        --output-partial-info-plist 
        /Users/iSh3lan/Library/Developer/Xcode/DerivedData/أماني-caqoeowuyabyckgqjoznpdyhfjcc/Build/Intermediates.noindex/أماني.build/Debug-iphonesimulator/أماني.build/assetcatalog_generated_info.plist 
        --app-icon AppIcon --launch-image LaunchImage --compress-pngs --enable-on-demand-resources YES 
        --filter-for-device-model iPhone8,4 --filter-for-device-os-version 11.0 --sticker-pack-identifier-prefix 
        .sticker-pack. --target-device iphone --target-device ipad --minimum-deployment-target 9.0 --platform 
        iphonesimulator --product-type com.apple.product-type.application --compile 
        /Users/iSh3lan/wishlist_mobile/WishList/platforms/ios/build/emulator/أماني.app 
        /Users/iSh3lan/wishlist_mobile/WishList/platforms/ios/أماني/Images.xcassets
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        failed to find PDF header: `%PDF' not found.
        2017-09-28 05:47:23.433 IBCocoaTouchImageCatalogTool[75341:8265148] CoreThemeDefinition: Unable to create image 
        for 
        file:///Users/iSh3lan/wishlist_mobile/WishList/platforms/ios/%D8%A7%D9%94%D9%85%D8%A7%D9%86%D9%8A/Images.xcassets/LaunchStoryboard.imageset/Default@2x~universal~anyany.png
        2017-09-28 05:47:23.442 IBCocoaTouchImageCatalogTool[75341:8265148] CoreThemeDefinition: Unable to create image 
        for 
        file:///Users/iSh3lan/wishlist_mobile/WishList/platforms/ios/%D8%A7%D9%94%D9%85%D8%A7%D9%86%D9%8A/Images.xcassets/LaunchStoryboard.imageset/Default@2x~universal~anyany.png
        2017-09-28 05:47:23.467 IBCocoaTouchImageCatalogTool[75341:8265372] CoreThemeDefinition: Unable to create image 
        for 
        file:///Users/iSh3lan/wishlist_mobile/WishList/platforms/ios/%D8%A7%D9%94%D9%85%D8%A7%D9%86%D9%8A/Images.xcassets/LaunchStoryboard.imageset/Default@2x~universal~anyany.png
        /* com.apple.actool.errors */
        /Users/iSh3lan/wishlist_mobile/WishList/platforms/ios/أماني/Images.xcassets: error: The stickers icon set or app 
        icon set named "AppIcon" did not have any applicable content.
        /Users/iSh3lan/wishlist_mobile/WishList/platforms/ios/أماني/Images.xcassets: error: The launch image set named 
        "LaunchImage" did not have any applicable content.
        /Users/iSh3lan/wishlist_mobile/WishList/platforms/ios/أماني/Images.xcassets: error: Distill failed for unknown 
        reasons.
        /* com.apple.actool.compilation-results */
        /Users/iSh3lan/wishlist_mobile/WishList/platforms/ios/build/emulator/أماني.app/Assets.car
        /Users/iSh3lan/Library/Developer/Xcode/DerivedData/أماني-caqoeowuyabyckgqjoznpdyhfjcc/Build/Intermediates.noindex/أماني.build/Debug-iphonesimulator/أماني.build/assetcatalog_generated_info.plist
        
        
        ** BUILD FAILED **
        
        
        The following build commands failed:
        	CompileAssetCatalog build/emulator/أماني.app أماني/Images.xcassets
        (1 failure)
        Error: Error code 65 for command: xcodebuild with args: 
        -xcconfig,/Users/iSh3lan/wishlist_mobile/WishList/platforms/ios/cordova/build-debug.xcconfig,-workspace,أماني.xcworkspace,-scheme,أماني,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS 
        Simulator,name=iPhone 
        SE,build,CONFIGURATION_BUILD_DIR=/Users/iSh3lan/wishlist_mobile/WishList/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/iSh3lan/wishlist_mobile/WishList/platforms/ios/build/sharedpch

and ionic cordova resources --force

✖ Generating platform resources: 48 / 50 complete - failed!
Error: encountered bad status code (503) for https://res.ionic.io/api/v1/transform
body: <!DOCTYPE html>
	<html>
	  <head>
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta charset="utf-8">
		<title>Application Error</title>
		<style media="screen">
		  html,body,iframe {
			margin: 0;
			padding: 0;
		  }
		  html,body {
			height: 100%;
			overflow: hidden;
		  }
		  iframe {
			width: 100%;
			height: 100%;
			border: 0;
		  }
		</style>
	  </head>
	  <body>
		<iframe src="//www.herokucdn.com/error-pages/application-error.html"></iframe>
	  </body>
	</html>
    at Response.res.on (/Users/iSh3lan/wishlist_mobile/WishList/node_modules/ionic/node_modules/@ionic/cli-utils/lib/cordova/resources.js:148:32)
    at emitNone (events.js:86:13)
    at Response.emit (events.js:185:7)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

Seems the server generating the resources had problems. Does the problem persist?

I had the same error "failed to find PDF header: `%PDF’ not found."
And i could solve it by adding the icon and splash screen with the correct format and size.

No , the issue is gone