tjvantoll / nativescript-IQKeyboardManager

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

NsVue "Can't find variable: IQKeyboardManager" #38

Closed Reached closed 6 years ago

Reached commented 6 years ago

Hi there,

Great plugin!

I have some problems getting it to work correctly though. As stated in the headline I get the error Can't find variable: IQKeyboardManager which kills the build process.

Please note that I am using Nativescript Vue, and NS 4.1

My template (shortened for brevity):

<PreviousNextView>
      <FlexboxLayout alignItems="center" class="border-bottom">
            <Image src="~/images/envelope.png" width="16" height="16" class="icon-margin" />
            <TextField v-model="email" keyboardType="email" hint="Email" class="form-input" @textChange="checkValidity" @returnPress="authenticate"/>
      </FlexboxLayout>

       <FlexboxLayout alignItems="center" class="border-bottom">
            <Image src="~/images/lock.png" width="16" height="16" class="icon-margin" />
            <TextField v-model="password" secure="true" hint="Password" class="form-input" @textChange="checkValidity" @returnPress="authenticate" />
        </FlexboxLayout>
</PreviousNextView>

And I init it as stated in the docs:

Vue.registerElement("PreviousNextView", () => require("nativescript-iqkeyboardmanager").PreviousNextView);

Any ideas why this might happen? Any help is highly appreciated.

kfvit-andreaskviby commented 5 years ago

Why is this closed? I still get this error as described above and can't seem to find a solution on it. Ideas?