更新GoogleMaps和GooglePlaces pod后,iOS版本崩溃

问题描述 投票:2回答:1

我有一个使用GoogleMaps和GooglePlaces pods的Objective-c应用程序,直到现在版本为2.7.0。由于最近的弃权,谷歌要求升级到v3.0.0。 https://developers.google.com/places/ios-sdk/client-migration

The Problem

当我编辑应用程序以使用版本3.0.0时,它会在LaunchScreen之后崩溃,而不会调用委托的didFinishLaunchingWithOptions。这仅在发布配置中发生,并且仅在物理设备中发生。

#0  0x00000001014d5290 in std::__1::vector<int, std::__1::allocator<int> >::vector(std::__1::vector<int, std::__1::allocator<int> > const&) ()
#1  0x0000000101633178 in std::__1::vector<unsigned int, std::__1::allocator<unsigned int> >::vector(unsigned long) ()
#2  0x0000000101683494 in GMSx_absl::base_internal::InitGetTID() ()
#3  0x000000010167ae38 in void GMSx_absl::base_internal::CallOnceImpl<void (&)()>(std::__1::atomic<unsigned int>*, GMSx_absl::base_internal::SchedulingMode, void (&&&)()) ()
#4  0x00000001016833c4 in GMSx_absl::base_internal::GetTID() ()
#5  0x00000001016566a0 in GMSx_base_logging::LogMessage::Flush() ()
#6  0x00000001016564d4 in GMSx_base_logging::LogMessage::~LogMessage() ()
#7  0x0000000101655290 in (anonymous namespace)::AddFlagValidator(void const*, bool (*)()) ()
#8  0x00000001016841d0 in _GLOBAL__sub_I_vlog_is_on.cc ()
#9  0x0000000102649504 in ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) ()
#10 0x0000000102649738 in ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) ()
#11 0x0000000102644768 in ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) ()
#12 0x0000000102643798 in ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) ()
#13 0x0000000102643854 in ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) ()
#14 0x00000001026326a4 in dyld::initializeMainExecutable() ()
#15 0x0000000102637468 in dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) ()
#16 0x0000000102631044 in _dyld_start ()

Symbols dump

<_NSCallStackArray 0x104f67740>(
0   ???                                 0x00000001050f890c 0x0 + 4379871500,
1   MyApp                              0x00000001010416e0 main + 0,
2   MyApp                              0x0000000101683494 _ZN9GMSx_absl13base_internalL10InitGetTIDEv + 116,
3   MyApp                              0x000000010167ae38 _ZN9GMSx_absl13base_internal12CallOnceImplIRFvvEJEEEvPNSt3__16atomicIjEENS0_14SchedulingModeEOT_DpOT0_ + 88,
4   MyApp                              0x00000001016833c4 _ZN9GMSx_absl13base_internal6GetTIDEv + 420,
5   MyApp                              0x00000001016566a0 _ZN17GMSx_base_logging10LogMessage5FlushEv + 280,
6   MyApp                              0x00000001016564d4 _ZN17GMSx_base_logging10LogMessageD2Ev + 20,
7   MyApp                              0x0000000101655290 _ZN12_GLOBAL__N_116AddFlagValidatorEPKvPFbvE + 316,
8   MyApp                              0x00000001016841d0 _GLOBAL__sub_I_vlog_is_on.cc + 56,
9   ???                                 0x0000000102649504 0x0 + 4335113476,
10  ???                                 0x0000000102649738 0x0 + 4335114040,
11  ???                                 0x0000000102644768 0x0 + 4335093608,
12  ???                                 0x0000000102643798 0x0 + 4335089560,
13  ???                                 0x0000000102643854 0x0 + 4335089748,
14  ???                                 0x00000001026326a4 0x0 + 4335019684,
15  ???                                 0x0000000102637468 0x0 + 4335039592,
16  ???                                 0x0000000102631044 0x0 + 4335013956
)

What I tried so far

只是为了确保它不是'假错误':

  • 清除构建文件夹
  • 删除派生数据
  • 删除pods文件夹和工作区,并使用pod install重新创建所有文件夹
  • 多次重启Xcode和Mac

但我也试过这些解决方法:

  • 禁用bitcode
  • 将swift编译设置为none(从最快的编译)

以上都没有解决或跳过崩溃。将版本恢复到2.7.0会使应用程序再次运行!

有没有人体验过类似谷歌地图和谷歌地方图书馆的东西?任何人都可以提出另一种方法来调查这个问题吗?

Solution

pod的3.0.3版解决了错误

ios objective-c google-maps google-places-api
1个回答
0
投票

如果版本不匹配,Cocoapods将失败,以解决;

打开终端;

  sudo gem install cocoapods

添加--pre以获取最新的预发布:

  sudo gem install cocoapods --pre
© www.soinside.com 2019 - 2024. All rights reserved.