Can't upload IOS app to iTunes with Xcode 7 and GoogleMaps with Podfile

前端 未结 1 1124
温柔的废话
温柔的废话 2021-02-04 22:49

I have an app that I\'ve rebuilt using Xcode 7. This app has been using the GoogleMaps IOS SDK. At the same time (big mistake), that I was updating the code to Xcode 7 (for IO

相关标签:
1条回答
  • 2021-02-04 23:13

    After a lot of research, I've concluded that this is in fact a bug with the GoogleMaps API for IOS when compiled using Pods and Xcode 7.

    The problem is that the info.plist file under 2 different packages has an illegal value. The solution is to remove that illegal value. This is a pain to do manually. I found a person that had a partial solution. I've expanded their solution to encompass both plist files.

    The solution is to add the following code to the end of your Podfile:

    # Patch GoogleMaps' bundle to avoid iTunes connect submission error
    post_install do |installer|
        `/usr/libexec/PlistBuddy -c "Delete :CFBundleSupportedPlatforms" ./Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Resources/GoogleMaps.bundle/Info.plist`
        `/usr/libexec/PlistBuddy -c "Delete :CFBundleSupportedPlatforms" ./Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Info.plist`
    end
    

    This code deletes the illegal values from the plist files and works in both the simulator and on physical devices. Once archived with this new script, the app can be submitted to iTunes without issue.

    Hope this helps.

    0 讨论(0)
提交回复
热议问题