Closed tuliogoiania closed 7 years ago
This is mostly a duplicate of #144:
This plugin uses the Apple Reachibility implementation to determine if there's currently an internet connection (see the source code here and here).
However, as this SO answer points out:
Important Note: The Reachability class is one of the most used classes in projects so you might run into naming conflicts with other projects like ShareKit. If this happens, you'll have to rename one of the pairs of Reachability.h and Reachability.m files to something else to resolve the issue.
In a native iOS app this is easily resolved. However, in a Cordova app it's not so trivial if your linking issues are be due to multiple instances of the Reachability files being included by separate Cordova plugins. That's not something that can easily be resolved by this plugin though, and is something you'll probably have to resolve either by editing the native project generated by Cordova in XCode, or modifying the conflicting plugins to rename the Reachability files so they don't conflict.
Thank you very much for reply, I will check then the best way to resolve this conflict.
I guess it has something to do with the "onesignal" plugin.
If you want to leave open the post, when you can correct, put here what we did, otherwise you can close it.
Again Thank you very much for the answer and for your plugin.
Could you provide any guidance on how to resolve this issue by editing the native project generated by Cordova in XCode?
@gregor-srdic Rename Reachability.h and Reachability.m in Plugins/uk.co.workingedge.phonegap.plugin.launchnavigator/
to something like LN_Reachability.h
and LN_Reachability.m
and update the name in the import.
Thinking about it, that's something I could in the plugin by default: namespacing it, should resolve the issue for everyone. Will reopen and implement shortly.
Thanks, I appreciate such a prompt response. However, I tried to fix this based on your suggestion, but then I have run into the problem with CDVLogger :S
The fix resolved most of the issues with the duplicate symbols for me, however there is one more.
10-Oct-2017 10:02:24 | duplicate symbol _kReachabilityChangedNotification in: |
---|---|
10-Oct-2017 10:02:24 | /Users/bambooagent/Library/Developer/Xcode/DerivedData/XXX-ajulpjidcsimmjefjtsjqrlufjzy/Build/Intermediates/XXX.build/Release-iphonesimulator/XXX.build/Objects-normal/x86_64/Reachability.o |
10-Oct-2017 10:02:24 | /Users/bambooagent/Library/Developer/Xcode/DerivedData/XXX-ajulpjidcsimmjefjtsjqrlufjzy/Build/Intermediates/XXX.build/Release-iphonesimulator/XXX.build/Objects-normal/x86_64/LN_Reachability.o |
10-Oct-2017 10:02:24 | ld: 1 duplicate symbol for architecture x86_64 |
10-Oct-2017 10:02:24 | clang: error: linker command failed with exit code 1 (use -v to see invocation) |
Would it be possible to rename this too?
Hello, thank you for the plugin, it is very useful, congratulations for the development.
I tried using it in the current version of my project, but it can not be compiled after adding the plugin. It has version errors.
I do not know if the information below will be enough to help, in case I need to run another command, please let me know.
Thank you very much.
ionic info
global packages:
local packages:
System:
Error message when build
....
/Users/tg/Library/Developer/Xcode/DerivedData/Easier_123_Driver-eiitjpafspssjpeyzoouxznvowny/Build/Intermediates/ArchiveIntermediates/Easier 123 Driver/IntermediateBuildFilesPath/Easier 123 Driver.build/Debug-iphoneos/Easier 123
cker/comp2/easier123/ionic-motorista-v35/platforms/ios/build/sharedpch