tinycreative / react-native-intercom

React Native wrapper for Intercom.io
MIT License
406 stars 280 forks source link

XCode build errors on Apple Silicon due to Intercom iOS SDK version #418

Closed Ivraj closed 3 years ago

Ivraj commented 3 years ago

Hi. We're working with the react-native-intercom package in a project and just transitioned to using machines on an arm64 architecture. When trying to compile the project during development, we run into the following error:

In /.../ios/Pods/Intercom/Intercom/Intercom.framework/Intercom(FLAnimatedImage.o), building for iOS Simulator, but linking in object file built for iOS, file '/.../ios/Pods/Intercom/Intercom/Intercom.framework/Intercom' for architecture arm64

We think that the issue is actually being caused by the fact that the package's podspec specifies to use Intercom iOS SDK version ~> 8.0.0, which doesn't support arm64 iOS simulator architectures. However, it seems that as of v9.0.0 the Intercom iOS SDK includes architecture slices for arm64.

We tested this theory by locally changing the react-native-intercom.podspec file to specify ~> 9.0.0 and it seemed to resolve the compilation issue. If anyone is aware of reasons that we should specifically use ~> 8.0.0, let us know. Otherwise, we'd be happy to put in a minor PR that bumps the iOS SDK to ~> 9.0.0.

Br1an-Boyle commented 3 years ago

hi @Ivraj You should be using v9.0.0 of the Intercom iOS SDK. This will fix the issue you've listed above. V9.0.0 specifically provides support for the new M1 Macs. https://github.com/intercom/intercom-ios/releases/tag/9.0.0

Ivraj commented 3 years ago

Hi @bboyle18 , sorry for not following up sooner. I appreciate the response.

Since I see that others have proposed PRs (#432) and have opened other related issues (#422), I'm going to go ahead and close this in favor of those.