SwiftAnyPic
Swift port of AnyPic project https://github.com/ParsePlatform/Anypic
Requirements
This application requires Xcode 7 and the iOS SDK v9.0.
- Developed on Xcode 7.
- Tested only with:
- Simulator iPhone 5s.
- Device iPhone 5s (iOS 9.1)
- Note: Cocoapods version must be at least version 0.38.2
Setup
- Install all project dependencies from CocoaPods by running this script:
pod install
- Open the Xcode workspace Anypic.xcworkspace
- Create your Anypic App on Parse
- Copy your new app's application id and client key into
AppDelegate.swift
:Parse.setApplicationId("APPLICATION_ID", clientKey: "CLIENT_KEY")
Configuring Anypic's Facebook integration
- Set up a Facebook app at http://developers.facebook.com/apps
- Set up a URL scheme for fbFACEBOOK_APP_ID, where FACEBOOK_APP_ID is your Facebook app's id.
- Add your Facebook app id to
Info.plist
in theFacebookAppID
key.
Note: By using the original Parse application ID, client key and the Facebook App ID in the source code, the app will connect to the Parse and Facebook apps which the App Store's AnyPic app is using.
TODO
This project is still work in progress. There are quite a lot of things need to be fixed.
- Many iOS APIs used in the objective-C version are already deprecated. They need to be replaced with the latest APIs.
- I encountered some strange crashes in Bolts. Same error as described in https://github.com/BoltsFramework/Bolts-iOS/issues/102. I temporarily used the workaround mentioned by https://github.com/wdcurry.
- We need @3x images for iPhone 6 Plus (so far I just tested on Simulator iPhone 5s only).
- I basically just converted the Objective-C syntax to Swift syntax for most of the code whenever possible. So there are still rooms for improvement to make the code more "Swifty".
- etc.
Misc
Please feel free to contribute! :-)