Hi Apple Team & Everyone,
Can someone guide me why sending 'diskutil eraseDisk APFS "WIPED" GPT /dev/disk0' command via terminal to remove/wipe the main physical drive (disk0) is failed?
I tried booting into recovery mode, but it still didn’t work. The command returned the following error:
Started erase on disk0
Unmounting disk
The volume on disk0 couldn't be unmounted because it is in use by process 0 (kernel).
Error: -69877: Couldn't open device
I understand that we can use Disk Utility (GUI) to unmount and erase the drive. Is it possible to perform this operation via Terminal to erase disk0?
I would appreciate any guidance on this.
Regards,
Winson
Apple Developers
RSS for tagThis is a dedicated space for developers to connect, share ideas, collaborate, and ask questions. Introduce yourself, network with other developers, and foster a supportive community.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello,
I use Navigationstack in the first and second views. In this case, the second view is executed immediately and then disappears.
Is there a solution?
The code is as follows.
device = i-phone
struct ContentView: View {
@State var path: [String] = []
var body: some View {
NavigationStack(path: $path) {
VStack {
Text("Screen1")
Spacer()
Button(action: {
path.append("2nd")
}, label: {
Text("go to 2nd Screen")
})
}
.navigationDestination(for: String.self) { s in
if s == "2nd" {
let _ = print("1st screen nav path(1) = \(path)")
SecondScreen(path: $path)
let _ = print("1st screen nav path(2) = \(path)")
}
}
.onAppear {
print("1st screen on appear")
print("1st screen path = \(path)")
}
.onDisappear {
print("1st screen on disappear")
print("1st screen disa. path = \(path)")
}
.padding()
}
}
}
struct SecondScreen: View {
@State var path2: [String] = []
@Binding var path: [String]
var body: some View {
NavigationStack(path: $path2) {
VStack {
Text("2nd Screen is loaded")
Spacer()
Button(action: {
path2.append("3rd")
}
, label: {
Text("go to 3rd Screen")
})
Button(action: {
path2.removeLast()
}
, label: {
Text("back to 1st Screen")
})
}
.navigationDestination(for: String.self) { s in
if s == "3rd" {
// Text("3rd")
thirdScreen()
} else {
thirdScreen()
}
}
}
.onAppear {
print("2nd screen on appear")
print("2nd screen path = \(path)")
print("2nd screen path2 = \(path2)")
}
.onDisappear {
print("2nd screen on disappear")
print("2nd screen path = \(path)")
print("2nd screen disa. path2 = \(path2)")
}
}
}
struct thirdScreen: View {
var body: some View {
VStack {
Text("3rd Screen")
}
.onAppear {
print("3rd screen on appear")
}
.onDisappear {
print("3rd screen on disappear")
}
}
}
Topic:
Community
SubTopic:
Apple Developers
My Z key isn’t working and now weird characters come up when i type random keys fast.
Topic:
Community
SubTopic:
Apple Developers
I have encountered a problem that the Apple Watch cannot automatically continue playing the music in my playlist even if I have press the cycle button. It stops every song. And I used Apple Music. All these are performed without iPhone. But after restarted the watch, it works fine. I use S10 GPS watch with watch os 11.3.1. I never restarted the watch after I renewed the system. And i believe the problem have existed for more than one year as i saw a post describe the same problem on social media.
Why can’t Apple just release a version that put the most frequent used emoticons in the most left side of the emoticons keyboard???
Each person always uses the same 20 or 30 emoticons.
How this could be reported to developers?
Thx
Topic:
Community
SubTopic:
Apple Developers
Hello,
I use Navigationstack in the first and second views. In this case, the second view is executed immediately and then disappears. Is there a solution? The code is as follows.
XCode = 15.0
device = i-phone
ContentView.txt
SecondScreen.txt
thirdScreen.txt
HI APPLE I'm Jameel Perkins asking For feedback apple game center for Nintendo switch https://developer.apple.com/game-center/ ?
Dear Apple:
The program we developed uses BLE broadcasting to discover devices. The discovered device sends three broadcasts, but when we debug the program, we found that the addresses reported by centralManager::didDiscoverPeripheral for the same device's three broadcasts are actually different CBPeripheral * addresses. I would like to ask how we can identify that these three broadcasts are from the same device? Are there any variables in the peripheral that can identify it as the same device? Thanks。
My main app is CardView based w/programmatic navigation.. My secondary app is a nice EventListView w/programmatic navigation. Both are functional with no errors.
I want to add an event list to my CardView app but the appearance is all wrong. See image. The blue swirl at bottom is all of my List that appears.
I can post images of code, if needed.
My question is this - can I combine CardViews and ListViews?
Topic:
Community
SubTopic:
Apple Developers
I have an app that was written in UIKit. It's too large, and it would be much too time consuming at this point to convert it to SwiftUI.
I want to incorporate the new limited contacts into this app. The way it's currently written everything works fine except for showing the limited contacts in the contact picker.
I have downloaded and gone though the Apple tutorial app but I'm having trouble thinking it through into UIKit. After a couple of hours I decided I need help.
I understand I need to pull the contact IDs of the contacts that are in the limited contacts list. Not sure how to do that or how to get it to display in the picker. Any help would be greatly appreciated.
func requestAccess(completionHandler: @escaping (_ accessGranted: Bool) -> Void)
{
switch CNContactStore.authorizationStatus(for: .contacts)
{
case .authorized:
completionHandler(true)
case .denied:
showSettingsAlert(completionHandler)
case .restricted, .notDetermined:
CNContactStore().requestAccess(for: .contacts) { granted, error in
if granted
{
completionHandler(true)
} else {
DispatchQueue.main.async { [weak self] in
self?.showSettingsAlert(completionHandler)
}
}
}
// iOS 18 only
case .limited:
completionHandler(true)
@unknown default: break
}
}
// A text field that displays the name of the chosen contact
@IBAction func contact_Fld_Tapped(_ sender: TextField_Designable)
{
sender.resignFirstResponder()
// The contact ID that is saved to the Db
getTheCurrentContactID()
let theAlert = UIAlertController(title: K.Titles.chooseAContact, message: nil, preferredStyle: .actionSheet)
// Create a new contact
let addContact = UIAlertAction(title: K.Titles.newContact, style: .default) { [weak self] _ in
self?.requestAccess { _ in
let openContact = CNContact()
let vc = CNContactViewController(forNewContact: openContact)
vc.delegate = self // this delegate CNContactViewControllerDelegate
DispatchQueue.main.async {
self?.present(UINavigationController(rootViewController: vc), animated: true)
}
}
}
let getContact = UIAlertAction(title: K.Titles.fromContacts, style: .default) { [weak self] _ in
self?.requestAccess { _ in
self?.contactPicker.delegate = self
DispatchQueue.main.async {
self?.present(self!.contactPicker, animated: true)
}
}
}
let editBtn = UIAlertAction(title: K.Titles.editContact, style: .default) { [weak self] _ in
self?.requestAccess { _ in
let store = CNContactStore()
var vc = CNContactViewController()
do {
let descriptor = CNContactViewController.descriptorForRequiredKeys()
let editContact = try store.unifiedContact(withIdentifier: self!.oldContactID, keysToFetch: [descriptor])
vc = CNContactViewController(for: editContact)
} catch {
print("Getting contact to edit failed: \(self!.VC_String) \(error)")
}
vc.delegate = self // delegate for CNContactViewControllerDelegate
self?.navigationController?.isNavigationBarHidden = false
self?.navigationController?.navigationItem.hidesBackButton = false
self?.navigationController?.pushViewController(vc, animated: true)
}
}
let cancel = UIAlertAction(title: K.Titles.cancel, style: .cancel) { _ in }
if oldContactID.isEmpty
{
editBtn.isEnabled = false
}
theAlert.addAction(getContact) // Select from contacts
theAlert.addAction(addContact) // Create new contact
theAlert.addAction(editBtn) // Edit this contact
theAlert.addAction(cancel)
let popOver = theAlert.popoverPresentationController
popOver?.sourceView = sender
popOver?.sourceRect = sender.bounds
popOver?.permittedArrowDirections = .any
present(theAlert,animated: true)
}
func requestAccess(completionHandler: @escaping (_ accessGranted: Bool) -> Void)
{
switch CNContactStore.authorizationStatus(for: .contacts)
{
case .authorized:
completionHandler(true)
case .denied:
showSettingsAlert(completionHandler)
case .restricted, .notDetermined:
CNContactStore().requestAccess(for: .contacts) { granted, error in
if granted
{
completionHandler(true)
} else {
DispatchQueue.main.async { [weak self] in
self?.showSettingsAlert(completionHandler)
}
}
}
// iOS 18 only
case .limited:
completionHandler(true)
@unknown default: break
}
}
// MARK: - Contact Picker Delegate
extension AddEdit_Quote_VC: CNContactPickerDelegate
{
func contactPicker(_ picker: CNContactPickerViewController, didSelect contact: CNContact)
{
selectedContactID = contact.identifier
let company: String = contact.organizationName
let companyText = company == "" ? K.Titles.noCompanyName : contact.organizationName
contactNameFld_Outlet.text = CNContactFormatter.string(from: contact, style: .fullName)!
companyFld_Outlet.text = companyText
save_Array[0] = K.AppFacing.true_App
setSaveBtn_AEQuote()
}
}
extension AddEdit_Quote_VC: CNContactViewControllerDelegate
{
func contactViewController(_ viewController: CNContactViewController, shouldPerformDefaultActionFor property: CNContactProperty) -> Bool
{
return false
}
func contactViewController(_ viewController: CNContactViewController, didCompleteWith contact: CNContact?)
{
selectedContactID = contact?.identifier ?? ""
if selectedContactID != ""
{
let company: String = contact?.organizationName ?? ""
let companyText = company == "" ? K.Titles.noCompanyName : contact!.organizationName
contactNameFld_Outlet.text = CNContactFormatter.string(from: contact!, style: .fullName)
companyFld_Outlet.text = companyText
getTheCurrentContactID()
if selectedContactID != oldContactID
{
save_Array[0] = K.AppFacing.true_App
setSaveBtn_AEQuote()
}
}
dismiss(animated: true, completion: nil)
}
}
I bought a Mac mini M4 and when I used it to sign up for a developer account, I was always encountered, it needed me to take a photo, but I didn't have a camera, so I used the iriun software to connect my phone to take a photo, it works fine in FaceTime, but when I take a photo in the Apple Developer app, the round photo frame is shown black.
How can I make the camera work and if I buy a third-party camera?
A
a group of hackers have been illegally accessing my iPhone, all my accounts on my phone, my online university portal, all my stored passwords, and my iCloud. I have changes to my iPhone that I did not do. No one has had access to my iPhone other than myself. I have been dealing with these hackers for five+yrs. they have locked me out of my accounts for several years by changing all my login information. They have disabled my laptop and they have reset my previous phone remotely. I was sent a message from my provide t-mobile that they locked
my phone due to someone trying to remotely reset it. Now I am dealing with the same people again. My iphone heats up tremendously, my battery drains constantly, I cannot access my accounts because they are changing my passwords, and now they have disabled access to my sim.
Topic:
Community
SubTopic:
Apple Developers
as title suggests i want to reset adID on my iphone
Hi,
Am using fastlane to upload into TestFlight. Am able to successfully upload the build without any issues.
For Testing Internally , I want to upload the build into App Store Connect but I should restrict it on submitting to App Store. ( This is possible when i distribute the app via TestFlight Internal Only from XCode -> Organizer -> Distribute App (Select option with TestFlight Internal Only). I want to achieve the same using either Transporter/ fastlane.
I tried setting buildAudienceType to INTERNAL_ONLY as per https://developer.apple.com/documentation/appstoreconnectapi/buildaudiencetype but it is not working.
Can you suggest how i can achieve this via fastlane?
Hi all, after installing ios 18.4 beta here in Europe (and also resetting and restoring my iphone given Apple Intelligence features were not working at all initially) my phone decided to reoptimise my whole photo library which took a while and I understand it was a battery consuming process. Nonetheless, this is all done, all Apple intelligence features supposedly work and my phone is still in ongoing device setup burning through the battery to the point I am sure this will make my battery health drop.
does anyone know what is going on (indexing?), how long it will take and why is it happening? Is it because of the 18.4 beta or because of having Apple Intelligence for the first time?
can someone please confirm that at the very least this will NOT have to take place again after moving to the official 18.4?
thanks
Topic:
Community
SubTopic:
Apple Developers
xin chào tôi muốn mã sử dụng Testflight hoặc một số trợ giúp để tôi có thể sử dụng testflight
I am trying to create a phone app that can receive incoming call notifications using CallKit, as described in Apple's CallKit documentation.
Added the com.apple.developer.calling-app entitlement in my .entitlements file. Implemented CXProvider and set up the delegate methods (provider:perform: and providerDidReset). Added UIBackgroundModes with voip in Info.plist. Configured CXProviderConfiguration to support phone numbers.
I expected to receive incoming call notifications when my app was set as the default calling app. However, I am not receiving any notifications when an incoming call arrives.
How can I properly detect and handle incoming calls in my default calling app? Is there any additional configuration required for iOS 18.2+?
I am a startup founder based in India. Recently the iOS developer we were working with left the company in some what acrimonious circumstances.
Post his departure from the company, he has made it clear that he will try to cause damage to our iOS app to the extent that it starts to crash.
Even though we have removed his access, as a non tech founder, I am not sure what ways he can edit or hamper our iOS app and what measures we can take to protect the same.
Please advise us with steps for us to secure our code and ensure no one can edit the same or hamper our iOS app on the app store.
Thank you
I'm a developer that has only produced for a single company. Though my developer account shows me as the account holder, my "Enrolled as" status is "Organization," and the "Entity" field shows the name of that company. I want to build an app for a separate company/organization, but unsure how to proceed. My App Store Connect account shows the original company name beneath my name as the only option in the account ID selector menu, so when I begin the New App process it automatically assumes I'm doing it for that company. Can I change my "Enrolled as" status to something independent of any organization, do I need to create a completely separate account to do this, or how should I proceed?
Any help would be appreciated.
Thanks.
While setting up the MDM server, I got the following error:
Please tell me what the error is and how to fix it.
ProfileConnection Error com.apple.ManagedConfiguration 12:33:23.432323+0900 ManagedConfiguration PerfPowerServices MDM profile installation check failed with error:NSError.
Desc : Connectiong process 'com.apple.managedconfiguration.profiled-access' lacks permission
US Desc: Calling process lacks 'com.apple.managedconfiguration.profiled-access' entitlement
Domain : MCXPCErrorDomain
Code : 39000
Type : MCFatalError
Params : (
"com.apple.managedconfiguration.profiled-access"
)