iCloud Testing of application in iOS simulator - xcode

I am new to the iOS application development and i came across a situation where i need to perform iCloud testing using XCode to check if it is working properly. Can anyone please suggest the steps that needs to be followed in order to perform iCloud testing of iOS application?

You can login to iCloud in the simulator. Open Settings, then login to iCloud just like you would on a device.
I highly recommend using a test account, not your actual account. I also recommend that you have that test account login on a real physical device at least once somewhere to enable additional storage and features on the account.
From that point iCloud should report as available in the simulator.
To trigger a sync with the server, use the "Trigger iCloud Sync" menu item. Simulators don't currently have server-side push notification support so the simulator device is not notified immediately about CloudKit subscriptions.
If you run into any problems please file a feedback report after reproducing the problem, then running xcrun simctl diagnose to gather logs.

Related

Xamarin.iOS on macincloud development and automatic provisioning setup

I'm trying to develop a cross-platform app using xamarin forms and mac-in-cloud. Specifically with ios, I'm trying to set-up automatic provisioning since I originally got the error when debugging: >Could not find any available provisioning profile for (app name).iOS on iOS
So, after researching into the issue I put my apple developer acct info in, and when trying to use automatic provisioning. I get an error under Team: >There were errors in the data supplied. Please correct and re-submit. There are no current IOS devices on this team matching the provided device IDs.
Now, following the research rabbit hole, I go to the apple developer portal, try and register device, select macOS, insert Hardware UUID of mac mini into device ID, so on. And no change to error(s).
Question time, am I setting it up completely wrong? Other (older) articles/forums suggest linking an ios device via itunes, however, that seems counterproductive to my objective. Anyways, any help would be greatly appreciated. Apologies for any naiveté.
What are you trying to develop with the mac? Is it a iOS (iPhone) app? If so you can just use the simulator on the mac, and the mac does not need to be registered.
Try manual provisioning in VS
Signing Identity > Development (your name)
Provisioning profile > probably will be vs (something)
Also in VS go to Preferences > Apple Developer Accounts > make sure your account is listed. Then on the right hand side, click 'View Details' then 'Download all profiles'
Restarting VS or the mac may also help.

Change iOS simulator iCloud account

I am trying to debug a CloudKit issue which means I need to see the data being saved to iCloud in the CloudKit dashboard. I have two iCloud accounts, one which is for my personal email address, and the other for my work address and which I use for iOS development. The iOS simulator seemed to pick up the iCloud account from the Mac, so the entries being saved by the app were not visible in the CloudKit dashboard. I tried logging the Mac out of my personal iCloud account, logging in to the work account, restarting the computer, resetting the content and settings of the simulator, cleaning and rebuilding the app, but it still shows all of the data I entered while on the personal iCloud account. How can I configure Xcode or the simulator to log in to a different iCloud account?
FFS... I'm an idiot. I was using the public database 😖

Allow App Data to be downloaded to iCloud (Nativescript)

My Nativescript iOS app saves some user created data using the nativescript-localstorage plugin. I want to be sure that users have a place to back-up this data.
The most straightforward option seems to be that they can include the app's data in an icloud backup (ie, icloud -> icloud Drive -> then allow the app to be backed up in the drive).
When I have used "$ tns run ios" and run the app locally on my phone, the app properly runs on my phone, but it does not appear as an option for backing up to icloud. On the icloud backup screen where apps are listed that you can choose to backup, my app does not appear.
This might be because it is just a local build, and only full releases (apps received from the app store) can be included in icloud backups, but I have not seen this confirmed anywhere.
Do I need to do anything to enable my app to be available for icloud backup?
I have figured out the key piece I was missing--that there are two different types of iCloud uses:
(i) the system-wide iCloud backup that happens automatically if the user turns it on (app developer does not need to take special action) and (ii) the iCloud as a cloud storage solution for certain data that you as the programmer need to configure.
For iCloud with CloudKit to show up as a specific feature of your app, this requires (ii)--and further configuration than just enabling it.
Further detail in my answer here.

Mac OSX Core Data App - Cannot turn on iCloud Capability

I have a published Mac app which uses Core Data and I am in the beginning stages of implementing iCloud (Documents) to sync data between devices (using Ensembles). When I attempt to turn on iCloud the app does not run. It builds successfully and then says it has finished running. This message appears in the Console:
Message from debugger: unable to attach
If I turn off the iCloud capability it will run successfully with no issues.
I am logged into iCloud, and there are no issues shown in the setup. Any ideas as to why I cannot use the iCloud capability? The same issue occurs if I try to activate Push Notifications (even with iCloud Off).
iCloud Settings 1
iCloud Settings 2

How to preview apps on iPad?

I am using xcode to develop a prototype application. Nothing too fancy, just slide effects and other simple gestures. Mostly moving images around the screen.
I can preview the app on my laptop using ios simulator, but how do I take the prototype to the iPad for a more realistic view?
Thank you
First, you need to join a paid iOS Developer Program or, if possible, the iOS University Program.
Then, you will have to create and install provisioning profiles using the steps in this documentation.
After that, you can test on iOS devices the same way you test on the Simulator.
Edit
Alleviate the need to go to the iOS Provisioning Portal every time you want to add a device to your provisioning profile by using automatic provisioning.
An easier way to install provisioning profiles is to let Xcode manage them for you. See the paragraph "To provision a device automatically for development" in this guide for more information.
This process requires a developer account with Apple - and you have to go through the Provisioning Portal to setup your provisioning profile. Apple recently came up with a great getting started guide:
https://developer.apple.com/programs/ios/gettingstarted/
Read the section on "Installing and Testing Apps on iPad, iPhone, and iPod touch".

Resources