Fake Step Data for Apple Health Kit in React Native Development - ios

I'm developing a React-Native app that utilizes Apple Health-Kit to gather daily step data for users. I've got everything setup and running, but I'm not sure what people are doing to provide fake step data for testing/development purposes. For the other parts of my app, I'm always getting data from HTTP requests, for which I just provide a test api and serve up dummy data from a file in my repo. But does anyone know how to do this for step data (or any other sort of data) in Apple Health-Kit?
Thanks

I figured out a way to handle this. Newer versions of the Xcode iPhone simulator come with Apple Health Kit installed. So, you can just manually go into the app in the simulator and add some step data the old fashioned way. Not a scalable solution if you need loads of data, but good enough for my needs.

You can manually add step data via the Health app already included on your iPhone simulator.

Related

Fcm implementation in self made framework

I am new to the IOS development. I have created the app and Implemented the FCM in it. And notifications are working just fine as expected.
Now I have to make this whole code as a private framework. but I am really confused. The following is the thing that is what confused me
I have a workspace with the Framework and the multiple apps that depends on the Framework.You can think framework as a complete app.And the multiple apps are dependent on the framework and these multiple apps have no UI but starting the Framework app with the following things (And these following things are what I am unable to do and are needed for each client app)
App Name
App Icons
App Colors
And Ofcourse FCM plist google file for each client separately
So I really do not know How to make these things change for each client. Because I really do not know if there is something to be done for the shared resources to be get overrided by the Client app.
So what should be done here? How can I fulfill these requirements? how can I achieve what I wanted?
I hope that I am pretty clear in my questions. Please tell me how it can be done.

How to demo your react-native app continuously during development

As the title suggest I need to be able to showcase a react native app continuously during development every other day with a client which is not technical orientated. The alternativs I see is,
* Sharing a git/github repo for them to download and run through Xcode
which is not a possibility.
*Screen record while i run the simulation on my computer and share it
with the client
Both of these options seems subpar and not optimal.
How do I do this in a better way?
I am sorry if this seems like an open ended question and if you have suggestions on how to better formulate this question please provide it.
You can upload the binary to TestFlight, which allows your client to download and use the app instantly.
You can also consider over-the-air update systems like Expo or CodePush which allows you to deliver Javascript-only updates automatically to your clients when they open the app (just like a web app).

How do I move data to a new version of the iOS app?

I'm developing an app from scratch in Xamarin that is intended to be an upgrade from an existing app developed previously in xcode and already available on the app store (I haven't seen it, but I presume it's objective c). The new app needs to ingest data from the old app so the user transition experience is smooth. I don't currently know how the old data is stored on the iOS device, just that it is stored on the device and not in a more convenient location.
Assuming I need access to all the data the old app might have stored on the device, what are my options? Can I release it as a separate app and somehow ingest the old data? Do I have to release it as the same app to the app store to gain access to the old data? Am I going to have to consider the harder route of updating the old app to store the data in a special way or in the cloud so the new app can then access it?
While I'm doing this is Xamarin, I'm fine with answers that discuss what Apple provides and how iOS works in this instance, and I'll figure out what that means for Xamarin, but Xamarin specific answers would be greatly appreciated.

How to access iCloud as core data for iCloud is deprecated

I am working on an app using core data as I thought I could use sync functionality provided by core data for iCloud for syncing data between iPad and iPhone, now it is deprecated.
I came across CloudKit but it is mainly to create and manage data that can be consumed by community of end users but not just one like chat apps. My app is only for single user so that user can sync their data between their apple eco system devices.
I am new to iOS development so it would be helpful to know which technology will meet my requirements.
In short, can you please suggest what should I use
If have to store data on phone for offline use
Then sync it across devices if user have say iPhone, iPad, and iWatch
P.S. Can you please suggest something that doesn't need the user to be signed into iCloud while saving the data.
The CoreData/iCloud integration is deprecated in iOS 10 / macOS Sierra, and there is no replacement (at least so far).
Way forward so far :
Use third party framework such as Ensembles : http://www.ensembles.io
Use CloudKit, which can be used for that. See this for a help : https://nickharris.wordpress.com/2016/02/09/cloudkit-core-data-nsoperations-introduction/
Note that CoreData/iCloud integration will still be working for some time in the future. Apps that are using it will not suddenly stop working.
Apple just released a new container for Core Data that can sync across devices with iCloud.
Get started here: https://developer.apple.com/documentation/coredata/mirroring_a_core_data_store_with_cloudkit/setting_up_core_data_with_cloudkit
Note, this requires iOS 13.
You should take a look at the videos from the latest WWDC.
Here is something about CloudKit Best Practices and whats new in cloud kit
CloudKit really have some nice out of the box solutions and you dont have to bother about security. Also the newest functionality enables you to use notifications for synchronising apps using the same apple id and even beyond, as the user can now opt to share certain data.
Depending how much data you are syncing, NSUbiquitousKeyValueStore.default() is also an option. But only for very less data

Preserve Core Data Between Development Distributions

I have a development distribution of an app out on a couple of devices.
Turns out my export functionality causes a memory leak - meaning I can't get that screen to open without reinstalling the distribution of the app.
Is that data totally lost? I'd really like to be able to save it.
Some ideas:
Write a second helper app that could grab the data
Write some sort of shell script that could retrieve the data plugged into a comptuer
Plug in the devices to a computer... do something in Xcode... no lost data?
Is there any hope?
UPDATE
There was hope!
First - Your data is accessible via Organizer in XCode.
Second - New versions in iTunes do not overwrite core data. BUT you're going to want to make sure the version # increases as iTunes was somewhat finicky about sending over the new version. Your testers might be tempted to delete the app - replacing it in iTunes and re-syncing is all they need to do.
If you update the app without deleting it first, the data is not removed by the OS. So the new version of your app has the opportunity to read the old data.

Resources