Interface Builder

RSS for tag

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

Posts under Interface Builder tag

200 Posts

Post

Replies

Boosts

Views

Activity

NSNumberFormatter wrongfully displays 16-bit unsigned int as signed
Hi all, My interface displays a text field bound to an NSNumber that I use internally as unsigned int. That NSNumber is actually saved with Core Data as Integer 16. However, the interface displays the number signed, meaning anything above 32.768 is actually shown to be negative. I couldn't find a way to force my NSNumberFormatter to display unsigned numbers. Setting the minimum value to 0 also doesn't work, since internally it's gonna be positive anyway. Could you help me display my 16-bit integer as an unsigned int between 0 and 65.535? I am building a macOS app using Objective-C, macOS SDK 10.14 and Xcode 14.3.1.
1
0
697
Aug ’23
Xcode Application Continuous (OSX) Indexing Crash Problem
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
2
0
2.8k
Aug ’23
Need help on using this function
I am very new to Swift and I am trying to use this function so my app doesn't trigger the Apple Pay notification. (requestAutomaticPassPresentationSuppression) I am working on react-native. I am trying to create a native module so I can import this function but I am very new to Swift. At this point, I am a bit stuck. Any help would be great. Thank you
1
0
1.2k
Aug ’23
UITabBarController is unsupported as viewController
Hi, I'm testing one of my app on iOS 14 with Xcode 12 beta 3 (12A8169g) and I have a problem with my storyboards. Xcode give me this error for all the storyboards that contain a split view controller: An internal error occurred. Editing functionality may be limited. The log generated by the Xcode "Report a bug" button say: Exception name: NSInvalidArgumentException Exception reason: UITabBarController is unsupported as viewController for -[UISplitViewController setViewController:forColumn:] in Primary column It worked correctly on Xcode 12 beta 2. Has anyone encountered the same problem and found a way to fix it? Thank you
7
0
2.9k
Jul ’23
Xcode 15 Beta - Could not instantiate class named _UIRecessedMaterialView because no class named _UIRecessedMaterialView was found
This is a very annoying error which is causing a crash in my app. The error description is very vague and I'm guessing mostly related to oddities of Xcode 15 Beta. Here is the full error stack: *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UIRecessedMaterialView because no class named _UIRecessedMaterialView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)' *** First throw call stack: ( 0 CoreFoundation 0x00007ff80048c88a __exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007ff800057894 objc_exception_throw + 48 2 CoreFoundation 0x00007ff80048c768 -[NSException initWithCoder:] + 0 3 UIFoundation 0x00007ff804a1eb4d UINibDecoderDecodeObjectForValue + 352 4 UIFoundation 0x00007ff804a1eebe UINibDecoderDecodeObjectForValue + 1233 5 UIFoundation 0x00007ff804a1e9e2 -[UINibDecoder decodeObjectForKey:] + 257 6 UIKitCore 0x000000010e566a9f -[UIView initWithCoder:] + 1327 7 UIKitCore 0x000000010e4ed417 -[UIScrollView initWithCoder:] + 65 8 UIKitCore 0x000000010e34cbd5 -[UITextView initWithCoder:] + 65 9 UIFoundation 0x00007ff804a1ecb4 UINibDecoderDecodeObjectForValue + 711 10 UIFoundation 0x00007ff804a1e9e2 -[UINibDecoder decodeObjectForKey:] + 257 11 UIKitCore 0x000000010d97e7f0 -[UIRuntimeConnection initWithCoder:] + 160 12 UIFoundation 0x00007ff804a1ecb4 UINibDecoderDecodeObjectForValue + 711 13 UIFoundation 0x00007ff804a1eebe UINibDecoderDecodeObjectForValue + 1233 14 UIFoundation 0x00007ff804a1e9e2 -[UINibDecoder decodeObjectForKey:] + 257 15 UIKitCore 0x000000010d977a79 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 447 16 UIKitCore 0x000000010d97a77e -[UINib instantiateWithOwner:options:] + 1118 17 UIKitCore 0x000000010d532dab -[UIViewController loadView] + 643 18 UIKitCore 0x000000010d533128 -[UIViewController loadViewIfRequired] + 129 19 UIKitCore 0x000000010d533960 -[UIViewController view] + 27 .... Has anyone found the solution to this issue? This is preventing us from fully validating our iPadOS 17 upgrade builds. Thanks in advance.
2
1
1.1k
Jul ’23
Xcode 15 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named StopwatchSupport.ActivityIndicatorVisualStyle
Hello I'm encountering a strange error, probably linked to a bug in Xcode 15 beta 2. When running my app from xcod 15 Beta 2 (either on device running iOS16.5.1 or any simulator running iOS17) for some views I receive the following fatal error: 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named StopwatchSupport.ActivityIndicatorVisualStyle because no class named StopwatchSupport.ActivityIndicatorVisualStyle was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)' From the stack trace, the error seems to be appearing just afterthos calls: #3 0x00000001b3faef54 in UINibDecoderDecodeObjectForValue () #4 0x00000001b3faf1ec in UINibDecoderDecodeObjectForValue () Thanks for any help guidance provided.
4
2
1.6k
Jul ’23
IB potentially insecure
When porting an old Mac project to Silicon (universal) I got an issue with IB to open MainMenu.xib: Trust opening older file format? “MainMenu.xib” uses an older format that is potentially insecure when decoded. If you trust the content of this file, open and save it to upgrade to the modern format. The "open and Upgrade" button make the MainMenu.xib not editable: it seem that every submenus has disappeared. How can I fix it ? Any suggestion will be greatly appreciate.
0
0
691
Jul ’23
Xcode 15 beta 2 - Build Error: "Failed to find or create execution context for description '<IBCocoaTouchPlatformToolDescription: 0x600002588860>'"
After I've updated to Xcode 15 beta 2, I'm getting these build time errors, which I didn't see in beta 1. Failed to find or create execution context for description '<IBCocoaTouchPlatformToolDescription: 0x600002588860> System content for IBRealityIdiom-seventeenAndLater <IBScaleFactorDeviceTypeDescription: 0x600002588b60> scaleFactor=2x, renderMode.identifier=(null)'. I've tried - restarting the Xcode15 beta 2, re-installing Xcode 15 beta 2 and also its Commnad Line Tools Restarting the macOS (twice) However, nothing has worked so far. I'd appreciate any suggestions or ideas as to how to fix this issue, because I'm stuck without being able to build the projects. Thanks in advance!
4
2
3.9k
Jul ’23
How to add a scene, and its class, to the Storyboard
I added a scene to an existing story board that already has other scenes. I put focus on the new scene, and in the Identity Inspector's "Class" field I gave it a class name. The "Storyboard ID" field did not show in this inspector. Why would it not? No file named after the class name I gave it appeared in the "Project navigator". Is this supposed to happen automatically? Or must I create this Swift file that contains the class definition for the scene manually?
2
0
1.7k
Jul ’23
Swift Compiler Crashes with Internal Error (NSInvalidArgumentException)
Hello, I am a first-time app developer and I have not posted on forums before, so please bear with me if my question is basic or amateur. I have created an app on Xcode with storyboard. I have not added any code yet except for the AppDelegate, Scene Delegate, and View Controller files which are automatically added when the project is created. When I try to build, I get the following error: Description: Internal error. Please file a bug at feedbackassistant.apple.com and attach "/var/folders/w5/32zs74y9287ddqdp_yjkkdbw0000gn/T/IB-agent-diagnostics_2023-07-09_09-58-08_842000" I have filed a bug, but was wondering if any of you know of a workaround. Looking into Log.txt, I see the following error: Failed to compile nib consisting of IBCLLocationButton (x1), IBMKMapView (x1), IBProxyObject (x4), IBUIButton (x3), IBUIContainerView (x2), IBUIView (x2), IBUIViewAutolayoutGuide (x1), and IBWKWebView (x1). Exception name: NSInvalidArgumentException Exception reason: UIImage instances should generally not be encoded in NIBs - attempting to encode '<UIImage:0x6000002b1830 anonymous {41, 41} renderingMode=automatic(original)>' for key 'UIImage' of <UIImageView: 0x7f7e45f32a60; frame = (0 0; 41 41); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x60000311c8c0>> My Main.storyboard file consists of a scrollview, with a table view inside. The table view has a custom prototype cell. My Xcode version is 14.2, and my deployment target is ios 16.2. I am using MacOS Monterrey. I have seen similar errors being discussed on this forum and others, but none exactly pertaining to the specific platform I am using. I have already tried cleaning the build folder and resetting my image views. Any help would be appreciated. Thank you.
1
1
993
Jul ’23
How to make the return key appear on numeric keyboards?
I have a UITextField object in a storyboard's scene where the user is make numeric entries. Because this field is for numbers only I set the keyboard type to "Number Pad" in attributes. But this keyboard does not have a return key which leaves the user unable to signal when the entry is complete, the keyboard should be put away, and the entered value processed. I tried all the other numeric keyboards also, and found that none of them has a return key. The default keyboard does, but it is a full alphanumeric keyboard which is undesirable for that field. How can I cause the return key, done key, or whichever does that function, appear on a numeric only keyboard?
2
0
2.9k
Jul ’23
"Editing Did End" event is not calling its event handler
I have a UITextField object on a storyboard's scene. Its "Editing Did End" event is connected to the view controller's "actIPhoneName()" event handler method as shown in this screenshot. I configured the keyboard to show its "Done" key. I expected that when this Done button is touched, that the keyboard would disappear, and the actIPhoneName() method would be called. But neither of these happen, nor does anything else. The UITextField object remains in edit mode. The breakpoint is never reached. What must I do to make the Done keyboard key work to make the UITextField object lose its First Responder status, and call its "Editing Did End" event handler method?
1
0
891
Jul ’23
How to prevent my custom header from being pushed up
Hi all, I have been racking my brain about this for hours now and cannot seem to get it figured out. I have created a custom header using a Swift UI View. When I put the HeaderView onto say my Menu View it is fine until I start adding content. I want to add navigation links in my Menu View to navigate my app. At that time, the shape part of my header start to get bumped up out of position but the text stays where it should. How do I prevent the header from moving at all? I want it to be in a fixed position on each screen. I will be using the same header just with different text on each screen. Here is my HeaderView struct HeaderView: View { let title: LocalizedStringKey var bgColor: Color var body: some View { GeometryReader { geometry in ZStack { Ellipse() .fill(self.bgColor) .frame(width: geometry.size.width * 1.4, height: geometry.size.height * 0.30) .position(x: geometry.size.width / 2.00, y: geometry.size.height * 0.035) .edgesIgnoringSafeArea(.all) VStack{ Text(self.title) .font(.title) .fontWeight(.bold) .foregroundColor(Color.green) .padding(.top,20) Spacer() } } } } } Here is my Menu View: struct MenuView: View { @StateObject var viewModel = MenuViewViewModel() init() {} var body: some View { NavigationView{ VStack{ HeaderView(title: "Menu", bgColor: Color.green.opacity(0.3)) HStack{ Image(systemName: "bell.fill") NavigationLink("Notifications", destination: NotificationsView()) } HStack{ Image(systemName:"person.crop.circle.fill") NavigationLink("Profile", destination: ProfileView()) } HStack{ Image(systemName: "puzzlepiece.fill") NavigationLink("Projects", destination: ProjectsView()) } } } } } I can provide screenshots of what happens after I do this if need be. Thanks in advance.
0
0
765
Jul ’23
Can't Create Storyboard Outlet
I am not able drag a reference object from a Storyboard screen to code in the Assistant. The expected blue line appears as the screenshot shows, but no code is created in the Assistant. This reference object is not in the Launch Screen. When the the screen this object is in is highlighted, the correct file opens in the Assistant. Dragging this object from the "Content View" folder also does not work, even though the blue line also appears. I was recently able to do this. Something changed. What might have changed?
1
0
1.1k
Jul ’23
Generation of IPA using Command line tools
I am generating the IPA file using command line tools for custom IPA generation. Each time, it asks for login credentials during code signing. However, this doesn't work for me because I always use a different developer's profile to generate the IPA. Consequently, I am unable to enter the login passcode for each developer's profile. Please let me know if there are any other steps to avoid code signing while generating the IPA file. The scripts as follows: xcodebuild -workspace -scheme -archivePath archive xcodebuild -exportArchive -archivePath -exportPath -exportOptionsPlist.
1
0
1.8k
Jun ’23
UIButton Changing Foreground, and Background, Colors
The goal is to have the background, and foreground, colors show the current state of a UIButton on a storyboard file. The attempt to do that is done with this code: var toggleLight: Bool = false @IBAction func toggleLight(_ sender: UIButton) { if( toggleLight ){ toggleLight = false sender.baseBackgroundColor = UIColor.black sender.baseForegroundColor = UIColor.white }else{ toggleLight = true sender.baseBackgroundColor = UIColor.white sender.baseForegroundColor = UIColor.black } tableView.reloadData() } I get these errors: Value of type 'UIButton' has no member 'baseBackgroundColor' Value of type 'UIButton' has no member 'baseForegroundColor' I do not understand this because in file "UIKit.UIButton" I see: extension UIButton { ... public var baseForegroundColor: UIColor? public var baseBackgroundColor: UIColor? ... } What has gone wrong there?
0
0
734
Jun ’23
How to implement similar navigation bar like what we have in Xcode?
Can anyone give any clues about how the navigation bar is implemented like below?
Replies
0
Boosts
0
Views
472
Activity
Sep ’23
Is there any builtin Text Find Bar?
I have a NSTableView which shows a list of translated text items. I want to provide a Find Bar for user to filter through the items, like the one I have in Xcode. Of course I don't want so many features; I only want to let user enter some text.
Replies
2
Boosts
0
Views
649
Activity
Sep ’23
NSNumberFormatter wrongfully displays 16-bit unsigned int as signed
Hi all, My interface displays a text field bound to an NSNumber that I use internally as unsigned int. That NSNumber is actually saved with Core Data as Integer 16. However, the interface displays the number signed, meaning anything above 32.768 is actually shown to be negative. I couldn't find a way to force my NSNumberFormatter to display unsigned numbers. Setting the minimum value to 0 also doesn't work, since internally it's gonna be positive anyway. Could you help me display my 16-bit integer as an unsigned int between 0 and 65.535? I am building a macOS app using Objective-C, macOS SDK 10.14 and Xcode 14.3.1.
Replies
1
Boosts
0
Views
697
Activity
Aug ’23
Xcode Application Continuous (OSX) Indexing Crash Problem
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
Replies
2
Boosts
0
Views
2.8k
Activity
Aug ’23
Need help on using this function
I am very new to Swift and I am trying to use this function so my app doesn't trigger the Apple Pay notification. (requestAutomaticPassPresentationSuppression) I am working on react-native. I am trying to create a native module so I can import this function but I am very new to Swift. At this point, I am a bit stuck. Any help would be great. Thank you
Replies
1
Boosts
0
Views
1.2k
Activity
Aug ’23
UITabBarController is unsupported as viewController
Hi, I'm testing one of my app on iOS 14 with Xcode 12 beta 3 (12A8169g) and I have a problem with my storyboards. Xcode give me this error for all the storyboards that contain a split view controller: An internal error occurred. Editing functionality may be limited. The log generated by the Xcode "Report a bug" button say: Exception name: NSInvalidArgumentException Exception reason: UITabBarController is unsupported as viewController for -[UISplitViewController setViewController:forColumn:] in Primary column It worked correctly on Xcode 12 beta 2. Has anyone encountered the same problem and found a way to fix it? Thank you
Replies
7
Boosts
0
Views
2.9k
Activity
Jul ’23
Xcode 15 Beta - Could not instantiate class named _UIRecessedMaterialView because no class named _UIRecessedMaterialView was found
This is a very annoying error which is causing a crash in my app. The error description is very vague and I'm guessing mostly related to oddities of Xcode 15 Beta. Here is the full error stack: *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UIRecessedMaterialView because no class named _UIRecessedMaterialView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)' *** First throw call stack: ( 0 CoreFoundation 0x00007ff80048c88a __exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007ff800057894 objc_exception_throw + 48 2 CoreFoundation 0x00007ff80048c768 -[NSException initWithCoder:] + 0 3 UIFoundation 0x00007ff804a1eb4d UINibDecoderDecodeObjectForValue + 352 4 UIFoundation 0x00007ff804a1eebe UINibDecoderDecodeObjectForValue + 1233 5 UIFoundation 0x00007ff804a1e9e2 -[UINibDecoder decodeObjectForKey:] + 257 6 UIKitCore 0x000000010e566a9f -[UIView initWithCoder:] + 1327 7 UIKitCore 0x000000010e4ed417 -[UIScrollView initWithCoder:] + 65 8 UIKitCore 0x000000010e34cbd5 -[UITextView initWithCoder:] + 65 9 UIFoundation 0x00007ff804a1ecb4 UINibDecoderDecodeObjectForValue + 711 10 UIFoundation 0x00007ff804a1e9e2 -[UINibDecoder decodeObjectForKey:] + 257 11 UIKitCore 0x000000010d97e7f0 -[UIRuntimeConnection initWithCoder:] + 160 12 UIFoundation 0x00007ff804a1ecb4 UINibDecoderDecodeObjectForValue + 711 13 UIFoundation 0x00007ff804a1eebe UINibDecoderDecodeObjectForValue + 1233 14 UIFoundation 0x00007ff804a1e9e2 -[UINibDecoder decodeObjectForKey:] + 257 15 UIKitCore 0x000000010d977a79 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 447 16 UIKitCore 0x000000010d97a77e -[UINib instantiateWithOwner:options:] + 1118 17 UIKitCore 0x000000010d532dab -[UIViewController loadView] + 643 18 UIKitCore 0x000000010d533128 -[UIViewController loadViewIfRequired] + 129 19 UIKitCore 0x000000010d533960 -[UIViewController view] + 27 .... Has anyone found the solution to this issue? This is preventing us from fully validating our iPadOS 17 upgrade builds. Thanks in advance.
Replies
2
Boosts
1
Views
1.1k
Activity
Jul ’23
Xcode 15 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named StopwatchSupport.ActivityIndicatorVisualStyle
Hello I'm encountering a strange error, probably linked to a bug in Xcode 15 beta 2. When running my app from xcod 15 Beta 2 (either on device running iOS16.5.1 or any simulator running iOS17) for some views I receive the following fatal error: 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named StopwatchSupport.ActivityIndicatorVisualStyle because no class named StopwatchSupport.ActivityIndicatorVisualStyle was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)' From the stack trace, the error seems to be appearing just afterthos calls: #3 0x00000001b3faef54 in UINibDecoderDecodeObjectForValue () #4 0x00000001b3faf1ec in UINibDecoderDecodeObjectForValue () Thanks for any help guidance provided.
Replies
4
Boosts
2
Views
1.6k
Activity
Jul ’23
How can I access Reality Composer Pro?
I wish to create an AR project with an interactive interface with help of Xcode and Reality Composer pro, how could I start?
Replies
2
Boosts
0
Views
1.4k
Activity
Jul ’23
IB potentially insecure
When porting an old Mac project to Silicon (universal) I got an issue with IB to open MainMenu.xib: Trust opening older file format? “MainMenu.xib” uses an older format that is potentially insecure when decoded. If you trust the content of this file, open and save it to upgrade to the modern format. The "open and Upgrade" button make the MainMenu.xib not editable: it seem that every submenus has disappeared. How can I fix it ? Any suggestion will be greatly appreciate.
Replies
0
Boosts
0
Views
691
Activity
Jul ’23
Xcode 15 beta 2 - Build Error: "Failed to find or create execution context for description '<IBCocoaTouchPlatformToolDescription: 0x600002588860>'"
After I've updated to Xcode 15 beta 2, I'm getting these build time errors, which I didn't see in beta 1. Failed to find or create execution context for description '<IBCocoaTouchPlatformToolDescription: 0x600002588860> System content for IBRealityIdiom-seventeenAndLater <IBScaleFactorDeviceTypeDescription: 0x600002588b60> scaleFactor=2x, renderMode.identifier=(null)'. I've tried - restarting the Xcode15 beta 2, re-installing Xcode 15 beta 2 and also its Commnad Line Tools Restarting the macOS (twice) However, nothing has worked so far. I'd appreciate any suggestions or ideas as to how to fix this issue, because I'm stuck without being able to build the projects. Thanks in advance!
Replies
4
Boosts
2
Views
3.9k
Activity
Jul ’23
How to add a scene, and its class, to the Storyboard
I added a scene to an existing story board that already has other scenes. I put focus on the new scene, and in the Identity Inspector's "Class" field I gave it a class name. The "Storyboard ID" field did not show in this inspector. Why would it not? No file named after the class name I gave it appeared in the "Project navigator". Is this supposed to happen automatically? Or must I create this Swift file that contains the class definition for the scene manually?
Replies
2
Boosts
0
Views
1.7k
Activity
Jul ’23
Swift Compiler Crashes with Internal Error (NSInvalidArgumentException)
Hello, I am a first-time app developer and I have not posted on forums before, so please bear with me if my question is basic or amateur. I have created an app on Xcode with storyboard. I have not added any code yet except for the AppDelegate, Scene Delegate, and View Controller files which are automatically added when the project is created. When I try to build, I get the following error: Description: Internal error. Please file a bug at feedbackassistant.apple.com and attach "/var/folders/w5/32zs74y9287ddqdp_yjkkdbw0000gn/T/IB-agent-diagnostics_2023-07-09_09-58-08_842000" I have filed a bug, but was wondering if any of you know of a workaround. Looking into Log.txt, I see the following error: Failed to compile nib consisting of IBCLLocationButton (x1), IBMKMapView (x1), IBProxyObject (x4), IBUIButton (x3), IBUIContainerView (x2), IBUIView (x2), IBUIViewAutolayoutGuide (x1), and IBWKWebView (x1). Exception name: NSInvalidArgumentException Exception reason: UIImage instances should generally not be encoded in NIBs - attempting to encode '<UIImage:0x6000002b1830 anonymous {41, 41} renderingMode=automatic(original)>' for key 'UIImage' of <UIImageView: 0x7f7e45f32a60; frame = (0 0; 41 41); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x60000311c8c0>> My Main.storyboard file consists of a scrollview, with a table view inside. The table view has a custom prototype cell. My Xcode version is 14.2, and my deployment target is ios 16.2. I am using MacOS Monterrey. I have seen similar errors being discussed on this forum and others, but none exactly pertaining to the specific platform I am using. I have already tried cleaning the build folder and resetting my image views. Any help would be appreciated. Thank you.
Replies
1
Boosts
1
Views
993
Activity
Jul ’23
How to make the return key appear on numeric keyboards?
I have a UITextField object in a storyboard's scene where the user is make numeric entries. Because this field is for numbers only I set the keyboard type to "Number Pad" in attributes. But this keyboard does not have a return key which leaves the user unable to signal when the entry is complete, the keyboard should be put away, and the entered value processed. I tried all the other numeric keyboards also, and found that none of them has a return key. The default keyboard does, but it is a full alphanumeric keyboard which is undesirable for that field. How can I cause the return key, done key, or whichever does that function, appear on a numeric only keyboard?
Replies
2
Boosts
0
Views
2.9k
Activity
Jul ’23
"Editing Did End" event is not calling its event handler
I have a UITextField object on a storyboard's scene. Its "Editing Did End" event is connected to the view controller's "actIPhoneName()" event handler method as shown in this screenshot. I configured the keyboard to show its "Done" key. I expected that when this Done button is touched, that the keyboard would disappear, and the actIPhoneName() method would be called. But neither of these happen, nor does anything else. The UITextField object remains in edit mode. The breakpoint is never reached. What must I do to make the Done keyboard key work to make the UITextField object lose its First Responder status, and call its "Editing Did End" event handler method?
Replies
1
Boosts
0
Views
891
Activity
Jul ’23
Story UI Buttons, & Text Fields, are in Rectangles
I do not know what I did to make it so, but somehow I accidentally got Xcode Interface Builder to display a storyboard file in an undesired mode which displays the UI buttons, and text fields, in rectangles as shown in the screenshot below. How do I reverse what I did to get it out of this mode?
Replies
1
Boosts
0
Views
946
Activity
Jul ’23
How to prevent my custom header from being pushed up
Hi all, I have been racking my brain about this for hours now and cannot seem to get it figured out. I have created a custom header using a Swift UI View. When I put the HeaderView onto say my Menu View it is fine until I start adding content. I want to add navigation links in my Menu View to navigate my app. At that time, the shape part of my header start to get bumped up out of position but the text stays where it should. How do I prevent the header from moving at all? I want it to be in a fixed position on each screen. I will be using the same header just with different text on each screen. Here is my HeaderView struct HeaderView: View { let title: LocalizedStringKey var bgColor: Color var body: some View { GeometryReader { geometry in ZStack { Ellipse() .fill(self.bgColor) .frame(width: geometry.size.width * 1.4, height: geometry.size.height * 0.30) .position(x: geometry.size.width / 2.00, y: geometry.size.height * 0.035) .edgesIgnoringSafeArea(.all) VStack{ Text(self.title) .font(.title) .fontWeight(.bold) .foregroundColor(Color.green) .padding(.top,20) Spacer() } } } } } Here is my Menu View: struct MenuView: View { @StateObject var viewModel = MenuViewViewModel() init() {} var body: some View { NavigationView{ VStack{ HeaderView(title: "Menu", bgColor: Color.green.opacity(0.3)) HStack{ Image(systemName: "bell.fill") NavigationLink("Notifications", destination: NotificationsView()) } HStack{ Image(systemName:"person.crop.circle.fill") NavigationLink("Profile", destination: ProfileView()) } HStack{ Image(systemName: "puzzlepiece.fill") NavigationLink("Projects", destination: ProjectsView()) } } } } } I can provide screenshots of what happens after I do this if need be. Thanks in advance.
Replies
0
Boosts
0
Views
765
Activity
Jul ’23
Can't Create Storyboard Outlet
I am not able drag a reference object from a Storyboard screen to code in the Assistant. The expected blue line appears as the screenshot shows, but no code is created in the Assistant. This reference object is not in the Launch Screen. When the the screen this object is in is highlighted, the correct file opens in the Assistant. Dragging this object from the "Content View" folder also does not work, even though the blue line also appears. I was recently able to do this. Something changed. What might have changed?
Replies
1
Boosts
0
Views
1.1k
Activity
Jul ’23
Generation of IPA using Command line tools
I am generating the IPA file using command line tools for custom IPA generation. Each time, it asks for login credentials during code signing. However, this doesn't work for me because I always use a different developer's profile to generate the IPA. Consequently, I am unable to enter the login passcode for each developer's profile. Please let me know if there are any other steps to avoid code signing while generating the IPA file. The scripts as follows: xcodebuild -workspace -scheme -archivePath archive xcodebuild -exportArchive -archivePath -exportPath -exportOptionsPlist.
Replies
1
Boosts
0
Views
1.8k
Activity
Jun ’23
UIButton Changing Foreground, and Background, Colors
The goal is to have the background, and foreground, colors show the current state of a UIButton on a storyboard file. The attempt to do that is done with this code: var toggleLight: Bool = false @IBAction func toggleLight(_ sender: UIButton) { if( toggleLight ){ toggleLight = false sender.baseBackgroundColor = UIColor.black sender.baseForegroundColor = UIColor.white }else{ toggleLight = true sender.baseBackgroundColor = UIColor.white sender.baseForegroundColor = UIColor.black } tableView.reloadData() } I get these errors: Value of type 'UIButton' has no member 'baseBackgroundColor' Value of type 'UIButton' has no member 'baseForegroundColor' I do not understand this because in file "UIKit.UIButton" I see: extension UIButton { ... public var baseForegroundColor: UIColor? public var baseBackgroundColor: UIColor? ... } What has gone wrong there?
Replies
0
Boosts
0
Views
734
Activity
Jun ’23