mixpanel / mixpanel-swift

Official iOS (Swift) Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
434 stars 234 forks source link

Could not find module 'Mixpanel' for target 'x86_64-apple-ios-simulator' #467

Closed rbpaul2 closed 2 years ago

rbpaul2 commented 3 years ago

When trying to build on simulator or preview SwiftUI components I get the following error:

Could not find module 'Mixpanel' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator

I've tried including Mixpanel using both Swift Package Manager and CocoaPods. Have tried both version 2.10.2 and 3.0.0.beta with no luck.

I've tried setting Build Active Architecture Only to "No". Also added a User-defiend setting for VALID_ARCHS with "x86_64" listed.

Has anyone else run into this?

rbpaul2 commented 3 years ago

I am using an M1 Macbook btw

zihejia commented 3 years ago

hi @rbpaul2 , if you are using SPM to integrate Mixpanel, then it is integrated as source code. It is up to you how to build it. Since you are using M1 Macbook, it is not x86_64. Could you try setting your Architectures to Standard Architectures?

MobileMon commented 2 years ago

I'm having this same issue. Any updates?

I'm building on an intel Macbook

I'm using a Flutter project

zihejia commented 2 years ago

For anyone who has this issue, please set your Architectures to Standard Architectures, Build Active Architecture Only: Debug -> YES, Release -> NO. in your build settings. The reason is if you set Debug to NO, it will try to build the simulator build for all platforms but if you are on intel, you don't have the one for Arm, if you on M1, you don't have the one for x86.

image

Since this is not an issue related to the SDK itself, I'm closing this one now. Please feel free to reopen if you need further assistance.