分段错误11 - 桥接标题

时间:2016-04-05 13:47:46

标签: ios xcode swift swift2

我在尝试存档项目时遇到问题。在设备,模拟器或运行单元测试上运行时,一切正常,但当我尝试存档时,我收到Segmentation fault 11错误。除其他外,错误的突出部分似乎是:

/Users/[USER]/Projects/[PROJECT]/[PROJECT]-ios/[PROJECT]/[PROJECT]-Bridging-Header.h:15:9: error: 'Mixpanel.h' file not found
#import "Mixpanel.h"
        ^
0  swift                    0x00000001033e84eb llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift                    0x00000001033e77d6 llvm::sys::RunSignalHandlers() + 70
2  swift                    0x00000001033e8b4f SignalHandler(int) + 287
3  libsystem_platform.dylib 0x00007fff84e9252a _sigtramp + 26
4  libsystem_platform.dylib 0x00007f9ffc822bf0 _sigtramp + 2006517472
5  swift                    0x0000000101604397 swift::ClangImporter::Implementation::addEntryToLookupTable(clang::Sema&, swift::SwiftLookupTable&, clang::NamedDecl*) + 151
6  swift                    0x0000000101604462 swift::ClangImporter::Implementation::addEntryToLookupTable(clang::Sema&, swift::SwiftLookupTable&, clang::NamedDecl*) + 354
7  swift                    0x0000000101604ec9 swift::ClangImporter::Implementation::importHeader(swift::ModuleDecl*, llvm::StringRef, swift::SourceLoc, bool, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >) + 985
8  swift                    0x0000000101605656 swift::ClangImporter::importBridgingHeader(llvm::StringRef, swift::ModuleDecl*, swift::SourceLoc, bool) + 502
9  swift                    0x00000001015f5c29 swift::CompilerInstance::performSema() + 601
10 swift                    0x000000010113a326 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 934
11 swift                    0x000000010113941d frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2781
12 swift                    0x0000000101134e3c main + 1932
13 libdyld.dylib            0x00007fff8a0d15ad start + 1
Stack dump:

我使用cocoapods进行包管理并在同一个项目中使用swift + objc。

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

我通过将 // Get the bounds from the map once it's loaded $scope.$watch(function() { return $scope.map.bounds;}, function(nv, ov) { // Only need to regenerate once if (!ov.southwest && nv.southwest) { var markers = []; for (var i=0; i<$scope.List.length; i++) { markers.push(createAgentMarker(i, $scope.map.bounds,$scope.agentList[i])); } _.each(markers, function (marker) { marker.onMarkerClicked = function () { onMarkerClicked(marker); }; }); $scope.agentMarkers = markers; } }, true); 添加到我的应用目标上的Pods/**版本设置来解决此问题

希望这将有助于将来的人。