tjvantoll / nativescript-IQKeyboardManager

NativeScript wrapper for the popular IQKeyboardManager iOS framework
MIT License
100 stars 20 forks source link

Error when trying to tweak behaviour #56

Open legroen opened 5 years ago

legroen commented 5 years ago

Hello,

When I follow the steps to tweak the appearance and behavior so I can add a distance between the keyboard and textfield, I receive the following messages.

node_modules/tns-core-modules/tns-core-modules.d.ts(170,15): error TS2300: Duplicate identifier 'NativeScriptEmbedder'. node_modules/tns-platform-declarations/ios/objc-x86_64/objc!NativeScriptEmbedder.d.ts(2,15): error TS2300: Duplicate identifier 'NativeScriptEmbedder'.

If I remove the references from the file references.d.ts it is impossible to retrieve the sharedManager().

thx

EddyVerbruggen commented 5 years ago

Perhaps cleaning your node_modules and platforms folders will fix that, but otherwise you can always use this:

https://github.com/tjvantoll/nativescript-IQKeyboardManager/blob/1b5ef97cf016dd2792b83473445c2193740e6fd9/demo/app/main-view-model.ts#L4

You'll lose typing definitions, but at runtime there is no difference.

lsowmya commented 5 years ago

Facing the same error. Tried above method no luck. Any other alternatives ?

sunpasup commented 5 years ago

Hey Guys

facing below Error while trying to tweak, any Solution TIA

ERROR in node_modules/tns-core-modules/tns-core-modules.d.ts(170,15): error TS2300: Duplicate identifier 'NativeScriptEmbedder'. node_modules/tns-platform-declarations/ios/objc-x86_64/objc!NativeScriptEmbedder.d.ts(2,15): error TS2300: Duplicate identifier 'NativeScriptEmbedder'. node_modules/tns-platform-declarations/ios/objc-x86_64/objc!NativeScriptEmbedder.d.ts(2,15): error TS2417: Class static side 'typeof NativeScriptEmbedder' incorrectly extends base class static side 'typeof NSObject'. Types of property 'alloc' are incompatible. Type '() => NativeScriptEmbedder' is not assignable to type '() => NSObject'. Type 'NativeScriptEmbedder' is not assignable to type 'NSObject'. Property 'accessibilityActivationPoint' is missing in type 'NativeScriptEmbedder'.