From 1b6d9992d01c0bf3b4d0388ee9ea3dcf2e8ca827 Mon Sep 17 00:00:00 2001 From: Martin Bektchiev Date: Wed, 29 Jan 2020 16:53:32 +0200 Subject: [PATCH] feat: Add iOS APIs usage list --- .../platforms/ios/native-api-usage.json | 36 +++++++++++++++++++ .../App_Resources/iOS/native-api-usage.json | 13 +++++++ 2 files changed, 49 insertions(+) create mode 100644 nativescript-core/platforms/ios/native-api-usage.json create mode 100644 tests/app/App_Resources/iOS/native-api-usage.json diff --git a/nativescript-core/platforms/ios/native-api-usage.json b/nativescript-core/platforms/ios/native-api-usage.json new file mode 100644 index 0000000000..7e5dff0bd2 --- /dev/null +++ b/nativescript-core/platforms/ios/native-api-usage.json @@ -0,0 +1,36 @@ +{ + "uses": [ + "CoreFoundation.CFError:*", + "CoreFoundation.CFNumber:*", + "CoreFoundation.CFRunLoop:*", + + "CoreGraphics.*:*", + + "CoreText.CTFontManager:*", + + "Darwin.C.math:*", + "Darwin.POSIX.sys.socket:*", + + "Foundation.*:*", + + "MaterialComponents.MDCTabBar:*", + + "NativeScriptEmbedder:*", + + "Photos.PHImageManager:*", + + "QuartzCore.*:*", + + "SystemConfiguration.SCNetworkReachability:*", + + "UIKit.*:*", + + "WebKit.WKNavigationDelegate:*", + "WebKit.WKUserContentController:*", + "WebKit.WKUserScript:*", + "WebKit.WKWebView:*", + "WebKit.WKWebViewConfiguration:*", + + "TNSWidgets*:*" + ] +} diff --git a/tests/app/App_Resources/iOS/native-api-usage.json b/tests/app/App_Resources/iOS/native-api-usage.json new file mode 100644 index 0000000000..8a35c643de --- /dev/null +++ b/tests/app/App_Resources/iOS/native-api-usage.json @@ -0,0 +1,13 @@ +{ + "whitelist-plugins-usages": true, + "$comment": "Whitelist native constants used by core modules because {N} webpack's typescript transpiler is configured not to remove them like tsc does", + "whitelist": [ + "CoreFoundation.CFStringEncodingExt:kCF*", + "MaterialComponents.MDCTabBarAlignment:*", + "MaterialComponents.MDCTabBarItemAppearance:*", + "Photos.PhotosTypes:*", + "WebKit.WKNavigationAction:*" + ], + "blacklist": [ + ] +}