* Update to Xcode 15
## Summary
We want to make Texture build with recent tools like Xcode 15. Part of this is bumping the minimum supported OS to iOS 14.
I only removed the dead code (i.e. code gated on versions older than iOS 14). There are still some warnings about outdated APIs in use, but they are non-trivial changes to fix.
## Test plan
Run all the examples. Run all the unit tests and make them pass.
* Use Xcode 15.3 so we have 17.4 simulators
* Fixing an asset catalog compiler error when building against iPhone SE
* Fix a couple of file extensions for assets
A couple of PNGs were marked as JPGs
We have `ASCellNodeVisibilityEvent` events that roughly correlate to the scrollViewDid… delegate methods in UIScrollView. With the current events we get a callback when a user stops dragging a cell, but if the cell decelerates we do not get an event when it comes to a rest. I’ve added `ASCellNodeVisibilityEventDidStopScrolling` to have both `ASTableView` and `ASCollectionView` send this event to the cells in `_cellsForVisibilityUpdates` in `- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView`.
I created unit tests to ensure that the proper events are being called for the proper scroll delegate methods.
As of iOS15 the AuthenticationServices framework has a class named `ASNavigationController`. We need to rename our `ASNavigationController` to protect against undefined behavior.
Note: This change was based on this PR https://github.com/TextureGroup/Texture/pull/2014. We were slow in merging it and the author has not replied, so I'm making a new one to get this landed.
* Return nil instead of empty array when no accessibility elements are found. Fixes#1954.
* Use nullability annotations to fix static analyzer warnings.
* Add UI test target.
* Add UI test to make sure web view stays accessible.
* Revert "Add UI test to make sure web view stays accessible."
This reverts commit 00253f49a0af329602b0d9709b58bc92dcd90147.
* Revert "Add UI test target."
This reverts commit 288b5e0f564ef3ba3fb5568baa832bc03124cdc9.
* Add unit test to make sure accessibility elements are correct when a WKWebView is wrapped in an ASDisplayNode.
* Trying to make ASTextLinePositionModifier public
* d’oh
* be a little more restrictive on the files we pull into the pod
* Never mind, I guess we need all of these
* update the project file as well
* try this again
* I think this will work this time.
* Renames AS_EXTERN and ASViewController
To ASDK_EXTERN and ASDKViewController.
This is to avoid conflicting with AuthenticationServices in
Xcode 12
* Fix up examples and docs
* Add bit about updating ASViewController rename
* Update FBSnapshotTestCase to iOSSnapshotTestCase (=6.1)
* be explicit about iOSSnapshotTestCase 6.2
* get rid of iOS_10 suffix and move all the reference images from there into the true reference directory
Co-authored-by: Rahul Malik <rmalik@pinterest.com>
- Update all the tests identifiers in code to use `_` instead of `-`.
-- Rename all the reference images with `_` instead of `-`.
-- The above two changes are in preparation for iOSSnapshotTestsCase doing this for us.
- Move all the reference images in the path "ReferenceImages_iOS_10" to "ReferenceImages_64".
-- When copying these reference images, prefer the iOS10 reference images since we now run under iOS10.
-- The exception is testRoundedCornerBlock where we prefer the 64 one.
-- Remove "_iOS_10" as a suffix in code.
Co-authored-by: Rahul Malik <rmalik@pinterest.com>
- The issues in #1038 are not explained.
- In `ASCollectionViewTests` do not mock every `collectionViewLayout`, only do it for the test that requires it. In addition, call `-stopMocking` when done. OCMock 3.6 found this code using stuff after it should have been.
- 5c42bb4e2f says the layer tests are not typically run, but they are in the project. That diff refers to ASUIViewTests being skipped, but those tests do not exist. So I've just disabled them in this diff. It is not clear how they ever worked.
- In IGListDiff is no longer part of IGListKit as of 4.0. It has its own podspec now. After bumping our IGListKit dependency of our subspec, we got an "Undefined symbol: _IGListDiff" error which breaks podspec linting CI job (as well as some of our clients as reported in #1749).
- To fix it, we can either remove the IGListDiff dependency since it's used once in the entire project, or link to IGListDiffKit. I opt for the latter because I imagine many IGListKit users would have IGListDiffKit anyway so we can still take advantage of it (it's faster than our built in diffing algorithm). Plus, it's not a big dependency.
* Prefer `reserve` rather than `fill constructor` in AS::map()
`fill constructor` constructs the vector with n elements and initializes each element with its default constructor. Instead, `reserve` just allocates memory, no element is initialized and put into the vector, so it's more effeicent. For example, after running the `result_type res(iterable.size());` statement, the `res` vector's size is equal to `iterable.size()`, but after running the `res.reserve(iterable.size());` statement, the `res` vector's size is 0.
* Add tests for ASLayoutSpecUtilities
* ASImageNode tintColor improvements.
When ASImageNodes changes tintColor or enters the hierarchy, ensure -setNeedsDisplay is called if the image is templated.
Add unit tests to ensure this behavior works.
Currently ASImageNode would initially load the correct asset from the asset catalog but would not respond to changes in trait collections that would require loading a different asset from the asset catalog. This change allows use to use `-[UIImage imageAsset]` to reference the asset catalog entry for the current image and load the appropriate version based on the current trait collection
- Add the ability to specify a tintColor for images / buttons that behave similarly to how they would under UIKit.
- Add flag to control if tint color is applied to ASTextNode to match how
UIKit controls if it is .applied to UILabel.
- Update tests for not-tinting automatic render mode for UIImage.
- Add property on ASTextNode2.
- Add tint color support to ASTextNode2.
* Remove ASEventLog. We'll focus on ASLog for the future, possibly making it triggerable on a per-node basis
* See ya!
* Hello semicolon
* Remove refs to gone tree methods
* Fix
* Remove irrelevant change, kick CI
* Clean up
* Improve separation of code for layout method types
* Address PR comments
- Delegate to layout spec engine if the node is a layout spec node but yoga engine was asked for calculate the layout
- Change ASLayoutType to ASLayoutEngineType
- Improve layout engine fall through code
* Split up table view thrash tests
* Fix license
* Fix license
* Reenable thrash tests for table view
* Creating the collection view thrash tests
* Batch update animated tests
* Thrash wildly dispatch main
* Reset the thrash count
* One more test
* Lint
* Update Tests/ASThrashUtility.h
Co-Authored-By: mikezucc <mikezuccarino@gmail.com>
* Tiny code style change in ASCollectionViewThrashTests.mm
* Convert the codebase to Objective-C++ throughout. One language is better than two.
* Put it back
* Fix linker
* Point explicitly to updated Weaver to unblock build
* Revert "Point explicitly to updated Weaver to unblock build"
This reverts commit fdc25296e8794d4e6e56c35f5fe6da2be3f71dbc.
* Revert "Fix linker"
This reverts commit 7be25f91519b8497ef42de79f115bcfbdb965c39.
* Add in the frameworks
* no message
* Address spec lint warnings
* Fix tvos build
* Put that back
* Address Michael's review
* Add comment to kick CI
* fix SIMULATE_WEB_RESPONSE not imported #449
* Fix to make rangeMode update in right time
* remove uncessary assert
* Fix collection cell editing bug for iOS 9 & 10
* Revert "Fix collection cell editing bug for iOS 9 & 10"
This reverts commit 06e18a1059.
* Only test when photo library is enabled.
It will fail to build if photo library is disabled cause the test is
depending on it.
* Add ChangeLog.
* set default tuning parameters for collection/table node
* add change log
* Move to framework private.
* Apply to tableNode
* trigger ci
* fix directory
* fix file link
* Apply recommended warnings
* Squelch designated initializer warning in ASViewController
* Remove unused compiler flag
clang: warning: argument unused during compilation: '-fno-objc-arc-exceptions' [-Wunused-command-line-argument]
* Fix warning about overriding an instance variable within a category
Instance method 'methodOverrides' in category from _ASDisplayView.o overrides method from class in ASDisplayNode.o
* Refactored `accessibleElements` to `accessibilityElements`, and removed the re-definition of the property.
With this refactor, the field can now be used as a single access point into the accessibility elements of a view. Also, removing the re-definition of the property in _ASDisplayViewAccessibility.h enables us to make use of the field and its associated helper methods directly from the `UIAccessibilityContainer` API rather than rolling our own implementation.
* Added tests for the accessors to ASDisplayView.accessibilityElements.
* Commented out tests for older a11y accessors & added relevant warnings.
Also added assertions that the getter and setter for the accessibilityElements
property are used only on the main thread.
* Remove objc association & weak proxy from node -> controller relationship
* Rename ASNodeController+Beta.m to ASNodeControllerx+Beta.mm
Currently we can't import ASDisplayNodeInternal from C
* Update project pointers
* Rename ASNodeControllerx+Beta.mm to ASNodeController+Beta.mm
* Add move detection and support to ASLayoutTransition
...and NSArray+Diffing.
Add some tests.
* Update CHANGELOG.md
* Update CHANGELOG.md
* Update ASLayout+IGListKit.h
* Update ASLayout+IGListKit.mm
* Use std collections to avoid NSNumber boxing
* Update ASLayoutTransition.mm
* Code review updates.
* Use `unordered_multimap` on stack instead of unordered_map<id,queue> on heap
* Remove notFound BOOL (use NSNotFound sentinel value) and put some vars inside the if (insertions/moves) loop
* Don't copy defaultCompare block (redundant under ARC)
* Whitespace
* Remove unneeded mutableCopy-s in ArrayDiffingTests
* Code review updates.
* Type _subnodeMoves pair.first to ASDisplayNode * instead of id
* C++ enumeration
* unowned refs for adding previousLayout nodes to _subnodeMoves
* Remove unreleated ASDynamicCast that is probably right though
* Add commentary to NSArray+Diffing.h; make multimap elements unowned
* Use std::make_pair, optimize ASLayout+IGListKit
* Oops I thought I had added these headers but nope
* Simplify simplify
* Diff subnodes instead of sublayouts
* Another randomized test with actual ASLayouts
* Adds support for having multiple interface state delegates.
Hopefully in a performant way.
* Switch to respondsToSelector for int del instead of separate object
* Add CHANGELOG
* Make ASDisplayNode+InterfaceState.h public
* Huy's comments
* Don't even bother removing since it's a weak hash table.