Build IOS xcode warnings

I am trying to build my Ionic app for IOS but I am having a few problems - so I started a new ‘blank’ project and in xcode it has 16 warnings - do these need to be fixed?

xcode warnings:

CordovaLib Group
Semantic Issue Group
/Users/macuser/Documents/lvf/platforms/ios/CordovaLib/Classes/Public/CDVUserAgentUtil.m:100:22: This block declaration is not a prototype
Deprecations Group
/Users/macuser/Documents/lvf/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m:60:9: 'ALAssetsLibraryAssetForURLResultBlock' is deprecated: first deprecated in iOS 9.0 - Use fetchAssetsWithLocalIdentifiers:options: on PHAsset to fetch assets by local identifier (or to lookup PHAssets by a previously known ALAssetPropertyAssetURL use fetchAssetsWithALAssetURLs:options:) from the Photos framework instead
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetsLibrary.h:64:16: 'ALAssetsLibraryAssetForURLResultBlock' has been explicitly marked deprecated here
/Users/macuser/Documents/lvf/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m:63:69: 'defaultRepresentation' is deprecated: first deprecated in iOS 9.0 - Use PHImageRequestOptions with the PHImageManager from the Photos framework instead
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAsset.h:51:1: 'defaultRepresentation' has been explicitly marked deprecated here
/Users/macuser/Documents/lvf/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m:64:142: 'UTI' is deprecated: first deprecated in iOS 9.0 - Use requestImageDataForAsset:options:resultHandler: on PHImageManager for a PHAsset to request image data from the Photos framework and check the dataUTI passed to your result handler instead
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetRepresentation.h:28:1: 'UTI' has been explicitly marked deprecated here
/Users/macuser/Documents/lvf/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m:65:82: 'size' is deprecated: first deprecated in iOS 9.0 - Use requestImageDataForAsset:options:resultHandler: on PHImageManager to request image data for a PHAsset from the Photos framework instead
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetRepresentation.h:34:1: 'size' has been explicitly marked deprecated here
/Users/macuser/Documents/lvf/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m:66:133: 'size' is deprecated: first deprecated in iOS 9.0 - Use requestImageDataForAsset:options:resultHandler: on PHImageManager to request image data for a PHAsset from the Photos framework instead
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetRepresentation.h:34:1: 'size' has been explicitly marked deprecated here
/Users/macuser/Documents/lvf/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m:66:62: 'getBytes:fromOffset:length:error:' is deprecated: first deprecated in iOS 9.0 - Use requestImageDataForAsset:options:resultHandler: on PHImageManager to request image data for a PHAsset from the Photos framework instead
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetRepresentation.h:40:1: 'getBytes:fromOffset:length:error:' has been explicitly marked deprecated here
/Users/macuser/Documents/lvf/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m:60:63: 'ALAsset' is deprecated: first deprecated in iOS 9.0 - Use PHAsset from the Photos framework instead
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAsset.h:42:12: 'ALAsset' has been explicitly marked deprecated here
/Users/macuser/Documents/lvf/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m:63:17: 'ALAssetRepresentation' is deprecated: first deprecated in iOS 9.0 - Use PHImageRequestOptions with the PHImageManager from the Photos framework instead
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetRepresentation.h:22:12: 'ALAssetRepresentation' has been explicitly marked deprecated here
/Users/macuser/Documents/lvf/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m:74:9: 'ALAssetsLibraryAccessFailureBlock' is deprecated: first deprecated in iOS 9.0 - Use the Photos framework instead
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetsLibrary.h:71:16: 'ALAssetsLibraryAccessFailureBlock' has been explicitly marked deprecated here
/Users/macuser/Documents/lvf/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m:79:9: 'ALAssetsLibrary' is deprecated: first deprecated in iOS 9.0 - Use PHPhotoLibrary from the Photos framework instead
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetsLibrary.h:80:12: 'ALAssetsLibrary' has been explicitly marked deprecated here
/Users/macuser/Documents/lvf/platforms/ios/CordovaLib/Classes/Public/CDVURLProtocol.m:80:24: 'assetForURL:resultBlock:failureBlock:' is deprecated: first deprecated in iOS 9.0 - Use fetchAssetsWithLocalIdentifiers:options: on PHAsset to fetch assets by local identifier (or to lookup PHAssets by a previously known ALAssetPropertyAssetURL use fetchAssetsWithALAssetURLs:options:) from the Photos framework instead
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetsLibrary.h:95:1: 'assetForURL:resultBlock:failureBlock:' has been explicitly marked deprecated here
lvf Group
Asset Catalog Compiler Warning Group
/Users/macuser/Documents/lvf/platforms/ios/lvf/Images.xcassets: A 1024x1024 app store icon is required for iOS apps
Semantic Issue Group
/Users/macuser/Documents/lvf/platforms/ios/lvf/Plugins/cordova-plugin-ionic-webview/GCDWebServerPrivate.h:173:44: This function declaration is not a prototype
/Users/macuser/Documents/lvf/platforms/ios/lvf/Plugins/cordova-plugin-ionic-webview/CDVWKWebViewEngine.m:29:9: In file included from /Users/macuser/Documents/lvf/platforms/ios/lvf/Plugins/cordova-plugin-ionic-webview/CDVWKWebViewEngine.m:29:
Deprecations Group
/Users/macuser/Documents/lvf/platforms/ios/lvf/Plugins/cordova-plugin-ionic-webview/CDVWKWebViewEngine.m:148:23: 'mediaPlaybackRequiresUserAction' is deprecated: first deprecated in iOS 9.0
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:203:28: 'mediaPlaybackRequiresUserAction' has been explicitly marked deprecated here
/Users/macuser/Documents/lvf/platforms/ios/lvf/Plugins/cordova-plugin-ionic-webview/CDVWKWebViewEngine.m:587:91: 'stringByAddingPercentEscapesUsingEncoding:' is deprecated: first deprecated in iOS 9.0 - Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid.
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:592:1: 'stringByAddingPercentEscapesUsingEncoding:' has been explicitly marked deprecated here

Ionic info:

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.0.1 

local packages:

@ionic/app-scripts : 3.1.6
Cordova Platforms  : ios 4.4.0
Ionic Framework    : ionic-angular 3.9.2

System:

ios-deploy : 1.9.2 
Node       : v8.9.3
npm        : 5.5.1 
OS         : macOS High Sierra
Xcode      : Xcode 9.1 Build version 9B55 

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

I think they have sth. to do with cordova - and as long they are only warnings and your app will sill build proberly. I see nothing to be worried about.

Thanks @user5555 I think you are correct - still have not submitted app to store yet - I just don’t like having warnings hanging around.

Feel free to open a PR to cordova-ios that replaces all these usages with their replacements :wink:

Yes but is it a cordova problem? or is it a cordova running within Ionic problem?

I’ve got like a lot of Xcode warnings, like a loooooot (> 80). My app is in store since something like a year, this was never a problem.

Ionic uses Cordova for everything native, iOS or Android. So as soon as you run a commadn with cordova in it and work with the results, it is always coming from Cordova.

In this case, the code for the iOS project Cordova is using uses some deprecated methods.

2 Likes

Thanks @Sujan12 I will raise a PR with Cordova as soon my broadband gets back to normal - it is currently running very slow making everything difficult.

1 Like

y lo podias emular desde xcode, porque tengo 12 problemas y no me deja emular no se si sea algo normal