Comments (1)
Hello I've same issue, encountered a crash issue related to infinite recursion in the view hierarchy manipulation when attempting to modify the layer hierarchy to prevent screenshots. This occurs specifically during the traversal by +[FBSDKViewHierarchy recursiveGetLabelsFromView:] method in the Facebook iOS SDK.
The manipulation involves making a UITextField secure and non-interactive, and then adjusting its layer within the hierarchy. This process seems to trigger an infinite loop in the hierarchy search, leading to a crash.
Here's the code snippet that leads to this issue:
let textField = UITextField()
textField.isSecureTextEntry = true
textField.isUserInteractionEnabled = false
self.addSubview(textField)
textField.centerYAnchor.constraint(equalTo: self.centerYAnchor).isActive = true
textField.centerXAnchor.constraint(equalTo: self.centerXAnchor).isActive = true
textField.layer.removeFromSuperlayer()
self.layer.superlayer?.insertSublayer(textField.layer, at: 0)
textField.layer.sublayers?.last?.addSublayer(self.layer)
After the textField is configured and its layer is rearranged in the hierarchy, the SDK's method for traversing the view hierarchy seems to enter an infinite recursion, causing a crash.
To address this, I propose introducing a limit to the depth of recursion in the +[FBSDKViewHierarchy recursiveGetLabelsFromView:] method. Implementing a recursion depth limit could prevent such crashes by avoiding infinite loops in scenarios where complex layer manipulations lead to cyclic dependencies in the view hierarchy.
This suggestion aims to enhance the stability of the SDK when handling complex view and layer hierarchies, preventing crashes and improving overall usability.
from facebook-ios-sdk.
Related Issues (20)
- ld: symbol(s) not found for architecture arm64 (Flutter) HOT 5
- iOS SDK API does not work even after performing all requested actions
- Privacy manifests only included in release 17.0.0 with breaking changes HOT 13
- Xcode15.3: After updating SDKv17.0.0 through SPM, an error occurred while running the project: dyld [5199]: Library not loaded: @ rpath/FBSDKCoreKit. framework/FBSDKCoreKit, unable to start the application HOT 12
- unity sdk 17.0.0 how date update ?
- App is live but only approved testers can login (using limited login on 17.0.0) HOT 9
- Limited Login Failed on iOS 17 HOT 2
- Facebook Login using SDK 17.0.0 always displays a limited login warning HOT 2
- Warning Issue with FBAudienceNetwork 6.15.0 Upgrade via Cocoapods HOT 1
- m.facebook.com
- apps.microsoft.com
- Get wrong first name from `Profile.current?.firstName`
- FBSDKShareVideo failed, Error Message:"FBSDKErrorDeveloperMessageKey=Must refer to an asset file." HOT 1
- Multiple FBAudienceNetwork pod spec for the same version HOT 1
- Swift Package version 17.0.0 fails on Xcode 15.3
- SDK v17.0.0 may not get valid AccessToken immediately after call ApplicationDelegate didFinishLaunchingWithOptions
- v17.0.0 Invalid access tokenString HOT 10
- sdk17.0.0 iOS系统17以上 登录不了 token验证失败 HOT 2
- limited login auth token not refreshed when trackingPreference not explicitly passed in login config
- AuthenticationToken.current == nil
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 facebook-ios-sdk.