A Pokèmon Go API written in swift.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
Pods
pgoapi.xcodeproj
pgoapi.xcworkspace
pgoapi
.gitignore
LICENSE-2.0.txt
Podfile
Podfile.lock
Readme.md
pgoapi.podspec

Readme.md

Swift Pokemon GO API

Swift Version Pokemon GO API PokeFarmer Hash Server

This is still a work in progress. The only working function at the moment is login via PTC, and downloading the following data:

  • Player
  • Hatched eggs
  • Inventory
  • Badges
  • Settings
  • Map Objects

I'm adding functionality as I need it. Feel free to contribute any API calls I haven't already implemented.

####Note Due to copyright reasons, the Niantic encryption and hashing functions used for the requests are not included in the repo. Before using the api, you will need to set a static function pointer for PgoEncryption.encrypt, which will perform the necessary encryption. Look at the example project to see how to do it using the encrypt.c file that can be found floating around the depths of the Internet. Remember that the different API versions use a slightly different encrypt function, so you will have to use different versions of the encrypt function when using NativeHashGenerator or PokeFarmerHashGenerator

Installation

Note, when integrating with cocoa pods, you need to make sure to use a version of ProtocolBuffers-Swift v3.0, compatible with Swift 3.0. Include this in your pod file:

pod 'ProtocolBuffers-Swift', :git => 'https://github.com/alexeyxo/protobuf-swift', :branch => 'ProtoBuf3.0-Swift3.0'

Credit

A big shout out to all the devs involved in figuring out Unknown6 and other hashes, and to keyphact and contributors for the excellent pgoapi fork showcasing the necessary steps to get the API working again. Thank you to all the open source projects working together to make this possible, including, but not limited to Luke Sapan, with his Swift API that gave me a push in the right direction, and AeonLucid for providing and maintaining the POGO Protocol Buffer files.