Onesignal-ios-sdk: Does XCFramework version support new ARM based Mac?

Created on 28 Nov 2020  Â·  7Comments  Â·  Source: OneSignal/OneSignal-iOS-SDK

Description:

Hi, we integrated XCFramework version of OneSignal iOS SDK and it worked on an Intel CPU Macbook, however it didn't work on new ARM based Mac e.g. Mac Mini. Are we missing anything while setting this up?

Environment

  • Version: 2.16.0 XCFramework
  • Cocoapods
  • Steps to Reproduce Issue:

    Anything else:

    (crash stacktraces, as well as any other information here)

    High Priority Compatibility Issue Possible Bug Question

    Most helpful comment

    Hi,

    I'm using OneSignal version 2.15.0 and I am having the same issue when I try to build on the simulator. I think OneSignal needs to add support for arm64 simulators.

    To help you get a better understanding of what we need here is the folder inside OneSignal.xcframework vs another third-party dependency (Crisp) that uses XCFramework.

    Screen Shot 2020-12-15 at 21 44 23

    Screen Shot 2020-12-15 at 21 44 36

    Notice that OneSignal doesn't have arm64 simulator like Crisp.xcframework. It does have arm64 to be built on a device but not an arm64 simulator which is present on the M1 Macs.

    This is why I'm getting this error message:
    missing required architecture arm64 in file /Users/johnappleseed/Library/Developer/Xcode/DerivedData/AppName-gfokweabokxwszhigttygwyfrajj/Build/Products/Development-iphonesimulator/OneSignal.framework/OneSignal (2 slices)

    Could you please prioritize this issue? We have developers that are using the M1 Macs and this practically stops them from working.

    All 7 comments

    Howdy,

    it didn't work on new ARM based Mac

    Thank you. Can you please provide more information? What about the integration didn't work?

    @josephktcheung What architecture are you building the mac version for?

    Hi — I'm also receiving encountering this problem. I'm working off of my M1 Macbook Pro, and my xcode build is erroring with this message:

    ld: in /Users/...Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/OneSignal(OneSignal-arm64-master.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/.../Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/OneSignal'
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    My build is targeting arm64. From googling around, it seems like other extensions are having similar issues: here is a thread from firebase. Here's my OneSignal install from the Podfile:

    target 'OneSignalNotificationServiceExtension' do
      pod 'OneSignal', '>= 2.9.3', '< 3.0'
    end
    

    Let me know if there's any information I'm not providing

    Same here with cocoapods

    Hi,

    I'm using OneSignal version 2.15.0 and I am having the same issue when I try to build on the simulator. I think OneSignal needs to add support for arm64 simulators.

    To help you get a better understanding of what we need here is the folder inside OneSignal.xcframework vs another third-party dependency (Crisp) that uses XCFramework.

    Screen Shot 2020-12-15 at 21 44 23

    Screen Shot 2020-12-15 at 21 44 36

    Notice that OneSignal doesn't have arm64 simulator like Crisp.xcframework. It does have arm64 to be built on a device but not an arm64 simulator which is present on the M1 Macs.

    This is why I'm getting this error message:
    missing required architecture arm64 in file /Users/johnappleseed/Library/Developer/Xcode/DerivedData/AppName-gfokweabokxwszhigttygwyfrajj/Build/Products/Development-iphonesimulator/OneSignal.framework/OneSignal (2 slices)

    Could you please prioritize this issue? We have developers that are using the M1 Macs and this practically stops them from working.

    Hello we are working on this and it should be available in the next release. In the mean time try to run Xcode and the Simulator in Rosetta.

    To do this go to Simulator in finder -> Right Click -> Get Info -> Click the "Open using Rosetta" check box

    NOTE: The fix will be for the OneSignal XCFramework not the standard OneSignal Framework (for now). In order to use the XCFramework please update your podfile following instructions here.

    This process will be improved in the future by registering the OneSignal XCFramework as its own pod.

    Does XCFramework support M1 iPhone simulator without Rosetta now?

    Was this page helpful?
    0 / 5 - 0 ratings

    Related issues

    huahengling picture huahengling  Â·  5Comments

    arthurdapaz picture arthurdapaz  Â·  5Comments

    konkontos picture konkontos  Â·  3Comments

    0x7fs picture 0x7fs  Â·  6Comments

    ogres picture ogres  Â·  3Comments