无法使用Xcode 7和带有Podfile的GoogleMaps将IOS应用上传到iTunes [英] Can't upload IOS app to iTunes with Xcode 7 and GoogleMaps with Podfile

查看:125
本文介绍了无法使用Xcode 7和带有Podfile的GoogleMaps将IOS应用上传到iTunes的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Xcode 7重建的应用程序。此应用程序一直使用GoogleMaps IOS SDK。同时(很大的错误),我正在更新代码到Xcode 7(用于IOS 9支持),我决定升级到最新版本的GoogleMaps API。此版本要求项目使用Podfiles。



我拥有多个目标,并且获得Podfiles的工作是件痛苦的事情,但我已将其运用。该应用程序在模拟器中编译并运行良好。当我将该项目归档并尝试将应用程序上传到App Store时,问题就出现了。我收到以下错误消息:



< img src =https://i.stack.imgur.com/g3ybE.pngalt =在这里输入图片描述>



我不知道该怎么做。我似乎无法找到有关此错误的任何信息。这里是我的Podfile的副本:

 #Podfile 

source'https:// github。 com / CocoaPods / Specs.git'

platform:ios,'7.0'

#Common Pods

def common_pods
pod' GoogleMaps的
结束

#目标列表

目标'app1'做
common_pods
结束

目标'app2'do
common_pods
end

target'app3'do
common_pods
end

由于我不控制Google API,我无法更改其Info.plist文件。我错过了什么?

解决方案

经过大量研究后,我断定这实际上是GoogleMaps使用Pods和Xcode 7进行编译时,IOS的API。

问题在于2个不同包中的info.plist文件具有非法值。解决办法是删除该非法值。这是一个手动操作的痛苦。我找到了一个有部分解决方案的人。我已经扩展了他们的解决方案以包含两个plist文件。



解决方案是将以下代码添加到您的Podfile的末尾:

 #修补GoogleMaps的套件以避免iTunes连接提交错误
post_install do | installer |
`/ usr / libexec / PlistBuddy -c删除:CFBundleSupportedPlatforms。/ Pods / GoogleMaps / Frameworks / GoogleMaps.framework / Resources / GoogleMaps.bundle / Info.plist`
`/ usr / libexec / PlistBuddy -cDelete:CFBundleSupportedPlatforms。/ Pods / GoogleMaps / Frameworks / GoogleMaps.framework / Resources / GoogleMaps.bundle / GMSCoreResources.bundle / Info.plist`
end

此代码从plist文件中删除非法值,并在模拟器和物理设备上运行。一旦存档这个新的脚本,应用程序可以提交给iTunes没有问题。



希望这有助于。


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 IOS 9 support), I decided to upgrade to the latest version of the GoogleMaps API. This version requires that the project use Podfiles.

I have multiple targets and getting Podfiles to work was a pain, but I got it to work. The app compiles and runs fine in the simulator. The problem comes when I archive the project and try to upload the app to the App Store. I get the following error:

I'm not sure what to do. I can't seem to find any information on this error. Here is a copy of my Podfile:

# Podfile

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, ‘7.0’

# Common Pods

def common_pods
    pod 'GoogleMaps'
end

# Target List

target 'app1' do
    common_pods
end

target 'app2' do
    common_pods
end

target 'app3' do
    common_pods
end

Since I don't control the Google API, I can't change their Info.plist file. Am I missing something?

解决方案

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.

这篇关于无法使用Xcode 7和带有Podfile的GoogleMaps将IOS应用上传到iTunes的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆