Appboy / appboy-ios-sdk

Public repo for the Braze iOS SDK
https://www.braze.com
Other
165 stars 140 forks source link

AppboyKit not found, trying to build on an M1 macbook #321

Closed jvieiraABC closed 2 years ago

jvieiraABC commented 2 years ago

Report

Describe your environment.

Info Value
Platform Name iOS
Platform Version 15.0
SDK Version 4.4.0
Integration Method Cocoapods
Xcode Version Xcode 13.0
Computer Processor Apple M1
Repro rate 100%

What did you do?

I am attempting to build and run my project on an M1 macbook

What did you expect to happen?

I was expecting my project to run like it normally did on my older machine, it is not an M1

What happened instead?

The build fails

Steps to reproduce

pod 'Appboy-iOS-SDK' exists in my podfile, Build and run on my m1 machine.

Code Snippet

import "AppboyKit.h"

          ^~~~~~~~~~~~~ 'AppboyKit.h' file not found

This is referenced in a class I have in a prefix.pch file Other classes that import AppboyKit do not have this error, however this is only happening on the M1

Additional notes

Adding "arm64" to "Excluded Architectures" and adding this snippet to my podfile lets me run on my simulator

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
  end
end

However, duplicating the changes on my older machine renders builds to fail when I run to a device. This is not acceptable as other developers build on the same project, and they don't have an M1 machine.

hokstuff commented 2 years ago

Hi @jvieiraABC,

Our SDK supports running on M1 machines since the artifacts we ship for Cocoapods are XCFrameworks that contain the necessary arm64 simulator architecture. If your project explicitly excludes the arm64 architecture, then your project may not compile correctly.

Based on the information you provided, it looks like the issues you're seeing are not specific to Apple Silicon machines.

I have several questions and requests regarding your setup. Please contact support@braze.com with your answers so we can dive into your situation:

Thanks!

Best, Daniel

jvieiraABC commented 2 years ago

It looks like it is an issue with how imports are being managed, I will close the ticket and reach out via the support email if I have any more questions regarding the SDK.

Thanks.