Comments (8)
Hello @aaronpk,
I have looked into this problem, and I believe it's a possible bug on Apple side.
What I found out is that it's related to having custom subscript while inheriting from NSObject.
If you paste this code into Xcode Playground you'll see the same warning, but it will go away if you just remove inheritance from NSObject.
import Foundation
class ClassWithSubscript: NSObject {
subscript(key: String) -> ClassWithSubscript {
return self
}
}
func testFunc(settings: Dictionary<String, AnyObject>) {
if let nested = settings["foo"] {
if let foo = nested["bar"] {
print(foo as! Int)
}
}
}
What do you think? Should we report this as a bug?
from aexml.
i think it should be reported as a bug - the interesting thing is that it occurs in both 7.0 and 7.1 (swift 2 and 2.1).
from aexml.
Any updates on this? I run into this simply using subscript on a dictionary object, not even a custom class of mine.
from aexml.
I am having an issue with this as well. Has anybody found a suitable workaround?
from aexml.
Ok, so I just reported this bug to Apple. ID: 23694764
from aexml.
I'm just going through and changing all of my [subscript] syntaxes to .valueForKey to work around it.
from aexml.
Well i was also facing this issue, but then i was using Cocoapods.
Later i added the library manually and the issue was gone automatically.
I guess that something is wrong when we use it as a framework(please back me up if m right, otherwise enlightening is appreciated)
from aexml.
So, without some real solution from Apple (this bug is still open), I removed inheritance from NSObject which in fact fixed this warning, so this issue can be closed now. Thanks for dicsussion!
from aexml.
Related Issues (20)
- module compiled with Swift 5.0 cannot be imported by the Swift 5.1 compiler. HOT 3
- could not find module 'AEXML' for target 'arm64-apple-ios'; found: x86_64 HOT 1
- AEXMLDocument Retain Cycle
- XML incomplete parsing
- module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler HOT 6
- module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler HOT 4
- Add child with end tag HOT 1
- Support for DTDs? HOT 4
- Parser doesn't handle "0" or "1" for Booleans HOT 1
- Sorted attributes
- Build Target out of date HOT 3
- AEXML.modulemap not found on iOS 14 HOT 4
- Xcode 12 build warning - 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0 HOT 1
- Question
- Ability to exclude standalone attribute from document header HOT 3
- When <ruby> elements are used in html, other texts are vanished. HOT 1
- Error while parsing large files on linux
- Apple Silicon support HOT 4
- Privacy Manifest HOT 1
- Could not find module 'AEXML' for target 'x86_64-apple-ios-simulator'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aexml.