Skip to content

Updated starter projects to use initializeWithConfiguration #943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ class AppDelegate: NSObject, NSApplicationDelegate {
@IBOutlet weak var window: NSWindow?

func applicationDidFinishLaunching(aNotification: NSNotification) {
// Enable storing and querying data from Local Datastore.
// Remove this line if you don't want to use Local Datastore features or want to use cachePolicy.
Parse.enableLocalDatastore()

// ****************************************************************************
// Uncomment and fill in with your Parse credentials:
// Parse.setApplicationId("your_application_id", clientKey: "your_client_key")
// ****************************************************************************

let configuration = ParseClientConfiguration {
$0.applicationId = "your_application_id"
$0.clientKey = "your_client_key"
$0.server = "https://YOUR_PARSE_SERVER/parse"

// Enable storing and querying data from Local Datastore.
// Remove this line if you don't want to use Local Datastore features or want to use cachePolicy.
$0.enableLocalDatastore = true
}
Parse.initializeWithConfiguration(configuration)

PFUser.enableAutomaticUser()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ @implementation AppDelegate
#pragma mark NSApplicationDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)notification {
// Enable storing and querying data from Local Datastore.
// Remove this line if you don't want to use Local Datastore features or want to use cachePolicy.
[Parse enableLocalDatastore];

// ****************************************************************************
// Uncomment and fill in with your Parse credentials:
// [Parse setApplicationId:@"your_application_id" clientKey:@"your_client_key"];
// ****************************************************************************
[Parse initializeWithConfiguration:[ParseClientConfiguration configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
configuration.applicationId = @"your_application_id";
configuration.clientKey = "your_client_key"
configuration.server = @"https://YOUR_PARSE_SERVER/parse";

// Enable storing and querying data from Local Datastore.
// Remove this line if you don't want to use Local Datastore features or want to use cachePolicy.
configuration.localDatastoreEnabled = true
}]];

[PFUser enableAutomaticUser];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
//--------------------------------------

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Enable storing and querying data from Local Datastore.
// Remove this line if you don't want to use Local Datastore features or want to use cachePolicy.
Parse.enableLocalDatastore()

// ****************************************************************************
// Uncomment and fill in with your Parse credentials:
// Parse.setApplicationId("your_application_id", clientKey: "your_client_key")


let configuration = ParseClientConfiguration {
$0.applicationId = "your_application_id"
$0.clientKey = "your_client_key"
$0.server = "https://YOUR_PARSE_SERVER/parse"

// Enable storing and querying data from Local Datastore.
// Remove this line if you don't want to use Local Datastore features or want to use cachePolicy.
$0.enableLocalDatastore = true
}
Parse.initializeWithConfiguration(configuration)

//
// If you are using Facebook, uncomment and add your FacebookAppID to your bundle's plist as
// described here: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,18 @@ @implementation ParseStarterProjectAppDelegate
#pragma mark UIApplicationDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Enable storing and querying data from Local Datastore. Remove this line if you don't want to
// use Local Datastore features or want to use cachePolicy.
[Parse enableLocalDatastore];

// ****************************************************************************
// Uncomment and fill in with your Parse credentials:
// [Parse setApplicationId:@"your_application_id" clientKey:@"your_client_key"];


[Parse initializeWithConfiguration:[ParseClientConfiguration configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
configuration.applicationId = @"your_application_id";
configuration.clientKey = "your_client_key"
configuration.server = @"https://YOUR_PARSE_SERVER/parse";

// Enable storing and querying data from Local Datastore.
// Remove this line if you don't want to use Local Datastore features or want to use cachePolicy.
configuration.localDatastoreEnabled = true
}]];

//
// If you are using Facebook, uncomment and add your FacebookAppID to your bundle's plist as
// described here: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
//--------------------------------------

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// ****************************************************************************
//
// Uncomment and fill in with your Parse credentials:
// Parse.setApplicationId("your_application_id", clientKey: "your_client_key")
//
// ****************************************************************************

let configuration = ParseClientConfiguration {
$0.applicationId = "your_application_id"
$0.clientKey = "your_client_key"
$0.server = "https://YOUR_PARSE_SERVER/parse"
}
Parse.initializeWithConfiguration(configuration)

PFUser.enableAutomaticUser()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ import Parse
class ExtensionDelegate: NSObject, WKExtensionDelegate {

func applicationDidFinishLaunching() {
// Enable storing and querying data from Local Datastore.
// Remove this line if you don't want to use Local Datastore features or want to use cachePolicy.
Parse.enableLocalDatastore()

// Make sure to replace with your Parse app credentials:
Parse.setApplicationId("your_application_id", clientKey: "your_client_key")

let configuration = ParseClientConfiguration {
$0.applicationId = "your_application_id"
$0.clientKey = "your_client_key"
$0.server = "https://YOUR_PARSE_SERVER/parse"

// Enable storing and querying data from Local Datastore.
// Remove this line if you don't want to use Local Datastore features or want to use cachePolicy.
$0.enableLocalDatastore = true
}
Parse.initializeWithConfiguration(configuration)

// Track application opened event in Analytics
PFAnalytics.trackAppOpenedWithLaunchOptions(nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
//--------------------------------------

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Enable storing and querying data from Local Datastore.
// Remove this line if you don't want to use Local Datastore features or want to use cachePolicy.
Parse.enableLocalDatastore()

// ****************************************************************************
// Uncomment and fill in with your Parse credentials:
// Parse.setApplicationId("your_application_id", clientKey: "your_client_key")
//

let configuration = ParseClientConfiguration {
$0.applicationId = "your_application_id"
$0.clientKey = "your_client_key"
$0.server = "https://YOUR_PARSE_SERVER/parse"

// Enable storing and querying data from Local Datastore.
// Remove this line if you don't want to use Local Datastore features or want to use cachePolicy.
$0.enableLocalDatastore = true
}
Parse.initializeWithConfiguration(configuration)

// If you are using Facebook, uncomment and add your FacebookAppID to your bundle's plist as
// described here: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/
// Uncomment the line inside ParseStartProject-Bridging-Header and the following line here:
Expand Down