来自iTC的Bundle错误无效,无法提交应用程序 - 因为4 swift dylibs无法嵌入 [英] Invalid Bundle error from iTC, cannot submit app - because 4 swift dylibs fail to embed

查看:395
本文介绍了来自iTC的Bundle错误无效,无法提交应用程序 - 因为4 swift dylibs无法嵌入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程式在装置和模拟器,但当我提交它,我得到无效的包 - 一个或多个动态库,您的应用程序引用的不存在于dylib搜索路径错误发送给我大约半小时后



按照此thead的建议



这是一个日志片段从失败的导出,任何想法如何解决这些?

 调试:命令花了0秒
Debug:Found framework / dylib :/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/System/Library/Frameworks/WatchKit.framework/WatchKit.tbd
Debug:Found framework / dylib:/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/System/Library/Frameworks/Foundation.framework/Foundation.tbd
Debug:Found framework / dylib:/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/usr/lib/libobjc.A.tbd
Debug:Found framework / dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/usr/lib/libSystem.B.tbd
Debug:Found framework / dylib:/ Applications / Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd
Debug:Found framework / dylib:/ Applications /Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit.tbd
Debug:Found framework / dylib:/应用程序/ Xcode.app / Contents / Developer / Platforms / WatchOS.platform / Developer / SDKs / WatchOS3.0.sdk / System / Library / Frameworks / WatchConnectivity.framework / WatchConnectivity.tbd
Debug:Found framework / dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/usr/lib/libobjc.A.tbd
Debug:搜索路径:['/ Applications / Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/lib/darwin','/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS。 platform / Developer / SDKs / WatchOS3.0.sdk / usr / lib','/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/System/Library/Frameworks ']
错误:libswiftCore.dylib在dylib搜索路径中找不到


Stderr:
从/Applications/Xcode.app/Contents/Developer/usr/bin / ipatool:1974:inblock in CompileOrStripBitcodeInBundle'
从/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1931:in'each'
从/Applications/Xcode.app / contents / Developer / usr / bin / ipatool:1931:在`CompileOrStripBitcodeInBundle'
从/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1921:in`block in CompileOrStripBitcodeInBundle'
来自/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1920:in`each'
来自/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1920:in `CompileOrStripBitcodeInBundle'
来自/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2106:in`ProcessIPA'
来自/Applications/Xcode.app/Contents/Developer/usr/bin / ipatool:2674:in`< main>
2016-09-14 15:33:40 +0000 /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool exited with 1
2016-09-14 15:33:40 +0000 ipatool JSON:{
alerts =(
{
code = 2554;
description =配置问题:platform AppleTVSimulator.platform没有任何非模拟器SDK;忽略它;
info = {
};
level = WARN;
},
{
code = 2554;
description =配置问题:platform iPhoneSimulator.platform没有任何非模拟器SDK;忽略它;
info = {
};
level = WARN;
},
{
code = 2554;
description =配置问题:platform WatchSimulator.platform没有任何非模拟器SDK;忽略它;
info = {
};
level = WARN;
},
{
code = 284;
description =无法解析连接相关性观察扩展armv7k - > @ rpath / libswiftCore.dylib:无法在/private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu中找到用于armv7k的图像链接/Root/Payload/Photobooth.app/Frameworks/libswiftCore.dylib;
info = {
};
level = WARN;
},
{
code = 284;
description =无法解析连接相关性观看扩展armv7k - > @ rpath / libswiftCoreGraphics.dylib:无法在/private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu中找到要链接到armv7k的图像/Root/Payload/Photobooth.app/Frameworks/libswiftCoreGraphics.dylib;
info = {
};
level = WARN;
},
{
code = 284;
description =无法解析连接相关性观看扩展armv7k - > @ rpath / libswiftCoreLocation.dylib:无法在/private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu中找到用于armv7k的图像链接/Root/Payload/Photobooth.app/Frameworks/libswiftCoreLocation.dylib;
info = {
};
level = WARN;
},
{
code = 284;
description =无法解析连接相关性观看扩展armv7k - > @ rpath / libswiftDarwin.dylib:无法在/private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu中找到用于armv7k的图像链接/Root/Payload/Photobooth.app/Frameworks/libswiftDarwin.dylib;
info = {
};
level = WARN;
},
{
code = 284;
description =无法解析连接相关性观看扩展armv7k - > @ rpath / libswiftDispatch.dylib:无法在/private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu中找到要链接到armv7k的图像/Root/Payload/Photobooth.app/Frameworks/libswiftDispatch.dylib;
info = {
};
level = WARN;
},
{
code = 284;
description =无法解析连接相关性观察扩展armv7k - > @ rpath / libswiftFoundation.dylib:无法在/private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu中找到要链接到armv7k的图像/Root/Payload/Photobooth.app/Frameworks/libswiftFoundation.dylib;
info = {
};
level = WARN;
},
{
code = 284;
description =无法解析连接相关性观看扩展armv7k - > @ rpath / libswiftHomeKit.dylib:无法解析@rpath / libswiftHomeKit.dylib从手表扩展;
info = {
};
level = WARN;
},
{
code = 284;
description =无法解析连接相关性观察扩展armv7k - > @ rpath / libswiftObjectiveC.dylib:无法在/private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu中找到要链接到armv7k的图像/Root/Payload/Photobooth.app/Frameworks/libswiftObjectiveC.dylib;
info = {
};
level = WARN;
},
{
code = 284;
description =无法解析连接依赖性观看扩展armv7k - > @ rpath / libswiftSceneKit.dylib:无法解析@rpath / libswiftSceneKit.dylib从Watch扩展;
info = {
};
level = WARN;
},
{
code = 284;
description =无法解析连接相关性观看扩展armv7k - > @ rpath / libswiftUIKit.dylib:无法在/private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu中找到要链接到armv7k的图像/Root/Payload/Photobooth.app/Frameworks/libswiftUIKit.dylib;
info = {
};
level = WARN;
},
{
code = 284;
description =无法解析链接相关性观看扩展armv7k - > @ rpath / libswiftWatchKit.dylib:无法解析@rpath / libswiftWatchKit.dylib从手表扩展;
info = {
};
level = WARN;
},
{
code = 284;
description =无法解析连接相关性观看扩展armv7k - > @ rpath / libswiftsimd.dylib:无法解析@rpath / libswiftsimd.dylib从Watch扩展;
info = {
};
level = WARN;
},


解决方案

这个是固定的 - 改变 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES 构建设置如下:



应用目标(主要目标) - 设置为NO(我的是YES)



观看目标 - 设置为YES (我的是NO)



观看应用扩展程序目标 - 设置为NO(我的是YES)



编辑:我想通过在xcode 8中创建一个新的空的监视项目,并交叉引用新的xcode 8模板项目中的构建设置之间的差异,我的硬皮古老的项目。上面的设置是xcode 8模板项目具有的。


My app runs fine on devices & simulators, but when I submit it, I get the Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path error emailed to me about half an hour after the upload completes successfully.

Following the advice on this thead here, namely running otool -L, I can see that the app's main executable has all of its @rpath/...dylib files in the Frameworks/folder as expected, but, the appex's executable is missing some Swift libs.

Here's the output from otool -L on the appex:

Watch Extension:
    /System/Library/Frameworks/WatchKit.framework/WatchKit (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/Foundation.framework/Foundation (compatibility version 300.0.0, current version 1349.0.0)
    /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)
    /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation (compatibility version 150.0.0, current version 1348.0.0)
    /System/Library/Frameworks/UIKit.framework/UIKit (compatibility version 1.0.0, current version 3599.4.0)
    /System/Library/Frameworks/WatchConnectivity.framework/WatchConnectivity (compatibility version 1.0.0, current version 116.0.0)
    @rpath/libswiftCore.dylib (compatibility version 1.0.0, current version 800.0.46)
    @rpath/libswiftCoreGraphics.dylib (compatibility version 1.0.0, current version 800.0.46)
    @rpath/libswiftCoreLocation.dylib (compatibility version 1.0.0, current version 800.0.46)
    @rpath/libswiftDarwin.dylib (compatibility version 1.0.0, current version 800.0.46)
    @rpath/libswiftDispatch.dylib (compatibility version 1.0.0, current version 800.0.46)
    @rpath/libswiftFoundation.dylib (compatibility version 1.0.0, current version 800.0.46)
    @rpath/libswiftHomeKit.dylib (compatibility version 1.0.0, current version 800.0.46)
    @rpath/libswiftObjectiveC.dylib (compatibility version 1.0.0, current version 800.0.46)
    @rpath/libswiftSceneKit.dylib (compatibility version 1.0.0, current version 800.0.46)
    @rpath/libswiftUIKit.dylib (compatibility version 1.0.0, current version 800.0.46)
    @rpath/libswiftWatchKit.dylib (compatibility version 1.0.0, current version 800.0.46)
    @rpath/libswiftsimd.dylib (compatibility version 1.0.0, current version 800.0.46)

The following are NOT in the Frameworks/ folder (but all the others are):

    @rpath/libswiftHomeKit.dylib (compatibility version 1.0.0, current version 800.0.46)
    @rpath/libswiftSceneKit.dylib (compatibility version 1.0.0, current version 800.0.46)
    @rpath/libswiftWatchKit.dylib (compatibility version 1.0.0, current version 800.0.46)
    @rpath/libswiftsimd.dylib (compatibility version 1.0.0, current version 800.0.46)

Why is this? I regenerated my pods project via pod install, didn't change anything. I didn't see any warnings. I checked the build (archive)'s log output, no warnings there either. How can I get these included like they should be?

In my main app's target, Always Embed Swift Standard Libraries is set to yes. In Watch and Watch Appex targets, this is set to no to avoid the rejection for having duplicates (good). I tried setting EMBEDDED_CONTENT_CONTAINS_SWIFT to yes in my appex as described in that other thread, but that didn't make any difference.

Update 1 - I also cannot export as an ADHOC build from xcode organizer, it fails for the same reason on the "compile bitcode" step. Runtime search paths are set like this:

Here is a log snippet from the failed export, any ideas how to fix these? I see no reason why these libs are missing.

    Debug: Command took 0 seconds
    Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/System/Library/Frameworks/WatchKit.framework/WatchKit.tbd
    Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/System/Library/Frameworks/Foundation.framework/Foundation.tbd
    Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/usr/lib/libobjc.A.tbd
    Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/usr/lib/libSystem.B.tbd
    Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd
    Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit.tbd
    Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/System/Library/Frameworks/WatchConnectivity.framework/WatchConnectivity.tbd
    Debug: Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/usr/lib/libobjc.A.tbd
    Debug: Search Path: ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/lib/darwin', '/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/usr/lib', '/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS3.0.sdk/System/Library/Frameworks']
    error: libswiftCore.dylib not found in dylib search path


Stderr:
    from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1974:in `block in CompileOrStripBitcodeInBundle'
    from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1931:in `each'
    from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1931:in `CompileOrStripBitcodeInBundle'
    from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1921:in `block in CompileOrStripBitcodeInBundle'
    from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1920:in `each'
    from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1920:in `CompileOrStripBitcodeInBundle'
    from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2106:in `ProcessIPA'
    from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2674:in `<main>'
2016-09-14 15:33:40 +0000  /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool exited with 1
2016-09-14 15:33:40 +0000  ipatool JSON: {
    alerts =     (
            {
        code = 2554;
        description = "Configuration issue: platform AppleTVSimulator.platform doesn't have any non-simulator SDKs; ignoring it";
        info =             {
        };
        level = WARN;
    },
            {
        code = 2554;
        description = "Configuration issue: platform iPhoneSimulator.platform doesn't have any non-simulator SDKs; ignoring it";
        info =             {
        };
        level = WARN;
    },
            {
        code = 2554;
        description = "Configuration issue: platform WatchSimulator.platform doesn't have any non-simulator SDKs; ignoring it";
        info =             {
        };
        level = WARN;
    },
            {
        code = 284;
        description = "Failed to resolve linkage dependency Watch Extension armv7k -> @rpath/libswiftCore.dylib: Could not find image to link for armv7k in /private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu/Root/Payload/Photobooth.app/Frameworks/libswiftCore.dylib";
        info =             {
        };
        level = WARN;
    },
            {
        code = 284;
        description = "Failed to resolve linkage dependency Watch Extension armv7k -> @rpath/libswiftCoreGraphics.dylib: Could not find image to link for armv7k in /private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu/Root/Payload/Photobooth.app/Frameworks/libswiftCoreGraphics.dylib";
        info =             {
        };
        level = WARN;
    },
            {
        code = 284;
        description = "Failed to resolve linkage dependency Watch Extension armv7k -> @rpath/libswiftCoreLocation.dylib: Could not find image to link for armv7k in /private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu/Root/Payload/Photobooth.app/Frameworks/libswiftCoreLocation.dylib";
        info =             {
        };
        level = WARN;
    },
            {
        code = 284;
        description = "Failed to resolve linkage dependency Watch Extension armv7k -> @rpath/libswiftDarwin.dylib: Could not find image to link for armv7k in /private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu/Root/Payload/Photobooth.app/Frameworks/libswiftDarwin.dylib";
        info =             {
        };
        level = WARN;
    },
            {
        code = 284;
        description = "Failed to resolve linkage dependency Watch Extension armv7k -> @rpath/libswiftDispatch.dylib: Could not find image to link for armv7k in /private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu/Root/Payload/Photobooth.app/Frameworks/libswiftDispatch.dylib";
        info =             {
        };
        level = WARN;
    },
            {
        code = 284;
        description = "Failed to resolve linkage dependency Watch Extension armv7k -> @rpath/libswiftFoundation.dylib: Could not find image to link for armv7k in /private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu/Root/Payload/Photobooth.app/Frameworks/libswiftFoundation.dylib";
        info =             {
        };
        level = WARN;
    },
            {
        code = 284;
        description = "Failed to resolve linkage dependency Watch Extension armv7k -> @rpath/libswiftHomeKit.dylib: Could not resolve @rpath in @rpath/libswiftHomeKit.dylib from Watch Extension";
        info =             {
        };
        level = WARN;
    },
            {
        code = 284;
        description = "Failed to resolve linkage dependency Watch Extension armv7k -> @rpath/libswiftObjectiveC.dylib: Could not find image to link for armv7k in /private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu/Root/Payload/Photobooth.app/Frameworks/libswiftObjectiveC.dylib";
        info =             {
        };
        level = WARN;
    },
            {
        code = 284;
        description = "Failed to resolve linkage dependency Watch Extension armv7k -> @rpath/libswiftSceneKit.dylib: Could not resolve @rpath in @rpath/libswiftSceneKit.dylib from Watch Extension";
        info =             {
        };
        level = WARN;
    },
            {
        code = 284;
        description = "Failed to resolve linkage dependency Watch Extension armv7k -> @rpath/libswiftUIKit.dylib: Could not find image to link for armv7k in /private/var/folders/yl/mw_r1p4j3vj2mfp32rqs0y7r0000gn/T/XcodeDistPipeline.6Tu/Root/Payload/Photobooth.app/Frameworks/libswiftUIKit.dylib";
        info =             {
        };
        level = WARN;
    },
            {
        code = 284;
        description = "Failed to resolve linkage dependency Watch Extension armv7k -> @rpath/libswiftWatchKit.dylib: Could not resolve @rpath in @rpath/libswiftWatchKit.dylib from Watch Extension";
        info =             {
        };
        level = WARN;
    },
            {
        code = 284;
        description = "Failed to resolve linkage dependency Watch Extension armv7k -> @rpath/libswiftsimd.dylib: Could not resolve @rpath in @rpath/libswiftsimd.dylib from Watch Extension";
        info =             {
        };
        level = WARN;
    },

解决方案

It took 12 hours to figure this out, but this is what fixed it -- changing the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting like this:

App target (main target) -- set to NO (mine was YES)

Watch target -- set to YES (mine was NO)

Watch App Extension target -- set to NO (mine was YES)

Edit: I figured this out by creating a new, empty watch project in xcode 8, and cross-referencing the differences between build-settings in the new xcode 8 template project, and my crusty old ancient project. The settings above are what the xcode 8 template project has.

这篇关于来自iTC的Bundle错误无效,无法提交应用程序 - 因为4 swift dylibs无法嵌入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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