[iOS] Xcode 15.2 build error on Ionic 7
Opened this issue · 2 comments
Hi, we use this plugin a long time, but after an upgrade to Ionic 7 and plugin latest version, it starts to crash the build.
Building trough ionic capacitor cli (ionic cap run ios
), we received this error:
The following build commands failed:
[capacitor] CompileC /Users/user/dev-projects/my-app/ios/DerivedData/00008110-000E29641E53801E/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/CordovaPlugins.build/Objects-normal/arm64/MixpanelPlugin.o /Users/user/dev-projects/my-app/ios/capacitor-cordova-ios-plugins/sources/CordovaPluginMixpanel/MixpanelPlugin.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'CordovaPlugins' from project 'Pods')
[capacitor] (1 failure)
[capacitor]
[ERROR] An error occurred while running subprocess capacitor.
The error that Xcode appoints is:
"property 'group' not found on object of type 'Mixpanel *'", at MixpanelPlugin.m.
On the methods: setGroup, addGroup and removeGroup.
After some search on Mixpanel.m, we found that the original is setting group by increasing "people" property, and we changed the code:
[mixpanelInstance.group set:setObject];
To:
[mixpanelInstance.people union:setObject];
With this change, the app build is working again.
This is appropriated? If yes, I'll open a PR with the changes.
ionic info
Ionic:
Ionic CLI : 7.1.1 (/Users/my-user/.nvm/versions/node/v16.20.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.6.6
@angular-devkit/build-angular : 17.2.0
@angular-devkit/schematics : 17.1.4
@angular/cli : 17.1.4
@ionic/angular-toolkit : 11.0.1
Capacitor:
Capacitor CLI : 5.7.0
@capacitor/android : 5.7.0
@capacitor/core : 5.7.0
@capacitor/ios : 5.6.0
Utility:
cordova-res : not installed globally
native-run : 2.0.1
System:
NodeJS : v16.20.0
npm : 8.19.4
OS : macOS Sonoma 14.2.1
Yes, please. Pr are welcome