Skip to content

[iOS] Xcode 15.2 build error on Ionic 7 #137

@andrehhtm

Description

@andrehhtm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions