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

Xcode Documentation

Posts under Xcode tag

3,558 Posts
Sort by:
Post marked as solved
13 Replies
4.0k Views
Hello. I'm having problems testing my app using Xcode13 beta 5 and iOS15 simulators. When I try to run the tests of a target that needs a host application on a iOS 15 simulator I get the following crash before the test starts: Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT) dyld_sim`getpid:   0x10ccd7765 <+0>: pushq %rbp   0x10ccd7766 <+1>: movq  %rsp, %rbp   0x10ccd7769 <+4>: leaq  0x38950(%rip), %rax    ; gSyscallHelpers   0x10ccd7770 <+11>: movq  (%rax), %rax -> 0x10ccd7773 <+14>: cmpq  $0x5, (%rax)   0x10ccd7777 <+18>: jb   0x10ccd7780        ; <+27>   0x10ccd7779 <+20>: popq  %rbp   0x10ccd777a <+21>: jmpq  *0x128(%rax)   0x10ccd7780 <+27>: callq 0x10ccd7fef        ; findHostFunctions   0x10ccd7785 <+32>: popq  %rbp   0x10ccd7786 <+33>: jmpq  *0x38fa4(%rip)      ; proc_getpid If I run the tests with Fastlane, on the console it shows: ▸ Testing failed: ▸ MYAPPTests: ▸ MYAPP (66354) encountered an error (Test runner never began executing tests after launching.) ▸ ** TEST EXECUTE FAILED ** On targets that does not need a host application it works well. And if try to run the same target with host application but on a iOS 14 simulator, it works fine. So the problem seems to be the iOS15 simulator. Any tips? Thank you!
Posted Last updated
.
Post not yet marked as solved
1 Replies
298 Views
I updated my machine to: macOS Monterey Version 12.4 Xcode Version 13.4 (13F17a) iOS Version 15.4.1 (19E258) device real (iPhone 11) iOS Version 15.5 (19F77) device real (iPhone 11) I executed this command on host machine which is wirelessly connected to X code. $ automationmodetool enable-automationmode-without-authentication Setting up machine to allow Automation Mode without requiring user authentication... succeeded. $ automationmodetool Automation Mode is disabled. This device DOES NOT REQUIRE user authentication to enable Automation Mode. but I still get this exception Underlying Error: Timed out while enabling automation mode. My devices constantly requests password to enable UI Automation.
Posted Last updated
.
Post not yet marked as solved
1 Replies
59 Views
I'm using Xcode 14.1 and iPhone 14 Simulator (iOS 16.1) on macOS Ventura 13.0.1. For some reason, the simulator comes in English, however the previous versions defaulted to my native language (which is a system language in macOS). If I debug the app I'm currently working on, the Preferred Languages list (defined by CFBundleLocalizations) is missing. When I'm trying to change the simulator's language or region, it just hangs on "Setting language..." or "Setting region...". If I wait, a crash report appears which is related to SpringBoard: Hardware Model: MacBookPro15,1 Process: SpringBoard [39407] Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/CoreServices/SpringBoard.app/SpringBoard Identifier: com.apple.springboard Version: 1.0 (50) Code Type: X86-64 (Native) Role: Foreground Parent Process: launchd_sim [36363] Coalition: com.apple.CoreSimulator.SimDevice.C20800F7-3C7B-4C62-83FB-DF67A3BD8D3A [2845] Responsible Process: SimulatorTrampoline [7758] Date/Time: 2022-11-29 14:14:46.1258 +0100 Launch Time: 2022-11-29 14:08:49.3676 +0100 OS Version: macOS 13.0.1 (22A400) Release Type: User Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x00007fe09b8fc000 Exception Codes: 0x0000000000000001, 0x00007fe09b8fc000 VM Region Info: 0x7fe09b8fc000 is not in any region. Bytes after previous region: 1 Bytes before following region: 33854341120 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL MALLOC_LARGE 7fe09a0e6000-7fe09b8fc000 [ 24.1M] rw-/rwx SM=PRV ---> GAP OF 0x7e1e04000 BYTES MALLOC_TINY 7fe87d700000-7fe87d800000 [ 1024K] rw-/rwx SM=PRV Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [39407] Restarting the simulator leads to a black screen and infinite loading, and if I erase content and settings, it just returns to its basic configuration (English (US) / USA), but after that I still can't set region or language. Restarting macOS doesn't help, reinstalling Xcode doesn't help, removing local simulator files doesn't help, and it seems nobody has the same issue... iOS 16.0 Simulator is totally fine.
Posted
by efpies.
Last updated
.
Post not yet marked as solved
46 Replies
5.9k Views
I'm unable to use XCode 14 to develop my app because as soon as a compiler error is shown, it is immediately withdrawn from the Issue Navigator pane. This makes it impossible to see what is wrong. The errors are also immediately withdrawn from the editor. This video shows 3 attempts to compile the project: after the first attempt no error shows, after the second attempt the error shows for a moment then is automatically removed (no mouse or keypress from me), after the third attempt same. https://youtu.be/bmK_k6oLYpQ I have tried rebooting, and deleting ~/Library/Developer/Xcode/DerivedData, to no effect.
Posted Last updated
.
Post not yet marked as solved
3 Replies
202 Views
Hi, since Upgrading to Ventura I cannot Debug my Photos Extension any more. But I urgently need to as we have a new bug that makes our app crash only on Ventura. (it's ONLY extensions that cannot be debugged, anything else works.) Trying to Debug shows: Could not attach to pid : “38699” Details: attach failed (Not allowed to attach to process.  Look in the console messages (Console.app), near the debugserver entries, when the attach failed.  The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.) Console: "macOSTaskPolicy: (com.apple.debugserver) may not get the task control port of (friedmann print ) (pid: 35508): (friedmann print ) is hardened, (friedmann print ) doesn't have get-task-allow, (com.apple.debugserver) is a declared debugger(com.apple.debugserver) is not a declared read-only debugger" Is there ANYTHING I can do? Or do I have to wait for the next Ventura or XCode update??? All the best Christoph
Posted Last updated
.
Post not yet marked as solved
22 Replies
2.3k Views
Hello, Switching Core Data Editor Style has been broken since Xcode 14 Beta 1. Although I can get by, it would be convenient to switch to the Graphical ER diagram style to "visually" study the model for an App. Regards and Thank You, John
Posted Last updated
.
Post not yet marked as solved
4 Replies
56 Views
I have built an app from my web site using Storyboard and view controllers. I have five tabs which all calls different URL's from my web site. Everything works perfect, except one thing: When the Home tab launches and I click on a link on the web site it opens the link in the same view controller. That is fine. But, when I want to click on the Home button again, it does not reload the site - it stays on that same URL still. So instead of going to the default URL it stays on the link address that I clicked on which is mydomain/somelinkurl. How can I make the Home button (which is a Tab Bar Controller) to reload my website again? One note: If I click on any of the other buttons in the Tab bar, and then click on Home again, THEN it reloads the site as it should. Hope you understand my issue and that someone knows how to fix this. Thank you very much in advance! /Lise
Posted
by beakiddo.
Last updated
.
Post not yet marked as solved
4 Replies
7.4k Views
Hello, I’m not a developer but a regular user and while I was checking out iOS 15’s features I came across XCode Previews within the Accessibility > Per App Settings menu. I never downloaded this app and it did not appear in the Home Screen or App Library until I opened it with a Shortcuts > Scripting > Open App command. Now it appears in the App Library but I am unable to remove it. Why is it in my phone? How can I remove it? Can it be maliciously accessed? Please help removing it.
Posted
by Mindmusik.
Last updated
.
Post not yet marked as solved
0 Replies
28 Views
After generating a unity build which works fine in the editor, I get this error in the title when I try to archive the build for App Store. My application uses both Firebase and Google AdMob, which from my research from online forums these two packages causes the problem most likely. Unfortunately I've not found any solution from the Google side. Additionally I get an error message in unity after the build but the build is created no matter what. I am not sure if this error happening because of a broken CocoaPods installation or some missing files/libraries in the build file. Any help would be appreciated. Thanks! Unity Error : iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project. After the failure, "pod repo update" was executed and succeeded. "pod install" was then attempted again, and still failed. This may be due to a broken CocoaPods installation. See: https://guides.cocoapods.org/using/troubleshooting.html for potential solutions. pod install output: Analyzing dependencies [!] CocoaPods could not find compatible versions for pod "GoogleAppMeasurement": In Podfile: Firebase/Core (= 9.6.0) was resolved to 9.6.0, which depends on FirebaseAnalytics (~> 9.6.0) was resolved to 9.6.0, which depends on FirebaseAnalytics/AdIdSupport (= 9.6.0) was resolved to 9.6.0, which depends on GoogleAppMeasurement (= 9.6.0) Google-Mobile-Ads-SDK (~> 8.8) was resolved to 8.13.0, which depends on GoogleAppMeasurement (< 9.0, >= 7.0) Xcode Errors (The error list goes on more than this): Undefined symbols for architecture arm64:   "_CGSizeFromGADAdSize", referenced from:       +[GADUPluginUtil safeAdSizeForAdSize:] in unity-plugin-library.a(GADUPluginUtil.o)   "_FIRAuthErrorUserInfoUpdatedCredentialKey", referenced from:       firebase::auth::SignInResultCallback(FIRAuthDataResult*, NSError*, firebase::SafeFutureHandle<firebase::auth::SignInResult>, firebase::auth::AuthData*) in libFirebaseCppAuth.a(auth_ios.mm.o)   "_GADAdSizeEqualToSize", referenced from:       +[GADUPluginUtil safeAdSizeForAdSize:] in unity-plugin-library.a(GADUPluginUtil.o)   "_GADAdSizeFromCGSize", referenced from:       +[GADUPluginUtil safeAdSizeForAdSize:] in unity-plugin-library.a(GADUPluginUtil.o)       +[GADUPluginUtil adSizeForWidth:height:] in unity-plugin-library.a(GADUPluginUtil.o)   "_GADAdSizeFullWidthPortraitWithHeight", referenced from:       +[GADUPluginUtil adSizeForWidth:height:] in unity-plugin-library.a(GADUPluginUtil.o)   "_GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth", referenced from:       +[GADUPluginUtil adaptiveAdSizeForWidth:orientation:] in unity-plugin-library.a(GADUPluginUtil.o)   "_GADErrorUserInfoKeyResponseInfo", referenced from:       _GADUGetAdErrorResponseInfo in unity-plugin-library.a(GADUInterface.o)   "_GADLandscapeAnchoredAdaptiveBannerAdSizeWithWidth", referenced from:       +[GADUPluginUtil adaptiveAdSizeForWidth:orientation:] in unity-plugin-library.a(GADUPluginUtil.o)   "_GADPortraitAnchoredAdaptiveBannerAdSizeWithWidth", referenced from:       +[GADUPluginUtil adaptiveAdSizeForWidth:orientation:] in unity-plugin-library.a(GADUPluginUtil.o)   "_OBJC_CLASS_$_FIRApp", referenced from:       objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)   "_OBJC_CLASS_$_FIRAuth", referenced from:       objc-class-ref in libFirebaseCppAuth.a(auth_ios.mm.o)   "_OBJC_CLASS_$_FIRComponentType", referenced from:       objc-class-ref in libFirebaseCppFirestore.a(create_credentials_provider_ios.mm.o)   "_OBJC_CLASS_$_FIRConfiguration", referenced from:       objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)   "_OBJC_CLASS_$_FIREmailAuthProvider", referenced from:       objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)   "_OBJC_CLASS_$_FIRFacebookAuthProvider", referenced from:       objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)   "_OBJC_CLASS_$_FIRGameCenterAuthProvider", referenced from:       objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
Posted
by Megasoft.
Last updated
.
Post not yet marked as solved
0 Replies
25 Views
HI guys, im new to xcode and flutter development. ive been having this error for a while and i dont seem to know why. it happens after add some dependencies into my project.with image_picker i added the necessary permissions into my info.plist file. Below are my info.plist and the error its showing. info.plist file Xcode failed build error message
Posted Last updated
.
Post not yet marked as solved
0 Replies
20 Views
Hello, I have an Xcode project that I want to deploy to App Store. When I run Product>Archive I receive an "Archive failed" error in the Signing And Capabilities section. I tried both "Automatically Manage Signing" checked and unchecked. When "Automatically Manage Signing" is unchecked, I receive 2 errors: "Failed to create a provisioning profile. There are no devices registered in your account on the developer website..." and "No profiles for 'net.myprojectname' were found. XCode could not find any IOS development provisioning profiles matching 'net.myprojectname' When "Automatically Manage Signing" is checked, I receive those same 2 errors even before I run Product>Archive. I do have a provisioning profile that appears to be visible to Xcode when the Automatically Manage Signing is unchecked. When I try to just build the project and run it on the simulator, it works fine. Again, all I want is to deploy the project to the App Store. Do I really need a registered iPhone in order to do so? (I don't have one) Or is there another way to solve it? Thank you in advance for any help.
Posted
by Skiffrace.
Last updated
.
Post not yet marked as solved
1 Replies
514 Views
Apple Documentation says that there is only one CNContainer in an iOS device of type local. Creating a container of type exchange requires using Exchange, and creating a container of type cardDAV requires a server also. Is there any way to create a container of type unassigned? I would need to do this programmatically in Swift to use in my iOS app. This question and the posts it mentions give no answer.
Posted Last updated
.
Post not yet marked as solved
2 Replies
283 Views
I'm working on a project that uses the phone camera and want to test out the functionality on my device. I recently got an iPhone 14 and updated to iOS 16.1.1. XCode is updated to 14.1. When I select my iPhone as the build destination and go to run it, a dialogue pops up: The run destination <iPhone 14> is not valid for Running the scheme 'projectname'. Xcode doesn’t support iPhone 14’s iOS 16.1.1 (20B101). I have tried: Restarting XCode Cleaning build folder Unplugging/plugging in the device unplugging, restarting XCode, plugging back in unplugging, cleaning build folder, plugging back in Is iOS 16.1.1 just not supported? Do I need to change a configuration file? I noticed in my .xcodeproj config, the iOS Deployment Target only goes up to iOS 15.4. I can select Other... and manually type in 16.1 but that does nothing (obviously). XCode 14.1 says it includes SDKs for iOS 16.1 but for some reason my device still isn't supported.
Posted
by camgould.
Last updated
.
Post not yet marked as solved
1 Replies
256 Views
Information: Xcode version: 13.4.1. MAC OS: MAC OS Monterrey 12.5 After I imported Firebase into my project with their public SDK's from GitHub, my projects is really slow to work with. Both previewing a swift view is slow (talking minutes), and simulating the app is even worse. I have a M1 Macbook Pro. Looking forward to some help!
Posted
by Haakonem.
Last updated
.
Post not yet marked as solved
1 Replies
159 Views
In XCode 13, when an XCUITest failed I would get an error message in the editor that contained useful information and allowed me to navigate to the source of an error caused somewhere in the call hierarchy. Now it only - somewhat redundantly - lists the method name of the test?! The only way I can investigate now, it seems, is to trawl through the rather verbose error log to eventually find useful information. That significantly extends the time it takes to spot errors. On a related note: I had a helper method that would wait, check for the existence of an element and, if it does not appear, would try to tap() on the element. This would give me a list of identifiers that were not matched. By looking at these, I could easily spot where I had perhaps mistyped something in my test code or otherwise messed up the element selection.
Posted
by AlexVoss.
Last updated
.
Post marked as solved
3 Replies
1.3k Views
Hi community, my existing ui-tests did test push-notification interactions. Since upgrading to Xcode 13 those tests fail when tapping a by the generic tap via XCUIApplication(bundleIdentifier: "com.apple.springboard").otherElements["Notification"].firstMatch.tap() this is the error I get *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil (NSInvalidArgumentException) actually the push notification is visible and can be queried in the debug console. just tapping it, crashes the test. I`m testing this with a real device (iPhone X, iOS 15). Testing on a iOS 14 device still works. Did anyone else face this problem or solve it? Thanks you
Posted Last updated
.
Post not yet marked as solved
1 Replies
157 Views
I am trying to Enroll to Apple developer program to upload my first app to App Store. I checked many tutorials but they all uses old method of enrolling through browser and now apple is only allowing to enrollment through Developer App So i downloaded Developer app and logged in using my Apple developer account. But when i click on "Enroll Now" button i am getting this error - Please ensure your device and iCloud account meet our system requirements I also have attached a screenshot of error I am using MacBook Air (13-inch, Early 2015) with MacOs Monterey 12.6.1 I also try by logging in my i-cloud with same apple account But still getting the Error. Please guide me through the process to register in apple developer program.
Posted
by vksdgreat.
Last updated
.
Post not yet marked as solved
0 Replies
35 Views
We are releasing IOS SDK and one of our customers has shared with us his crash log which is not symbolicated and shows a wrong instruction place in our SDK. We release our SDK with .DSYms stam2.txt I would like to symbolicate the Apple framework stack first so I have looked at the following : Code Type: ARM-64 (Native) OS Version: iOS 16.1.1 (20B101) I have downloaded the correct package for it: iOS DeviceSupport/16.1.1 (20B101) arm64 If I look at the binary images: 0x1cfeb9000 - 0x1d1696fff UIKitCore arm64-unknown <179501b60fc2344ab969b4e3961ebe10> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore so the uuid is 179501b60fc2344ab969b4e3961ebe10 BUT executing dwarfdump --uuid UIKitCore UUID: AA0A89BD-E48F-31DB-AD5C-5C724CE77D12 (arm64) UIKitCore in the iOS DeviceSupport/16.1.1 (20B101) arm64 gave me a different uuid I am wondering why the uuid are differnt? (I have also tried with arm64e) is there a way to symbolicated apple framework stack trace without the .DSYM file of the app? why the only symbolicated method is in our SDK (I guess it because we ship the SDK with .DSYM while the app developer didnt symbolize his crash logs)
Posted Last updated
.
Post not yet marked as solved
3 Replies
178 Views
Hi everyone, In the Apple overview page of Xcode Cloud, I can see this image of the result of a test executed with Xcode Cloud: The attachements of the test are displayed as a full image. But on my side, the attachements are displayed inline and not as a full image preview. I can still QuickLook them but they are always collapsed. I created an extensions of XCTestCase to easily generate screenshot attachements for my UI tests: extension XCTestCase { /// Take a screenshot of a given app and add it to the test attachements. /// - Parameters: /// - app: The app to take a screenshot of. /// - name: The name of the screenshot. func takeScreenshot(of app: XCUIApplication, named name: String) { let screenshot = app.windows.firstMatch.screenshot() let attachment = XCTAttachment(screenshot: screenshot) #if os(iOS) attachment.name = "Screenshot-\(name)-\(UIDevice.current.name).png" #else attachment.name = "Screenshot-\(name)-macOS.png" #endif attachment.lifetime = .keepAlways add(attachment) } } And use it like so on my UI Test: final class LocalizationTests: XCTestCase { override class var runsForEachTargetApplicationUIConfiguration: Bool { true } func testLaunchScreen() throws { let app = XCUIApplication() app.launch() takeScreenshot(of: app, named: "Launch") } } Here is also my test plan configuration: There are a lot of WWDC sessions about Xcode Cloud and unit testing, but I couldn't find one of them that talks about this feature. Maybe I'm missing something really obvious, but this feature would be a super nice addition to my workflow. I'm using Xcode 14.1 (14B47b) and macOS Ventura 13.0.1 (22A400). Does anyone know if it is possible to replicate the behavior showed on the Apple website? Thanks in advance for your help.
Posted
by Benjo.
Last updated
.