Capacitor isn't managing dependencies correctly
See original GitHub issueUpdating from @capacitor/ios@1.1.1 to @capacitor/ios@1.2.0 WITHOUT @capacitor/core@1.2.0 results in build error.
My diff:
g di master
diff --git a/package-lock.json b/package-lock.json
index 0244284..c1164f1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2294,9 +2294,9 @@
}
},
"@capacitor/ios": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-1.1.1.tgz",
- "integrity": "sha512-6JCNWDY7E+Tt9mkzflwlK9tHl2qcPUgazZC0/aBte9lBEDpmzGPbTlHoiYeKTIqfhQeU7Qk8g6QabCx6vNzJpQ=="
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-1.2.0.tgz",
+ "integrity": "sha512-LPe1Abix3caFX25zsRIUOWHGfCQuCoGo4pWWg78AD/1pjILNd3+uzD29pMvPwC1NsgwnZrm+nnYcUl1KSRLVpQ=="
},
"@ionic-native/core": {
"version": "5.13.0",
diff --git a/package.json b/package.json
index a7c606c..7e653dc 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
"@angular/router": "~8.1.2",
"@capacitor/android": "^1.1.1",
"@capacitor/core": "1.1.1",
- "@capacitor/ios": "^1.1.1",
+ "@capacitor/ios": "^1.2.0",
"@ionic-native/core": "^5.13.0",
"@ionic-native/splash-screen": "^5.13.0",
"@ionic-native/status-bar": "^5.13.0",
Resulting error:
[05:45:06]: $ set -o pipefail && xcodebuild -workspace ios/App/App.xcworkspace -scheme App -destination 'generic/platform=iOS' -archivePath /Users/distiller/Library/Developer/Xcode/Archives/2019-09-06/App\ 2019-09-06\ 05.45.06.xcarchive clean archive | tee /Users/distiller/project/output/buildlogs/gym/App-App.log | xcpretty
# normal/etc...
[05:45:42]: ▸ Compiling DefaultPlugins.m
[05:45:42]: ▸ Compiling Capacitor_vers.c
[05:45:42]: ▸ Compiling Capacitor-dummy.m
[05:45:42]: ▸ Compiling CAPPluginMethod.m
[05:45:42]: ▸ Compiling CAPPluginCall.m
[05:45:42]: ▸ Compiling CAPPlugin.m
[05:45:42]: ▸ Linking Capacitor
[05:45:42]: ▸ ❌ Undefined symbols for architecture arm64
[05:45:42]: ▸ > Symbol: _OBJC_CLASS_$_CAPPermissionsPlugin
[05:45:42]: ▸ > Referenced from: l_OBJC_$_CATEGORY_CAPPermissionsPlugin_$_CAPPluginCategory in DefaultPlugins.o
[05:45:42]: ▸ ❌ ld: symbol(s) not found for architecture arm64
[05:45:42]: ▸ ❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
[05:45:42]: ▸ ** ARCHIVE FAILED **
[05:45:42]: ▸ The following build commands failed:
[05:45:42]: ▸ Ld /Users/distiller/Library/Developer/Xcode/DerivedData/App-hjcpfurhuavuxahacyugyzwwmrzx/Build/Intermediates.noindex/ArchiveIntermediates/App/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Capacitor.framework/Capacitor normal arm64
[05:45:42]: ▸ (1 failure)
It seems if I also (manually) update @capacitor/core to 1.2.0 then the issue goes away.
Why isn’t there a dependency in @capacitor/ios@1.2.0 that @capacitor/core@1.2.0 is required?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Troubleshooting Android Issues
It could be as simple as updating a dependency, running Gradle sync, or invalidating caches. Gradle Sync. If you have installed a new...
Read more >" npx cap add ios" fails with error "Updating iOS native ...
I added the necessary angular dependencies to get "ionic serve" working properly. I have installed capacitor using the following commands
Read more >Capacitor
A capacitor is a device that stores electrical energy in an electric field by virtue of accumulating electric charges on two close surfaces...
Read more >Micro Frontends with Module Federation | Ionic Article
By dynamically loading and handling dependencies for remote modules at runtime, ... For those not using Capacitor, fear not - Portals can work...
Read more >Managing dependencies
dev. Import the packages you want in your code. Add your code to a module for dependency tracking (if it isn't in a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, just resolved my problems by executing
npx cap sync
on the project folder, then cleaning build folder on XCode (Product > Clean Build Folder) and rebuilding.The platform packages now have a peer dependency to core matching their version, so npm should warn when versions don’t match. Also we have updated the cli to warn if core version doesn’t match the platform version on update/sync command. Closing.