matrix-org / matrix-org/matrix-ios-sdk
SwiftMatrixSDK build error?
Nobody has claimed this yet.
- Dominant language
- Objective-C
- Stars
- 484
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
I'm seeing an error after adding `pod "SwiftMatrixSDK"` to my project's Podfile:
```
In file included from /Users/x/dev/element-chat-test/Pods/SwiftMatrixSDK/MatrixSDK/JSONModels/AutoDiscovery/MXWellknownIntegrations.m:17:
/Users/x/dev/element-chat-test/Pods/SwiftMatrixSDK/MatrixSDK/JSONModels/AutoDiscovery/MXWellknownIntegrations.h:19:9: fatal error: 'MXJSONModel.h' file not found
#import "MXJSONModel.h"
```
Happens in Xcode 11.0 and 11.5. Anyone know what might be wrong?
Really annoying, since without the swift library, some objc methods are unavailable since they've been annotated with `NS_REFINED_FOR_SWIFT`.
Full output:
```
CompileC /Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SwiftMatrixSDK.build/Objects-normal/x86_64/MXWellknownIntegrations.o /Users/x/dev/element-chat-test/Pods/SwiftMatrixSDK/MatrixSDK/JSONModels/AutoDiscovery/MXWellknownIntegrations.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'SwiftMatrixSDK' from project 'Pods')
cd /Users/x/dev/element-chat-test/Pods
export LANG=en_US.US-ASCII
/Applications/Xcode_11.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-ios9.0-simulator -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -gmodules -fmodules-cache-path=/Users/x/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/x/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -fmodule-name=SwiftMatrixSDK -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DPOD_CONFIGURATION_DEBUG=1 -DDEBUG=1 -DCOCOAPODS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode_11.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.0.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -fobjc-abi-version=2 -fobjc-legacy-dispatch -index-store-path /Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Index/DataStore -iquote /Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SwiftMatrixSDK.build/SwiftMatrixSDK-generated-files.hmap -I/Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SwiftMatrixSDK.build/SwiftMatrixSDK-own-target-headers.hmap -I/Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SwiftMatrixSDK.build/SwiftMatrixSDK-all-non-framework-target-headers.hmap -ivfsoverlay /Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SwiftMatrixSDK.build/all-product-headers.yaml -iquote /Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SwiftMatrixSDK.build/SwiftMatrixSDK-project-headers.hmap -I/Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Products/Debug-iphonesimulator/SwiftMatrixSDK/include -I/Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SwiftMatrixSDK.build/DerivedSources-normal/x86_64 -I/Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SwiftMatrixSDK.build/DerivedSources/x86_64 -I/Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SwiftMatrixSDK.build/DerivedSources -F/Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Products/Debug-iphonesimulator/SwiftMatrixSDK -F/Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Products/Debug-iphonesimulator/AFNetworking -F/Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Products/Debug-iphonesimulator/GZIP -F/Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Products/Debug-iphonesimulator/OLMKit -F/Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Products/Debug-iphonesimulator/Realm -F/Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Products/Debug-iphonesimulator/libbase58 -include /Users/x/dev/element-chat-test/Pods/Target\ Support\ Files/SwiftMatrixSDK/SwiftMatrixSDK-prefix.pch -MMD -MT dependencies -MF /Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SwiftMatrixSDK.build/Objects-normal/x86_64/MXWellknownIntegrations.d --serialize-diagnostics /Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SwiftMatrixSDK.build/Objects-normal/x86_64/MXWellknownIntegrations.dia -c /Users/x/dev/element-chat-test/Pods/SwiftMatrixSDK/MatrixSDK/JSONModels/AutoDiscovery/MXWellknownIntegrations.m -o /Users/x/Library/Developer/Xcode/DerivedData/element-chat-test-gqphdkcrgegkrvbebqyuobmvhwbs/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SwiftMatrixSDK.build/Objects-normal/x86_64/MXWellknownIntegrations.o
In file included from /Users/x/dev/element-chat-test/Pods/SwiftMatrixSDK/MatrixSDK/JSONModels/AutoDiscovery/MXWellknownIntegrations.m:17:
/Users/x/dev/element-chat-test/Pods/SwiftMatrixSDK/MatrixSDK/JSONModels/AutoDiscovery/MXWellknownIntegrations.h:19:9: fatal error: 'MXJSONModel.h' file not found
#import "MXJSONModel.h"
^~~~~~~~~~~~~~~
1 error generated.
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting MatrixSDK/JSONModels/AutoDiscovery/MXWellknownIntegrations.h and the referenced MXJSONModel.h include, then reproduce the SwiftMatrixSDK CocoaPods build in Xcode 11. Check how the SDK's headers are exposed to this target. Done means the pod builds without the reported missing-header error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c
- Domain
- build-system, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100