Giter VIP home page Giter VIP logo

unsplash-photopicker-ios's Issues

API misuse

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

SPM Support

Hey there,

We are upgrading our dependency manager to SPM. We would love support for Unsplash as well. Thanks!

Dark mode support

Hi, tell me please, would you add dark mode support or I should manage it in my code? Thanks

Invalid exclude '.../UnsplashPhotoPicker.h': File not found.

Since Xcode 13 I'm getting the following warning:

  • Invalid Exclude 'Users/abc/Library/Developer/Xcode/DerivedData/app-doylkpssjtiwgacyfgzwbtlcseds/SourcePackages/checkouts/unsplash-photopicker-ios/UnsplashPhotoPicker/UnsplashPhotoPicker/UnsplashPhotoPicker.h': File not found.

How can I resolve this warning? I'm using v1.2.0.

Could not load NIB with name 'PhotoView'

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

images do not load

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

Getting author urls

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.

SERVER ERROR DUE TO SCHEMA CHANGE

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"
        },

author clickable link

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?

Server Error

Hi. I use unsplash IOS sdk. At he beginning
ServerError
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

there is no SQL cache DB located at unsplash//Cache.db

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]

Support for VisionOS

There are couple of errors for VisionOS. It requires small changes to make the VisionOS work.
Do you plan to fix these issues?

Screenshot 2024-06-17 at 13 23 12

Add the ability to pass a search string when instantiating the photo picker

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.

  • If the value is nil, we keep the current behaviour.
  • If the value contains a string, the photo picker performs the search right away, and the search bar is not visible.

Photo Picker Configuration on Obj-C

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.