Эх сурвалжийг харах

Fixed #1824 by adding availability attributes

Iftekhar 3 жил өмнө
parent
commit
3f88bfc6d1

+ 14 - 2
Demo.xcodeproj/project.pbxproj

@@ -183,6 +183,7 @@
 		C03C87FA1B8DCED400295DFA /* OptionTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OptionTableViewCell.swift; sourceTree = "<group>"; };
 		C03C87FC1B8DCEE700295DFA /* StepperTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StepperTableViewCell.swift; sourceTree = "<group>"; };
 		C03C87FE1B8DCEF400295DFA /* SwitchTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwitchTableViewCell.swift; sourceTree = "<group>"; };
+		C0949D9B2735545700D7405E /* DemoSwift.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DemoSwift.entitlements; sourceTree = "<group>"; };
 		C0ACB0F519CF104B0057B571 /* DemoSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoSwift.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		C0B63B9B1781FAB1008D3B64 /* IQKeyboardManagerDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IQKeyboardManagerDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		C0B63B9F1781FAB1008D3B64 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
@@ -345,6 +346,7 @@
 		C0B63B901781FAB0008D3B64 = {
 			isa = PBXGroup;
 			children = (
+				C0949D9B2735545700D7405E /* DemoSwift.entitlements */,
 				C0CB618F1B884D4100C33368 /* Objective_C_Demo */,
 				C0CB61D01B884D4100C33368 /* Swift_Demo */,
 				C0CB61CB1B884D4100C33368 /* Resources */,
@@ -1137,24 +1139,29 @@
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
 				CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = NO;
 				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CODE_SIGN_ENTITLEMENTS = DemoSwift.entitlements;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				CURRENT_PROJECT_VERSION = 6.5.7;
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				EXCLUDED_ARCHS = "";
+				"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
 				GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				INFOPLIST_FILE = Demo/Swift_Demo/Resources/Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+				"IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.5;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				MARKETING_VERSION = 6.5;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				OTHER_SWIFT_FLAGS = "$(inherited)";
 				PRODUCT_BUNDLE_IDENTIFIER = com.iftekhar.IQKeyboardManagerSwift;
 				PRODUCT_NAME = DemoSwift;
+				SUPPORTS_MACCATALYST = YES;
 				SWIFT_OBJC_BRIDGING_HEADER = "Demo/Swift_Demo/Resources/IQKeyboardManger-Swift-Bridging-Header.h";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 				SWIFT_VERSION = 5.0;
-				TARGETED_DEVICE_FAMILY = "1,2";
+				TARGETED_DEVICE_FAMILY = "1,2,6";
 			};
 			name = Debug;
 		};
@@ -1174,23 +1181,28 @@
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
 				CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = NO;
 				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CODE_SIGN_ENTITLEMENTS = DemoSwift.entitlements;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				CURRENT_PROJECT_VERSION = 6.5.7;
 				ENABLE_NS_ASSERTIONS = NO;
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				EXCLUDED_ARCHS = "";
+				"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				INFOPLIST_FILE = Demo/Swift_Demo/Resources/Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+				"IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.5;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				MARKETING_VERSION = 6.5;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				OTHER_SWIFT_FLAGS = "$(inherited)";
 				PRODUCT_BUNDLE_IDENTIFIER = com.iftekhar.IQKeyboardManagerSwift;
 				PRODUCT_NAME = DemoSwift;
+				SUPPORTS_MACCATALYST = YES;
 				SWIFT_OBJC_BRIDGING_HEADER = "Demo/Swift_Demo/Resources/IQKeyboardManger-Swift-Bridging-Header.h";
 				SWIFT_VERSION = 5.0;
-				TARGETED_DEVICE_FAMILY = "1,2";
+				TARGETED_DEVICE_FAMILY = "1,2,6";
 			};
 			name = Release;
 		};

+ 10 - 0
DemoSwift.entitlements

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>com.apple.security.app-sandbox</key>
+	<true/>
+	<key>com.apple.security.network.client</key>
+	<true/>
+</dict>
+</plist>

+ 4 - 4
IQKeyboardManager/IQTextView/IQTextView.m

@@ -70,15 +70,15 @@
 {
     if([[self text] length] || [[self attributedText] length])
     {
-        if (self.placeholderLabel.alpha != 0) {
-            [self.placeholderLabel setAlpha:0];
+        if (self.IQ_PlaceholderLabel.alpha != 0) {
+            [self.IQ_PlaceholderLabel setAlpha:0];
             [self setNeedsLayout];
             [self layoutIfNeeded];
         }
     }
-    else if(self.placeholderLabel.alpha != 1)
+    else if(self.IQ_PlaceholderLabel.alpha != 1)
     {
-        [self.placeholderLabel setAlpha:1];
+        [self.IQ_PlaceholderLabel setAlpha:1];
         [self setNeedsLayout];
         [self layoutIfNeeded];
     }

+ 1 - 0
IQKeyboardManagerSwift/IQKeyboardManager.swift

@@ -32,6 +32,7 @@ import QuartzCore
 Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more. A generic version of KeyboardManagement. https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html
 */
 
+@available(iOSApplicationExtension, unavailable)
 @objc public final class IQKeyboardManager: NSObject {
 
     /**

+ 2 - 0
IQKeyboardManagerSwift/IQKeyboardReturnKeyHandler.swift

@@ -24,6 +24,7 @@
 // import Foundation - UIKit contains Foundation
 import UIKit
 
+@available(iOSApplicationExtension, unavailable)
 private final class IQTextFieldViewInfoModal: NSObject {
 
     fileprivate weak var textFieldDelegate: UITextFieldDelegate?
@@ -42,6 +43,7 @@ private final class IQTextFieldViewInfoModal: NSObject {
 /**
 Manages the return key to work like next/done in a view hierarchy.
 */
+@available(iOSApplicationExtension, unavailable)
 public final class IQKeyboardReturnKeyHandler: NSObject {
 
     // MARK: Settings

+ 1 - 0
IQKeyboardManagerSwift/IQTextView/IQTextView.swift

@@ -24,6 +24,7 @@
 import UIKit
 
 /** @abstract UITextView with placeholder support   */
+@available(iOSApplicationExtension, unavailable)
 open class IQTextView: UITextView {
 
     @objc required public init?(coder aDecoder: NSCoder) {

+ 1 - 0
IQKeyboardManagerSwift/IQToolbar/IQBarButtonItem.swift

@@ -24,6 +24,7 @@
 // import Foundation - UIKit contains Foundation
 import UIKit
 
+@available(iOSApplicationExtension, unavailable)
 open class IQBarButtonItem: UIBarButtonItem {
 
     private static var _classInitialize: Void = classInitialize()

+ 1 - 0
IQKeyboardManagerSwift/IQToolbar/IQInvocation.swift

@@ -23,6 +23,7 @@
 
 import UIKit
 
+@available(iOSApplicationExtension, unavailable)
 @objc public final class IQInvocation: NSObject {
     @objc public weak var target: AnyObject?
     @objc public var action: Selector

+ 1 - 0
IQKeyboardManagerSwift/IQToolbar/IQPreviousNextView.swift

@@ -23,6 +23,7 @@
 
 import UIKit
 
+@available(iOSApplicationExtension, unavailable)
 @objc public class IQPreviousNextView: UIView {
 
 }

+ 1 - 0
IQKeyboardManagerSwift/IQToolbar/IQTitleBarButtonItem.swift

@@ -23,6 +23,7 @@
 
 import UIKit
 
+@available(iOSApplicationExtension, unavailable)
 open class IQTitleBarButtonItem: IQBarButtonItem {
 
     @objc open var titleFont: UIFont? {

+ 1 - 0
IQKeyboardManagerSwift/IQToolbar/IQToolbar.swift

@@ -24,6 +24,7 @@
 import UIKit
 
 /** @abstract   IQToolbar for IQKeyboardManager.    */
+@available(iOSApplicationExtension, unavailable)
 open class IQToolbar: UIToolbar, UIInputViewAudioFeedback {
 
     private static var _classInitialize: Void = classInitialize()

+ 1 - 0
IQKeyboardManagerSwift/IQToolbar/IQUIView+IQKeyboardToolbar.swift

@@ -26,6 +26,7 @@ import UIKit
 /**
  IQBarButtonItemConfiguration for creating toolbar with bar button items
  */
+@available(iOSApplicationExtension, unavailable)
 @objc public final class IQBarButtonItemConfiguration: NSObject {
 
     @objc public init(barButtonSystemItem: UIBarButtonItem.SystemItem, action: Selector) {