When can I use Photos Framework and iCloud Photo Library? - ios8

I want to provide my users a photo picker which displays all their images similarly to the Photos app. Currently I can use two frameworks, the old Assets Library and the new Photos Library frameworks. Is there any recommendation how should I choose between these two?
The documentation states:
In iOS 8.0 and later, use the Photos framework instead of the Assets Library framework. The Photos framework provides more features and better performance for working with a user’s photo library.
But as my tests show, there are some cases when the user has not yet been enabled iCloud Photo Library, thus I can retrieve none of their photos via the new framework. How can I detect if iCloud Photo Library is enabled? And if enabled, the old framework more or less still works, but it seems that does not show every photo. Which photos does it show? Shall I continue using it? I can't find any documentation about this.

I've made an app with Assets Library framework and I'm testing another one with Photos framework.
On my iPhone I haven't enabled iCloud Photo Library, but with both frameworks I can retrieve all the photos.
On the other hand, on my iPad I've enabled iCloud Photo Library with "Optimize [device] Storage" option. In this case (https://support.apple.com/en-us/HT204264):
All of your original, full-resolution photos and videos are stored in iCloud while device-size versions are kept on your device. You can download the original photos and videos over Wi-Fi or cellular when you need them.
On iPad, with the Photos framework I can retrieve all photos, while with the old app using Assets Library I find only the downloaded ones (i.e. the images I've requested with the app using Photos framework).
I think that if you select the other option: "Download and Keep Originals" both frameworks can retrieve all photos (but I haven't tried yet).
I hope this can help.

Related

Xamarin Essentials Share does not have load option

My app backs up its data in a zip file that uses Share.RequestAsync to store the file. This works great because it presents all the possible sharing options including email, messaging, and cloud devices like Google Drive, Dropbox, etc.
In order to load that zip file from wherever it was stored I use FilePicker.PickAsync. The problem is that this presents a very limited number of options for selecting the file. It offers either the local device or a single cloud service (iCloud on iOS or Drive on Android). What if I want to restore the zip file from Drive in my app on my iPhone?
Why is there such a difference in the xamarin share options when it comes to saving and loading files? It seems like the Share class should offer a method to load files that presents the same options that it does for sharing. Or at least the FilePicker.PickAsync should present the same interface as Share.RequestAsync for load options. Am I missing something?
Here is what the share dialog looks like compared to the file picker on iOS. It is similar on Android. The share offers access to iCloud, Drive and Dropbox while the picker only offers access to iCloud.

Xamarin UI Measurement

I'm a UI designer working with a junior app developer.
We are working on an app I gave him the assets and there sizes using Zeplin app, he showed me the app and it was different than was design telling me that Xamarin doesn't use pixels or dpi but using a number without any measurement.
Is there any way to help him as a designer or something he can use to make the program use pixels or dpi.
#Muslem Mohammed
I think as you are an UI Designer, you are aware that how to provide assets for native app development if not please check for below process.
You can provide Android Assets in the form of Mdpi drawable, hdpi, xhdpi, xxhdpi.
And for iOS 1x, 2x and 3x same like native app assets.
And the developer place all those images into respective folder with respect to the platform.
Example: For Android you will be providing 5 kinds of images with same name respect to the folder I mentioned above.
sample.png for respective folders with the resolution, developer place those images into Android specific project.
Then developer place all images under resources and keep in respective folders.
For iOS also provide the images with same name and by applying 1x,2x,3x with sample below,
sample.png, sample#2x.png and sample#3x.png.
Then developer go to iOS project and place all ios images into Resources folder.
And finally developer will place the image control like below,
<Image source="sample.png" />
And this will show up the image in iOS and Android as well.

codenameone downloading files/images visible to other apps

I note that other apps (testing on Android) like WhatsApp, etc have folders that contains images the user has used/downloaded. These folders (like WhatsAppImages) are visible in other apps (Gallery/File Explorers, etc) so you can use those files to share, delete, etc like any other file.
In my codenameone app I download image files but they cannot be seen anywhere on the local device. I understand that for security apps run in a sandbox and this may be why.
But how do these other apps make their downloaded files visible to the general file system and other apps ?
Many Thx
Codename One doesn't support that at this time but you can use native interfaces to add this as explained here for Android: How to save image in android gallery
and here for iOS: How can I save an image to the camera roll?
You can also file an RFE to add this either as a cn1lib or API.

How to: upload user files to iCloud + retrieve files from iCloud? (Nativescript)

In my iOS nativescript app, I want users to be able to upload files to iCloud and also retrieve them from iCloud. So it would work like other apps, such as photos, where you can save your photos and retrieve them from iCloud.
The goal is to remove stress on phone storage.
Is this possible?
I earlier asked a question regarding backing up all app data to iCloud (link). It looks like this is possible--users can add the app to an iCloud backup. But this is different than what I am asking here. In that case, a user would have to retrieve all of their phone's data from the backup.
Here, I am looking for a way for users to (1) upload just specific types of files (say, pdf files or media files) to iCloud that they could later (2) download into the app itself.
In other words, they could choose to save and access files using iCloud instead of storing them locally on their phones.
I have seen this question asked earlier on nativescript forums and stackoverflow, but without answers.
So any help is appreciated.

Atmostphere and From Menu Photos Tabs In Google Maps

I was using Google Maps on my iPhone today and noticed that if you browse the photos there are two tabs at the top called "FROM MENU" and "ATMOSPHERE". These don't seem to appear on the the desktop version or iOS Google Maps app but only for me on the iOS Chrome browser.
Is there a way to access these lists of photos? I don't see anything in the Places API. The only way I could replicate this is by using Google Cloud Vision and parsing the tags of the images but it's an expensive service to subscribe to.

Resources