becvert / cordova-plugin-zeroconf

Cordova ZeroConf Plugin
MIT License
81 stars 57 forks source link

[iOS] "OBJC_CLASS$_Hostname" not found #19

Closed ghost closed 7 years ago

ghost commented 7 years ago

I keep getting this error, no matter what i try:

Undefined symbols for architecture x86_64: "_OBJCCLASS$_Hostname", referenced from: objc-class-ref in ZeroConf.o ld: symbol(s) not found for architecture x86_64

Any clue as to what is happening?

becvert commented 7 years ago

You must add the Hostname.m file to your target. I don't know why it is not added automatically.

ghost commented 7 years ago

That worked, my new (Swift?) error is this:

fatal error: unexpectedly found nil while unwrapping an Optional value

becvert commented 7 years ago

Have yout got more details on this new error? a line number or something?

ghost commented 7 years ago

I cannot find the line number, here is a screenshot.

screen shot 2016-11-10 at 11 48 03

It does detect the ip/device, however it crashes after that.

becvert commented 7 years ago

Thanks for the screenshot. How do you call the watch function? like this for instance zeroconf.watch('_http._tcp.', 'local.', success)? domain ('local.') is now a separate argument.

ghost commented 7 years ago

I think that was it. However, i wrapped it in a deviceready event, so it might still be that. I'll test it and let you know.

gercho25 commented 7 years ago

The problem is in the file: "plugin.xml":

You have to change: <header-file src="src/ios/Hostname.m"/> By: <source-file src="src/ios/Hostname.m"/>

becvert commented 7 years ago

How could I not see that! Thank you very much @gercho25

gercho25 commented 7 years ago

Hi,

Do you plan to correct the plugin and update the repository in the next few days? It is to know if I expect correction or not.

Best regards German

2016-11-17 5:21 GMT-03:00 becvert notifications@github.com:

How could I not see that! Thank you very much @gercho25 https://github.com/gercho25

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/becvert/cordova-plugin-zeroconf/issues/19#issuecomment-261183757, or mute the thread https://github.com/notifications/unsubscribe-auth/AHMGPHYq0ZFgUZG6HkYl5EQsBTSU_4Szks5q_A6lgaJpZM4Kqn9t .

becvert commented 7 years ago

I'll fix this right away :smile:

becvert commented 7 years ago

done

ghost commented 7 years ago

Good job, thx! :) This makes it a little more clear. I hope this plugin get's in the list of plugins for Ionic2. It's pretty awesome!