Post

Replies

Boosts

Views

Activity

ibtool omits "Estimate Size: Automatic" from compiled nibs when deployment target is iOS 17+
I found that Xcode 26.1.1 (17B100) silently disables UICollectionView self-sizing configured in Interface Builder, depending on the minimum deployment target. I've fixed this issue in my project by explicitly setting the estimatedItemSize to UICollectionViewFlowLayout.automaticSize, but I was wondering whether this is intended behavior, or am I missing something? When a XIB contains a UICollectionViewFlowLayout with Estimate Size: Automatic (automaticEstimatedItemSize="YES" in the document source): <collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" automaticEstimatedItemSize="YES" minimumLineSpacing="6" minimumInteritemSpacing="6"> <size key="itemSize" width="128" height="32"/> </collectionViewFlowLayout> ibtool drops the estimated-size key from the compiled nib if IPHONEOS_DEPLOYMENT_TARGET is 17.0 or later. It can be confirmed by compiling the same XIB at two deployment targets: $ ibtool --target-device iphone --minimum-deployment-target 16.0 --compile out16.nib View.xib $ strings out16.nib | grep -i estimat estimatedItemSize # present $ ibtool --target-device iphone --minimum-deployment-target 17.0 --compile out17.nib View.xib $ strings out17.nib | grep -i estimat # (nothing - key is gone) At runtime the flow layout decodes estimatedItemSize = .zero, so self-sizing is silently disabled and every cell is laid out at the placeholder Cell Size (128x32 above), regardless of its content: decoded estimatedItemSize = (0.0, 0.0), itemSize = (128.0, 32.0) // target 17.0 decoded estimatedItemSize = (1.79e+308, 1.79e+308) // target 16.0, works This is independent of the runtime OS version — I reproduced it on iOS 18.4 and iOS 26.1 simulators. The information is simply missing from the compiled nib, and no build warning or error is emitted. Confusingly, UIKit still calls the cell's preferredLayoutAttributesFitting(_:), so cells appear to compute correct sizes; they are just never adopted by the layout, which makes this quite hard to debug. Workaround — set it in code after the nib loads (the XIB cannot be fixed at the source level because the attribute is dropped at compile time): (collectionView.collectionViewLayout as? UICollectionViewFlowLayout)?.estimatedItemSize = UICollectionViewFlowLayout.automaticSize I attached minimal reproduction project (toggle IPHONEOS_DEPLOYMENT_TARGET between 16.0 and 17.0 to see both behaviors) to the feedback filed as FB23526517
0
0
76
Jul ’26
Error Missing required module 'RxCocoaRuntime' in xcframeworks
Hi. I have a xcframework that has a dependency on 'RxSwift' and 'RxCocoa'. I deployed it using SPM by embedding it in a Swift Package. However when I import swift package into another project, I keep getting the following error: "Missing required module 'RxCocoaRuntime" How can I fix this? Below are the steps to reproduce the error. Steps Create Xcode proejct, make a dependency on 'RxSwift' and 'RxCocoa' (no matter doing it through tuist or cocoapods) Create XCFramework from that proejct. (I used commands below) xcodebuild archive \ -workspace SimpleFramework.xcworkspace \ -scheme "SimpleFramework" \ -destination "generic/platform=iOS" \ -archivePath "./SimpleFramework-iphoneos.xcarchive" \ -sdk iphoneos \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES xcodebuild archive \ -workspace SimpleFramework.xcworkspace \ -scheme "SimpleFramework" \ -archivePath "./SimpleFramework-iphonesimulator.xcarchive" \ -sdk "iphonesimulator" \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES xcodebuild -create-xcframework \ -framework "./SimpleFramework-iphoneos.xcarchive/Products/Library/Frameworks/SimpleFramework.framework" \ -framework "./SimpleFramework-iphonesimulator.xcarchive/Products/Library/Frameworks/SimpleFramework.framework" \ -output "./SimpleFramework.xcframework" Embed in Swift Package, and deploy. // swift-tools-version: 6.0 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "SimplePackage", platforms: [.iOS(.v16)], products: [ .library( name: "SimplePackage", targets: ["SimplePackage"]), ], dependencies: [ .package(url: "https://github.com/ReactiveX/RxSwift", from: "6.8.0") ], targets: [ .binaryTarget( name: "SimpleFramework", path: "Sources/SimpleFramework.xcframework" ), .target( name: "SimplePackage", dependencies: [ "SimpleFramework", "RxSwift", .product(name: "RxCocoa", package: "RxSwift") ] ) ] ) Download Swift Package in another project and import module. I resolved this by removing dependencies from the Swift Package, downloading package in another project, and fetching dependencies by cocoapods. Thist works, but I don't want to use another dependency manager while using SPM. Development Environment CPU : Apple M4 Max MacOS : Sequoia 15.3 Xcode : 16.2
0
0
352
Mar ’25
ibtool omits "Estimate Size: Automatic" from compiled nibs when deployment target is iOS 17+
I found that Xcode 26.1.1 (17B100) silently disables UICollectionView self-sizing configured in Interface Builder, depending on the minimum deployment target. I've fixed this issue in my project by explicitly setting the estimatedItemSize to UICollectionViewFlowLayout.automaticSize, but I was wondering whether this is intended behavior, or am I missing something? When a XIB contains a UICollectionViewFlowLayout with Estimate Size: Automatic (automaticEstimatedItemSize="YES" in the document source): <collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" automaticEstimatedItemSize="YES" minimumLineSpacing="6" minimumInteritemSpacing="6"> <size key="itemSize" width="128" height="32"/> </collectionViewFlowLayout> ibtool drops the estimated-size key from the compiled nib if IPHONEOS_DEPLOYMENT_TARGET is 17.0 or later. It can be confirmed by compiling the same XIB at two deployment targets: $ ibtool --target-device iphone --minimum-deployment-target 16.0 --compile out16.nib View.xib $ strings out16.nib | grep -i estimat estimatedItemSize # present $ ibtool --target-device iphone --minimum-deployment-target 17.0 --compile out17.nib View.xib $ strings out17.nib | grep -i estimat # (nothing - key is gone) At runtime the flow layout decodes estimatedItemSize = .zero, so self-sizing is silently disabled and every cell is laid out at the placeholder Cell Size (128x32 above), regardless of its content: decoded estimatedItemSize = (0.0, 0.0), itemSize = (128.0, 32.0) // target 17.0 decoded estimatedItemSize = (1.79e+308, 1.79e+308) // target 16.0, works This is independent of the runtime OS version — I reproduced it on iOS 18.4 and iOS 26.1 simulators. The information is simply missing from the compiled nib, and no build warning or error is emitted. Confusingly, UIKit still calls the cell's preferredLayoutAttributesFitting(_:), so cells appear to compute correct sizes; they are just never adopted by the layout, which makes this quite hard to debug. Workaround — set it in code after the nib loads (the XIB cannot be fixed at the source level because the attribute is dropped at compile time): (collectionView.collectionViewLayout as? UICollectionViewFlowLayout)?.estimatedItemSize = UICollectionViewFlowLayout.automaticSize I attached minimal reproduction project (toggle IPHONEOS_DEPLOYMENT_TARGET between 16.0 and 17.0 to see both behaviors) to the feedback filed as FB23526517
Replies
0
Boosts
0
Views
76
Activity
Jul ’26
Error Missing required module 'RxCocoaRuntime' in xcframeworks
Hi. I have a xcframework that has a dependency on 'RxSwift' and 'RxCocoa'. I deployed it using SPM by embedding it in a Swift Package. However when I import swift package into another project, I keep getting the following error: "Missing required module 'RxCocoaRuntime" How can I fix this? Below are the steps to reproduce the error. Steps Create Xcode proejct, make a dependency on 'RxSwift' and 'RxCocoa' (no matter doing it through tuist or cocoapods) Create XCFramework from that proejct. (I used commands below) xcodebuild archive \ -workspace SimpleFramework.xcworkspace \ -scheme "SimpleFramework" \ -destination "generic/platform=iOS" \ -archivePath "./SimpleFramework-iphoneos.xcarchive" \ -sdk iphoneos \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES xcodebuild archive \ -workspace SimpleFramework.xcworkspace \ -scheme "SimpleFramework" \ -archivePath "./SimpleFramework-iphonesimulator.xcarchive" \ -sdk "iphonesimulator" \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES xcodebuild -create-xcframework \ -framework "./SimpleFramework-iphoneos.xcarchive/Products/Library/Frameworks/SimpleFramework.framework" \ -framework "./SimpleFramework-iphonesimulator.xcarchive/Products/Library/Frameworks/SimpleFramework.framework" \ -output "./SimpleFramework.xcframework" Embed in Swift Package, and deploy. // swift-tools-version: 6.0 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "SimplePackage", platforms: [.iOS(.v16)], products: [ .library( name: "SimplePackage", targets: ["SimplePackage"]), ], dependencies: [ .package(url: "https://github.com/ReactiveX/RxSwift", from: "6.8.0") ], targets: [ .binaryTarget( name: "SimpleFramework", path: "Sources/SimpleFramework.xcframework" ), .target( name: "SimplePackage", dependencies: [ "SimpleFramework", "RxSwift", .product(name: "RxCocoa", package: "RxSwift") ] ) ] ) Download Swift Package in another project and import module. I resolved this by removing dependencies from the Swift Package, downloading package in another project, and fetching dependencies by cocoapods. Thist works, but I don't want to use another dependency manager while using SPM. Development Environment CPU : Apple M4 Max MacOS : Sequoia 15.3 Xcode : 16.2
Replies
0
Boosts
0
Views
352
Activity
Mar ’25