Post

Replies

Boosts

Views

Activity

Reply to Import large C project into Xcode 14
One potential problem with using Xcode for this project is the open source project may not support Xcode project files. You would have to create a new project in Xcode and add the files from the open source project to the Xcode project. You may have problems pushing your changes to the open source project because of the Xcode project file. If you use a text editor like Visual Studio Code, Sublime Text, BBEdit, or TextMate, you wouldn't have to deal with Xcode project files. If you decide to use Xcode, start by creating an External Build System project in Xcode. The External Build System project is in the Other section of the New Project Assistant. Creating an External Build System project will give you an Xcode project that uses make as the build tool if you follow the defaults. After creating the project add the files from the open source project to your project. You can either drag the folders in the project to the Xcode project or choose File > Add Files to ProjectName in Xcode.
Feb ’23
Reply to Xcode Thread 1: signal SIGABRT
If you want to make a game, I recommend using a game engine like Unity or Godot or using Apple's SpriteKit framework. Use a game engine if you want your game to run on non-Apple platforms. If you really want to use SDL in Xcode, start over by creating a new project. Your screenshot shows a command-line tool project. The problem with a command-line tool project on Mac is that it doesn't create an app bundle for the game. Creating an app bundle makes it easier to load graphics, sounds, and other files in your game code. According to the SDL Mac instructions on their GitHub page, https://github.com/libsdl-org/SDL/blob/main/docs/README-macos.md The Mac download of SDL includes Xcode project templates. Install the templates and use them to create the Xcode project. The link also has instructions on how to set up a new project by hand.
Feb ’23
Reply to Xcode Thread 1: signal SIGABRT
The error message is saying that the SDL2_image framework can't be found. For anyone to be able to help you, you must provide more information. List the steps you took to create the Xcode project and add the SDL frameworks to your project. Be very specific because the people on this forum aren't standing next to you. They can only go by what you write here. Not many people on this forum use SDL. You may have better luck asking this question in a game development forum where people use SDL.
Feb ’23
Reply to Advice on releasing an internal OSX app
It is definitely possible to avoid the sandbox in a Mac app. Perform the following steps to turn off the App Sandbox: Open the project editor by selecting the project file on the left side of the project window. Select the target from the left side of the project editor. Click the Signing & Capabilities button at the top of the project editor. Click the Trash icon on the right side of the App Sandbox section in the project editor. I don't know if you can avoid code signing. There is a Signing section above the App Sandbox section. That's where you would turn off code signing.
Topic: Code Signing SubTopic: General Tags:
Feb ’23
Reply to Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
You are getting an error because displayLbl is an implicitly unwrapped optional whose value is nil. You declared the type to be UILabel!. By adding the ! character you set your app to crash if the outlet is nil and your code accesses the outlet. The most likely cause of the error is that the display label outlet is not connected to the label in the storyboard. Connecting the label in the storyboard to the outlet should fix that error. Your submitAction function also has the potential for the same error because you are force unwrapping optionals. When you add ! to a variable name, and that variable is nil, your app is going to crash. The following article has more details on dealing with the error you're getting: https://www.swiftdevjournal.com/fixing-the-thread-1-fatal-error-unexpectedly-found-nil-while-implicitly-unwrapping-an-optional-value-error/
Feb ’23
Reply to MacOS SwiftUI app hangs after view creation
I've tried running instrumentation to figure out what is going on here, Do you mean you profiled the app with Instruments? If so, what templates did you use? I recommend profiling your app with Instruments. Choose Product > Profile in Xcode to profile with Instruments. The App Launch, SwiftUI, and Time Profiler Instruments templates will help you find what's taking so long. The App Launch should help if the slowness you're experiencing occurs when launching your app. You may also find the following article helpful: https://www.swiftdevjournal.com/finding-the-slow-spots-in-your-code-with-the-time-profiler-instrument/
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’23
Reply to View Controller File missing in Xcode 14
The most likely cause of your problem is that you did not explicitly specify the interface when creating the project. Xcode defaults to using SwiftUI for new projects. SwiftUI does not have view controllers. You must explicitly choose Storyboard from the Interface menu when creating the project to get a view controller file. The following article has more detailed information: https://www.swiftdevjournal.com/xcode-11-missing-view-controllers/
Topic: UI Frameworks SubTopic: UIKit Tags:
Jan ’23
Reply to Aquestion About OS high sierra 10.13.6
You would not be able to submit apps to the App Store with macOS 10.13. Currently you need to use Xcode 13 to submit apps to the App Store. Xcode 13 requires macOS 11. Pretty soon this requirement will be bumped up to Xcode 14, which requires macOS 12. You listed macOS as a tag. With macOS 10.13 you could create Mac apps for people to download and install on your own site, bypassing the App Store.
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’23
Reply to unrecognized selector sent to instance
The problem is more likely to be in the storyboard than in the code you provided. What is the class name of the view controller in the storyboard's identity inspector? Choose View > Inspectors > Identity in Xcode to show the identity inspector. The class name in the storyboard needs to be the name of your view controller's class, ViewController in your code example. What is most likely happening is the view controller's class is UIViewController in the storyboard. UIViewController doesn't have a buttonPressed selector, ViewController does. If you change the name of the class to ViewController, the error should go away. Is the IBAction connected? There should be a filled-in circle next to the line of code in Xcode's editor. If the error persists, you will have to provide more information on how you set up your storyboard for anyone to help you.
Dec ’22