This is a dedicated space for developers to connect, share ideas, collaborate, and ask questions. Introduce yourself, network with other developers, and join us in fostering a supportive community.

All subtopics
Posts under Community topic

Post

Replies

Boosts

Views

Activity

WWDC26 beta cellular issues
So recently, last week, ive updated to the Dev Beta of ios 26. This began the very issue of my cellular data. I woke up to a warning symbol where my cellular bars should be, telling me there was something wrong with my antenna or carrier when in reality there was no problem with any of those problems and took up about 53% of my storage. This is absolutely insane and unacceptable.
0
0
122
Jun ’25
Stuck in assistive access
i have installed the ios 26 developer beta on iphone se2 and i was testing on my phone then i got stuck on assistive access and i am not able return from there i have tried rebooting then nothing is happening there i see the some option when i pressed and hold power button and volume down for few second there is the option to exit but when i tap on it it freeze for few second it land on the lock screen of that assistive access
1
0
98
Jun ’25
Issues with iPhone Mirroring
Hi! About a month ago (somewhere around the release of iOS 18.4.1 and MacOS 15.4.1) I started having issues with the iPhone Mirroring app, saying that it's unable to connect to iPhone, although it worked seamlessly before. In error console log I see this chain of events: error 19:00:51.054054+0200 iPhone Mirroring unable to get entitlements for client task. Error: nil error 19:00:51.054074+0200 iPhone Mirroring AppleEvent sender is not entitled error 19:00:51.098453+0200 iPhone Mirroring Tearing down the session due to: noCompatiblePhone error 19:00:51.139329+0200 iPhone Mirroring CAML error:727: No such class `LKEventHandler' error 19:00:51.139342+0200 iPhone Mirroring CAML error:727: Unknown value element `LKEventHandler' error 19:00:51.139349+0200 iPhone Mirroring CAML error:727: `o' element must have `type' attribute I tried literally every solution I could find, including deleting all possible preferences, but to no avail. It also might be worth mentioning that since these issues started, I can't AirPlay from my iPhone to my Mac unless I switch the "Allow Airplay for" option to either "Anyone on the same network" or "Everyone". Can anyone tell me if this may be something connected to those latest updates, or is there anything else I can try on my end? Thanks in advance!
1
0
235
Apr ’25
Selling your first app
How long was it between putting your first app on the App Store (that had a paid component to it like IAPs) and getting your first sale? I'm working on an app at the moment that I plan on putting up for a small one time fee. I'm curious to know what people's different experiences were with this. What was your app and how did it go?
0
0
80
Jun ’25
Some questions about custom email domain names with iCloud+ Mail
In the actual development, I found that I could not complete the setting of my icloud+ customised email domain name SMTP. I tried to configure the SMTP of iCloud custom email according to Apple's document (https://support.apple.com/en-us/102525) but the error I looked through Apple's support file, but I didn't find the specific configuration of iCloud + customised email SMTP.
0
0
162
May ’25
How to detect if an iPad is configured as a Shared iPad (Apple School Manager)?
I'm working on an iOS/iPadOS app and need to determine programmatically whether the device is a Shared iPad as configured through Apple School Manager (ASM). Shared iPads allow multiple users to sign in with Managed Apple IDs and are typically used in educational environments. I want to identify this configuration at runtime within my app. I’ve looked into UIDevice, NSProcessInfo, and MDM-related APIs but haven't found a reliable way to detect whether the current device is a Shared iPad. Is there an API or method to check if the current iPad is configured as a Shared iPad (via ASM)? Any guidance or code examples would be appreciated.
0
0
223
Jun ’25
Porting Games Over to Apple Arcade
Hi all, I'm working for a publisher, and we're looking to bring some of our PC/console titles over to Apple Arcade - how viable is this? Is Unity or Unreal Engine easier to port from? Does anyone have any contacts with porting studios who have done this before? Thanks
0
0
56
Apr ’25
How can I create a shortcut to toggle macro control in iPhone settings?
I’d like to create a button on my iPhone Home Screen that changes settings if I am using an external lens mounted to my phone. This is what I have along with notes on what I hope to do. But it does not work. I am only able to open either the camera settings or the camera preserve settings but nothing will toggle macro controls. There is an additional step within the camera app as well but it can be skipped for brevity. Name: Telephoto and macro lenses Check if macro settings are already enabled or not. (Settings > Camera > Macro Control toggle) as well as (Settings > Camera > Preserve Settings > Macro Control toggle) Non-working shortcut code: Verification question: "Are you using an external lens?" If yes, Notification: "Turning on Macro Control and preserve settings for macro control." (Run below immediately) prefs:root=CAMERA&path=Turn%20On%20Macro_Control And prefs:root=CAMERA&path=CameraPreserveSettingsSwitch&path=Turn%20On%20Macro_Control If no, Notification: "Turning off Macro Control and Preserve Settings for macro control." (Run below immediately) prefs:root=CAMERA&path=Turn%20Off%20Macro_Control And prefs:root=CAMERA&path=CameraPreserveSettingsSwitch&path=Turn%20Off%20Macro_Control
0
0
121
May ’25
IOS 26.
Good day. Friends, please help. I installed iOS 26 Betta version. During the update, there was a power surge and the Internet went out. The download was difficult but it went through. Now I can't check for updates. Write connection error and checking for updates. I can't roll back to 18.5. It gives an error through the computer. Please help. Thank you in advance.
0
0
120
Jun ’25
Wireless CarPlay
i am running iOS 18.5 beta 3 (iPhone 16 pro max) and my phone will not connect wirelessly to any of my vehicles. When connected via the apple certified usb-c cord, it will connect just fine. I have removed all vehicles from my phone, then removed my phone from both vehicle, reconnected, and it still will not connect wirelessly.
0
0
61
May ’25
CSV or TSV file in Numbers app
Hi Everybody knows about how this kind of files works. My issue is about trying to load data from these files to a HTML page. Everything works, I can read and use this data on my project however the records I have in Numbers, text where there are commas for punctuation, will be separated when this file is loaded. The comma is breaking the records, I know this is a CSV file but is there a way to set semicolon as delimiter on Mac or Numbers to be able to use the comma in my records without any issue? Also could be another symbol, but definitely I need the commas. thank you!
0
0
137
Jun ’25
Clearing an app’s memory, data etc.
My app works perfectly the first time it is used but when returning to the start after playing the game and playing another it does some random things. I figure it is because the app still retains the previous game in it’s memory allocation? My question is, what is the best way programmatically to have an app start fresh and not have to quit it and open it again?
6
0
214
May ’25
BLE advertisement and scan response
Dear Apple: If a BLE advertisement carries both a 16-bit service UUIDs and a 128-bit service UUIDs along with a local name, the local name will be placed in the scan response, then when the advertisement is turned off, both the 16-bit and 128-bit service UUIDs disappear while the local name persists. Subsequently, when transmitting a new advertisement that includes the 16-bit service UUIDs and local name, the resulting advertisement contains two local names. What methods can be used to avoid having two local names appearing simultaneously?Thanks
1
0
149
Jun ’25
Is It Possible to Restore Previous Browser State After openURL on iOS?
Hi Everyone, I’m currently working on a flow where a web page redirects to our app to perform certain actions, and then returns the user back to the browser. However, on iOS, the only way to go back to the browser is by using the openURL method. The issue is that this method can only open the browser app itself—it can’t control which tab or page is shown, so the user doesn’t return to the original tab they came from. The same limitation also applies to Android. Furthermore, iOS doesn’t allow an app to programmatically return to the previous app (in this case, the browser). While Android doesn’t have an official way either, in some cases, the OS automatically returns to the previous app when ours is closed. I’d like to ask: Is there any known method or workaround that allows returning from my app back to Safari (or the default browser) and restoring the previously active web page or tab? Or, is there any way to programmatically return to the previous app from within my app? Thanks in advance for your support!
0
0
165
Apr ’25
IOS 26 Camera and External Storage
Hi All, I searched for this feedback but didn't see it, so apologies if this has been covered by another thread. Exploring the new camera app, It doesn't seem to recognize that external storage has been connected, so the additional features that allow ProRes high frame rates will throw an error dialog stating that "to use this you need external storage" even when external storage is connected. Using the Files app, the phone recognizes the storage, and this is something I can do with this external storage device on the previous version of IOS. It is clear that this release of the camera has been rewritten significantly since the last version. Is it possible that this is an oversight, a bug, or just functionality that has not been completed? Interested if anybody else is seeing this, or if it is just my setup.
0
0
116
Jun ’25
Request for Confirmation of Paid International Repair Eligibility – iPhone 14 Pro
Dear Apple Support Team, I am writing to request clarification regarding paid service eligibility for my iPhone 14 Pro outside its original country of purchase. Here are the details of my device: Model: iPhone 14 Pro Serial Number: J346337TKY Purchase Date: December 2022 Current Location: Astana, Kazakhstan Warranty Status: Expired I recently visited an Apple Authorized Service Provider in Kazakhstan, and I was informed that my device could not be accepted for repair due to regional restrictions, even on a paid basis. I would appreciate your assistance in confirming whether my device qualifies for paid repair service in Kazakhstan, or if it is strictly limited to service in its country of origin. If not eligible, could you please advise on the nearest country or region where I can receive authorized service? Looking forward to your guidance on the next steps. Best regards, Ruslan D
1
0
95
May ’25
iCloud file reading and writing (iOS)
On my first attempt at adding iCloud to my existing app this is how far I've gotten. For reasons that I won't go into, the use case for my app does not need coordination. I have successfully made my app write a file to the Documents directory of iCloud and read back that same file without errors. In testing on a real iPhone 13 and iPhone 7 I have verified that my app can write a file to iCloud from the iPhone 7 and then read back that same file on the iPhone 13, so I know that the file truly exists in the cloud. But when I make my app on the iPhone 13 write to iCloud, my app on the iPhone 7 says the file does not exist. Exactly the same build of my app is running in both phones. This is problem #1. Problem #2 is that none of these files appear in the iCloud section of the Files app on either of these Phones, nor do they appear in the iCloud section of my Mac. All devices are signed in to my same Apple account in iCloud. Also my info.plist file in the app contains: <key>NSUbiquitousContainers</key> <dict> <dict> <key>iCloud.com.{my domain}.{my app}</key> <dict> <key>NSUbiquitousContainerIsDocumentScopePublic</key> <true/> <key>NSUbiquitousContainerSupportedFolderLevels</key> <string>Any</string> <key>NSUbiquitousContainerName</key> <string>{my app}</string> </dict> </dict> </dict> <key>UIFileSharingEnabled</key><true/> The iPhone 7 is running iOS 15.8.4 and the iPhone 13 is running iOS 18.3.2. The code that does the writing to iCloud is: NSFileManager *fman = [NSFileManager defaultManager]; NSURL *urlDrive = [fman URLForUbiquityContainerIdentifier: nil]; NSURL *urlDocs = [urlDrive URLByAppendingPathComponent:@"Documents"]; if(urlDocs.path == nil) { NSLog(@"NULL path"); return; //..big problem } if( ! [fman fileExistsAtPath: urlDocs.path] ) { //..need to create the Docs directory NSError *err00 = nil; @try { [fman createDirectoryAtURL: urlDocs withIntermediateDirectories:true attributes:nil error:&err00]; NSLog(@"created the directory"); } @catch (NSException *except) { NSLog(@"Exception creating directory %@", except); } } //..directory is now created NSLog(@"url=%@", urlDocs); NSURL *urlFile = [urlDocs URLByAppendingPathComponent:txtfname()]; NSData *fdata = [@"Hello world" dataUsingEncoding: NSUTF8StringEncoding]; NSLog(@"file url=%@", urlFile); NSLog(@"file Data=%@", fdata); NSError *errorReturn = nil; Boolean ret = [fdata writeToURL: urlFile options: NSDataWritingAtomic error: &errorReturn]; NSLog(@"returned %1d, error=%@", ret?1:0, errorReturn); And the code that does the reading is: NSFileManager *fman = [NSFileManager defaultManager]; NSURL *urlDrive = [fman URLForUbiquityContainerIdentifier: nil]; NSURL *urlDocs = [urlDrive URLByAppendingPathComponent:@"Documents"]; NSLog(@"url=%@", urlDocs); if(urlDocs.path == nil) { NSLog(@"urlDocs.path is NULL!"); return; //..big problem } if( ! [fman fileExistsAtPath: urlDocs.path] ) { //..need to create the Docs directory NSLog(@"It seems the urlDocs folder does not exist"); } NSURL *urlFile = [urlDocs URLByAppendingPathComponent:txtfname()]; if([fman fileExistsAtPath: urlFile.path]) { NSLog(@"file %@ exists", urlFile); [fman copyItemAtURL: urlFile toURL:<#(nonnull NSURL *)#> error:<#(NSError *__autoreleasing _Nullable * _Nullable)#>]; } else { NSLog(@"file %@ DOES NOT EXIST!", urlFile); }
1
0
127
May ’25
WWDC26 beta cellular issues
So recently, last week, ive updated to the Dev Beta of ios 26. This began the very issue of my cellular data. I woke up to a warning symbol where my cellular bars should be, telling me there was something wrong with my antenna or carrier when in reality there was no problem with any of those problems and took up about 53% of my storage. This is absolutely insane and unacceptable.
Replies
0
Boosts
0
Views
122
Activity
Jun ’25
Hy everyone i am newbie developer
i am trying to build some projects please check out my project
Replies
1
Boosts
0
Views
185
Activity
May ’25
Stuck in assistive access
i have installed the ios 26 developer beta on iphone se2 and i was testing on my phone then i got stuck on assistive access and i am not able return from there i have tried rebooting then nothing is happening there i see the some option when i pressed and hold power button and volume down for few second there is the option to exit but when i tap on it it freeze for few second it land on the lock screen of that assistive access
Replies
1
Boosts
0
Views
98
Activity
Jun ’25
Issues with iPhone Mirroring
Hi! About a month ago (somewhere around the release of iOS 18.4.1 and MacOS 15.4.1) I started having issues with the iPhone Mirroring app, saying that it's unable to connect to iPhone, although it worked seamlessly before. In error console log I see this chain of events: error 19:00:51.054054+0200 iPhone Mirroring unable to get entitlements for client task. Error: nil error 19:00:51.054074+0200 iPhone Mirroring AppleEvent sender is not entitled error 19:00:51.098453+0200 iPhone Mirroring Tearing down the session due to: noCompatiblePhone error 19:00:51.139329+0200 iPhone Mirroring CAML error:727: No such class `LKEventHandler' error 19:00:51.139342+0200 iPhone Mirroring CAML error:727: Unknown value element `LKEventHandler' error 19:00:51.139349+0200 iPhone Mirroring CAML error:727: `o' element must have `type' attribute I tried literally every solution I could find, including deleting all possible preferences, but to no avail. It also might be worth mentioning that since these issues started, I can't AirPlay from my iPhone to my Mac unless I switch the "Allow Airplay for" option to either "Anyone on the same network" or "Everyone". Can anyone tell me if this may be something connected to those latest updates, or is there anything else I can try on my end? Thanks in advance!
Replies
1
Boosts
0
Views
235
Activity
Apr ’25
Selling your first app
How long was it between putting your first app on the App Store (that had a paid component to it like IAPs) and getting your first sale? I'm working on an app at the moment that I plan on putting up for a small one time fee. I'm curious to know what people's different experiences were with this. What was your app and how did it go?
Replies
0
Boosts
0
Views
80
Activity
Jun ’25
Some questions about custom email domain names with iCloud+ Mail
In the actual development, I found that I could not complete the setting of my icloud+ customised email domain name SMTP. I tried to configure the SMTP of iCloud custom email according to Apple's document (https://support.apple.com/en-us/102525) but the error I looked through Apple's support file, but I didn't find the specific configuration of iCloud + customised email SMTP.
Replies
0
Boosts
0
Views
162
Activity
May ’25
How to detect if an iPad is configured as a Shared iPad (Apple School Manager)?
I'm working on an iOS/iPadOS app and need to determine programmatically whether the device is a Shared iPad as configured through Apple School Manager (ASM). Shared iPads allow multiple users to sign in with Managed Apple IDs and are typically used in educational environments. I want to identify this configuration at runtime within my app. I’ve looked into UIDevice, NSProcessInfo, and MDM-related APIs but haven't found a reliable way to detect whether the current device is a Shared iPad. Is there an API or method to check if the current iPad is configured as a Shared iPad (via ASM)? Any guidance or code examples would be appreciated.
Replies
0
Boosts
0
Views
223
Activity
Jun ’25
Porting Games Over to Apple Arcade
Hi all, I'm working for a publisher, and we're looking to bring some of our PC/console titles over to Apple Arcade - how viable is this? Is Unity or Unreal Engine easier to port from? Does anyone have any contacts with porting studios who have done this before? Thanks
Replies
0
Boosts
0
Views
56
Activity
Apr ’25
Water Lock missing from WatchOS 26
I noticed the water lock feature isn’t in the control center after updating to WatchOS 26
Replies
2
Boosts
3
Views
326
Activity
Jun ’25
How can I create a shortcut to toggle macro control in iPhone settings?
I’d like to create a button on my iPhone Home Screen that changes settings if I am using an external lens mounted to my phone. This is what I have along with notes on what I hope to do. But it does not work. I am only able to open either the camera settings or the camera preserve settings but nothing will toggle macro controls. There is an additional step within the camera app as well but it can be skipped for brevity. Name: Telephoto and macro lenses Check if macro settings are already enabled or not. (Settings > Camera > Macro Control toggle) as well as (Settings > Camera > Preserve Settings > Macro Control toggle) Non-working shortcut code: Verification question: "Are you using an external lens?" If yes, Notification: "Turning on Macro Control and preserve settings for macro control." (Run below immediately) prefs:root=CAMERA&path=Turn%20On%20Macro_Control And prefs:root=CAMERA&path=CameraPreserveSettingsSwitch&path=Turn%20On%20Macro_Control If no, Notification: "Turning off Macro Control and Preserve Settings for macro control." (Run below immediately) prefs:root=CAMERA&path=Turn%20Off%20Macro_Control And prefs:root=CAMERA&path=CameraPreserveSettingsSwitch&path=Turn%20Off%20Macro_Control
Replies
0
Boosts
0
Views
121
Activity
May ’25
IOS 26.
Good day. Friends, please help. I installed iOS 26 Betta version. During the update, there was a power surge and the Internet went out. The download was difficult but it went through. Now I can't check for updates. Write connection error and checking for updates. I can't roll back to 18.5. It gives an error through the computer. Please help. Thank you in advance.
Replies
0
Boosts
0
Views
120
Activity
Jun ’25
Wireless CarPlay
i am running iOS 18.5 beta 3 (iPhone 16 pro max) and my phone will not connect wirelessly to any of my vehicles. When connected via the apple certified usb-c cord, it will connect just fine. I have removed all vehicles from my phone, then removed my phone from both vehicle, reconnected, and it still will not connect wirelessly.
Replies
0
Boosts
0
Views
61
Activity
May ’25
CSV or TSV file in Numbers app
Hi Everybody knows about how this kind of files works. My issue is about trying to load data from these files to a HTML page. Everything works, I can read and use this data on my project however the records I have in Numbers, text where there are commas for punctuation, will be separated when this file is loaded. The comma is breaking the records, I know this is a CSV file but is there a way to set semicolon as delimiter on Mac or Numbers to be able to use the comma in my records without any issue? Also could be another symbol, but definitely I need the commas. thank you!
Replies
0
Boosts
0
Views
137
Activity
Jun ’25
Clearing an app’s memory, data etc.
My app works perfectly the first time it is used but when returning to the start after playing the game and playing another it does some random things. I figure it is because the app still retains the previous game in it’s memory allocation? My question is, what is the best way programmatically to have an app start fresh and not have to quit it and open it again?
Replies
6
Boosts
0
Views
214
Activity
May ’25
BLE advertisement and scan response
Dear Apple: If a BLE advertisement carries both a 16-bit service UUIDs and a 128-bit service UUIDs along with a local name, the local name will be placed in the scan response, then when the advertisement is turned off, both the 16-bit and 128-bit service UUIDs disappear while the local name persists. Subsequently, when transmitting a new advertisement that includes the 16-bit service UUIDs and local name, the resulting advertisement contains two local names. What methods can be used to avoid having two local names appearing simultaneously?Thanks
Replies
1
Boosts
0
Views
149
Activity
Jun ’25
Is It Possible to Restore Previous Browser State After openURL on iOS?
Hi Everyone, I’m currently working on a flow where a web page redirects to our app to perform certain actions, and then returns the user back to the browser. However, on iOS, the only way to go back to the browser is by using the openURL method. The issue is that this method can only open the browser app itself—it can’t control which tab or page is shown, so the user doesn’t return to the original tab they came from. The same limitation also applies to Android. Furthermore, iOS doesn’t allow an app to programmatically return to the previous app (in this case, the browser). While Android doesn’t have an official way either, in some cases, the OS automatically returns to the previous app when ours is closed. I’d like to ask: Is there any known method or workaround that allows returning from my app back to Safari (or the default browser) and restoring the previously active web page or tab? Or, is there any way to programmatically return to the previous app from within my app? Thanks in advance for your support!
Replies
0
Boosts
0
Views
165
Activity
Apr ’25
IOS 26 Camera and External Storage
Hi All, I searched for this feedback but didn't see it, so apologies if this has been covered by another thread. Exploring the new camera app, It doesn't seem to recognize that external storage has been connected, so the additional features that allow ProRes high frame rates will throw an error dialog stating that "to use this you need external storage" even when external storage is connected. Using the Files app, the phone recognizes the storage, and this is something I can do with this external storage device on the previous version of IOS. It is clear that this release of the camera has been rewritten significantly since the last version. Is it possible that this is an oversight, a bug, or just functionality that has not been completed? Interested if anybody else is seeing this, or if it is just my setup.
Replies
0
Boosts
0
Views
116
Activity
Jun ’25
Request for Confirmation of Paid International Repair Eligibility – iPhone 14 Pro
Dear Apple Support Team, I am writing to request clarification regarding paid service eligibility for my iPhone 14 Pro outside its original country of purchase. Here are the details of my device: Model: iPhone 14 Pro Serial Number: J346337TKY Purchase Date: December 2022 Current Location: Astana, Kazakhstan Warranty Status: Expired I recently visited an Apple Authorized Service Provider in Kazakhstan, and I was informed that my device could not be accepted for repair due to regional restrictions, even on a paid basis. I would appreciate your assistance in confirming whether my device qualifies for paid repair service in Kazakhstan, or if it is strictly limited to service in its country of origin. If not eligible, could you please advise on the nearest country or region where I can receive authorized service? Looking forward to your guidance on the next steps. Best regards, Ruslan D
Replies
1
Boosts
0
Views
95
Activity
May ’25
Ios26 Mail sidebar
Mail sidebar stays
Replies
1
Boosts
0
Views
49
Activity
Jun ’25
iCloud file reading and writing (iOS)
On my first attempt at adding iCloud to my existing app this is how far I've gotten. For reasons that I won't go into, the use case for my app does not need coordination. I have successfully made my app write a file to the Documents directory of iCloud and read back that same file without errors. In testing on a real iPhone 13 and iPhone 7 I have verified that my app can write a file to iCloud from the iPhone 7 and then read back that same file on the iPhone 13, so I know that the file truly exists in the cloud. But when I make my app on the iPhone 13 write to iCloud, my app on the iPhone 7 says the file does not exist. Exactly the same build of my app is running in both phones. This is problem #1. Problem #2 is that none of these files appear in the iCloud section of the Files app on either of these Phones, nor do they appear in the iCloud section of my Mac. All devices are signed in to my same Apple account in iCloud. Also my info.plist file in the app contains: <key>NSUbiquitousContainers</key> <dict> <dict> <key>iCloud.com.{my domain}.{my app}</key> <dict> <key>NSUbiquitousContainerIsDocumentScopePublic</key> <true/> <key>NSUbiquitousContainerSupportedFolderLevels</key> <string>Any</string> <key>NSUbiquitousContainerName</key> <string>{my app}</string> </dict> </dict> </dict> <key>UIFileSharingEnabled</key><true/> The iPhone 7 is running iOS 15.8.4 and the iPhone 13 is running iOS 18.3.2. The code that does the writing to iCloud is: NSFileManager *fman = [NSFileManager defaultManager]; NSURL *urlDrive = [fman URLForUbiquityContainerIdentifier: nil]; NSURL *urlDocs = [urlDrive URLByAppendingPathComponent:@"Documents"]; if(urlDocs.path == nil) { NSLog(@"NULL path"); return; //..big problem } if( ! [fman fileExistsAtPath: urlDocs.path] ) { //..need to create the Docs directory NSError *err00 = nil; @try { [fman createDirectoryAtURL: urlDocs withIntermediateDirectories:true attributes:nil error:&err00]; NSLog(@"created the directory"); } @catch (NSException *except) { NSLog(@"Exception creating directory %@", except); } } //..directory is now created NSLog(@"url=%@", urlDocs); NSURL *urlFile = [urlDocs URLByAppendingPathComponent:txtfname()]; NSData *fdata = [@"Hello world" dataUsingEncoding: NSUTF8StringEncoding]; NSLog(@"file url=%@", urlFile); NSLog(@"file Data=%@", fdata); NSError *errorReturn = nil; Boolean ret = [fdata writeToURL: urlFile options: NSDataWritingAtomic error: &errorReturn]; NSLog(@"returned %1d, error=%@", ret?1:0, errorReturn); And the code that does the reading is: NSFileManager *fman = [NSFileManager defaultManager]; NSURL *urlDrive = [fman URLForUbiquityContainerIdentifier: nil]; NSURL *urlDocs = [urlDrive URLByAppendingPathComponent:@"Documents"]; NSLog(@"url=%@", urlDocs); if(urlDocs.path == nil) { NSLog(@"urlDocs.path is NULL!"); return; //..big problem } if( ! [fman fileExistsAtPath: urlDocs.path] ) { //..need to create the Docs directory NSLog(@"It seems the urlDocs folder does not exist"); } NSURL *urlFile = [urlDocs URLByAppendingPathComponent:txtfname()]; if([fman fileExistsAtPath: urlFile.path]) { NSLog(@"file %@ exists", urlFile); [fman copyItemAtURL: urlFile toURL:<#(nonnull NSURL *)#> error:<#(NSError *__autoreleasing _Nullable * _Nullable)#>]; } else { NSLog(@"file %@ DOES NOT EXIST!", urlFile); }
Replies
1
Boosts
0
Views
127
Activity
May ’25