Closed Cultrarius closed 7 years ago
Hey @LukeeK, we are currently using cordova version 5.4.1, so we do not face this problem.
The cause is apparently not the cordova version, but the version of the ios module: https://github.com/apache/cordova-ios/blob/master/guides/API%20changes%20in%204.0.md#nsdatabase64h-removed
I do not know if this can be easily fixed, maybe it requires a separate branch.
I looked through the bugs on the parent sqlite plugin as it seems to be more active and kept up to date. I found a solution there. You can replace SQLitePlugin.m file in plugins/src/ios with the SQLItePlugin.txt file I attached just rename the file to SQLitePlugin.m Git hub doesn't recognize the .m file extension. SQLitePlugin.m.txt
Thanks @KimberleeDArmstrong but the file you attached did not have the fix included, maybe you linked the wrong file? Your file still includes the problematic header #import <Cordova/NSData+Base64.h>
.
I merged the missing commits from upstream, so it should work now. I tested it for cordova-ios version 3.8.0, but not with the problematic version from @LukeeK. When someone with a version > 4.0.0 could test it now and report back that would be great! (you probably have to remove and reinstall the plugin via cordova for it to work)
The fix from upstream basically disables the SQLite blob storage; if you need the feature to work you have to #define
the READ_BLOB_AS_BASE64
macro.
Hi, thanks for quick response. I will check it on monday when I get to work, where I have my Mac. Btw, You are right not cordova itself but cordova-ios.
Hi, I tried to build default apache cordova project from Visual Studio with newest spatialite plugin version but got some linker errors: Undefined symbols for architecture x86_64: "_uncompress", referenced from: _gaiaXmlBlobCompression in libspatialite.a(gg_xml.o) _gaiaXmlTextFromBlob in libspatialite.a(gg_xml.o) _gaiaXmlFromBlob in libspatialite.a(gg_xml.o) _gaiaXmlBlobSetFileId in libspatialite.a(gg_xml.o) _gaiaXmlBlobSetParentId in libspatialite.a(gg_xml.o) _gaiaXmlBlobAddFileId in libspatialite.a(gg_xml.o) _gaiaXmlBlobAddParentId in libspatialite.a(gg_xml.o) ... "_compressBound", referenced from: _gaiaXmlToBlob in libspatialite.a(gg_xml.o) _gaiaXmlBlobCompression in libspatialite.a(gg_xml.o) "_compress", referenced from: _gaiaXmlToBlob in libspatialite.a(gg_xml.o) _gaiaXmlBlobCompression in libspatialite.a(gg_xml.o) "_crc32", referenced from: _evalGeosCache in libspatialite.a(gg_relations.o) _gaiaXmlToBlob in libspatialite.a(gg_xml.o) _gaiaXmlBlobCompression in libspatialite.a(gg_xml.o) _gaiaIsValidXmlBlob in libspatialite.a(gg_xml.o) _is_valid_legacy_xml_blob in libspatialite.a(gg_xml.o) ld: symbol(s) not found for architecture x86_64 clang : error : linker command failed with exit code 1 (use -v to see invocation)
@LukeeK thank you for the test. Are you building your iOS project from Visual Studio? Maybe try to use XCode, I think it has better support.
You might also try to add libz.dylib as lib to your project: http://stackoverflow.com/a/8768277/2092777 Please open another ticket if this problem persists, so it does not get mixed up with this one.
@Cultrarius, thanks for info. I've already built and run my app with old version of spatialite plugin (before last commits, including Cordova/NSData+Base64.h' file not found bug) directly on mac with Xcode. I had to include NSData+Base64.m, NSData+Base64.h files add refence to libz.1.2.8.tbd and do few more tweeks. And of course that is the option, however I was hoping to have it run from vstudio as I am more familiar with it and it gives more options to debug (at least from my perspective).
@LukeeK we only support XCode for iOS projects, but we are happy to accept a pull request if you get it to work with VS. Maybe check out the plugin.xml: under <platform name="ios">
there are several entries such as <framework src="libiconv.dylib" />
. Try to add the libz.dylib
, libz.1.2.8.tbd
, libz.tbd
(or whatever its name now is) as a framework before installing the plugin.
@Cultrarius ,thanks I will check it. Btw is there a way to debug cordova app run in xcode on mac in real time (except using Safari)?
@LukeeK You can use XCode to debug the native parts (e.g. the spatialite lib), whereas Safari is used to debug the JavaScript parts of cordova. They go hand in hand ;) I do not know of any alternatives to these two.
@Cultrarius thanks for debug possibilities info and for <framework src="libiconv.dylib" />
tip. That made a job and I can compile, run and debug on mac my app from visual studio
Great, thanks! I will close the issue then.