Open alexisconsuegra opened 4 years ago
Hi @alexisconsuegra, unfortunately I didn't have a mac, so I cannot build or test iOS related stuff. I can help you to find a solution though... this plugin must have worked in the past on iOS, so if you are having problems with it, probably your setup is too recent and something may have broken.
I've found why markers are not showing, a quick hack made them working again, but before pushing the fix I would investigate on why this is happening, and how to refactor the plugin properly.
In the meanwhile, can you share the ouput of tns info
plus your package.json dependencies & devDependencies?
Maybe @dapriett is busy... if you want I can share with you my updated version, and you can build the iOS part on your mac.. that would be good as the Android version it's ok, except for that marker problem that I will fix in the next days.
Hi @funder7, thanks a lot.
Here is the tns info output:
✔ Getting NativeScript components versions information...
⚠ Update available for component nativescript. Your current version is 6.2.0 and the latest available version is 6.7.8.
⚠ Update available for component tns-core-modules. Your current version is 6.2.0 and the latest available version is 6.5.12.
⚠ Update available for component tns-android. Your current version is 6.5.0 and the latest available version is 6.5.3.
⚠ Update available for component tns-ios. Your current version is 6.2.0 and the latest available version is 6.5.2.
Here is the package.json
{
"nativescript": {
"id": "org.nativescript.ac",
"tns-android": {
"version": "6.5.0"
},
"tns-ios": {
"version": "6.2.0"
}
},
"description": "NativeScript Application",
"license": "SEE LICENSE IN
Okay.. first I suggest you to share the code here by using the "< >" button or with typing three backticks ` (right alt + question mark key) at code begin & end. It will be formatted and more readable :)
Your project has a lot of plugins installed...that could interfere with this test! If your project worked before installing nativescript-google-maps-sdk
then you can be sure that it's the source of the problem.
Anyway, let's move on:
package.json
file with this one. It contains the last 5.x nativescript libraries, they are not the latest but they should be 100% compatible with the plugin. Includes angular v8 dependencies, again, not the latest but better than the original v4;npm install
(ignore angular warnings)tns install
tns run ios --emulator
or just tns run ios
(use the one that caused the error before) Ok...so if the app works with this setup, we know that the error that you are getting it's related to some new update introduced with nativescript 6. You can use this setup for your project, while the plugin gets fixed. If you do this, it's important to delete this folders first:
node_modules
platforms
hooks
this will clean the project, avoiding to have wrong version installed. Now you can run npm install & tns install
safely.in case of errors from nativescript cli
nativescript cli must be retro-compatible, but in case that is not, reinstall the 5.x version with npm remove -g nativescript & npm i -g nativescript@5.4.2
.
That's all, I hope that will fix your error.
About making the plugin work with Nativescript 6.x If you know the git workflow, then in the next days I can tell you how to build the plugin on your mac, it's simple, just a few commands. Have you got Slack?
See you later ;)
Hi @funder7. Thanks again. I will keep in mind the tip about formatting the code. I am not familiar with Angular. I have written the app in plain Javascript. Is there way to try this without Angular?
Sure I didn't read well... that' why it's better to format code :)
Check the gist, there's the plain version. it's already updated to version 6.2.0, it should work as is.
steps:
package.json
node_modules platforms hooks
from the project rootnpm remove -g nativescript & npm i -g nativescript@6.2.0
npm i
& good luckThanks @funder7 I did it all but there is something with the webpack config. I have never seen this before. /Users/alexis/Documents/NsApps/anc/node_modules/webpack-cli/bin/cli.js:244 throw err; ^
TypeError: nsWebpack.hasRootLevelScopedModules is not a function
at module.exports (/Users/alexis/Documents/NsApps/anc/webpack.config.js:61:49)
at handleFunction (/Users/alexis/Documents/NsApps/anc/node_modules/webpack-cli/bin/prepareOptions.js:23:13)
at prepareOptions (/Users/alexis/Documents/NsApps/anc/node_modules/webpack-cli/bin/prepareOptions.js:9:5)
at requireConfig (/Users/alexis/Documents/NsApps/anc/node_modules/webpack-cli/bin/convert-argv.js:136:14)
at /Users/alexis/Documents/NsApps/anc/node_modules/webpack-cli/bin/convert-argv.js:142:17
at Array.forEach (
Probably your webpack.config.js is not compatible with the freshly installed nativescript-dev-webpack
version.
Look inside node_modules → nativescript-dev-webpack, there is a webpack.config.js file, copy that in your project root (owerwrite the old one), and try again. good luck again!
Change this line in node_modules/nativescript-google-maps-sdk/platforms/ios/Podfile to:
pod 'GoogleMaps', '<= 2.7.0'
hi @ju4nj3, can you give me some info about this change? is the pod up or downgraded? thanks
It seems nativescript-google-maps-sdk is causing the issue. Have anyone found a fix for this plugin? Thanks,
Undefined symbols for architecture i386: "___isPlatformVersionAtLeast", referenced from: -[GMSCellularInfo SIMCountryCode] in GoogleMaps -[GMSScreenInfo initWithUIScreen:] in GoogleMaps -[GMSx_QTMCollectionViewController viewDidLoad] in GoogleMaps -[GMSx_QTMCollectionViewController viewDidLayoutSubviews] in GoogleMaps -[GMSx_QTMCollectionViewStyleController contentViewInsetsForCellWithAttribute:] in GoogleMaps -[GMSx_QTMCollectionViewStyleController setInsetsContentViewsToSafeArea:] in GoogleMaps -[GMSx_QTMCollectionViewStyleController insetsAtSectionIndex:] in GoogleMaps ... ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) note: Using new build systemnote: Planning buildnote: Constructing build description BUILD FAILED
Command xcodebuild failed with exit code 65