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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

No Developer Mode option on iOS 16 device.
Hi, I'm really hoping someone can help me. After updating my iPhone 11 to iOS 16 and tried to launch an app from xCode on it, I noticed that I didn't have dev mode enabled. When I went to Settings > Privacy & Security to toggle the Developer Mode on, it wasn't there. There is no Developer Mode option in my settings, the only option and the end of Privacy & Security is Lockdown Mode. I tried so many troubleshooting techniques and spent a lot of time looking for solutions. I tried powering on and off while connected to my macbook with xcode running and again without xcode running. Made sure my device has the latest update (iOS 16.0.2) and my device has trusted the connection to the Macbook as well. I also had the same problem on my girlfriends brand new iPhone 13, I was really hoping it was just my device but no, her device doesn't have the Dev Mode option either. Out of curiosity I asked my friends at work if they had the option but they did not. I even went as far as going into an Apple store and checking the devices on display and they didn't have the option either. And when I asked the staff their, they didn't know why the option wasn't showing up on mine or even their own personal devices. The only source that I have found with the same issue as me is this youtube link (https://www.youtube.com/watch?v=5AEusqQV794), where it mentions that this is an issue with iOS 16 public beta users and not developer beta user and the only way to solve this is by sidloading the app which I am not gonna do. Please note that I am not running beta version on my device. I can't help think that there's something obvious that I'm missing or need to do but just can't find it. Any help or advice will by really appreciated :) Thank you
41
9
77k
Oct ’22
Xcode Cloud snapshot testing using ci_scripts directory
Setup I've been experimenting with migrating to Xcode Cloud for our CI but I'm struggling with getting Snapshot Testing to work. I've been involved in some discussions here... https://github.com/pointfreeco/swift-snapshot-testing/discussions/553 And I saw this site also which explains a little... https://wojciechkulik.pl/xcode/xcode-cloud-overview-and-setup But so far I've been unsuccessful in getting it to work at all. I'm using the swift-snapshot-testing library from PointFree https://github.com/pointfreeco/swift-snapshot-testing and I have overridden the assertSnapshot function to change the snapshot testing directory. The function looks like this... func snapshotDirectory( for file: StaticString, ciScriptsPathComponent: String = "ci_scripts", relativePathComponent: String = "Tests" ) -> String { var sourcePathComponents = URL(fileURLWithPath: "\(file)").pathComponents if let indexFolder = sourcePathComponents.firstIndex(of: relativePathComponent) { sourcePathComponents.insert("resources", at: indexFolder) sourcePathComponents.insert(ciScriptsPathComponent, at: indexFolder) } var pathsComponents: [String] = sourcePathComponents.dropLast() let fileUrl = URL(fileURLWithPath: "\(file)", isDirectory: false) let folderName = fileUrl.deletingPathExtension().lastPathComponent pathsComponents.append("__Snapshots__") pathsComponents.append(folderName) let directory = String(pathsComponents.joined(separator: "/").dropFirst()) return directory } public func assertSnapshot<Value, Format>( matching value: @autoclosure () throws -> Value, as snapshotting: Snapshotting<Value, Format>, named name: String? = nil, record recording: Bool = false, timeout: TimeInterval = 5, file: StaticString = #file, testName: String = #function, line: UInt = #line ) { let failure = verifySnapshot( matching: try value(), as: snapshotting, named: name, record: recording, snapshotDirectory: snapshotDirectory(for: file), timeout: timeout, file: file, testName: testName ) guard let message = failure else { return } XCTFail("\(message) snap: \(snapshotDirectoryUrl) file: \(file) ", file: file, line: line) } Essentially this takes my test file path... repoRoot/Tests/FeatureTests/FeatureTestFile.swift. And injects some path component into it so that you end up with a directory path... repoRoot/ci_scripts/resources/Tests/FeatureTests/__Snapshots__/FeatureTestFile/. And then the snapshot file will be located in that directory using the name of the test function with a suffix of .1.txt or .2.txt (etc... for each subsequent snapshot in each function). i.e. testSnapshotStuff.1.txt, testSnapshotStuff.2.txt. Problem This all works locally. And all the files are checked into GitHub. But, when I run this on Xcode Cloud it fails the tests and tells me the files are not there. Having added some logging in it is writing new snapshot files to where I am expecting them to be so it just looks like those files are not available to the Test environment. This is where I read about putting them into the ci_scripts file at the root of the repo. Which is what I've done. Files in this directory are supposed to be copied into the test environments so that they can be accessed... but it seems that they're not being. I have tried using ci_scripts/resources and ci_scripts/Artifacts but it's always the same. The files aren't there and the Xcode Cloud tests write those files there over time. I'm running out of options of what to do with this now. I just want a way that I can access these snapshot files in the test environment on Xcode Cloud. Any help would be much appreciated. Thanks
2
1
2.3k
Oct ’22
Xcode 14.0.1 crashes while idle
Very strange issue. It seems that a specific project of mine causes Xcode to crash while idle due to resources issue. Not sure if related, but when viewing source code differences of this project, the entire window is flickering like crazy... crash file is attached (converted to txt file otherwise can't attach it) Any ideas? ExcResource_Xcode-2022-10-07-115919.diag.txt
12
1
3.6k
Oct ’22
Minimum deployments XCODE 14.0.1 (14A400)
hello, Im struggling with the Minimum deployments section in Xcode 14 for the Target of my iOS and Mac Catalyst app. Its a bit different from what I'm used, previously I could look at the values in a drop down box. That values I would like to set are iOS 12.4 and MacOS 11.0. What is macOS 14.2 ? it that a catalyst number, What macOS is that? Nevermind I found this - macCatalyst 13.0 = macOS 10.15 macCatalyst 13.4 = macOS 10.15.4 macCatalyst 14.0 = macOS 11.0 macCatalyst 14.7 = macOS 11.6 macCatalyst 15.0 = macOS 12.0 macCatalyst 15.3 = macOS 12.2 and 12.2.1 macCatalyst 15.4 = macOS 12.3 macCatalyst 15.5 = macOS 12.4 macCatalyst 15.6 = macOS 12.5 How do I delete a question?
1
0
1.3k
Oct ’22
Can no longer start iOS app on MacOS via XCode
I'm writing here because I'm out of ideas now, I allow my iOS app to be used on macOS and previously I was able to launch my app via XCode and perform debugging but suddenly I'm not able to launch my app anymore (I updated my OS (12.6) and my XCode (14.0.1) in the meantime). When I start it I see the icon but then it immediately crashes with following error in the output AddressSanitizer: CHECK failed: sanitizer_mac.cpp:1231 "((ret_value)) &lt;= (((1ULL &lt;&lt; 36)))" ... AddressSanitizer: CHECK failed: sanitizer_mac.cpp:1231 "((ret_value)) &lt;= (((1ULL &lt;&lt; 36)))" ... (lldb)  I can't even put a breakpoint anywhere as my code doesn't even get executed. I tried a test project and it works there but my project doesn't start up even though it works perfectly fine on iOS/ tvOS and on iPads. How can I fix this error or what's exactly the problem?
3
2
1.7k
Oct ’22
Help with blocked developer account
Hi all I don’t even know if this is a help post or just a cry from my soul. I'll start from the very beginning. My firm is developing software for small and medium businesses. For us developers, there is nothing unusual about this. If the client's store, we transfer it beautifully and without problems to the mobile application. We have been releasing apps since 2019. And everything was fine, even excellent, until August 2022. In August, after submitting the application for review, I, as the account developer, received a notice that clause 3.2f was violated and that my account would be closed. It is clear that I immediately filed an appeal, but the Apple inspectors said that they would not change their minds. To say that I was shocked = to say nothing. Since then, I have filed 6 appeals, created other accounts (tried), so that our clients are calm that we are fulfilling our obligations. no response to appeals (no calls, no letters) Does anyone know how else to contact support? Because I have no more ideas, honestly - I'm broken. Thanks for reading, Tim
1
0
1k
Oct ’22
Unable to Boot Simulator - Xcode 14.0.1
I am running XCode 14.0.1 on mac ios 12.6. When I try to run any app in any simulator I get and alert: "Unable to boot the Simulator. Interrupted System Call." I have followed steps described in other posts. I've gone to About this Mac > Storage > Manage > Developer and deleted XCode Cache. I've deleted and re-added simulators in XCode itself. I even re-installed XCode. Nothing works. When I check the "Detail" button in my "Unable to Boot" alert, I also get this: "Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding Domain: com.apple.SimLaunchHostService.RequestError Code: 4" Does anyone have any clues as to what is happening? Thanks
1
0
2.5k
Oct ’22
Updateign provisioning taking forever
Hello, in the past couple of weeks I've been experience some problems with xcode regarding the signing & capabilities. I work in a company that makes customized apps for every of our clients and beacause of that we have about 200 targets in our project. In the past couple of weeks, I have been hanving trouble with the signing & capabilities in xcode. Some times is taking too long to load the poart where i select the team were the app will be upload and when it does it got stuck with the massege updating provisioning . There is anything that could have been done to not take too much time to the target get ready to be publiched? Thanks in advanced for any help.
2
3
610
Nov ’22
How to disable Temporary Tabs in Xcode?
It's maddening. I just opened a file and now it's gone because I had the audacity to open another file. I've learned that I can double click the tab of the first file to make it a permanent tab... but, of course, I'll need to do that every time I ever open any file ever, and if I close that file and come back to it later I'm going to be constantly having to double click tabs just to make Xcode stop replacing my tabs for me. It's nuts. It's driving me insane. Please. Is there any way to just DISABLE the temporary tabs behavior? I don't find it helpful in any way and I find it to be destructive to my development workflows.
5
2
2.5k
Nov ’22
Instruments cannot find binary for disassembly
Since version 14, Instruments cannot find the binary to show disassembly of executable or library. It says: Error - Binary file for selected symbol is expected to be here: /Users/<user>/Library/Developer/Xcode/DerivedData/<project>/Build/Products/Release/<project>. The thing is that the path shown by Instruments is actually the right one, and of course the binary exists in this directory. Am I missing something somewhere ?
3
1
2.0k
Nov ’22
Keyboard on Xcode Previews
Hey guys, anybody knows how to fix issues with the keyboard on Xcode in preview mode? it used to work well for me but has now stopped working, see details. Problem statement: Cannot use the keyboard in previews. For example, typing in a textfield does nothing. Everything works well in simulator. Environment: macOS Monterey 12.6 Xcode 14.1 Thanks in advance for your input.
2
1
1.5k
Nov ’22
XCode 14.1: Stuck at "Launching Application" after building the project
Hello team, On Xcode 14.1, After building the project and when the simulator launches, it shows blank black screen. Here steps to reproduce: build the project with fresh device. Try changing the language to French in device settings Device should launch in French language. Instead, it loads and goes blank (blank screen) Quit the simulator (XPC error is displayed) and rebuild the project using the same simulator device. Build succeeds and simulator launches, but has blank screen on simulator. Xcode is stuck at "Launching Application" Is this a known issue? Has anyone experienced the same? How can I fix this? Stack (https://stackoverflow.com/questions/74315983/xcode-stuck-on-launching-application) says its a bug, so posting here for recommendations
114
38
44k
Nov ’22
Command CodeSign fails because of two Apple Worldwide Developer certificates
I have an Apple Development certificate issued by: Apple Worldwide Developer Relations Certification Authority (until February 20, 2030). From time to time the Xcode build fails and I see that my certificate is invalid. In this situation, I see two "Apple Worldwide Developer Relations Certification Authority" certificates. One is valid until 2030 and the other is valid until 2023. When I remove the second one (until 2023), my Apple Development certificate becomes valid and the build goes fine. But after a while CodeSign fails again, and I have to remove the second certificate again to build the application. Seems to be that second certificates is auto downloaded by Xcode, how can i fix it?
14
1
2.3k
Nov ’22
Flutter App with WatchOS - Archive Problem
Hi there, I have a problem archiving a Flutter App containing an Apple WatchOS Target. The WatchOS target is built with the new logic, containing only one app and no Watchkit extension. When I build the app on my iPhone/Simulator everything is working just fine and they can communicate without any problems. The error occurs when I'm trying to upload my built archive to App Store Connect for Testflight testing purposes. It fails with the error Asset validation failed: "Missing Info.plist value. A value for the key “WKApplication“, or “WKWatchKitApp“ if your project has a WatchKit App Extension target, is required in “Runner.app/Watch/MyWatchOSApp Watch App.app“ bundle. For details, see: https://developer.apple.com/documentation/watchkit/creating_independent_watchos_apps/setting_up_a_watchos_project". I tried to fix it by adding a info.plist to the WatchOS target, which isn't created initially. By doing so I can not build the Runner App anymore because it fails with "A WatchKit app within this app is not a valid bundle.". Can anyone help me fix it please? Thank you! Greetings
3
1
2.7k
Nov ’22
XCODE 14.1 stuck on "launching application" Mac M1
After updating my Xcode, my Xcode is always stuck on "launching app" and the simulator is on a black screen every 2nd time I run the code. Steps to duplicate. Close the simulator Build and run code Here, Xcode runs the code perfectly. After I made changes in the code and re-ran the code, Xcode is now stuck on "launching app" and the simulator is on a black screen To rerun the code, I would have to go back to step 1 again to run the app on the simulator. Does anyone have an idea of how I can fix this? I tried removing derived data, and changing simulators, doing sudo xcrun simctl erase all in the terminal but didn't fix the issue.
9
6
3.1k
Dec ’22
TestFlight shows iOS app supports macOS, but still says its iOS only
Initially I removed the macOS support for my iPhone app. Now I want to enable it, so I enabled macOS Designed for iPad in Xcode, and also enabled macOS in App Store Connect for the app. In TestFlight on macOS it shows "Requires macOS and a Mac with Apple Silicon chip" but still lists it under IOS only Apps. (My Mac is Mac Book Air M1, macOS 13.1). I have another simple app which I created and it works just fine and I can't find any difference in the build setup between the two. I have verified the App works well with Mac (Designed for iPad) simulator so the App do work on macOS that much is certain. So my question is how can I enable macOS for an IOS app that previously was only built for iPhone/iPad. Either I'm missing a step or there is a bug lurking here. As it is now I am not able to install the app on macOS from TestFlight. Thanks, Marcus
2
5
1.6k
Dec ’22