Meteor METEOR@3.0.4 - meteor run ios Throws several errors and warnings
Any recommendations on how to address these is helpful.
Plugins/cordova-plugin-meteor-webapp/Asset.swift:32:7: warning: ‘Hashable.hashValue’ is deprecated as a protocol requirement; conform type ‘Asset’ to ‘Hashable’ by implementing ‘hash(into:)’ instead
var hashValue: Int { return ObjectIdentifier(bundle).hashValue ^ urlPath.hashValue }
Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift:1:38: warning: using ‘class’ keyword to define a class-constrained protocol is deprecated; use ‘AnyObject’ instead
protocol AssetBundleManagerDelegate: class {
^~~~~
AnyObject
Plugins/cordova-plugin-meteor-webapp/Asset.swift:32:7: warning: ‘Hashable.hashValue’ is deprecated as a protocol requirement; conform type ‘Asset’ to ‘Hashable’ by implementing ‘hash(into:)’ instead
var hashValue: Int { return ObjectIdentifier(bundle).hashValue ^ urlPath.hashValue }
Plugins/cordova-plugin-meteor-webapp/AssetBundleDownloader.swift:1:41: warning: using ‘class’ keyword to define a class-constrained protocol is deprecated; use ‘AnyObject’ instead
protocol AssetBundleDownloaderDelegate: class {
^~~~~
AnyObject
Plugins/cordova-plugin-meteor-webapp/Asset.swift:32:7: warning: ‘Hashable.hashValue’ is deprecated as a protocol requirement; conform type ‘Asset’ to ‘Hashable’ by implementing ‘hash(into:)’ instead
var hashValue: Int { return ObjectIdentifier(bundle).hashValue ^ urlPath.hashValue }
cordova-build/platforms/ios/mydev_o.xcodeproj: warning: The iOS Simulator deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.1.99.
I’m not sure why you’re experiencing this. It works well for me on both iOS for Meteor 3 and 2.
Can you share more details about your setup? Which Xcode version are you using? Do you have any other cordova plugins installed (.meteor/cordova-plugins)?
If possible, providing a reproduction repository would help. I can try to replicate your issue and confirm if it’s something I can fix.
Just to clarify, is this a crashing issue for you?
I see some of these warnings too, but my app still functions correctly. I understood that yours doesn’t. While this definitely needs a fix, I’m curious about how critical it is for the rest of us. Does your app still work at all?
Could these warnings be affecting HCP’s functionality? They don’t seem like breaking changes as are warnings, but it’s possible they’re having some impact that I don’t know.
While running Cordova app for platform iOS with options
–buildConfig,/Users/meteorcoder/cordova/.meteor/local/cordova-build/build.json,–emulator:
Error: Command failed with exit code 65: xcodebuild -workspace mobileD.xcworkspace -scheme mobileD -configuration
Debug -sdk iphonesimulator -destination platform=iOS Simulator,name=iPhone 16 Plus build
SYMROOT=/Users/meteorcoder/cordova/.meteor/local/cordova-build/platforms/ios/build
-UseModernBuildSystem=0 -quiet
at makeError
(/Users/meteorcoder/cordova/.meteor/local/cordova-build/node_modules/execa/lib/error.js:60:11)
at handlePromise
(/Users/meteorcoder/cordova/.meteor/local/cordova-build/node_modules/execa/index.js:118:26)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at CordovaProject.runCommands (/tools/cordova/project.js:954:14)
at CordovaProject.run (/tools/cordova/project.js:349:5)
at iOSRunTarget.start (/tools/cordova/run-targets.js:32:7)
at /tools/cordova/runner.js:98:11
at Object.capture (/tools/utils/buildmessage.js:282:5)
at CordovaRunner.startRunTargets (/tools/cordova/runner.js:95:24)
at AppRunner._runOnce (/tools/runners/run-app.js:781:7)
at AppRunner._runApp (/tools/runners/run-app.js:951:23)
We haven’t updated the Cordova examples yet. That example app is still on Meteor 2.5.2, and I’ve even encountered issues with meteor update --release 3.0.4. Have you run into similar problems on just upgrading?
As part of the effort to update materials for Meteor 3, we’ll ensure those examples are properly updated.
We’ve identified two main issues:
Meteor 3 Cordova triggers persistent deprecation warnings with each build. It would be useful to either remove these or determine when they might become breaking changes.
Meteor 3 Cordova examples need updating to the latest versions.
To clarify, were you primarily testing Cordova integration in Meteor? In the meantime, I suggest building projects from a fresh Meteor app created with meteor create, then adding platforms (meteor add-platform ios) to test in the simulator later.
Thank you @nachocodoner and team. Thank you for support and guidance.
I had cited the meteor example just to explain the issue I am having with upgrading from version 2 to 3.0.4.
My question is related to migrating an application built on earlier version of meteor to 3.0.4 that also works on cordova. I have an application, that I have migrated to 3.0.4. It is runs on the browser now after converting the sync calls to async but when I try to build it to run as a IOS app it fails.
In case build fails with errors, where can I find the errors and the reason for failure?
Got it. This crashing scenario is definitely different from the warning issue mentioned above.
Since your app likely has many features, one approach to debug is to gradually remove runtime code. Start with a minimal setup, verify your app visuals appears on your ios app and slowly add code back to find the cause of the issue. This also applies to third-party dependencies like NPM or Atmosphere packages.
To help you further, we would need to replicate the issue on our machines. If possible, create a small reproduction repository. However, following the debugging strategy above might already help you narrow down the problem and gain more insights.