openimsdk / open-im-sdk-ios

An OpenIM SDK in Objective-C for iOS
https://openim.io
MIT License
151 stars 140 forks source link

sdk导入项目真机运行报错 #28

Closed chaohall closed 1 year ago

chaohall commented 1 year ago

sdk导入项目后 真机运行报错如下:In /Users//Library/Developer/Xcode/DerivedData/-eebodtqbhfrplucyqiijtufxyyuv/Build/Products/Debug-iphoneos/OpenIMCore.framework/OpenIMCore(go.o), building for iOS, but linking in object file built for iOS Simulator, file '/Users//Library/Developer/Xcode/DerivedData/-eebodtqbhfrplucyqiijtufxyyuv/Build/Products/Debug-iphoneos/OpenIMCore.framework/OpenIMCore' for architecture arm64 有没有人遇到过这种情况

chaohall commented 1 year ago

已解决。 1.VAILID_ARCHS值改为$(inherited)

  1. sudo gem install cocoapods 3.vim podfile 移除sdk 4.删除podfile.lock文件 5.pod install 6.再添加sdk 7.添加: post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" config.build_settings['ENABLE_BITCODE'] = 'NO' config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = "" config.build_settings['CODE_SIGNING_REQUIRED'] = "NO" config.build_settings['CODE_SIGNING_ALLOWED'] = "NO" end end end 此配置到podfile 8.pod install