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

Xcode Documentation

Posts under Xcode tag

3,454 Posts
Sort by:
Post not yet marked as solved
16 Replies
15k Views
Xcode->Prefencrs->accounts>AppID;The certificate for this server is invalid. You might be connecting to a server that is pretending to be “idmsa.apple.com” which could put your confidential information at risk. How can I solve the problem?
Posted
by
zwq
Post marked as solved
13 Replies
21k Views
Every IDE I have ever used (besides XCode) has a dead-simple way for you to find the matching brace in a piece of code. You usually select one brace and then the other one is highlighted.XCode does this but only for like 1/100000 of a second, and it does not help when the brace is off the screen, which is the only time you really need this function.Is there a way to do it? I know there used to be that way of folding up the entire scope so that it disappeared, but I always hated that, it was confusing and alarming, and besides I don't even see it anymore.Can somebody please let me know how to do it? I am sure there is a way and I don't see it -- why don't they just do it like everyone else does?
Posted
by
Post not yet marked as solved
7 Replies
3.4k Views
This should be pretty simple:@import Foundation;...NSString *uuid = [[NSUUID UUID] UUIDString];This ALWAYS returns "nil" objectshould return something like: "68753A44-4D6F-1226-9C60-0050E4C00067"I recently found this about it, and it's definitely nil EVERY SINGLE TIME...Because of the way NSUUID's are wrappers of CFUUID's in one of the most bizzarre nonsense "toll free bridging" that I have run across in Foundation, NSUUID's cannot be used as keys, stored in another containers for any extended period of time, or even subclassed. You always must use the string representation as the key. In fact the longer you hold on to an NSUUID, the more likely you are to discover that it's underlying representation has been deallocated from under you and it can no longer return the value that it returned shortly after alloc/init. Fun stuff.SEE: post: Re: Background Session Task state persistenceBugReported:22939495- (NSString *)getUUID{ CFUUIDRef uuid = CFUUIDCreate(NULL); NSString *uuidStr = (__bridge_transfer NSString *)CFUUIDCreateString(NULL, uuid); CFRelease(uuid); return uuidStr;}This is also always returning 'nil'
Posted
by
Post marked as solved
3 Replies
1.1k Views
Has anybody gotten AWS CodeCommit to work with Xcode 7?
Posted
by
Post not yet marked as solved
33 Replies
51k Views
Computer: 12" MacBook 1.3 GHz (512 GB SSD).OS: OSX 10.11.1Tick Tock:1825 Turned ok Macbook for first time.1830 Installed Pages, Numbers, Keynote, OSX El Capitan Update. Setup FileVault for Full Disk Encrpytion.1900 Went to meeting, used Notes.2000 Came back from meeting.2100 Installed Sublime Text 3, Homebrew (XCode Command Line Tools).2200 Installed dot files, but did not compleate (took forever, ironic).2300 Watched end of Mets game.0000 Battery at 30% plugged into wall charger to recharge.0006 Started Download of XCode 7.1 from App Store.0010 Download Complete0200 Started Writing this.0210 Still not installed.Now I understand that these CPUs are terminally limited, and that they will underclock under heavy sustained load. That effect seems to be compounded with charging the device while using it's CPU intensivly. But over 2 hours to extract and install XCode 7.1 is insane. Progress is being made on the install, the bar moves slowly, very slowly towards the right of the screen. But it's still pretty crazy that it's taking this long.
Posted
by
Post not yet marked as solved
2 Replies
4.1k Views
I cannot use my keyboard to type in the simulator. The toggle is on. I also cant make the inputs active when I click with my mouse. When I turn the toggle off, everything works, but I have to type using the simulator keyboard, which isn't really ideal.I already tried to remove the .plist file, which didnt solve the problem. I also reinstalled Xcode, no fix unfortunately.Hope anyone has a solution.
Posted
by
Post not yet marked as solved
1 Replies
430 Views
HI GuysIs it possible to transfer app specific data via AirDrop?More specifically. If I have an app that persists data locally (say Core Data). Is it possible to use AirDrop to send data that is very specific to the app to other instances of the same app running on different devices?I envisage something like get the data from Core Data, serialize it to XML or JSON, send via AirDrop and then deserialize at the other end. Is this possible? Is AirDrop meant for such use? I've had a good look around and all of the info I can find seems to be about transferring non app specific data such as photos or URL's. If it is possible and a sensible use of AirDrop then any info or pointers to resources would be very much appreciated. Many ThanksHanks
Posted
by
Post not yet marked as solved
7 Replies
5.4k Views
I want to test parts of my app UI in isolation, so avoid having to drill down from the splash screen to the pages in question. My app implements deep linking, but I can't figure out how to configure XCUIApplication in the setUp() to trigger the page transition.I have a method in the app delegate called openURL() which handles this for the production app. It works great, but when I call it (below), nothing happens. If I put a breakpoint in openURL() it never even gets hit. override func setUp() { super.setUp() continueAfterFailure = false XCUIApplication().launch() guard let url = NSURL(string: "fooapp://page/3") else { fatalError("Couldn't create URL") } UIApplication.sharedApplication().openURL(url) }What I really want is to set UIApplicationLaunchOptionsURLKey in launchOptions and just let the app behave as if it received an external URL. I see launchArguments and launchEnvironment are available on XCUIApplication, but then I have to write something special to extract those values out and manually call openURL somewhere in the app delegate. What's the right way to do this?
Posted
by
Post not yet marked as solved
3 Replies
902 Views
Anyone else seeing this?I'm writing automated tests and some swift files have couple of thousand lines of code.At which point XCode gets extremly slow while edining the code. It freezes every few seconds for couple of seconds.Like intelisense tries to do something but since the size of the file is 5000+ lines of code it needs a few seconds to parse the file and release the editor back to the user 😟David
Posted
by
Post not yet marked as solved
47 Replies
72k Views
at 4.4 ish GB, my late 2013 MB Pro's internel SSD with 7.9 GB available ought to be able to handle size requirements for this update, I would think. Or, would have thought. Still, it said no, so I freed up a bit more space. Xcode still responds with "There is not enough disk space available to install the product." Why is that?
Posted
by
Post not yet marked as solved
2 Replies
355 Views
In previous versions of Xcode I was able to print source code and the line numbers would also print. I am unable to locate how to turn on this feature in XCode 7.2.How do i activate printing with line numbers?
Posted
by
Post not yet marked as solved
3 Replies
4.3k Views
Hi,I reciently rewrote on of my apps in Swift and the way I did it is I started from scratch creating a brand new project and what I'm trying to do is to upload this new project as a new version of an existing app in the Appstore.Is this possible to do? If yes, what is the process?Thanks
Posted
by
Post not yet marked as solved
1 Replies
762 Views
Using the following command:xcodebuild -workspace 'My.xcworkspace' -scheme 'My scheme' -destination 'generic/platform=iOS' -sdk iphoneosI get the following errors:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/usr/include/sys/cdefs.h:707:2: error: Unsupported architecture #error Unsupported architecture ^ While building module 'UIKit' imported from /Users/avi/Projects/rounds/iphone/Pods/Target Support Files/GCDWebServer/GCDWebServer-prefix.pch:2: While building module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8: In file included from <module-includes>:3: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/usr/include/copyfile.h:36: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.2/include/stdint.h:63: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/usr/include/stdint.h:52: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/usr/include/sys/_types.h:33: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported #error architecture not supported ^ While building module 'UIKit' imported from /Users/avi/Projects/rounds/iphone/Pods/Target Support Files/GCDWebServer/GCDWebServer-prefix.pch:2: While building module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8:The errors continue in that vein until xcodebuild gives up.As can be determined from the error messages, I am using Cocoa Pods.
Posted
by
Post not yet marked as solved
1 Replies
3.4k Views
I'm building a dynamic framework. I'm seeing warnings in my test target and example app target.<module-includes> Umbrella header for module 'MyFramework' does not include header 'absolute path to a public header'The header is included in the umbrella header like:#import <MyFramework/PublicHeader.h>It seems like the warning stems from the fact that the header is located at ./MyFramework/Module/PublicHeader.hIs this an Xcode bug, or an issue with my framework target configuration?
Posted
by
Post not yet marked as solved
10 Replies
26k Views
Sorry I am asking this question here. I couldn't find any legal or tax category.I am a developer based out of US. When a user buys an app for $0.99 they have to pay $0.25 tax on it. So Apple collectsApp Price: $0.99Tax: $.25Total: $1.24Afterwards Apple pays us developers 70% off $0.99 i.e. $0.69My question is that do I need to pay Fed & State taxes on $0.69? Hasn't that amount been already taxed and tax taken out of it by Apple ($1.24) or did I miss something?I searched Apple Dev fourms and only found this answer on the topic - https://forums.developer.apple.com/message/90695#90695I appologize I am new to this.
Posted
by
Post not yet marked as solved
2 Replies
2.9k Views
I would like to remove obsolete simulators from Xcode because I'm low on space. Simulator for iOS 9.1 is 1,46 GB.
Posted
by
Post not yet marked as solved
12 Replies
21k Views
Hello Everybody,I have 2 teams under my only Apple ID, a regular paid one (Agent) and a "personal team" (Free). I really want to get ride of "Personal Team" and its provisioning profiles since my XCode keep adding my bundle Identifiers to the free account and I have no control over them. I checked my developer panel but it seems that I can manage the free acount from there. Please let me know if there is way to fix that.Thank you
Posted
by
Post not yet marked as solved
1 Replies
1.3k Views
How do I obtain the Swift Package Manager (SPM)?I tried using the snapshot from 4.12.16 but that would cause my XCode IDE to crash whenever I attempted to open a project.Now I've installed XCode_7.3.1_GM_Seed successfully which I thought included the SPM but when I run commands from the terminal like:swift built --version orswift buildIt returns: error: unable to invoke subcommand: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build (No such file or directory)Here is the results of my version check and --find swift commandsadmins-Mac:~ admin$ xcrun --find swift/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftadmins-Mac:~ admin$ swift --versionApple Swift version 2.2 (swiftlang-703.0.18.5 clang-703.0.31)Target: x86_64-apple-macosx10.9admins-Mac:~ admin$ export TOOLCHAINS=swiftadmins-Mac:~ admin$ xcrun --find swift/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftHow do I fix this so that I'm able to use SPM?
Posted
by
Post marked as solved
5 Replies
26k Views
I have seen that in the past, but in my situation I don't get why..- I have a static OS X framework, let's call it MyFramework.framework.- This framework links against a custom library, libMyStaticLibrary that contains a class MyClass.- MyClass.h is made public in the headers of MyFramework, and MyFramework.h has #import <MyFramework/MyClass.h>- I have an OSX app, MyApp, that links with MyFramework.framework, and makes usage of MyClass...When I go debugging and start doing a print object in lldb, I am prompt this:objc[69744]: Class MyClass is implemented in both /Users/(...)/DerivedData/MyApp/Build/Products/Debug/MyApp.app/Contents/MacOS/MyApp and /Library/Frameworks/MyFramework.framework/MyFramework. One of the two will be used. Which one is undefined.I would like to solve this issue, even though it doesn't seem to be a big deal..
Posted
by