lsapan / pgoapi-swift

A Pokemon GO API library for Swift
MIT License
97 stars 29 forks source link

How to import PGoApi in Cocoa Project #42

Closed subzerofun closed 8 years ago

subzerofun commented 8 years ago

Hey thanks for porting the pgo-api to Swift!

I would really like to write an Cocoa app for account management and some map scanning functions (to generate coordinates for beehive clusters like this: https://beehive.bessei-it.eu/ )

Could you give me short step-by-step tutorial how i could set up a new XCode Cocoa Project that correctly imports the PGoApi framework? Alamofire has a Cocoa framework too, that shouldn´t be a problem. But i have no idea about ProtocolBuffers...

PokemonGoSucks commented 8 years ago

Are you using cocoapods? See the readme for instructions.

If not, the easiest way to start is to simply clone/download and open the xworkspace file. From there, you can scrap the example app or import your own project. If you import your own project, just make sure to go to Build Phases under the target and add pgoapi-swift to Link Binary with Libraries.

subzerofun commented 8 years ago

Uh i meant how can i import the API for an Desktop (OSX, macOS) Cocoa Application 😄

I´m familiar with pods, but i unfortunately i get this error when i try to install it that way:

$ pod install
Analyzing dependencies
Pre-downloading: `PGoApi` from `https://github.com/lsapan/pgoapi-swift`, branch `master`
[!] The platform of the target `PgoApi-Desktop` (OS X 10.10) is not compatible with `PGoApi (0.1.0)`, which does not support `osx`.
PokemonGoSucks commented 8 years ago

Hey, sorry I misread your question. I added OS X support to the pod file so try again.

subzerofun commented 8 years ago

thanks will try it out! this api library is heaven-sent, since i´m only able to read and understand the python and js based apis that are out there, but unfortunately i´m not that experienced to write a python or js app from scratch.

since swift is so damn easy to learn (and fun to use, compared to other languages) i can´t thank you enough for all the effort you´ve put in this project.

i hope a lot of OSX & iOS devs will use your api and rewrite some existing map scanner projects. not with all the functions (like PokemonGo-Map), but something clean and simple. i´m already so tired of all the python command line typing and remembering all the different arguments for each project... with xcode you can create a nice GUI quite fast and eliminate all that redundant typing.

i´ll try to write a little app for testing and learning purposes. i will start with an user account manager that is able to pull workers from a file and use them to scan a small part of my city. with a nice GUI on top. let´s see how far i come with this 😄.

i´ve already written something like this with functions for generating python strings, coordinates, and an account database. now i can extend it in app without switching to python. it´s just a work in progress, but already saves me a lot of time.

accmanager

PokemonGoSucks commented 8 years ago

Nice, let me know if you run into anymore trouble!