Сбой команды из-за сигнала: ошибка сегментации: 11 Xcode 8.0

#ios #xcode #swift3 #alamofire #xcode8

#iOS #xcode #swift3 #alamofire #xcode8

Вопрос:

В проекте swift, который я использую alamofire для вызовов веб-служб, все работало нормально, пока я не обновился до последней версии xcode 8.0. Он начинает выдавать мне эту ошибку

Сбой команды из-за сигнала: ошибка сегментации: 11

Я наконец нашел причину проблемы. при вызове веб-служб я использую responseJSON для анализа ответа. При удалении вызовов responseJSON ошибка исчезает.

Мой код мне нравится

 request(urlToWebService, method: .get, parameters: nil, encoding: URLEncoding.queryString, headers: nil)
.validate(statusCode: 200..<300)
  

.responseJSON { (ответ) в
}

Я добавил Alamofire в фреймворк и использую его, ссылаясь на фреймворк. Но я попытался добавить исходники в свой текущий проект, но он выдает ту же ошибку. и полный вывод error / xcode

 CompileSwift normal x86_64 /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Services/ServiceHelper.swift
    cd /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/AdTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/DrugStore CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Ads CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/ActivityLevels.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/SectionHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Product CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/ImageHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Genders.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/EnteralCalculationTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Roles.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Visit CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/ViewController.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Congress CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Patient CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/CongressSchedules CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Resources/Images.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/NotificationHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/GUIHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/CongressSchedules CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/User CoreDataProperties.swift -primary-file /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Services/ServiceHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Ads CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/AppDelegate.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/StressLevels.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/ActivityLevel CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/DrugStore CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/SearchBase.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/User CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/TreatmentTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Entities.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/MalnutritionStatus.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Result CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Product CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Patient CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Menus.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/ProductPackageTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/DefaultKeys.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/News CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager Congress.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Users.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Visit CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager Product.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/News CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/ActivityLevel CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/StressLevel CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Result CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/WeightLossPeriods.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/DataTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Congress CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager Ads.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/StressLevel CoreDataProperties.swift -target x86_64-apple-ios9.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk -I /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Products/Debug-iphonesimulator -F /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Products/Debug-iphonesimulator -enable-testing -g -module-cache-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/ModuleCache -D DEBUG -serialize-debugging-options -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-generated-files.hmap -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-own-target-headers.hmap -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-project-headers.hmap -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/DerivedSources/x86_64 -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -working-directory/Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc -emit-module-doc-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper~partial.swiftdoc -Onone -module-name MyNutriCalc -emit-module-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper~partial.swiftmodule -serialize-diagnostics-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.dia -emit-dependencies-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.d -emit-reference-dependencies-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.swiftdeps -o /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.o

0  swift                    0x00000001095cab6d PrintStackTraceSignalHandler(void*)   45
1  swift                    0x00000001095ca5b6 SignalHandler(int)   470
2  libsystem_platform.dylib 0x00007fff8984652a _sigtramp   26
3  libsystem_platform.dylib 0x00007fff59288b00 _sigtramp   3483641328
4  swift                    0x00000001073fd508 swift::TypeBase::getCanonicalType()   872
5  swift                    0x0000000107301648 swift::FunctionType::get(swift::Type, swift::Type, swift::AnyFunctionType::ExtInfo constamp;)   56
6  swift                    0x0000000106fb911e swift::ModuleFile::getType(llvm::PointerEmbeddedInt<unsigned int, 31>)   1422
7  swift                    0x0000000106fb910c swift::ModuleFile::getType(llvm::PointerEmbeddedInt<unsigned int, 31>)   1404
8  swift                    0x0000000106fb68c1 swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>)   39137
9  swift                    0x0000000106fc1947 swift::ModuleFile::loadAllMembers(swift::Decl*, unsigned long long)   647
10 swift                    0x00000001073efbda swift::NominalTypeDecl::lookupDirect(swift::DeclName, bool)   138
11 swift                    0x0000000106fb7938 swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>)   43352
12 swift                    0x0000000106fb8ed4 swift::ModuleFile::getType(llvm::PointerEmbeddedInt<unsigned int, 31>)   836
13 swift                    0x0000000106fb15c7 swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>)   17895
14 swift                    0x0000000106fc1947 swift::ModuleFile::loadAllMembers(swift::Decl*, unsigned long long)   647
15 swift                    0x0000000106fa56aa (anonymous namespace)::LowerType::visitAnyStructType(swift::CanType, swift::StructDecl*)   250
16 swift                    0x0000000106fa4630 swift::Lowering::TypeConverter::getTypeLoweringForUncachedLoweredType(swift::Lowering::TypeConverter::TypeKey)   80
17 swift                    0x0000000106fa3c86 swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type, unsigned int)   3334
18 swift                    0x0000000106fa6c58 (anonymous namespace)::TypeClassifierBase<(anonymous namespace)::TypeClassifier, LoweredTypeKind>::visitAnyStructType(swift::CanType, swift::StructDecl*)   280
19 swift                    0x0000000106fa541d (anonymous namespace)::LowerType::visitAnyEnumType(swift::CanType, swift::EnumDecl*)   893
20 swift                    0x0000000106fa4630 swift::Lowering::TypeConverter::getTypeLoweringForUncachedLoweredType(swift::Lowering::TypeConverter::TypeKey)   80
21 swift                    0x0000000106fa3c86 swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type, unsigned int)   3334
22 swift                    0x0000000106fa6b18 (anonymous namespace)::TypeClassifierBase<(anonymous namespace)::TypeClassifier, LoweredTypeKind>::visitAnyEnumType(swift::CanType, swift::EnumDecl*)   280
23 swift                    0x0000000106fa57dd (anonymous namespace)::LowerType::visitAnyStructType(swift::CanType, swift::StructDecl*)   557
24 swift                    0x0000000106fa4630 swift::Lowering::TypeConverter::getTypeLoweringForUncachedLoweredType(swift::Lowering::TypeConverter::TypeKey)   80
25 swift                    0x0000000106fa3c86 swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type, unsigned int)   3334
26 swift                    0x0000000106f55cc3 (anonymous namespace)::DestructureInputs::visit(swift::Lowering::AbstractionPattern, swift::CanType)   259
27 swift                    0x0000000106f54beb getSILFunctionType(swift::SILModuleamp;, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::AnyFunctionType::ExtInfo, (anonymous namespace)::Conventions constamp;, llvm::Optional<swift::ForeignErrorConvention> constamp;, llvm::Optional<swift::SILDeclRef>)   1163
28 swift                    0x0000000106f544c2 getNativeSILFunctionType(swift::SILModuleamp;, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::AnyFunctionType::ExtInfo, llvm::Optional<swift::SILDeclRef>, swift::SILDeclRef::Kind)   498
29 swift                    0x0000000106fa434e swift::Lowering::TypeConverter::getTypeLoweringForUncachedLoweredFunctionType(swift::Lowering::TypeConverter::TypeKey)   158
30 swift                    0x0000000106fa381e swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type, unsigned int)   2206
31 swift                    0x0000000106f55cc3 (anonymous namespace)::DestructureInputs::visit(swift::Lowering::AbstractionPattern, swift::CanType)   259
32 swift                    0x0000000106f55d88 (anonymous namespace)::DestructureInputs::visit(swift::Lowering::AbstractionPattern, swift::CanType)   456
33 swift                    0x0000000106f54beb getSILFunctionType(swift::SILModuleamp;, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::AnyFunctionType::ExtInfo, (anonymous namespace)::Conventions constamp;, llvm::Optional<swift::ForeignErrorConvention> constamp;, llvm::Optional<swift::SILDeclRef>)   1163
34 swift                    0x0000000106f544c2 getNativeSILFunctionType(swift::SILModuleamp;, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::AnyFunctionType::ExtInfo, llvm::Optional<swift::SILDeclRef>, swift::SILDeclRef::Kind)   498
35 swift                    0x0000000106fa434e swift::Lowering::TypeConverter::getTypeLoweringForUncachedLoweredFunctionType(swift::Lowering::TypeConverter::TypeKey)   158
36 swift                    0x0000000106fa381e swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type, unsigned int)   2206
37 swift                    0x0000000106f55970 (anonymous namespace)::DestructureResults::destructure(swift::Lowering::AbstractionPattern, swift::CanType)   240
38 swift                    0x0000000106f54afc getSILFunctionType(swift::SILModuleamp;, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::AnyFunctionType::ExtInfo, (anonymous namespace)::Conventions constamp;, llvm::Optional<swift::ForeignErrorConvention> constamp;, llvm::Optional<swift::SILDeclRef>)   924
39 swift                    0x0000000106f543d2 getNativeSILFunctionType(swift::SILModuleamp;, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::AnyFunctionType>, swift::AnyFunctionType::ExtInfo, llvm::Optional<swift::SILDeclRef>, swift::SILDeclRef::Kind)   258
40 swift                    0x0000000106f5765a getUncachedSILFunctionTypeForConstant(swift::SILModuleamp;, swift::SILDeclRef, swift::CanTypeWrapper<swift::AnyFunctionType>)   186
41 swift                    0x0000000106f58b35 swift::Lowering::TypeConverter::getConstantInfo(swift::SILDeclRef)   1221
42 swift                    0x0000000106b9cfb8 swift::ASTVisitor<(anonymous namespace)::SILGenApply, void, void, void, void, void, void>::visit(swift::Expr*)   4072
43 swift                    0x0000000106ba1bae (anonymous namespace)::SILGenApply::visitApplyExpr(swift::ApplyExpr*)   5182
44 swift                    0x0000000106ba1bae (anonymous namespace)::SILGenApply::visitApplyExpr(swift::ApplyExpr*)   5182
45 swift                    0x0000000106b8fda1 prepareApplyExpr(swift::Lowering::SILGenFunctionamp;, swift::Expr*)   273
46 swift                    0x0000000106be0de7 swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext)   103
47 swift                    0x0000000106bf4e80 swift::Lowering::SILGenFunction::emitIgnoredExpr(swift::Expr*)   592
48 swift                    0x0000000106c3e951 swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*)   4129
49 swift                    0x0000000106bff2ca swift::Lowering::SILGenFunction::emitFunction(swift::FuncDecl*)   314
50 swift                    0x0000000106b7b855 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*)::$_1::operator()(swift::SILFunction*) const   1877
51 swift                    0x0000000106b7a402 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*)   626
52 swift                    0x0000000106b87303 swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*, unsigned int)   2195
53 swift                    0x0000000106b88e2d swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptionsamp;, swift::FileUnit*, llvm::Optional<unsigned int>, bool, bool)   1629
54 swift                    0x00000001069e016f performCompile(swift::CompilerInstanceamp;, swift::CompilerInvocationamp;, llvm::ArrayRef<char const*>, intamp;, swift::FrontendObserver*)   19503
55 swift                    0x00000001069d9265 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*)   17029
56 swift                    0x000000010699682d main   8685
57 libdyld.dylib            0x00007fff94d9e5ad start   1
58 libdyld.dylib            0x0000000000000073 start   1797659335
Stack dump:
0.  Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/AdTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/DrugStore CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Ads CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/ActivityLevels.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/SectionHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Product CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/ImageHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Genders.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/EnteralCalculationTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Roles.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Visit CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/ViewController.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Congress CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Patient CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/CongressSchedules CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Resources/Images.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/NotificationHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/GUIHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/CongressSchedules CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/User CoreDataProperties.swift -primary-file /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Services/ServiceHelper.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Ads CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/AppDelegate.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/StressLevels.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/ActivityLevel CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/DrugStore CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/SearchBase.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/User CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/TreatmentTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Entities.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/MalnutritionStatus.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Result CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Product CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Patient CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Menus.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/ProductPackageTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/DefaultKeys.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/News CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager Congress.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/Users.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Visit CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager Product.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/News CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/ActivityLevel CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/StressLevel CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Result CoreDataProperties.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/WeightLossPeriods.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Enums/DataTypes.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/Congress CoreDataClass.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Helpers/FileManager/FileManager Ads.swift /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Model/StressLevel CoreDataProperties.swift -target x86_64-apple-ios9.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk -I /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Products/Debug-iphonesimulator -F /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Products/Debug-iphonesimulator -enable-testing -g -module-cache-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/ModuleCache -D DEBUG -serialize-debugging-options -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-generated-files.hmap -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-own-target-headers.hmap -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/MyNutriCalc-project-headers.hmap -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/DerivedSources/x86_64 -Xcc -I/Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -working-directory/Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc -emit-module-doc-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper~partial.swiftdoc -Onone -module-name MyNutriCalc -emit-module-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper~partial.swiftmodule -serialize-diagnostics-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.dia -emit-dependencies-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.d -emit-reference-dependencies-path /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.swiftdeps -o /Users/Hassan2/Library/Developer/Xcode/DerivedData/MyNutriCalc-gfxqfsaqobsaewbfgsmjtovmkods/Build/Intermediates/MyNutriCalc.build/Debug-iphonesimulator/MyNutriCalc.build/Objects-normal/x86_64/ServiceHelper.o 
1.  While emitting SIL for 'Request' at /Users/Hassan2/Documents/MyNutriCalc/MyNutriCalc/MyNutriCalc/Services/ServiceHelper.swift:11:8
2.  While loading members for 'Data' at <invalid loc>
3.  While deserializing decl #4466 (TYPE_ALIAS_DECL)
4.  While deserializing decl #1290 (XREF)
5.  Cross-reference to module 'Foundation'
    ... NSData
    ... in an extension in module 'Foundation'
    ... ReadingOptions
6.  While loading members for declaration 0x7f8a99e2c060 at <invalid loc>
7.  While deserializing 'readFromPath' (FuncDecl #634) 
  

Ответ №1:

Я наконец нашел проблему и решил ее.

Сначала я создал новый проект, затем переместил свои исходные файлы по одному в новый проект,

Я, наконец, обнаружил, что проблема даже не связана с Alamofire.

Ошибка исходила из библиотеки, которую я использовал для управления файлами

Возможно, эти шаги кому-то помогут