Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error sending to Apple #59

Closed
sLm-s opened this issue Feb 13, 2018 · 23 comments
Closed

Error sending to Apple #59

sLm-s opened this issue Feb 13, 2018 · 23 comments

Comments

@sLm-s
Copy link

sLm-s commented Feb 13, 2018

Can not fill application.

ERROR ITMS-90087: "Unsupported Architectures. The executable for Programme.app/Frameworks/FlexLayout.framework/Frameworks/YogaKit.framework contains unsupported architectures '[x86_64, i386]'."

ERROR ITMS-90685: "CFBundleIdentifier Collision. There is more than one bundle with the CFBundleIdentifier value 'com.facebook.YogaKit' under the iOS application 'Programme.app'."

ERROR ITMS-90205: "Invalid Bundle. The bundle at 'Programme.app/Frameworks/FlexLayout.framework' contains disallowed nested bundles."

ERROR ITMS-90206: "Invalid Bundle. The bundle at 'Programme.app/Frameworks/FlexLayout.framework' contains disallowed file 'Frameworks'."

@lucdion
Copy link
Member

lucdion commented Feb 13, 2018

@sLm-s, sorry for that. Are you using Carthage for FlexLayout?

@sLm-s
Copy link
Author

sLm-s commented Feb 13, 2018

Yes

@sLm-s
Copy link
Author

sLm-s commented Feb 13, 2018

With a CocoaPods, everything is working fine

@lucdion
Copy link
Member

lucdion commented Feb 13, 2018

Do you absolutely need to use Carthage in your situation?

@sLm-s
Copy link
Author

sLm-s commented Feb 13, 2018

At the moment not necessarily. Installed your library through Cocoapods but in the future if you would not be difficult would not bad to work all and on Carthage

@lucdion
Copy link
Member

lucdion commented Feb 13, 2018

Yes sure, I'll try to fix it as soon as possible.

@zintus
Copy link
Collaborator

zintus commented Feb 26, 2018

@sLm-s I believe issue you're experiencing is related to following thread Carthage/Carthage#1927

Looks like FlexLayout carthage configuration should be updated to not have nested framework dependencies, as they're not supported by platform.

@lucdion
Copy link
Member

lucdion commented Feb 26, 2018

@sLm-s, this has been fixed in the release 1.3.0, FlexLayout now integrates Yoga's source code, so this issue is resolved.

@sLm-s
Copy link
Author

sLm-s commented Feb 27, 2018

Hi Luc Dion. Thank you very much for the correction.

@sLm-s
Copy link
Author

sLm-s commented Feb 27, 2018

@lucdion Is it possible to make the same animation as in UIStackView. For example, hide an object with animation UIView.animate

@sLm-s
Copy link
Author

sLm-s commented Feb 27, 2018

For example, like this.


class ViewController: UIViewController {
    
    
    lazy var buttonAnimate: UIButton = {
        let button = UIButton(type: .system)
        button.setTitle("Start Animate", for: .normal)
        button.addTarget(self, action: #selector(handlerButtonAnimate), for: .touchUpInside)
        button.translatesAutoresizingMaskIntoConstraints = false
        return button
    }()
    
    
    let stack: UIStackView = {
        let stack = UIStackView()
        stack.axis = .horizontal
        stack.alignment = .fill
        stack.distribution = .fillProportionally
        stack.translatesAutoresizingMaskIntoConstraints = false
        return stack
    }()
    
    
    let label_1: UILabel = {
        let label = UILabel()
        label.text = "TEST LABEL_1"
        label.backgroundColor = .red
        label.translatesAutoresizingMaskIntoConstraints = false
        return label
    }()
    
    let label_2: UILabel = {
        let label = UILabel()
        label.text = "TEST LABEL_1"
        label.backgroundColor = .blue
        label.translatesAutoresizingMaskIntoConstraints = false
        return label
    }()

    override func viewDidLoad() {
        super.viewDidLoad()
        
        stack.addArrangedSubview(label_1)
        stack.addArrangedSubview(label_2)
        
        
        
        
        view.addSubview(stack)
        view.addSubview(buttonAnimate)
        
        
        NSLayoutConstraint.activate([
            stack.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 16),
            stack.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -16),
            stack.centerYAnchor.constraint(equalTo: view.centerYAnchor),
            stack.heightAnchor.constraint(equalToConstant: 60),
            
            buttonAnimate.topAnchor.constraint(equalTo: stack.bottomAnchor, constant: 16),
            buttonAnimate.centerXAnchor.constraint(equalTo: view.centerXAnchor)
            ])
        
        
        
    }

    
    
    @objc func handlerButtonAnimate(sender: UIButton) {
        
        UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
            self.label_2.isHidden = true
        }) { (completed) in
            UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
                self.label_2.isHidden = false
                self.stack.layoutIfNeeded()
            }, completion: nil)
        }
    }


}

@sLm-s
Copy link
Author

sLm-s commented Feb 27, 2018

Now displays this warning.
:1:1: Umbrella header for module 'FlexLayout' does not include header 'YGNodeList.h'

@lucdion
Copy link
Member

lucdion commented Feb 27, 2018

@sLm-s, you can try by setting the item's width to zero and layout the flex container, something like that should work:

UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
            self.label_2.flex.width(0)
            self.flexContainer.layout()
        }) { (completed) in
            UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
 
                // reset to the default item's width
                self.label_2.flex.width(nil)
                self.flexContainer.layout()
            }, completion: nil)
        }

@sLm-s
Copy link
Author

sLm-s commented Feb 28, 2018

@lucdion Thank you so much. Everything works perfectly.

@sLm-s
Copy link
Author

sLm-s commented Feb 28, 2018

@lucdion Maybe I'm doing something wrong. But in my flex not correctly rasichtyvaet the size of the text. In the previous version, the same code worked fine



class ViewController: UIViewController {
    
    
    lazy var buttonAnimate: UIButton = {
        let button = UIButton(type: .system)
        button.setTitle("Start Animate", for: .normal)
        button.addTarget(self, action: #selector(handlerButtonAnimate), for: .touchUpInside)
//        button.translatesAutoresizingMaskIntoConstraints = false
        return button
    }()
    
    
    let stack: UIStackView = {
        let stack = UIStackView()
        stack.axis = .horizontal
        stack.alignment = .fill
        stack.distribution = .fillProportionally
//        stack.translatesAutoresizingMaskIntoConstraints = false
        return stack
    }()
    
    
    let label_1: UILabel = {
        let label = UILabel()
        label.text = "TEST LABEL_1 tex"
        label.backgroundColor = .red
        label.numberOfLines = 0
//        label.translatesAutoresizingMaskIntoConstraints = false
        return label
    }()
    
    let label_2: UILabel = {
        let label = UILabel()
        label.text = "TEST LABEL_2 tex"
        label.backgroundColor = .blue
        label.numberOfLines = 0
//        label.translatesAutoresizingMaskIntoConstraints = false
        return label
    }()
    
    let titleLabel: UILabel = {
        let label = UILabel()
        label.textColor = .black
        label.numberOfLines = 0
        label.text = "Headline small test test"
        label.font = UIFont.systemFont(ofSize: 18)
        return label
    }()
    
    let infoLabel: UILabel = {
        let label = UILabel()
        label.textColor = .lightGray
        label.text = "If I'm not mistaken, then flex incorrectly calculates the dimensions If I'm not mistaken, then flex incorrectly calculates the dimensions If I'm not mistaken, then flex incorrectly calculates the dimensions"
        label.numberOfLines = 0
        label.font = UIFont.systemFont(ofSize: 16)
        return label
    }()

    let rootFlexContainer = UIView()
    
    
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        
        rootFlexContainer.flex.layout(mode: .adjustHeight)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

        rootFlexContainer.flex.paddingHorizontal(16).define { (flex) in
            flex.addItem(titleLabel).alignSelf(.center)
            flex.addItem(infoLabel).marginTop(16)
            flex.addItem(label_2).alignSelf(.center).marginTop(16)
            flex.addItem(buttonAnimate).marginTop(16).alignSelf(.center)
        }

        self.view.addSubview(rootFlexContainer)
        
        rootFlexContainer.translatesAutoresizingMaskIntoConstraints = false
        
        NSLayoutConstraint.activate([
            rootFlexContainer.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 16),
            rootFlexContainer.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -16),
            rootFlexContainer.centerYAnchor.constraint(equalTo: view.centerYAnchor)
            ])


        
    }

    
    
    @objc func handlerButtonAnimate(sender: UIButton) {
        
        
        UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
//            self.label_1.flex.alignSelf(.start)
            self.label_2.flex.width(0)
            self.rootFlexContainer.flex.layout()
        }) { (completed) in
            UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
                
                // reset to the default item's width
                self.label_2.flex.width(nil)
                self.rootFlexContainer.flex.layout()
            }, completion: nil)
        }

    }


}

simulator screen shot - iphone 8 - 2018-02-28 at 11 43 05

@sLm-s
Copy link
Author

sLm-s commented Feb 28, 2018

@lucdion But if you install via the cocoapods the text size correctly counts but there was another error you can not set the size in "nill".

simulator screen shot - iphone 8 - 2018-02-28 at 11 58 53

2018-02-28 11 58 24

@lucdion
Copy link
Member

lucdion commented Feb 28, 2018

@sLm-s have you updated your pods: pod update. You should have the FlexLayout version 1.3.2. Same thing for Carthage.

@sLm-s
Copy link
Author

sLm-s commented Feb 28, 2018

@lucdion Yes, I'm using the latest version 1.3.2. FlexLayout incorrectly calculates the size of the UILabel. Through the cocoapods everything works correctly. Perhaps this is due to a previous warning
Umbrella header for module 'FlexLayout' does not include header 'YGNodeList.h'

2018-02-28 19 46 14

@lucdion
Copy link
Member

lucdion commented Feb 28, 2018

It is really strange. I have this little dummy project that use Carthage that compile perfectly 🤔

PinLayoutCarthageTest.zip

@zintus
Copy link
Collaborator

zintus commented Feb 28, 2018

@sLm-s Label truncation issues could be related to rounding issues, fixed by #63

Please give version 1.3.3 a try.

@sLm-s
Copy link
Author

sLm-s commented Feb 28, 2018

Here is my project.

TestFlexLayout.zip

@sLm-s
Copy link
Author

sLm-s commented Feb 28, 2018

Yes, it worked. Thank you so much.

@lucdion
Copy link
Member

lucdion commented Feb 28, 2018

Thanks @zintus 👍

@lucdion lucdion closed this as completed Mar 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants