QuickBlox / quickblox-ios-sdk

QuickBlox iOS SDK for messaging and video calling
https://quickblox.com/developers/IOS
MIT License
397 stars 358 forks source link

Apple silicon support? #1307

Closed codingrhythm closed 2 years ago

codingrhythm commented 2 years ago

New Issue Checklist

Environment details

Info Value
iOS Version 15.0
Quickblox iOS SDK version 2.17.10
QuickbloxWebRTC SDK version 2.17.10
Xcode Version Xcode 13.2.1
Repro with our demo sample Yes

Did this work before? No

Expected behavior Successfully built against iOS simulator with arm64 architecture.

Actual behavior Build failed due to missing symbols for arm64.

Logs

Undefined symbol: _OBJC_CLASS_$_QBChat
Undefined symbol: _OBJC_CLASS_$_QBChatDialog
Undefined symbol: _OBJC_CLASS_$_QBChatMessage
Undefined symbol: _OBJC_CLASS_$_QBGeneralResponsePage
Undefined symbol: _OBJC_CLASS_$_QBRequest
Undefined symbol: _OBJC_CLASS_$_QBResponsePage
Undefined symbol: _OBJC_CLASS_$_QBSession
Undefined symbol: _OBJC_CLASS_$_QBSettings
Undefined symbol: _OBJC_CLASS_$_QBUUser

Steps to reproduce the behavior

  1. Open Xcode 13 on M1 machine
  2. Build the project with the SDK.

Any others comments

ghost commented 2 years ago

@codingrhythm Hello,

This is Nikolay from QuickBlox support.

We will refactor the samples in the future.

At this moment to correctly launch samples in the iOS simulator, you need to update the pod file like in the next snippet:

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
  end
end

And reinstall the pods.

Podfile example (update pod file for the chat sample swift):

platform :ios, "13.0"

use_frameworks!

inhibit_all_warnings!

target 'sample-chat-swift' do
    pod 'QuickBlox', '~> 2.17.10'
    pod 'SVProgressHUD'
    pod 'SDWebImage', '~> 4.4.7'
    pod 'TTTAttributedLabel', '~> 2.0.0'
end

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
  end
end
codingrhythm commented 2 years ago

@QB-nikolay-zolotarov Thanks for your reply. Correct me if I am wrong, this change you suggested was to exclude arm64 from iOS simulator build, but we actually need it for building on M1 machine. What we need is to include the arm64 slice (for simulator) as part of the prebuilt xcframework. Instead of ios-x86_64-simulator/Quickblox.framework, we will have ios-arm64_x86_64-simulator/Quickblox.framework

ghost commented 2 years ago

@codingrhythm Thank you for your reply. Yes, you are right. We will add support of arm64 in the next release. I will update you.

codingrhythm commented 2 years ago

@QB-nikolay-zolotarov That's great! Do you know when will the next release be?

ghost commented 2 years ago

@codingrhythm ETA - next week.

codingrhythm commented 2 years ago

Hi @QB-nikolay-zolotarov any updates on this? Thanks.

ghost commented 2 years ago

@codingrhythm Hello. Our developers are working on it. However, unfortunately, it was not possible to build our SDK for the required architecture. It will take some more time. I will update you as soon as possible.

codingrhythm commented 2 years ago

@QB-nikolay-zolotarov Hi, could you be more specific why it's not possible? Is there any help I can provide? I've been working on M1 support for some of our own mobile libraries(c++, golang) recently on both M1 and Intel based Macbook Pro. Maybe I could provide a bit help?

ghost commented 2 years ago

@codingrhythm Thank you, I will provide you with information from the developers as soon as I have it. If we have any questions, we will let you know.

ghost commented 2 years ago

@codingrhythm We have successfully built a QuickBlox SDK with arm64 simulator support. But we can't build the Quickblox-WebRTC SDK because there is a fail with building a static WebRTC library with simulator support.

We will provide a new Quickblox-WebRTC SDK with arm64 simulator support. ETA - 4 months.

codingrhythm commented 2 years ago

@QB-nikolay-zolotarov thank you. When will you push the update of the Quickblox.xcframework ?

codingrhythm commented 2 years ago

BTW, we are not using Quickblox-WebRTC SDK anyway, so arm64 simulator support for QuickBlox SDK should be sufficient at the moment.

ghost commented 2 years ago

@codingrhythm We will try building the SDK. However, it will take time due to the current situation in Ukraine.

codingrhythm commented 2 years ago

Thanks @QB-nikolay-zolotarov . Let me know if you have any updates.

ghost commented 2 years ago

@codingrhythm Unfortunately, there are no updates. I will update you if there is any news.

ghost commented 2 years ago

@codingrhythm M1 simulator support added in the new version, please check

codingrhythm commented 2 years ago

@QB-nikolay-zolotarov Thanks, we've tested it, works as expected. All the best!