Reputation: 215
I have a Ionic v1 project and I have an issue when building on ios. Almost all of my cordova plugins are not added in the Xcode project in the left column under the folder plugin. Cordova version : 6.2.0 Xcode version : 8.3.3
I have done :
cordova platforms rm ios
cordova platforms add ios
cordova build ios
It compiles fine but the plugin files are not added in my Xcode project (when I run the app, I have a lot of XXXPlugin class CDVXXXX (pluginName: XXX) does not exist).
<plugin name="cordova-plugin-geolocation" spec="~2.4.3" />
) <feature name="Geolocation"><param name="ios-package" value="CDVLocation" /></feature>
)I could add them manually but it takes time and every time I remove and re-add platform, I would have to do it again.
I don't know what to do, any ideas of what I'm doing wrong ? Why is XCode stopping importing plugin files after the first one (BranchSDK which appears to be the first one in alphabetical order by the way) ?
My package.json :
{
"name": "myapp",
"version": "1.1.1",
"description": "myapp: An Ionic project",
"dependencies": {
"grunt-contrib-compress": "^1.3.0",
"grunt-contrib-uglify": "^2.0.0",
"gulp": "^3.5.6",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0",
"gulp-sass": "^2.0.4",
"ionic-native-transitions": "^1.0.2",
"moment": "^2.14.1",
"ng2-translate": "^2.2.2",
"plist": "^2.0.1"
},
"devDependencies": {
"angular-translate": "^2.15.2",
"bower": "^1.3.3",
"coffee-script": "^1.10.0",
"grunt-contrib-compress": "^1.3.0",
"grunt-contrib-uglify": "^2.0.0",
"gulp-angular-templatecache": "^2.0.0",
"gulp-ng-annotate": "^2.0.0",
"gulp-useref": "^3.1.2",
"gulp-util": "^2.2.14",
"mv": "^2.1.1",
"shelljs": "^0.3.0"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-console",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard",
"cordova-plugin-network-information",
"cordova-plugin-geolocation",
"cordova-plugin-badge"
],
"cordovaPlatforms": [
"android",
{
"platform": "ios",
"version": "4.1.1",
"locator": "[email protected]"
}
]
}
Thanks
Upvotes: 3
Views: 1457
Reputation: 158
delete plugins folder, node_module folder and platform/ios folder. Then run "npm install in the project root. The add ios platform
Upvotes: 1
Reputation: 30366
Cordova version : 6.2.0
[email protected] was released over 1½ years ago. Try updating to the latest version [email protected]
Then install the latest iOS platform: cordova platform add ios@latest
Xcode version : 8.3.3
While you're at it, update to Xcode 9 so you can build for iOS 11 / iPhone X.
Upvotes: 0