How to set "report inappropriate content" with cloudkit? - ios

I'm learning iOS and am unsure what approach to take here so this isn't specific as I'd like. My app allows users to generate content. I'd like to allow them to flag content that's generated by others as inappropriate. If I'm using cloudkit, do I just create a flag button that sets YES if flagged and in the dashboard search for it? Is there a mechanism I should use in iOS that will notify me of this automatically? Any guidance is greatly appreciated.

You could indeed add a value that marks a record as inappropriate. You could create a second app (OS X or iOS) that connects to the same data container. In that second app you could create a subscription where the predicate is a filter for that value. You would then receive push notifications whenever something is set to inappropriate.

Related

How to create Account based Sync for specific app in iOS like android

How to create Account based Sync for specific app in iOS like android. Which has to sync data in specific interval. and i think mailbox managed all things but How to Mail Box manage these all things, because in following path setting->mail->accounts->Fetch New Data-> given there we can configure.
How the Same thing i can achieve. any idea and thanks in advance for help.
Also i attached the MailBox Setting Screenshot.enter image description here

Is it possible to send mails periodically from iOS app

I'm developing an app that creates a simple document with basic information created by the app. It won't contain any personal information, but it will contain data created and requested by the user. I want the user to be able to send this to themselves via email. I would also like to add the option for the user to have this file (which updates daily) to be able to send to them automatically every week/month, so they won't have to think about it. The user can set the intervals themselves.
Is this possible? The user will set up this option themselves from a menu, so it's not like they won't know it's happening. Every automatic mail will also contain information on how to turn the option back off again.
Is this possible and is it allowed by Apple?
Thanks for your reply
It is not possible from within the app. A user has to explicitly send the email through the MFMailComposeViewController.
If you want this functionality, you should build a backend for your app.
To clarify, if you want to use the users configured accounts; i.e. the account they use with Mail, then no you cannot do this automatically. The other answers rely on the fact a user enters their POP/IMAP settings, which personally I would never do.
You could use an email service as mandril or mailgun, to send emails "from your app".
Take a look at this: https://github.com/rackerlabs/objc-mailgun
There's a library called MailCore that's incredibly powerful. You can use it to send mail in the background of your app without needing to present the built in mail composer view
https://github.com/MailCore/mailcore2

iOS access phone settings programmatically

is it possible to access the phone settings of an iOS Device programmatically? I'm currently building an app and there I will provide contact possibillities, for example a direct link for calling (you just push it and then the specific contact number is called).
But I only want to show that possibility, if the user isn't calling with an unknown number.
You can access the contacts stored in the phone using the Address Book framework. If you're unfamiliar with the framework, I suggest you take a look at this quick start tutorial.
EDIT It seems you wish to read the state of the Show My Caller ID system setting, however you cannot programmatically access the system settings.
Use ABAddressBook for getting contact details in your project...
see this

Prevent installing passbook on multiple devices

Not exactly a programming question but here it goes:
How can a company who is distributing passbook passes via email or web prevent a pass from being installed on more than one device?
I can not find anything about this on Apple docs. The only I can think of is to check on the device registration webservice whether the combination of pass type and serial has a device already registered and delete it , but I am not aware of any command to delete the pass remotely.
Another option would be to check if it is already registered prior to generating the pass but this would only work for URL distribution, not for email.
Is there any way to delete a pass remotely via push notification + update? Any ideas on how to solve this issue?
Mail and Mobile Safari will present any pass they are given and the user can decide to add them to their Passbook. There is nothing the pass creator can do to prevent it except to be careful about how the .pkpass files get handed around.
If you really only want to deliver a specific pass to a specific device you might consider a companion app that uses a custom API to communicate with the the backend and request the pass for that device that way. Then you have much more control than distribution via email or url links.
Apple frowns on trying to delete a pass programmatically; only users are supposed to delete passes because they added them. You can, however, update a pass to make it clear that is not valid and should be deleted. For example you can remove the bar code, if any, and use a background image with a big red "INVALID" on it.
Just to extend #ohmi's answer:
You cannot prevent passes from being installed on more than one
device - e.g. if user enables iCloud for Passbook, the passes will get
synced automatically across devices.
Considering your links to pkpasses are public, you may want to consider
introducing one-time download links, but while it can fill your
needs just fine, users can be really disappointed if it's impossible to re-add
passes that they manually deleted. So I wouldn't recommend such solution.
You can make you pkpass links kind of private, so only GET request originating from your application and carrying a specific value for specific header field (e.g. auth_token), will receive a pkpass file, however this way you almost disable pass distribution via email or via sharing URLs to passes and make pass updating probably impossible.

iOS first time user tutorial

I'm building an iPhone app and want to create a 1st time use tutorial for the user. I've seen some other apps use popover style baloons to guide the user through the UI and I'd like to do that as well. I have a popover library. What's the best way to create and track the steps of the tutorial?
I would go with NSUserDefaults. Just trigger some BOOL-ean values to change as each part finishes. I assume you want to continue the tutorial if the user quits the app, so this would be your best and easiest bet.
BOOLs for each dialog? Persisted however you want - NSUserDefaults or plist, json file, xml, whatever.
You can also use NSUbiquitousKeyValueStore if you want to setting to sync across devices using iCloud. If the user doesn't have iCloud configured it will just store it locally.

Resources