Creating Albums on iCloud and storing different photos in each album using cloudKit Swift 4 - swift4

I am new to iOS Development and I am creating this project where I need to use CloudKit in order to save photos on iCloud. So basically my app will allow user to create different photo albums and inside every album adding photos of his/her choice, the catch is user will only be able to see this adding album page when a secret password is entered on a separate page.
Basically I need some guidance from you guys in order to achieve this task. After searching online I came to know that i have to use CloudKit in order to integrate iCloud in my app.
Basically i am looking for answers to this following questions :
After integrating CloudKit what am I suppose to do?
How can i create different folders on iCloud and how can I possibly give unique ids to them?
How can I upload photos to specific album?
If someone has reference code to such app,it will be of great help.
looking forward to get my doubts cleared.

Related

Get iCloud Document Share link programmatically

How can I get the share link for a file on iCloud documents in swift?
I want the link which is generated, when I share a file in iCloud documents from finder (share with another person, copy link).
The truth is: at the current point in time, it is not possible to get the iCloud share link with the API apple offers. Maybe in the future.

iPhone App - Using and Storing Contact Photos Best Practice

I was wondering if anyone had any best practices or advice for using contact photos in an app. Essentially I'm building an app that mimics the given contact app except my app will provide the contacts and their photos - this is so the user doesn't have to add contacts etc.
I can get my app to read an XML file for the contact information though I may change this to the JSON stuff served from a web server - right now the XML is within the app for testing purposes and I have to read up on JSON. This XML file simply holds the contact information and I show a contact photo that's in the support files for testing purposes too.
What would be a good way to server contact photos? Any best practices or advice? Should I store photos on the users phones and just reference them?
Hi for that case use Lazyloading
checkout this LazyloadingSample

Facebook: detecting user apps

Hello I've read the docs and am having trouble getting a definitive answer for the following questions:
Can our app detect if another app is used by a given user. What about if we are admin of, or have the id of both apps.
If one of the apps is removed from FB is there a way to tell if a user had it installed before it was removed? A sort of history of past apps, I guess.
Here:
FB Connect: is there a way to see the logged in user's facebook apps?
Best answer is "I think the most you can do..." but I'd like to know for sure.
Thanks for any help.
If you request the permission user_actions:APP_NAMESPACE you can see the open graph actions that the user has performed in that app.
http://developers.facebook.com/docs/authentication/permissions/#open_graph_perms
In my apps I generally store the user ID of all authorized users in a database, and when I get a call via the "Deauthorize Callback URL" I don't delete the user from the database, but instead only flag the user as deauthorized.
This way I can easily get an overview of users that are using (or have used) any of my apps. This allows me to present special features for users who are using several of my apps.
For example, let's say I made a photo app (like Instagram) and a GPS running app (like Endomondo). If the user takes a photo with Instagram while running with Endomondo, I could present the option to GPS-tag the photo, or add the photo to Endomondo.
This is something that I think we developers should use more. Perhaps present an open API to other apps, to let the apps work together.

How to fetch data from website within the app?

I am developing an app for Lawyers to be used here in Brazil and one of the features of this app is to track the phase of the lawsuit as it develops through time.
It works like this: the user fill a form within the app with the info on the lawsuit and it is stored in a database. Whenever the user wants to know if the lawsuit has any new record, he'll push a button and will get the records ordered by date.
The website that the app will fetch is http://www.tjpb.jus.br the problem is that I donĀ“t know how to code in order to get the app access that site, input the lawsuit number and get the reply displayed on an UIWebView.
So could anyone help me, or just give me a guide on where to find a solution for this?
You will need to asynchronously go to server(via that url) and parse data, then show the responses in UIWebView. But as far as i know you will need a PUSH Server and clerify which data you will show from that site.. This is a great source to get started with app development, you can find video lectures in i-Tunes too
I'm not sure what you really want to do, but one scenario could be that you build a URL, like
http://www.tjpb.jus.br/?...&...
and load it in an UIWebView or if there is a webservice there you should use a lib like ASIHTTPRequest to manage your API calls.

How to get uploaded tracks from soundcloud?

I have implemented Sound cloud api in my app to export songs to soundcloud.
Now,I want to launch a browser in my app.This browser will allow the user to browse and listen to various other users songs that have been exported to SoundCloud through my app.
Also,the songlist should not include tracks which are not uploaded through my app.
The following is a screenshot from an app which uses similar functionality:
The only change in my app will be that I dont want the Sessions list.
Please suggest how to do this.
I am with an answer for my question. wat a relief.. :)
To get the app id first, the url is to be resolved by:
http://api.soundcloud.com/resolve?url=http://soundcloud.com/apps/{appName}
With this, you will get your app id.
(For more on Resolver, can refer to the link : https://github.com/soundcloud/api/wiki/12-Resolver)
Now, you can get tracks created with your app like this:
http://api.soundcloud.com/apps/{app-id}/tracks
For the browser look, it is to be customised on your own. Its not a standard from SoundCloud.