xcode 错误 ITMS-90206 无效的包包含不允许的文件“框架”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/35748933/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:36:20  来源:igfitidea点击:

Error ITMS-90206 Invalid bundle contains disallowed file 'Frameworks'

iosxcodecocoapodsios-frameworksswift-custom-framework

提问by Kevin Machado

I have a problem uploading my application into the Store via Xcode, this one in particular.

我在通过 Xcode 将我的应用程序上传到商店时遇到问题,尤其是这个。

Invalid Bundle contains disallowed file frameworks

无效的捆绑包包含不允许的文件框架

I saw a lot of post about this error, but all are talking about Extension App, that I do not use.

我看到很多关于这个错误的帖子,但都在谈论Extension App我不使用的。

I'm using a Custom frameworkand Cocoapods.

我正在使用Custom frameworkCocoapods

You can see here my tree :

你可以在这里看到我的树:

Tree Xcode Project Custom Framework

Tree Xcode 项目自定义框架

  • XXXis my project app name
  • SharedXXXis my custom framework
  • Podsis the project created by cocoa pods
  • XXX是我的项目应用名称
  • SharedXXX是我的custom framework
  • Pods是由cocoa pods

Here is my cocoa podFile:

这是我的可可podFile

use_frameworks!
link_with 'XXX', 'SharedXXX'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'


workspace 'XXX'

xcodeproj 'XXX/XXX.xcodeproj'
xcodeproj 'Shared/SharedXXX.xcodeproj'

def default_pods
    pod 'Reveal-iOS-SDK', :configurations => ['Debug']
    pod "SnapKit", '~> 0.17.0'
    pod "DKChainableAnimationKit", '~> 1.6.0'
    pod "AsyncSwift"
end

def shared_pods
    pod "Alamofire", '~> 3.0'
    pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
    pod 'ReachabilitySwift', :git => 'https://github.com/ashleymills/Reachability.swift'
end

target :XXX do
    xcodeproj 'XXX/XXX.xcodeproj'
    default_pods
    shared_pods
end

target :XXXDev do
    xcodeproj 'XXX/XXX.xcodeproj'
    default_pods
    shared_pods
end

target :SharedXXX do
    xcodeproj 'Shared/SharedXXXX.xcodeproj'
    shared_pods
end

Build settings for custom framework(SharedXXX) :

custom framework( SharedXXX) 的构建设置:

Custom Framework build settings

自定义框架构建设置

I set the Embedded property to Yes

我将 Embedded 属性设置为 Yes

General Settings for custom framework(SharedXXX) :

custom framework( SharedXXX) 的一般设置:

Custom Framework General Settings

自定义框架常规设置

The framework provided by Cocoapods is linked.

Cocoapods 提供的框架是链接的。

And to finish,

为了完成,

The General Settings to the main project (App Project : called XXXon the tree)

主项目的常规设置(App Project:树上称为XXX

Main project:

主要项目

Any idea ?

任何的想法 ?

回答by Kevin Machado

I solved the problem

我解决了这个问题

Firstly, set into Build Settings

首先,设置成 Build Settings

  • For main project (here XXX) : Embedded Content Contains Swift Codeto YES

  • Custom Framework (SharedXXX) : Embedded Content Contains Swift Codeto NO

  • Custom Framework (SharedXXX) : Runpath Search Path= @executable_path/../../Frameworks

  • 对于主体工程(这里XXX):Embedded Content Contains Swift CodeYES

  • 自定义框架(SharedXXX):Embedded Content Contains Swift CodeNO

  • 自定义框架(SharedXXX):Runpath Search Path=@executable_path/../../Frameworks

This helped me solving that issue

这帮助我解决了这个问题

回答by varun kalra

I faced the same problem while trying to upload from Xcode 9.3This happened because I added 'use_frameworks' in my OneSignal NotificationServiceExtension

我在尝试从Xcode 9.3上传时遇到了同样的问题 这是因为我在OneSignal NotificationServiceExtension添加了“use_frameworks”

enter image description here

在此处输入图片说明

The value Always Embed Swift Standard Librariesfound in Build Settings should be set to Yesonly for you main Projects and not for your custom frameworks or extensions.

在构建设置中找到的Always Embed Swift Standard Libraries值应该只为您的主项目设置为Yes,而不是为您的自定义框架或扩展。