Interface Builder

RSS for tag

Build interfaces for applications without writing code using Interface Builder, an editor within Xcode.

Interface Builder Documentation

Posts under Interface Builder tag

142 Posts
Sort by:
Post not yet marked as solved
1 Replies
1k Views
Morning, Is there a way to combine inboxes, trash and junk from multiple accounts in to 1. It's just easier for me to sort emails in 1 location then to have them under individual sections. This used to be a choice. I have Mac.com, 2 google and a other internet account. Thank you
Posted
by
Post not yet marked as solved
12 Replies
11k Views
Hello all, IB Designables Failed to render and update auto layout status for ViewController After updating to XCode 12.1 I get this error every time I open Main.storyboard. I have 3 custom view classes for UIButton, UITextField, UITextView, etc. Tried to update pods and I've deleted DerivedData folder but that didn't fix the issue. What could I do in order to overcome this stubborn issue? Thanks in advance!
Posted
by
Post marked as solved
5 Replies
1.7k Views
How to get rid of this warning? NSToolbarItem.minSize and NSToolbarItem.maxSize methods are deprecated. I do not set minSize or maxSize, it is Interface Builder that seems to do this. Even if I create completely new interface from scratch, this warning still appears. What is the point of introducing this warning if Apple tools unable to produce correct behaviour?
Posted
by
Post not yet marked as solved
0 Replies
495 Views
I am trying to add a border around a AVCaptureVideoPreviewLayer, but the left and right sides of the border get clipped after setting the corner radius to anything above 24. The top and bottom border show. I cannot figure out an explanation for this.
Posted
by
Post not yet marked as solved
1 Replies
643 Views
Yesterday I abandoned Catalina and Xcode 12.3 and installed Big Sur 11.2 (20D64) and Xcode 12.4 on my MacBook Pro 16" top config. Now compiling my app is twice slower, when I select and work on a XIB file the fans begin to run fast and noisy and at any compile-launch I get 57 log messages like this ScanAllPluginsInLibrary: load Library [/System/Library/Filesystems/NetFSPlugins] The are many other smaller troubles but let's focus on these ones. What does it mean ScanAllPluginsInLibrary ? I have been searching on Google and found nothing explaining.
Posted
by
Post marked as solved
4 Replies
2.2k Views
Hi, i'm having this issue using Xcode 12.2 were i can't scroll in horizontal direction a UICollectionView, i have try multiples answers from the forum and none of then work for me first of all what i'm only trying to achieve is the scroll horizontally. Heres my UITableView declaration on the View: }() here's the Delegate and DataSource protocols in VC: } This is the code for UICollectionView declaration on the NumberOfSeasonsCell or UITableViewCell }() Protocols for the UICollectionView } i've read that i should store the last position of the Table for scrolling the UICollectionView but i've tried but not work for me here's the UICollectionViewCell }
Posted
by
Post not yet marked as solved
1 Replies
837 Views
My Xcode can't compile *.xib and this is the error: 2021-06-30 13:34:42.355 ibtoold[5240:180074] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEInterfaceBuilder/IDEInterfaceBuilder-19115.3/InterfaceBuilderKit/Utilities/IBAbstractInterfaceBuilderPlatformToolManager.m:495 Details: Failed to attach to IBAgent-iOS with error: Error Domain=com.apple.InterfaceBuilder Code=-1 "Encountered an error communicating with IBAgent-iOS." UserInfo={NSLocalizedFailureReason=IBAgent-iOS (5309) failed to launch and exited with status 11, NSUnderlyingError=0x7fa995b726f0 {Error Domain=com.apple.InterfaceBuilder Code=-1 "Failed to launch IBAgent-iOS via CoreSimulator spawn" UserInfo={NSLocalizedDescription=Failed to launch IBAgent-iOS via CoreSimulator spawn, NSUnderlyingError=0x7fa995b63350 {Error Domain=com.apple.InterfaceBuilder Code=-1 "Failed to handshake with platform tool" UserInfo={NSLocalizedFailureReason=Failed to open connection over FIFOs with platform tool, NSLocalizedDescription=Failed to handshake with platform tool, NSUnderlyingError=0x7fa995b5e810 {Error Domain=com.apple.InterfaceBuilder Code=-1 "" UserInfo=0x7fa995b5e840 (not displayed)}}}}}, NSLocalizedRecoverySuggestion=Please check Console.app for crash reports for "IBAgent-iOS" for further information., NSLocalizedDescription=Encountered an error communicating with IBAgent-iOS.} Object:   Method:  +_THREADSAFE_launchNewToolWithLaunchContext:executionContext:toolProxyClass:proxyDelegate:failureContext:requestingMethod:error:forReason: Thread:  <NSThread: 0x7fa9e5421b60>{number = 1, name = main} Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide. 2021-06-30 13:34:42.355 ibtoold[5240:180074] [MT] IBPlatformTool: *** Failed to launch tool with description <IBCocoaTouchPlatformToolDescription: 0x7fa995b59330> System content for IBCocoaTouchFramework-EightAndLater <IBScaleFactorDeviceTypeDescription: 0x7fa995b58980> scaleFactor=2x, renderMode.identifier=(null): Encountered an error communicating with IBAgent-iOS. (Failure reason: IBAgent-iOS (5309) failed to launch and exited with status 11): Failed to launch IBAgent-iOS via CoreSimulator spawn: Failed to handshake with platform tool (Failure reason: Failed to open connection over FIFOs with platform tool): : Failed to open FIFOs for handshaking with platform tool (Failure reason: IBAgent-iOS exited before we could handshake) /* com.apple.ibtool.errors */ /Users/white/Downloads/IAPConnect_2.16.7-POC_tmn/IAPWallet/LaunchScreen.storyboard: error: Encountered an error communicating with IBAgent-iOS.   Failure Reason: IBAgent-iOS (5309) failed to launch and exited with status 11   Recovery Suggestion: Please check Console.app for crash reports for "IBAgent-iOS" for further information.   Underlying Errors:     Description: Failed to launch IBAgent-iOS via CoreSimulator spawn     Underlying Errors:       Description: Failed to handshake with platform tool       Failure Reason: Failed to open connection over FIFOs with platform tool       Underlying Errors:         Description:          Recovery Suggestion: Try restarting your computer         Underlying Errors:           Description: Failed to open FIFOs for handshaking with platform tool           Failure Reason: IBAgent-iOS exited before we could handshake macOS: 12.0 Beta (21A5268h) Xcode: 13.0 beta (13A5155e) This happened when I upgraded my macOS and Xcode to beta versions. Now they are beta2 and this error is still there. In Console.app there are many IBAgent-iOS crashes, like below: Incident Identifier: B054FA93-708C-467C-8FFC-BCE93325E057 CrashReporter Key: 0E556268-9A0A-80A5-ED93-2D187F2B194A Hardware Model: MacBookPro17,1 Process: IBAgent-iOS [5309] Path: /Users/USER/Desktop/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/IBAgent-iOS Identifier: com.apple.dt.Xcode Version: 13.0 (19161.15) Code Type: X86-64 (Native) Role: Unspecified Parent Process: ibtoold [5240] Coalition: com.apple.dt.Xcode [2293] Responsible Process: [4617] Date/Time: 2021-06-30 13:34:42.3555 +0800 Launch Time: 2021-06-30 13:34:42.3476 +0800 OS Version: macOS 12.0 (21A5268h) Release Type: User Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Codes: 0x0000000000000001, 0x0000000000000000 VM Region Info: 0 is not in any region. Bytes before following region: 4299710464 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> mapped file 100486000-10048a000 [ 16K] r-x/r-x SM=COW ...t_id=a2f74781 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [5309] Triggered by Thread: 0 Application Specific Information: Thread 0 Crashed: 0 ??? 0x7ff7ffecc118 ??? 1 0x1004b5954 ??? 2 dyld 0x2004c2a32 dyld4::prepareSim(dyld4::RuntimeState&, char const*) + 890 3 dyld 0x2004c16b5 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 244 4 dyld 0x2004c14b4 start + 388 5 dyld 0x2004bc000 ??? Thread 1:: com.apple.rosetta.exceptionserver 0 ??? 0x7ff7ffeb9984 ??? 1 ??? 0x7ff7ffed1320 ??? Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x000000010850daf8 rcx: 0x0000000000000000 rdx: 0x0000000000000001 rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x0000000000000000 rsp: 0x0000000108bbd000 r8: 0x2cbd1c0c97070014 r9: 0x0000000000000000 r10: 0x0000000108bbd000 r11: 0x00000001089c6010 r12: 0x0000000000000000 r13: 0x00000001089c6060 r14: 0x0000000200530080 r15: 0x0000000000000000 rip: rfl: 0x0000000000000283 tmp0: 0x00000001004a4d98 tmp1: 0x00000001004a4090 tmp2: 0x00000002004dba13 Binary Images: 0x0 - 0xffffffffffffffff ??? () <00000000-0000-0000-0000-000000000000> ??? 0x2004bc000 - 0x200523fff dyld () <1051784a-31a4-3307-b922-6e65e511ff69> /usr/lib/dyld EOF
Posted
by
Post not yet marked as solved
2 Replies
1.3k Views
Hi, I using packages to modularize my app's features, so my package contains Views. I'm unable to get the preview working in from any of my packages. SwiftUI preview is complaining that it couldn't find the dependency module. MessageSendFailure: Message send failure for send previewInstances message to agent ================================== | RemoteHumanReadableError | | LoadingError: failed to load library at path "/Users/karthik/Library/Developer/Xcode/DerivedData/WWoC-eovhbulekrmpsfbtdmwyilxornun/Build/Intermediates.noindex/Previews/WWoC/Products/Debug-iphonesimulator/PackageFrameworks/Groups.framework/Groups": Optional(dlopen(/Users/karthik/Library/Developer/Xcode/DerivedData/WWoC-eovhbulekrmpsfbtdmwyilxornun/Build/Intermediates.noindex/Previews/WWoC/Products/Debug-iphonesimulator/PackageFrameworks/Groups.framework/Groups, 0x0000): Library not loaded: @rpath/UIConvenience.framework/UIConvenience | Referenced from: /Users/karthik/Library/Developer/Xcode/DerivedData/WWoC-eovhbulekrmpsfbtdmwyilxornun/Build/Intermediates.noindex/Previews/WWoC/Products/Debug-iphonesimulator/PackageFrameworks/Groups.framework/Groups | Reason: tried: '/Users/karthik/Library/Developer/Xcode/DerivedData/WWoC-eovhbulekrmpsfbtdmwyilxornun/Build/Intermediates.noindex/Previews/WWoC/Products/Debug-iphonesimulator/UIConvenience.framework/UIConvenience' (no such file), '/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/UIConvenience.framework/UIConvenience' (no such file)) I noticed that that the preview starts to work as soon as I remove all the dependencies on a package. It looks like SwiftUI preview is not working for the packages with dependencies. I'm seeing this bug in Xcode 12.5 and in Xcode 13.0 beta 2 ss well. Can some please help me with this bug. At least please confirm if, at all, this feature is implemented in Xcode.
Posted
by
Post marked as solved
2 Replies
468 Views
If i have a *.xib and the source code(Assist, automatic) opened at XCode. The Position in code editor is at a(propably) previous line. Now i scroll to top to add a connection(IBOutlet). After that the editor jumps back to the old line. Also if i scroll to top and select another item at xib and the editor jumps back. Ist there a way to disable this annoing automatism?
Posted
by
Post not yet marked as solved
0 Replies
461 Views
Xcode indexing will cause my Mac Mini (M1) to crash when indexing is active (ON). ===> Xcode Version 12.5.1 (12E507) To test the following, I created a smaller OSX desktop application, compared to my main OSX desktop application, which is significantly larger in scope, and size. That said, I enter the following code in the terminal to activate and deactivate Xcode Indexing: 1. Indexing is active (ON) when applied in the terminal : defaults write com.apple.dt.XCode IDEIndexDisable 0 2. Indexing is NOT active (OFF) when applied in the terminal : defaults write com.apple.dt.XCode IDEIndexDisable 1 The application causing the crash with Xcode Indexing turned (ON), creates a PList file for my main application to use, which is an array of dictionary tuples. This application for the moment, creates a baseline array of 4,000+ dictionary objects with eight (8) tuple objects per dictionary. I use the same design with different, and significantly less information to create other PList array of dictionary objects, such as creating a PList array of dictionary objects for one column of objects instead of my application’s eight tableView columns. The smaller PLlist array of dictionary objects for an identified tableView column contains numeric information, which my application analyses to provide statistical data, such as mean, median, mode, maximum, minimum, number of occurrences, histograms, charts, et al. The smaller PList column application does not crash when Xcode Indexing is active (ON). When Xcode Indexing is active (ON) for the larger PList application the following occurs: 1. Xcode quickly usurps all the RAM in my Mac Mini (M1 - 16 GB). 2. Activity Monitor shows “SourceKitService” climbs steadily to (20 GB) from (140 MB). 3. Activity Monitor shows “swift-frontend” climbs steadily to (80 GB) from (1 GB). 4. Activity Monitor shows “Physical Memory: 16 GB” 5. Activity Monitor shows “Memory Used: 14.01 GB” 6. Activity Monitor shows “Cached Files: 1.91 GB” 7. Activity Monitor shows “Swap Used: 29.49 GB” 8. Activity Monitor shows “App Memory: 3.69 GB” 9. Activity Monitor shows “Wired Memory: 1,012.5 MB” 10. Activity Monitor shows “Compressed: 8.53 GB” 11. Activity Monitor shows “Memory Pressure: Max” My Mac Mini (M1) does not hesitate to show the Force Quit Modal: “Your system has run out of application memory.” Xcode ===> (“Xcode set at 309.0 MB”) Finder ===> (“Finder set at 158.2 MB”) Boom, I must restart my computer. When Xcode Indexing is NOT active (OFF) the following occurs: 1. The Mac Mini (M1) does not crash. 2. My application will NOT allow me to connect to any viewController outlet in my application from any IB. 3. Attempting a connection from IB to the associated properly named “viewController” presents the following error message: ===> Could not insert new action connection: could not find any information for the class named “blah blah blah …” <=== This exercise to turn “ON” and turn “OFF” Xcode indexing for my situation is repeatable. Turning (OFF) Xcode indexing introduces the above "Could not" error message, and turning (ON) Xcode indexing prevents the error message from showing with my smaller indexed applications. So, for the moment, I can manually create an outlet in the “viewController” with copy and paste, “change” the new outlet name and function, then “connect” the IB item to the new viewController outlet, using “control-drag.” This “get-by-product” effort allows me to continue making connections without frustration. For me, and my Mac Xcode programming experience, when Xcode Indexing is “OFF,” all the other internet suggestions to fix the “Could not insert new action connection” failed miserably. Those suggestions obviously worked for the individual poster, but unfortunately not for me. When Xcode crashes with this error, my computer asks to send the issue to Apple, so I say “Yes.” This experience blindly took me more than two months to isolate my application issue, through trial and error, trying to follow the numerous suggestions on the internet to no avail. I turned OFF Xcode Indexing a few months ago to prevent the larger indexing application from crashing. My efforts to resolve the “Could not insert new action” message included: 1. Creating new view controllers. 2. Copying the original viewController code into the new viewController. 3. Clean and rebuild. 4. Delete derived folders. 5. Reviewing possible “Automatic and Manual” assistant editor issues. 5. Believing my suspect object copy methods from one IB to another IB, caused the issue, therefore causing me to rebuild an IB or two from scratch. The Xcode Index crashing issue, and the subsequent “Could not insert new action” issue happens to be annoying, but I am able to continue programming my application without Xcode indexing. My main concern and my current dilemma right now happens to be, what will become of my application, since I cannot index the application without Xcode indexing causing my Mac Mini (M1) to crash … ? Just curious … :] All suggestions, as always, are welcome. Best regards, jim_k
Posted
by
Post not yet marked as solved
2 Replies
832 Views
Hello, Please help me solve this error: IB Designables: Failed to render and update auto layout status for ViewController (BYZ-38-t0r): dlopen(Demo.app, 1): no suitable image found. Did find: Demo.app: mach-o, but not built for platform iOS-sim I create new simple application. Then I create custom view with IB Designables and this broke Storyboard. I have a lot of projects in which I use Storyboard and now I cannot edit them. Thanks. Xcode: 12.5.1 (12E507) MacOS: 11.5.1 (20G80) Chip: Apple M1
Posted
by
Post not yet marked as solved
2 Replies
436 Views
I subclassed an UIView that is supposed to create it's owned constraints: @IBDesignable class MyCtrl: UIView { var label: UITextField! var _internalLayout = false public override init(frame: CGRect) { super.init(frame: frame) _init() } public required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) _init() } open override func prepareForInterfaceBuilder() { super.prepareForInterfaceBuilder() self._init() self.setNeedsDisplay() } func _init() { label = UITextField() addSubview(label) super.backgroundColor = .cyan #if TARGET_INTERFACE_BUILDER translatesAutoresizingMaskIntoConstraints = true #else translatesAutoresizingMaskIntoConstraints = false #endif } override public func layoutSubviews() { if _internalLayout { _internalLayout = false return } let theOrientation = orientation setupConstraints(theOrientation) super.layoutSubviews() } func setupConstraints(_ orientation: IosTraitClass) { _internalLayout = true superview?.removeConstraints(superview!.constraints) if orientation == .CR { label.text = "setupConstraints(.CR \(superview?.frame.size.width)" label.sizeToFit() superview?.addConstraint(NSLayoutConstraint(item: self, attribute: .leading, relatedBy: .equal, toItem: superview , attribute: .leading , multiplier: 1, constant: 30)) superview?.addConstraint(NSLayoutConstraint(item: self, attribute: .top, relatedBy: .equal, toItem: superview, attribute: .top, multiplier: 1, constant: 100)) superview?.addConstraint( NSLayoutConstraint(item: self, attribute: .width, relatedBy: .equal, toItem: .none, attribute: .notAnAttribute, multiplier: 1, constant: (superview?.frame.size.width ?? 0)-60)) superview?.addConstraint(NSLayoutConstraint(item: self, attribute: .height, relatedBy: .equal, toItem: .none, attribute: .notAnAttribute, multiplier: 1, constant: (superview?.frame.size.height ?? 0)-300)) } else if orientation == .RC || orientation == .CC { label.text = "setupConstraints(.CC ou .RC \(superview?.frame.size.width)" label.sizeToFit() superview?.addConstraint(NSLayoutConstraint(item: self, attribute: .trailing, relatedBy: .equal, toItem: superview, attribute: .trailing, multiplier: 1, constant: -50)) superview?.addConstraint(NSLayoutConstraint(item: self, attribute: .top, relatedBy: .equal, toItem: superview, attribute: .top, multiplier: 1, constant: 50)) superview?.addConstraint( NSLayoutConstraint(item: self, attribute: .width, relatedBy: .equal, toItem: .none, attribute: .notAnAttribute, multiplier: 1, constant: (superview?.frame.size.width ?? 0)-100)) superview?.addConstraint(NSLayoutConstraint(item: self, attribute: .height, relatedBy: .equal, toItem: .none, attribute: .notAnAttribute, multiplier: 1, constant: (superview?.frame.size.height ?? 0)-100)) } } } In the method layoutSubviews of my component, I called orientation which is an extension of UIView: public var orientation: IosTraitClass { if UIScreen.main.traitCollection.horizontalSizeClass == .regular && UIScreen.main.traitCollection.verticalSizeClass == .compact { return .RC } else if UIScreen.main.traitCollection.horizontalSizeClass == .compact && UIScreen.main.traitCollection.verticalSizeClass == .regular { return .CR } else if UIScreen.main.traitCollection.horizontalSizeClass == .compact && UIScreen.main.traitCollection.verticalSizeClass == .compact { return .CC } else if UIScreen.main.traitCollection.horizontalSizeClass == .regular && UIScreen.main.traitCollection.verticalSizeClass == .regular { return .RR } else { return .none } } Finally I made a UIViewController: class ViewController: UIViewController { @IBOutlet weak var container: MyCtrl! override func viewDidLoad() { super.viewDidLoad() setupConstraints() } func setupConstraints() { container.setupConstraints(view.orientation) } func calculatedConstraints() -> [NSLayoutConstraint] { return []; var constraints = [NSLayoutConstraint]() container.removeConstraints(container.constraints) if view.orientation == .CR { //constraints.append(contentsOf: container.setSize(width: (view?.frame.size.width ?? 0)-60, height: (view?.frame.size.height ?? 0)-300)) } else { //constraints.append(contentsOf: container.setSize(width: (view?.frame.size.width ?? 0)-40, height: (view?.frame.size.height ?? 0)-100)) } return constraints } override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { container.setupConstraints(view.orientation) super.viewWillTransition(to: size, with: coordinator) } } When I run my program the constraints are well applied in landscape or portrait mode. But when I look in the interface Builder, constraints are not applied, and I don't understand Why
Posted
by
Post not yet marked as solved
2 Replies
283 Views
Hello good afternoon, I'm having an issue on xcode, when trying to create an outlet for an imageview the popup to create the outlet does not appear. As a result, making it impossible to interact with it coding wise, any way to solve this issue.
Posted
by
Post not yet marked as solved
11 Replies
4.2k Views
Hello everyone! I has tried build an exists iOS app on Xcode 13 beta 4. The building process finished with issues of building storyboards. Even more, Xcode is crashed when I open this storyboard. The error: /* com.apple.ibtool.errors */ /path-to-storyboard/main.storyboard: error: Compilation Failed.     Underlying Errors:         Description: Encountered an error communicating with IBAgent-iOS.         Failure Reason: IBAgent-iOS (51126) failed to launch and exited with status 5         Recovery Suggestion: Please check Console.app for crash reports for "IBAgent-iOS" for further information.         Underlying Errors:             Description: Failed to launch IBAgent-iOS via CoreSimulator spawn             Underlying Errors:                 Description: Failed to handshake with platform tool                 Failure Reason: Failed to keep platform tool alive                 Underlying Errors:                     Description: Failed to keep launch platform tool and keep alive                     Recovery Suggestion: Try restarting your computer                     Underlying Errors:                         Description: Failed to communicate with helper tool                         Failure Reason: The tool closed the connection I see following issue in console.app: Application Specific Information: dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH= DYLD_FRAMEWORK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks BUG IN LIBDISPATCH: Failed to create fd to simulator memory pressure file
Posted
by
Post marked as solved
2 Replies
681 Views
Hi I am having an issue with the Back Button on my Navigation Controller. It looks as though the hitbox of button is misaligned, as although you can tap the button, it doesn't take you back a page like the back button should do. Below is an image showing the hittable areas. The green outlined areas work correctly, the red outlined area does not. Here is a video with the issue as well. The video shows me tapping on the back button a bunch of times without the button actually working. The final time I press the button I press it at the far right green area shown in the photo. https://youtu.be/LuWdYbl0BwM This is the default back button that comes with the Navigation Controller. I tried with a new UiBarButton that I added but I get the same issue. Has anyone had an issue like this before? Thanks!
Posted
by
Post not yet marked as solved
1 Replies
284 Views
Hi! Im trying to run a .sh script from Xcode AppDelegate.swift like so: @IBOutlet weak var Startsh: NSButtonCell!   @IBAction func Startsh(_ sender: NSButton) {     sender.isEnabled = true     let task = Process()     task.launchPath = "/Users/xxxxx/zzzzzzz1_0_5_sh"     task.waitUntilExit()   } I have also linked my Start-button to Mainmenu.xib App Delegate Received Action called Startsh But after building succesfully and running I can't see on terminal-window that .sh process running. I'v been trying and studying without any results. Kilke56
Posted
by
Post not yet marked as solved
1 Replies
485 Views
MacMini (M1) with Xcode (12.5.1), and Big Sur (11.5.2). I am exploring different avenues to illustrate my application’s multiple tuple value occurrence results between tableView columns: 1. The application provides a method to display each resultant value occurrence as an array of dictionary objects (tuples) within a new tableView. 2. The application provides separate viewControllers to illustrate the different resultant data sources with different record counts. 3. The application wants each tableView aligned within an associated tabView. 4. Engaging “NSTabViewController” with the object’s separate viewControllers seemed logical. That said, I have a repeatable fault issue with NSTabViewController, as follows: 1. I add a windowController and associated viewController to the application storyboard to control the window. 2. I add a containerView to the windowController - viewController. 3. I add an “NSTabViewController” to the application storyboard. 4. I try to connect (imbed) the “NSTabViewController” to the containerView. 5. The application crashes with immediate effect. 6. Xcode illustrates an error report moments later, where I acknowledge the report, and the report is sent to Apple. 7. The application restarts, I want to delete the “NSTabViewController,” I touch the object, and the application crashes once again. 8. Very repeatable, and I send another report to Apple. Caveat (somewhat): 1. I resurrect a previous unblemished application copy from my back-up storage. 2. I repeat the same storyboard process. 3. I add four (4) more viewControllers to the “NSTabViewController” as a viewController limit test, where the total is now six (6). 4. I connect (imbed) the “NSTabViewController” to the containerView. 5. The application does NOT crash. - (at least not yet) 6. I save the application, and restart the application. 7. I try to add one more viewController to the “NSTabViewController,” again as a viewController limit test. 8. The application crashes again with immediate effect. 9. The application restarts, where I want to delete the “windowController et al grouping.” 10. This time, I touch the connected windowController object, and the application crashes. 11. Very repeatable, and I send another report to Apple. So, I have a partial crash report from a a previous session listed below, where the original happens to be too long to post, and unfortunately I do not understand what this report tells me could be the cause of the repeatable issue. I notice the report states “a different number of items than controllers,” and the comment “this shouldn’t happened.” Again, and for the moment, just a current lack of “Swift knowledge.” Just curious whether this is a known bug with “NSTabViewController” in macOS, or an obvious method error by me … ? Your suggestions are welcome. Best regards, jim_k The_TabViewController_Crash_Report_(210817) Process: Xcode [568] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 12.5.1 (18212) Build Info: IDEFrameworks-18212000000000000~4 (12E507) App Item ID: 497799835 App External ID: 842555601 Code Type: ARM-64 (Native) Parent Process: ??? [1] Responsible: Xcode [568] User ID: 501 Date/Time: 2021-08-17 19:07:32.259 -0600 OS Version: macOS 11.5 (20G71) Report Version: 12 Anonymous UUID: B35E6E7E-0543-C17D-0AF0-F408BA4CDFDC Time Awake Since Boot: 120 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Application Specific Information: ProductBuildVersion: 12E507 ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEInterfaceBuilder/IDEInterfaceBuilder-18122/CocoaIntegration/WidgetIntegration/TabViewController/IBNSTabViewControllerIntegration.m:316 Details: We have a different number of items (4) than controllers (3). This shouldn't happend. Object: <IBNSTabViewController: 0x16e285760> Method: -ibTitleForItemAtIndex: Thread: <NSThread: 0x12f629f90>{number = 1, name = main} Open FDs: 43/7168 Hints: 0: DVTControllerContentView_ControlledBy_IBInspectorViewController 1: IDEUtilityDisclosureView 2: DVTStackView_ML
Posted
by
Post marked as solved
5 Replies
566 Views
I want to have a single window and use buttons to change between VCs A/B/C in that window. (Let's say it's a game and I want to freely move between a map view, a budget view, and a diplomacy view.) No problem on iOS, but on macOS it always wants to open new windows. I want to know the minimum necessary to either: A) Create a window and move between VCs with buttons (i.e., back button, menu button, …) or B) Hook up a split view controller so I can change the VC on the right from buttons on the left. A skeleton project, a tutorial compatible with XCode 12.5, an annotated screenshot, a backmasked Led Zeppelin album… it's been 3 days and I've tried so many things, read so many tutorials, dev docs, that they're all jumbled in my head making it worse. Please save me before I code again!
Posted
by