Build, test, and submit your app using Xcode, Apple's integrated development environment.

Xcode Documentation

Post

Replies

Boosts

Views

Activity

Xcode Simulator is not showing changed text font size
Hello, I have a probelm with the Xcode Simulator not showing desired changes with text font at specific configuration. When the configuration of a UIButton text was set as below on the editor, althought the changes were viewable on storyboard, the simulator didn't look the same. Type:Custom Style: Plain Title:Attributed Is there a logical reason why this happens? Also, the documentation says "Plain" indicate the text is a plain String object whilst "Attributed" indicate the string has become a instance of NSAttributedString. How is it possible to set the style and the title different like Style: Plain/Title: Attributed and vise versa? Maybe this was the reason the simulator didn't work alright? Thank you in advance
1
0
946
Mar ’22
ld: symbol(s) not found for architecture arm64
Hi,all I'm writing a simple c program on my m1 MacBook with vscode ,but when I complied the project, error occurs: Undefined symbols for architecture arm64: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) I installed Xcode and used vscose and my program is : #include <cstdio> int main() { char name[100];printf("please input your name:"); scanf("%s",name); printf("hello,%s",name); }
7
2
23k
Mar ’22
Not able to enroll in Apple developer program
On the iOS Developer app on my Iphone 13, when I try to submit my id front and back pictures, it fails every time with no fruitful error. All it says is Unable to send information, your information couldn't be sent due to connection error. The internet connection is working absolutely fine I can assure. It seems impossible to go past this step! Why is apple so vaguely difficult!
21
4
7k
Apr ’22
Import Local Swift Package in Xcode 13.3
Hello! I am struggling with the most basic things :-( I created a Swift Package with the wizard and left it basically untouched, only added a func: public struct TestPackage {     public init() {     }     public static func hello()     {         print("Hello, World!")     } } It just build fine. Now I created a second project, this time a SpriteKit iOS app. In the file list on the left, right-clicked on "Packages" -> "Add Packages ..." -> "Add Local" and selected the root directory of TestPackage (containing the Package.swift) The Package now correctly appears in the "Packages" folder. Opening a random Swift file in said SpriteKit iOS app, I expect to be able to import TestPackage But it tells me "No such module TestPackage". Searching the internet, I somewhere read that I have to add the package also to the "Frameworks, Libraries and Embedded Content" section in the project's target settings, but I can't. Hitting the "+" button there does not give me my library in the list of suggested libraries. Via "Add Other" -> "Add package dependency" -> "Add Local ..." I can again select the root directory of my library, but other than showing up twice in the left-side folder view (and not in said Frameworks, Libraries and Embedded content", I have no luck in importing it to my code. What am I doing wrong?
9
1
9.4k
Apr ’22
signal SIGABRT when loading a .sks (Swift 5.5)
I'm trying to make my GameOverScene load when I supposedly "die" but all i get in the editor is signal SIGABRT. Here is some code for it. if self.livesArray.count == 0 { let gameOver = SKScene(fileNamed: "GameOverScene") as! GameOverScene //This line causes SIGABRT gameOver.score = self.score self.view?.presentScene(gameOver)} Please can someone help me? Also i dont know where to find the debugger :P
1
0
492
Apr ’22
CMake, vcpkg, and universal builds
Again, none of this is really my choice: our project is multi-platform (specifically, at this time, Windows and macOS). As a result, the people who started 8 hours before I did picked CMake and vcpkg to handle build system generation and 3rd party dependencies. (TBF, I can't blame them for this, since this does work on a Mac, for at least a simple build.) I want to support Apple Silicon, obviously. I can build native on my M1 MBP. (I could, theoretically, use lipo and create a universal bundle, but that would mean manually signing a handful of executables, and then the whole thing, unless I missed a way to do this much more easily?) We're using CircleCI for CI, or maybe github actions in the future. I have not been able to figure out how to use CMake and vcpkg to do a cross build. Not even universal, just "build for arm64 on Intel mac". googling and searching these fora hasn't shown a lot that seems to work (mainly, I think, for the vcpkg side). Which is weird, because one of the things people use CMake for is to build Android and iOS apps, which generally does mean cross-compiling. Does anyone know how to do that? I'm at the point where I'm looking at CocoaPods again -- but that will not work with CMake, so we'll have two completely different build systems, one of which requires a Mac with GUI to add/remove sources/targets.
13
0
5.5k
May ’22
FxPlug open file dialog using a push button
I am trying to develop a plug in for motion in Objective-c using the FxPlug template and so far I have been having issues with getting "NSOpenPanel" to be called from a push button in order to get a file dialog window, similar to the "File" generator present in Motion. [paramAPI addPushButtonWithName: @"MIDI file" parameterID: 1 selector: @selector(MIDI_func) parameterFlags: kFxParameterFlag_DEFAULT] I have tried to call NSOpenPanel through "dispatch_async" so that it would run on the main thread and thus not crash but when I press the button it appears not to work - (void)MIDI_func {     NSLog(@"Button pressed");     dispatch_async(dispatch_get_main_queue(), ^{         NSOpenPanel* openDlg = [NSOpenPanel openPanel];         [openDlg setCanChooseFiles:YES];         [openDlg setAllowsMultipleSelection:NO];         [openDlg setCanChooseDirectories:NO];         if ([openDlg runModal] == NSModalResponseOK) {             NSArray* urls = [openDlg URLs];             for(NSInteger i = 0; i < [urls count]; i++ ) {                 NSString* url = [urls objectAtIndex:i];                 NSLog(@"Url: %@", url);             }         }     }); } How can I achieve this or is there a function in the FxPlug SDK that will let me open a file dialog from the host application?
3
1
1.6k
May ’22
Xcode Full Vim Support
Hi everyone! I've been using various IDEs over the years for different projects I work on, and one thing I have always been able to rely on is full or at least powerful integration with Vim keybindings. Of course I can survive going back to using my mouse and keybinds I prefer only using when off the clock, but I think as a mature and modern IDE, despite clashes with existing keybinds, there should be a better effort to give full Vim keybinds support. I know that for developers who don't buy into spending a ridiculous amount of time to possibly edit code faster, if you learn Vim right, they don't see this as an issue. But for someone who has opened Eclipse, Rstudio, Google Cloud, Jupyter lab, good ol' Vim itself, Overleaf notebook, and basically any text editor for programming, to have full access to Vim keybindings, it feels quite frustrating that not even Visual block mode is mapped properly in Xcode with Vim keybindings. Would it be possible for better support for Vim keybindings, even being able to edit text with regex using classic Vim command-line mode ":". I know it will not be possible to implement everything, but at least implementing enough for me to not notice that Vim is clearly not supported would be amazing. Thanks everyone 😘😘
6
9
4.3k
Jun ’22
Debugging Resources
General: DevForums tags: Debugging, LLDB, Graphical Debugger Xcode > Debugging documentation Diagnosing memory, thread, and crash issues early documentation Diagnosing issues using crash reports and device logs documentation Choosing a Network Debugging Tool documentation Testing a release build documentation Isolating Code Signing Problems from Build Problems DevForums post What is an exception? DevForums post Language Exception from RCTFatal DevForums post Standard Memory Debugging Tools DevForums post Using a Sysdiagnose Log to Debug a Hard-to-Reproduce Problem DevForums post Posting a Crash Report DevForums post Creating a test project DevForums post Implementing Your Own Crash Reporter DevForums post Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com"
0
0
2.9k
Jun ’22
Xcode Cloud is unable to connect to the repository
Hello, I am trying out Xcode Cloud for the first time. I could connect to Github in the initial setup and had a few failed builds (package resolution error), which I resolved fairly quickly. Now whenever I am trying to build, I get the following error: Xcode Cloud is unable to connect to the repository “<respository-name>”. Reconnect the repository to resume builds. I am unable to remove the connection from settings as well because it's stuck in a loading state. Is there a way to fix this?
14
4
8.5k
Jun ’22
Xcode Cloud - slow test-without-building step
Hi, I'm currently researching if we are able to migrate to Xcode Cloud in our project. I encountered one issue. I run unit tests on Xcode Cloud and I see that they finish in ~150 seconds, but the whole step takes ~530s and there is no information in logs why. I even run the same command on my local computer and it doesn't take that long. Any ideas? Any way to optimize it? Also one more thing: it looks like Xcode Cloud is not running on M1 machines. Do you know guys if there are plans for Xcode Cloud to take advantage of M1/M2?
2
0
1.6k
Jun ’22
Xcode's Vim Mode - further development?
It was fantastic news to hear, last year, that Xcode was getting a Vim mode. Apple's implementation of it was a great first step, but it was missing a bunch of key features. Most importantly the dot command (and by, extension, macros) and creating marks in files, which are functions that I use/rely on on a daily basis. I thought I would finally be able to stop having to self-sign Xcode (which causes problems) in order to use XVim2 plugin, but no such luck. Will these features get added in for Xcode 14 (they don't seem to be in the beta) or are they far out on the roadmap?
10
13
5.2k
Jun ’22