I am trying to make a small language learning app using Core Data. Everything is working fine except for one thing: if I use the simulator( iphone SE, for instance) that was selected when I was creating the app, I have got access to all the data from my attributes. But when I switch to another simulator (not an actual device) to run the app , all the attributes look like there are empty, and I do not get nothing.
So if I try to save new data using a different simulator at the top left, i can only get acces to those data only if i run the same simulator that was used to save them.
In a nuthshell, i want to get access to my recorded data no matter what simulator I use.
Can anyone help me solve this problem, please?
Each simulator is independent, and different simulators do not share data. Each one acts like it's a separate simulated device. This isn't about Core Data-- it would be the same for any data your app saves. There's no good way to share data between simulators. Some command-line Unix wizardry might get shared files but it's not built in or supported.
Related
I am planning a project CCTV system using Node.js and openCV, WebGL.
Would you please take a look at my plan and find flaw or give me advice?
My plan is: Entire system consists of 3 types of host, CCTV-server-watchmen. Numbers of each host may be (more than 10)-1-3? CCTV take a video and send it to the server. The server identifies persons in the video, and analyzes who this person is and where he or she is(using OpenCV). Finally, watchmen can seize entire status of field he or she manages(map drawn by webGL helps it). I will use node.js as network method.
I have a few issues about my plan.
Is it efficient to use Node.js as video data transmitter?
Basic concept of Node.js is single-thread, so maybe large data like video does not fit to it. But, count of CCTV and watchmen is limited and fixed(It is system for closed intranet)
Is there any method can replace Node.js?
I will not replace openCV and WebGL. But Node.js could matters. At the beginning of planning, I was finding other means for networking between C/C++ program and web-browser. Honestly, I got failed at school-project last year. One of problems that I can't find solution was "How to send/receive data between C program installed at Raspberry Pi and web Browser". I chose Node.js as method this project, but also heard other means of Qt, DB, CGI. Is there a better way?
Thank you for reading it.
I have a coredata app that I would love to be able to share the same data with multiple devices, possibly with iCloud/cloud kit. I am not sure where to start, or how to go about it? The only thing I can think of, but still not sure how to do, would be to sync the SQLite files with iCloud? Not sure if thats a good idea or not? I just recently converted my app over to swift 3 and iOS10 core data code. The only way I am able to share data between devices currently is thru iTunes files sharing.
For whatever reason this topic is hard to find modern info on.
Core Data doesn't have support for this. Except for the built-in iCloud sync, but that's deprecated as of iOS 10.
You could use CloudKit to sync data, but you'll have to write your own code to convert between Core Data's persistent store and CloudKit's online store. It's not impossible but it's certainly not automatic.
Syncing the SQLite file is not a good idea unless you really want to corrupt the data.
I'm having a heck of a time trying to get kAudioUnitEvent_ParameterValueChange to work with my custom C++ Audio Unit Host app and a third party 'aumu' unit. I'm loading the unit and displaying the user interfaces just fine. The audio unit is uniquely rare however, in that the plugin is an interface for an external hardware music device. I'm so close but getting weird results.
1) When I change a parameter on the external device, it shows the updated parameter value in the audio unit's custom UI but not in the generic UI. No event changes are notified.
2) When I change a parameter in the custom UI, neither the external hardware or generic UI detect the updated values and still no parameter change events. So nothing was getting change values.
3) When I change a value in the generic UI, everything works properly. I get updated parameter values on both the external device and the custom UI and I'm getting kAudioUnitEvent_ParameterValueChange events.
I'm ultimately trying to get the external device parameters to notify my host app of the event change. My understanding is that Audio Units automatically update parameter values between the UIs and should generate event changes no matter which UI end I use. It seems weird to me that it isn't all being handled automatically. Am I doing something wrong or could this have to do with the Plugin or my Host app?
It seems to work just fine using JUCE pluginHost example but I haven't been able to use JUCE's standalone modules in my project successfully either. Not a lot of Docs on the matter. I've been at this for weeks and just out of ideas.
I don't know much about FirefoxOS hence this question.
I have an android app that ships with already prepared data saved in SQLite database. In the runtime the app copies that db to the device storage and uses it for reading and writing data. This is much more efficient than creating empty DB file and inserting data when the app first starts(e.g from JSON).
I was wondering how can I achieve the same thing in Firefox OS? Is there any way I can create IndexedDB, fill it with data and then add it to the app package as an asset?
Unfortunately this behavior is not yet supported. As Fabrice Desré mentioned in bugzilla, some of the files to achieve this behaviour is specific to gaia apps, which gecko does not have access at the moment.
By now, you will have to stick with the less efficient method (depending on the size of your db, the difference isn't that big).
Hope I was able to help,
cheers
What is the best way to check iCloud for existing data?
I need to check that data doesn't exist on the local device, or iCloud so I can then download it.
Since you included the core-data tag I'm assuming you mean that you're using Core Data rather than iCloud file APIs or the ubiquitous key-value store.
With Core Data's built-in iCloud support, you check on existing data in exactly the same way as if you were not using iCloud. Once you create your Core Data stack, you check what data exists by doing normal Core Data fetches. There's no (exposed) concept of local vs. cloud data, there's just one data store that happens to know how to communicate with iCloud. You don't explicitly initiate downloads-- they happen automatically.
At app launch time when you call addPersistentStoreWithType:configuration:URL:options:error:, Core Data internally initiates the download of any data that's not available locally yet. As a result this method may block for a while. If it returns successfully, then all current downloads can be assumed to be complete.
If new changes appear while your app is running, Core Data will download and import them and, when it's finished, will post NSPersistentStoreDidImportUbiquitousContentChangesNotification to tell you what just happened.
This all describes how Core Data's iCloud is supposed to work. In practice you'll probably find that it doesn't always work as intended.
Thanks to #Tom Harrington for pointing out, this error is nothing to do with the developer/coding - it's purely to do with iCloud/Apple/connection issues.
More on this SO answer I found.