unsplash / unsplash-photopicker-ios Goto Github PK
View Code? Open in Web Editor NEW📱An iOS photo picker to search and download photos from Unsplash.
License: MIT License
📱An iOS photo picker to search and download photos from Unsplash.
License: MIT License
There are issues with the Photo and User model for serialization. This diff addresses it: lekom/unsplash-photopicker-ios@cbf1215
I'm really enjoying using this project and figured I'd share my findings. Thanks!
I muted a query string, but I wish user can change query in picker sheet.
When using this Library, everything seems to work fine, but I'm getting dozens of messages like this on the console:
2020-11-17 09:57:18.377493+0100 MyProject[17854:197368] [logging] misuse at line 130558 of [02c344acea]
2020-11-17 09:57:18.377694+0100 MyProject[17854:197368] [logging] API call with unopened database connection pointer
Should I worry about having problems with Unsplash? They say they can ban my account if I'm misusing the API
Hey there,
We are upgrading our dependency manager to SPM. We would love support for Unsplash as well. Thanks!
It would be great if this component has option to list and search within one or more collections (created by the account of the API account).
Hi, tell me please, would you add dark mode support or I should manage it in my code? Thanks
Since Xcode 13 I'm getting the following warning:
How can I resolve this warning? I'm using v1.2.0.
A user will scroll to the end of the search results, scroll back up and the search results will disappear saying "no results". Need to reference the entire result set here instead of just the latest.
After presenting the picker receive this error:
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/g.goncharik/Library/Developer/CoreSimulator/Devices/A1D0205D-FE16-45D6-8742-F235CF7A6BE5/data/Containers/Bundle/Application/9A548FD9-68AA-41E0-B149-0D7C976BDF68/MusicApp.app> (loaded)' with name 'PhotoView''
terminating with uncaught exception of type NSException
CoreSimulator 732.18.6 - Device: iPhone 12 (A1D0205D-FE16-45D6-8742-F235CF7A6BE5) - Runtime: iOS 14.3 (18C61) - DeviceType: iPhone 12
Is it possible to get the direct UIImageView UIImage from the UICollectionView cell when passing the UnsplashPickerDelegate? Instead of the need to re-create it from the URL from the UnsplashPhoto object?
Images do not load.
I just downloaded the example project and added my keys. I am sure my keys are valid because i get search results.
here is a screenshot of the issue : https://imgur.com/x65dqrP
Hi, I am using your sdk, but I have some problems with getting photo's author links. As I understand from API, I am getting it in format
{ "id": "pXhwzz1JtQU", "updated_at": "2016-07-10T11:00:01-05:00", "username": "jimmyexample", "name": "James Example", "first_name": "James", "last_name": "Example", "instagram_username": "instantgrammer", "twitter_username": "jimmy", "portfolio_url": null, "bio": "The user's bio", "location": "Montreal, Qc", "total_likes": 20, "total_photos": 10, "total_collections": 5, "followed_by_user": false, "followers_count": 300, "following_count": 25, "downloads": 225974, "profile_image": { "small": "https://images.unsplash.com/face-springmorning.jpg?q=80&fm=jpg&crop=faces&fit=crop&h=32&w=32", "medium": "https://images.unsplash.com/face-springmorning.jpg?q=80&fm=jpg&crop=faces&fit=crop&h=64&w=64", "large": "https://images.unsplash.com/face-springmorning.jpg?q=80&fm=jpg&crop=faces&fit=crop&h=128&w=128" }, "badge": { "title": "Book contributor", "primary": true, "slug": "book-contributor", "link": "https://book.unsplash.com" }, "links": { "self": "https://api.unsplash.com/users/jimmyexample", "html": "https://unsplash.com/jimmyexample", "photos": "https://api.unsplash.com/users/jimmyexample/photos", "likes": "https://api.unsplash.com/users/jimmyexample/likes", "portfolio": "https://api.unsplash.com/users/jimmyexample/portfolio" } }
So I need to add coding field "link" to UnsplashUser, but I am getting error "typeMismatch".
Please help me, and I will be very glad if you add this to your sdk, because this is necessary for following Unsplash guidelines. Or maybe there are other ways of solving this problem.
Thanks.
Add support for SwiftUI
There are open Pull Requests without any response, the same with issues.
Since today we are receiving Server Error
when our users open the Unplashphoto picker modal. This is because the server returns the Unsplash.links dictionary in a new form for the getCollection requests. (Not for every but for some photos), The Codable decoding fails, as alternative_html
is a dictionary instead of the URL.
Can you @ocollet please as a first reach out to the server team to revert any change that is causing this? Then a second update the Unsplasphoto
model not to accept dictionary bot specific models? :)
Client code
public enum LinkKind: String, Codable {
case own = "self"
case html
case download
case downloadLocation = "download_location"
}
public let links: [LinkKind: URL]
Server response of the dictionary
"links":
{
"self": "https://api.unsplash.com/photos/a-mountain-range-covered-in-snow-with-mountains-in-the-background--Sqw0ZRsdh8",
"html": "https://unsplash.com/photos/a-mountain-range-covered-in-snow-with-mountains-in-the-background--Sqw0ZRsdh8",
"alternative_html":
{
"en": "https://unsplash.com/photos/a-mountain-range-covered-in-snow-with-mountains-in-the-background--Sqw0ZRsdh8",
"es": "https://unsplash.com/es/fotos/una-cadena-montanosa-cubierta-de-nieve-con-montanas-al-fondo--Sqw0ZRsdh8",
"ja": "https://unsplash.com/ja/%E5%86%99%E7%9C%9F/%E9%9B%AA%E3%81%AB%E8%A6%86%E3%82%8F%E3%82%8C%E3%81%9F%E5%B1%B1%E8%84%88%E3%82%92%E8%83%8C%E6%99%AF%E3%81%AB%E5%B1%B1%E3%80%85--Sqw0ZRsdh8",
"fr": "https://unsplash.com/fr/photos/une-chaine-de-montagnes-recouverte-de-neige-avec-des-montagnes-en-arriere-plan--Sqw0ZRsdh8",
"it": "https://unsplash.com/it/foto/una-catena-montuosa-coperta-di-neve-con-montagne-sullo-sfondo--Sqw0ZRsdh8",
"ko": "https://unsplash.com/ko/%EC%82%AC%EC%A7%84/%EC%82%B0%EC%9D%84-%EB%B0%B0%EA%B2%BD%EC%9C%BC%EB%A1%9C-%EB%88%88%EC%9C%BC%EB%A1%9C-%EB%8D%AE%EC%9D%B8-%EC%82%B0%EB%A7%A5--Sqw0ZRsdh8",
"de": "https://unsplash.com/de/fotos/eine-schneebedeckte-bergkette-mit-bergen-im-hintergrund--Sqw0ZRsdh8",
"pt": "https://unsplash.com/pt-br/fotografias/uma-cordilheira-coberta-de-neve-com-montanhas-ao-fundo--Sqw0ZRsdh8"
},
"download": "https://unsplash.com/photos/-Sqw0ZRsdh8/download?ixid=M3wxNDIyNzR8MHwxfGNvbGxlY3Rpb258Mjl8MzE3MDk5fHx8fHwyfHwxNzA5ODE5MzY1fA",
"download_location": "https://api.unsplash.com/photos/-Sqw0ZRsdh8/download?ixid=M3wxNDIyNzR8MHwxfGNvbGxlY3Rpb258Mjl8MzE3MDk5fHx8fHwyfHwxNzA5ODE5MzY1fA"
},
from https://help.unsplash.com/en/articles/2511315-guideline-attribution
When displaying a photo from Unsplash, your application must attribute Unsplash, the Unsplash photographer, and contain a link back to their Unsplash profile. All links back to Unsplash should use utm parameters in the form of ?utm_source=your_app_name&utm_medium=referral
this sdk does not support this behavior. does this conflict with the documentation? Is it possible to get full access to the api using the official sdk?
many warning: 'unregisterForPreviewing(withContext:)' was deprecated in iOS 13.0: renamed to 'UIContextMenuInteraction' Use 'UIContextMenuInteraction' instead
Please fixed.
Hi. I use unsplash IOS sdk. At he beginning
it works very well but from some time I noticed that on searching (basic words as firework green camera ) very often appear "Server error" message.
And it very strange but then I tried next day some of them work and API returned a list of images.
Do you know what could be the problem?
Thanks
When presenting the UnsplashPhotoPicker as described below, my application is throwing hundreds of these errors in the console. Any thoughts on what could be causing them and how to fix it?
[logging-persist] cannot open file at line 44515 of [02c344acea]
[logging-persist] os_unix.c:44516: (0) open(//unsplash//Cache.db) - Undefined error: 0
NetworkStorageDB:_openDBReadConnections: failed to open read connection to DB @ unsplash//Cache.db. Error=14. Cause=unable to open database file
The read-connection to the DB=unsplash//Cache.db is NOT valid. Unable to determine schema version.
[logging-persist] cannot open file at line 44515 of [02c344acea]
[logging-persist] os_unix.c:44516: (0) open(//unsplash//Cache.db) - Undefined error: 0
NetworkStorageDB:_openDBWriteConnections: failed to open write connection to DB @ unsplash//Cache.db. Error=14. Cause=unable to open database file
DEBUG: there is no SQL cache DB located at unsplash//Cache.db.
DEBUG: there is no SQL cache DB located at unsplash//Cache.db-shm.
DEBUG: there is no SQL cache DB located at unsplash//Cache.db-wal.
[logging] API call with unopened database connection pointer
[logging] misuse at line 130558 of [02c344acea]
Some use cases can require to show photos around a specific search, and not allow users to search themselves.
We can add a query: String?
parameter to UnsplashPhotoPickerConfiguration
.
Hello,
maybe I'm missing something, but I'm trying to integrate the Unsplash Photo Picker in my native app written in Objective C.
I've imported the framework using CocoaPods and that creates the UnsplashPhotoPicker.h
header in my project.
I can import it in my UIViewController, but I am unable to configurate the picker with the relevant information (accessKey, secretKey, etc.).
In Objective C it only allows me to call the basic initialization
UnsplashPhotoPicker *picker = [[UnsplashPhotoPicker alloc] init];
but it then throws an error on this line, saying
UnsplashPhotoPicker/UnsplashPhotoPicker.swift:31: Fatal error: Use of unimplemented initializer 'init(nibName:bundle:)' for class 'UnsplashPhotoPicker.UnsplashPhotoPicker'
I don't know how to proceed. What am I missing here?
I don't know how to correctly call the configuration method using Objective C.
@ocollet any suggestions on how to fix it?
Thanks
I am looking to integrate Unsplash into an app that I am building. However, this library seems to be contradictory to Unsplash’s API guidelines. Specifically, item 4 at https://help.unsplash.com/en/articles/2511245-unsplash-api-guidelines says that the access key and secret key cannot be embedded in the application, yet they are requirements to use this framework.
Is this framework not intended to be used in published applications?
There is a way of changing the background color of the picker view ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.