MadL0rd / WhyNFT

Definition | Hackathon iOS mobile app
Apache License 2.0
0 stars 0 forks source link

callback?! #1

Open AMJ-7 opened 2 years ago

AMJ-7 commented 2 years ago

Hi, can you tell me how to add a callback URL on my dribbble app and on Xcode please?

MadL0rd commented 2 years ago

Hi!

  1. Create app here https://dribbble.com/account/applications
  2. Put callback URL with own url scheme. Here is mine nafthalene://callback Here nafthalene is url scheme for next step
  3. Add code like this to your info.plist
    <key>CFBundleURLTypes</key>
      <array>
          <dict>
              <key>CFBundleURLName</key>
              <string>com.atekutov.whynft</string>
              <key>CFBundleURLSchemes</key>
              <array>
                  <string>nafthalene</string>
              </array>
          </dict>
      </array>
  4. Handle callback in SceneDelegate or AppDelegate

U can find source code here AppDelegates usage in network service

AMJ-7 commented 2 years ago

class DribbbleNetworkService: let clientId = "507dc050a24aecaba98c4a0de867dbe27a3fa8dff2e81222456439c9eb8984cb" let clientSecret = "72ea2c4c50d5ffcacfa1397123f542170b4e58b641f22cdae726d17d7c022ccf" let callbackUrl = "nafthalenes://callback"

same things on application dribble but I just see the initial page?!!

MadL0rd commented 2 years ago

What is initial page? U can send me screenshot in telegram @MadL0rd

AMJ-7 commented 2 years ago

initial page = connect portfolio (dribbble and bechance)