Giter Site home page Giter Site logo

parse-community / parse-sdk-ios-osx Goto Github PK

View Code? Open in Web Editor NEW
2.8K 164.0 864.0 61.44 MB

The Apple SDK for Parse Platform (iOS, macOS, watchOS, tvOS)

Home Page: https://parseplatform.org

License: Other

Ruby 0.59% Objective-C 94.61% Swift 4.59% Shell 0.02% Rich Text Format 0.01% Handlebars 0.06% JavaScript 0.11%
parse-ios parse-platform cocoapods parseui hacktoberfest sdk bolts bolts-framework objective-c

parse-sdk-ios-osx's Introduction

parse-repository-header-sdk-apple

iOS · iPadOS · macOS · watchOS · tvOS


Build Status CI Build Status Release Snyk Badge Coverage auto-release

iOS iPad macOS watchOS tvOS

SPM

Backers on Open Collective Sponsors on Open Collective License Forum Twitter


A library that gives you access to the powerful Parse Server backend from your iOS, iPadOS, macOS, watchOS and tvOS app. For more information about the Parse Platform and its features, see the public documentation.


Getting Started

The easiest way to install the SDK is via Swift Package Manager.

  1. Open Xcode > File > Add packages...
  2. Add the following package URL:
https://github.com/parse-community/Parse-SDK-iOS-OSX
  1. Add package
  2. Choose the submodules you want to install

Take a look at the public documentation & API and start building.

How Do I Contribute?

We want to make contributing to this project as easy and transparent as possible. Please refer to the Contribution Guidelines.

Dependencies

We use the following libraries as dependencies inside of Parse:

  • Bolts, for task management.
  • OCMock, for unit testing.

parse-sdk-ios-osx's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

parse-sdk-ios-osx's Issues

Build failure with 'framework not found FBSDKCoreKit for architecture x86_64'

When trying to build an application, using Cocoapods that also includes ParseFacebookUtilsV4 with the latest Facebook SDK, we get a linker error:
screen shot 2015-08-14 at 9 08 20 am

ld: framework not found FBSDKCoreKit for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have provided a sample project that makes it reproducible: https://dl.dropboxusercontent.com/u/119336/ParseLinkerErrorSample.zip

Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.4'
link_with 'ParseSample'
inhibit_all_warnings!

pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'Parse'
pod 'ParseFacebookUtilsV4'

countObjectsInBackgroundWithBlock starts returning count 1

Last known working date: 16th August 2015
Affected app: VoteYourSpider
Using Parse (1.7.5.3)
Using ParseUI (1.1.4)

query.limit = 1000
query.whereKeyExists("name")
query.countObjectsInBackgroundWithBlock { (count, error) -> Void in

        if error == nil
        {
              self.maxRecordsCount = Int(count) - 1
        }
}

The above code suddenly starts returning count:1.

Error possibly due to adding localeIdentifier

After updating to 1.8.1, I was getting the following message in the debugger.

[Error]: This user is not allowed to add a field to _Installation. You can change this setting in the Data Browser. (Code: 119, Version: 1.8.1)

I checked the Installation table and it already had the new localeIdentifier column so that shouldn't be the cause.

I temporarily turned on the Add Field permission, ran my app again, then turned off Add Field and I've stopped getting the error.

My guess is that something private needed to be added to Installation since nothing I can see has changed on Installation. Is this the case? Any way to prevent this in the future?

PFPurchase.buyProduct() not working with Swift

It seems like somethings getting hung up and the block is never fired.

I'm working on a project in Swift and using Cocoapods to add Parse to my project

I'm testing in Sandbox Environment on iPhone 6 (8.4.1) with Parse 1.8.0

The user is never prompted to purchase the IAP either.

PFTwitterUtils crash

While testing my app I ran across this crash. It looks like it has to do with the PF_Twitter interface. The link with twitter was successful but right after the dialogue screen went away this crash happened.

Is this a known issue with the PF_Twitter/PFTwitterUtils class? Also, did the PFTwitterUtils get open sourced as well? I'm not finding it here.

Thanks.

pftwittercrash

Issue with Localizable.string file

Hi guys, when will you be able to make a new release for this pod with the new name for you localisable strings file name ? It actually messes up with my whole project and I would be pleased to have this fixed before releasing our next version of our application.

LDS Performance Improvements

This is a master issue for all things related to local datastore performance improvements.

  • Make LDS stop checkpointing and making copies of objects for mutable containers (#102)
  • Make LDS query matching more efficient by not loading every object into memory for a specified pin.
  • Make LDS use PFObjectState and PFUserState instead of PFObject and PFUser, to reduce the amount of locking required for every LDS operation.
  • Improve LDS PFRelation tracking.
  • Update LDS database schema to allow for query matching in the database layer itself.

For anyone reaching this issue as a result of currently bad LDS performance here's our current recommendations:

  • Keep your object schemas as small as possible - the faster it is to parse them from JSON, the better.
  • Relations are currently inefficient. If you can avoid them, do so.
  • Minimize usage of any values of the following classes:
    • NSArray
    • NSDictionary
    • PFACL
    • PFGeoPoint
  • Whenever possible, use smaller pins. Because LDS loads all objects in a single pin before evaluating a query, the smaller the pin is, the better.

Slow query from localdatastore

Using iPhone 5(on sim it was instant), query fromlocaldatastore take a bit more than 2 seconds to get approx 600 results. (very more that sqlite request)

The funny thing are that querying and get results from online a near faster!! :)

To reproduce:

  • Get online data and pin it (queryDataFromParse)
    Close the app(or not)
  • get all data from LocalDatastore (queryShareFromParse_UsingLocalDataStore)

-(void) queryShareFromParse_UsingLocalDataStore {
NSLog(@"--[%s:%d]",PRETTY_FUNCTION,LINE);
PFQuery *query = [PFQuery queryWithClassName:@"A_Sharing"];
query.limit = 1000;
[query fromLocalDatastore];
NSError *error;
NSArray *aContents=[query findObjects:&error];
if (!error) {
NSLog(@"--[%s:%@]",PRETTY_FUNCTION,@"->Results received");
}
}

-(void) queryDataFromParse {
NSLog(@"--[%s:%d]",PRETTY_FUNCTION,LINE);
PFQuery *query = [PFQuery queryWithClassName:@"A_Sharing"];
[query orderByDescending:@"updatedAt"];
query.limit = 10000;
[query findObjectsInBackgroundWithBlock:^(NSArray *aContents, NSError *error) {
//if (error) return;
if (aContents.count>0) {
[PFObject pinAll:aContents];
PFObject *pfObject=aContents[0];
}
}];
}

I can provide sample and ApplicationId to your private email.

Not compiling when used with Extensions.

I keep getting sharedApplication is unavailable on iOS (App Extension).
This has happened in PFPush, PFApplication, PFPushUtilities, PFLocationManager and PFNetworkActivityIndicatorManager. I am also getting ld: warning: linking against dylib not safe for use in application extensions:

Parse for iOS v1.8.0 breaks localization

After updating from parse v1.7.5.3 to v1.8.0 via cocoapods, my localizations stopped working.

I'm guessing it's because v1.8.0 now has it's own Localizable.strings file, which overrides the one my app was previously using.

Rolling back to v1.7.5.3 and cleaning my build folder restored my localizations.

Fetching pinned objects issues (2)

This maybe my specific implementation but I have a scenario where I would like to saveEventually and still pin the object, regardless of the outcome of the saveEventually.

This matters to me because I can then manipulate the object locally without fetching it again, then saveEventually again when I'm done.

saveEventually can pin the object or do whatever but if I purposely pin an object using the pinInBackgroundWithBlock I expect it to stay pinned regardless.

+[PFConfig currentConfig] warning on `long-running operation is being executed on the main thread`

Hey Parsers!

In my app, I'm calling +[PFConfig currentConfig], expecting to get the currentConfig. I received the warning long-running operation is being executed on the main thread, and when adding the symbolic breakpoint, I got the following:

screen shot 2015-08-23 at 11 31 23 am

What is strange is, that I call getConfigInBackgroundWithBlock, and in the completion block, other method tries to access currentConfig, triggering the warning.

My question is: is it ok to ask for the currentConfig in the main thread, right? If so, why am I getting the warning? If not, what am I doing wrong?

Swift compiler warning

Hi guys

I am getting Swift compiler warning:
Umbrella header for module 'Parse' does not include header 'PF_Twitter.h'

Podfile with Xcode 6.4

pod 'Parse', '1.8.1'
pod 'ParseFacebookUtils', '1.8.1'
pod 'ParseCrashReporting', '1.8.1'
pod 'FBSDKCoreKit', '4.5.1'
pod 'FBSDKLoginKit', '4.5.1'
pod 'FBSDKShareKit', '4.5.1'
pod 'Bolts', '1.2.0'

No such module "ParseFacebookUtilsV4"

I've been following Parse.com instructions to integrate Facebook Parse Login and get an error "No such module "ParseFacebookUtilsV4"" when trying to import the framework in the AppDelegate.

I doubled check the "Link Binary with Libraries" and both ParseFacebookUtils are there.

Facebook SDK is working fine, Parse.frameworks works fine... the only problem is with ParseFacebookUtilsV4.framework and ParseFacebookUtils.framework.

Any ideas on how to fix this?

I replicated the same bug in a new project, following the same parse.com facebook integration instructions and get the same "No such module" error.

I've tried cmd+option+shift+K to reset Xcode caches...

Language: swift
Xcode version 6.4

Thanks

PFFile TLS Download Support

iOS 9 and OS X 10.11 has a requirement that any network connection, unless added to exceptions is done via TLS. Apple Tech Note.
We have full support right now for API server, as announced in the blog post.

The only piece left is file downloads, which are still being served from S3 via http and we are working on getting support for TLS for them shortly.

The current workaround for this issue is to add the following section to Info.plist of your app:

<key>NSExceptionDomains</key>
<dict>
    <key>files.parsetfss.com</key>
    <dict>
        <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
        <true/>
    </dict>
</dict>

Please comment on this issue if there is anything we can help you with regarding PFFile TLS support.

findObjectsInBackgroundWithBlock always returning 1 PFObject

Last known working date: Unknown
Affected app: VoteYourSpider
Using Parse (1.7.5.3)
Using ParseUI (1.1.4)

query.whereKeyExists("name")
query.findObjectsInBackgroundWithBlock { (objects: [AnyObject]?, error: NSError?) -> Void in

     if error == nil
     {
                if let pfObjects = objects as? [PFObject]
                {
                    println(pfObjects)
                    completinHandler(pfObjects, true)
                    return
                }
            }

            // anything else
            completinHandler(nil, false)
}

The above query supposed to return all the records exists in my table, but always returning one PFObject.

Comment - Can't build framework using rakefile

Did
git clone --recursive https://github.com/ParsePlatform/Parse-SDK-iOS-OSX.git

from root directory tried running rake command

/Parse-SDK-iOS-OSX : rake package:deployment
rake aborted!
cannot load such file -- naturally

I guess I need to install the "Gemfile" (? )

Tried :

gem install bundler

and then:

bundle install

and then got errors:

An error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue.
Make sure that gem install nokogiri -v '1.6.6.2' succeeds before bundling.

PFFile Directories Need Clean Up

Users of my app have complained about it taking up too much space on disk. Inspecting the app bundle reveals two large directories maintained by Parse.

  • Private Documents / Parse / PFFileStaging (600+ MB)
  • Caches / Parse / PFFileCache (40+ MB)

I find it odd that Parse is not cleaning those up. I also don't understand why it is loading files in PFFileStaging at all since I'm using a regular networking library to load the files from URL.

I've observed these issues on V1.7.4 but I have no reason yet to believe they've been fixed in later releases. Any thoughts?

PFTwitterUtils and getting user twitter details

Hello, I"m trying to create User login via twitter here's my code:


-(void) twitterLogin {

    NSLog(@" twitter Login");
    [SVProgressHUD show];
    [PFTwitterUtils logInWithBlock:^(PFUser *user, NSError *error) {
        if (user){
            if (user.isNew) {
                NSLog(@"User signed up through twiter!");
                RegisterViewController *registerView = [[RegisterViewController alloc] initWithNibName:@"RegisterViewController" bundle:nil];
                registerView.newTwitterUser = YES;
                [self.navigationController pushViewController:registerView animated:YES];

            } else {

                NSString * requestString = [NSString stringWithFormat:@"https://api.twitter.com/1.1/users/show.json?screen_name=%@", [PFTwitterUtils twitter].screenName];
                NSURL *verify = [NSURL URLWithString:requestString];
                NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:verify];
                [[PFTwitterUtils twitter] signRequest:request];


                // After login with twitter and when try to get user account details I get the error.

                NSURLResponse *response = nil;
                NSError *error = nil;
                NSData *data = [NSURLConnection sendSynchronousRequest:request
                                                     returningResponse:&response
                                                                 error:&error];


                if (!error){
                    NSDictionary* result = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&error];
                    NSLog(@"%@",result);

                    [user setObject:[result objectForKey:@"profile_image_url_https"]
                             forKey:@"picture"];
                    // does this thign help?
                    [user setUsername:[result objectForKey:@"screen_name"]];

                    NSString * names = [result objectForKey:@"name"];
                    NSMutableArray * array = [NSMutableArray arrayWithArray:[names componentsSeparatedByString:@" "]];
                    if ( array.count > 1){
                        [user setObject:[array lastObject]
                                 forKey:@"last_name"];

                        [array removeLastObject];
                        [user setObject:[array componentsJoinedByString:@" " ]
                                 forKey:@"first_name"];
                    }

                } else
                    NSLog(@"Error : %@ ", [error userInfo]);
            }
        } else
            NSLog(@"Error : %@ .", [error userInfo]);

        [SVProgressHUD dismiss];
    }];
}

But it's seems that there's problem in the last version of parse SDK.
I get always this error :

{
NSErrorFailingURLKey = "https://api.twitter.com/1.1/users/show.json?screen_name=chlebta";
NSErrorFailingURLStringKey = "https://api.twitter.com/1.1/users/show.json?screen_name=chlebta";
NSUnderlyingError = "Error Domain=kCFErrorDomainCFNetwork Code=-1012 "The operation couldn\U2019t be completed. (kCFErrorDomainCFNetwork error -1012.)" UserInfo=0x175d2370 {_kCFURLErrorAuthFailedResponseKey=<CFURLResponse 0x176a82a0 [0x3a82e8a0]>{url = https://api.twitter.com/1.1/users/show.json?screen_name=chlebta}}";
}

after user logged in and when I try to get the current user twitter info.

Probably unused file PFBlockRetryer

I've been investigating how Parse for iOS does retrying upon -saveEventually and found PFBlockRetryer class which is not included anywhere but tests. Is this file no longer used? Can I rely on this class in the future or it will be deleted?

BOOL <-> Number iOS Parse 1.8.0

Interesting issue: This was working ok on 1.7.5 before updating to 1.8.0
I have a subclass of PFUser with a BOOL property isActive and a NSNumber property hibernating
-- init as isActive = NO;
-- init hibernating = [NSNumber numberWithBool:NO];
once the first PFUser is created the isActive is a number not a BOOL and the hibernating NSNumber becomes a BOOL not a number!!!!
Something is very wrong here, this was working correctly before.
Has anyone else seeing this problem?

Investigate bitcode support for the SDK.

In iOS 9, Apple is adding the ability for binaries to ship Bitcode (LLVM IR) slices alongside their binary. Currently, Parse doesn't support this.

This task will be the master task for investigating the requirements bitcode has on our code-base, and determining whether or not we should focus on Bitcode support in the SDK.

SDK breaks signature in Swift project

I added Parse SDK to my existing iOS project. Everything was OK. Then I added ParseCrashReporting. Now I can't start my app on a real device. Xcode fails with the following message: "App Installation Failed, The application does not have a valid signature". Tried cleaning project and recreating provisioning profile. Nothing helps.

Parse query from LocalDataStore for object with PFRelation returns empty

I am trying to implement Local datastore in my application but I have an issue when I need to query relation from local Datastore.

Here is my query :

var relation:PFRelation = PFUser.currentUser()!.relationForKey("Friendship")
var query:PFQuery = relation.query()!

This query returns what I'm looking for when fetched by network but then I Pin all the results and re-query from localDatastore, and the result is empty.

I am using the newest Parse iOS SDK (1.8.1)

This issue is linked with these topics :

Localization is broken since Parse 1.8

What happened guys? Where are all the previous versions? What's the reason all the previous releases were deleted?

Because there's only 1.8 everyone upgraded to the latest version and everyone seems to be fucked. This version is breaking Localization and there's no way to downgrade (using Cocoapods, doesn't take any older versions anymore, always 1.8).

Edit: removed all the rage & added a bit more info.

Accessing currentUser on multiple threads causing deadlock

When I'm launching my app, there are several places where I'm using PFUser.CurrentUser - mostly for queries, but also a couple of writes. It looks like the deadlock occurs when one thread is setting an object on currentUser while another is using it in a query, but I'm not entirely sure.

Here is a stack trace:
screen shot 2015-08-19 at 4 13 08 pm

I know that there have been similar issues opened and resolved for other releases, and it may be that 1.8 has nothing to do with it, but it only started happening in the last couple of days (after I updated).

Some more details:

  • Deadlock doesn't occur every launch, and it appears to happen much more frequently on older devices (iphone 4s) than the newer models. It almost never occurs on the simulator.
  • I've tried commenting out dozens of lines of code that the stack trace points to, but it always end up getting hung somewhere else. I haven't procedurally uncommented and tested every call to currentUser because so much code depends on it, but that'll be my next step for troubleshooting.

Edit
Is it possible that the deadlock is occurring during Facebook authentication while I'm trying to query/modify currentUser elsewhere? Take a look at this:

screen shot 2015-08-19 at 4 30 21 pm

Ability to revert all changes or a single field on `PFObject`.

After changing a single field on PFObject - there is no functionality to revert it back to the server state, even though we have the server state available internally. This is implemented in dotNet SDK via ParseObject.revert() method which reverts any changes to an object that were done after last successful save/fetch.

Implementation would require:

  • Add PFObject.revert() that would clear all operations in operationSetQueue and rebuild estimatedData
  • Add PFObject.revertObjectForKey(key: String) that would remove all operations for that key in operationSetQueue as well as rebuild estimatedData.

PFTwitterUtils silently fails when trying to log in and user has multiple accounts

This is an issue introduced with 1.8.0 when trying to log in user to twitter and the user has more than 1 twitter account setup.

This specific issue happens when trying to log into twitter from a uiviewcontroller that is been presented as modal.

This is/was working ok up until 1.7.3.5, where the selection of the account is done as a dialog and not as an action sheet.

For now the only way to make it work is forcing the 1.7.3.5 pod

In the console you can see printed

Warning: Attempt to present <UIAlertController: 0x127685e70> on <LFTabBarController: 0x12763c990> whose view is not in the window hierarchy!

Where LFTabBarController is just a sub class of UITabBarController

Consistent error and exception reporting (PFParameterAssert usage)

Hi, thank you for opening this code base up & good work! We occasionally get stuck with runtime exceptions which are difficult to debug. Having centralized error and exception mechanism should help, but your code currently uses a mix of PFParameterAssert macros, NSAssertions and ad-hoc error reporting. Could you perhaps use PFParameterAssert throughout so we have a central point to trap all exceptions?

For example, these calls to NSAssertion could be converted to the PFParameterAssert (or similar) macro: https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/search?utf8=✓&q=NSException&type=Code

Finally, any chance we could see the error codes in PFConstants aligned with the error & exception reporting: https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/blob/61f68e9333206f0eebf15d5adab076a0ae7c4b71/Parse/PFConstants.h#L151

Thanks!

Session token revoked when I set the current user's password

When I change the current user's password:

[PFUser currentUser].password = @"new_password";
[[PFUser currentUser] saveInBackground];

My currentUser's session token is gone. I check the Parse database, and the session is indeed gone from the Session class.

Update users Email in Parse

I have PFUser object and it has firstName, lastName and Email.

When I try to update the user's email which is already exist, i am receiving error. But when fetch the email from [PFUser currentUser], it returns wrong email, how to overcome this. Below is the my code for it.

PFUser *user = [PFUser currentUser];
user[@"email"] = @"[email protected]"
[user saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
//UI refresh
}];
I received the following error : the email address [email protected] has already been taken (Code: 203, Version: 1.7.4)

After this when fetching the email for current user

PFUser *user = [PFUser currentUser];
NSString *email = user[@"email"];
NSLog("email %@", email);
I received the following email "[email protected]" but which is wrong, which should be "[email protected]".

FYI : I am also using parse offline store
This is posted in stack overflow in the below link : http://stackoverflow.com/questions/32064941/update-users-email-in-parse?answertab=active#tab-top

The same issue has been reported in the Parse Developers google forums : https://groups.google.com/forum/#!searchin/parse-developers/update$20email$20ios/parse-developers/CyH2wiywE7s/09KPXeXn7JwJ

Waiting for a quick fix or workaround from Parse

Parse 1.8.0 is converting Bool into Numbers

Hi guys,

I am having problems with BOOL in iOS. Parse is converting them into Numbers. This started happening on 1.8.0 of parse SDK. How can I fix it?

Error message: "invalid type for key delivered, expected boolean, but got number (Code: 111, Version: 1.8.0)"

Thanks in advance,
Carmelo

trackAppOpenedWithRemoteNotificationPayload not recording app push open for iOS7

Hello,

I have an issue where trackAppOpenedWithRemoteNotificationPayload is being called in iOS7 but no push open event is shown in Parse.com.

The issue is detailed here on SO: http://stackoverflow.com/questions/32103788/parse-not-sending-push-open-notifications-for-ios7

I have followed the guide for the relevant Push setup with Parse.

When testing the app on an iOS7 device and iOS8 device the same method is called when opening from a push:

    - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
        DebugLog(@"%s",__PRETTY_FUNCTION__);
        if (application.applicationState == UIApplicationStateInactive) {
            [PFAnalytics trackAppOpenedWithRemoteNotificationPayload:userInfo];
        }
        if (completionHandler) {
            completionHandler(UIBackgroundFetchResultNoData);
        }
        [PFPush handlePush:userInfo];
    }

It appears that although the [PFAnalytics trackAppOpenedWithRemoteNotificationPayload:userInfo]; method is called on iOS7 the data is not shown in Parse.

For example, checking the Push that has been sent shows the amount of Opens. If I send a push to an iOS7 device and iOS8, the same part of code is being called. However, it is only recorded for the iOS8 version. Is there anything else I should be doing?

We have followed the relevant guide: https://parse.com/docs/ios/guide#push-notifications

This is also implemented:

    - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
        DebugLog(@"%s",__PRETTY_FUNCTION__);
        if (application.applicationState == UIApplicationStateInactive) {
            // The application was just brought from the background to the foreground,
            // so we consider the app as having been "opened by a push notification."
            [PFAnalytics trackAppOpenedWithRemoteNotificationPayload:userInfo];
        }
        [PFPush handlePush:userInfo];
    }

Thanks

PFObject.state causes crash

If a PFObject contains a variable called 'state' saving this object causes a crash.
You can find a sample bare bones project based on Parse Starter Project(v1.8) illustrating the bug here:
https://github.com/craiggrummitt/ParseStateBug

Error in console:
NSInvalidArgumentException', reason: '-[Swift._NSContiguousString isDeleted]: unrecognized selector sent to instance ...'

No such module 'Parse'

If I try to use Parse with iOS 9 beta i get the issue "No such module 'Parse'".

I use the newest Xcode 7 beta and Swift.

Deadlock when checking isDataAvailable and performing Query

While trying to findObjectsInBackgroundWithBlock and checking isDataAvailable, the following can occur:

Main Thread:
#0  0x00000001984530c0 in __psynch_mutexwait ()
#1  0x00000001984ed494 in _pthread_mutex_lock ()
#2  0x00000001002a8f78 in -[PFObject state] at /Users/nlutsenko/src/parse/ios-client/Parse/PFObject.m:2047
#3  0x00000001002aab20 in -[PFObject isDataAvailable] at /Users/nlutsenko/src/parse/ios-client/Parse/PFObject.m:2341
...


Internal Parse NSOperationQueue Serial Thread:
#0  0x00000001984530c0 in __psynch_mutexwait ()
#1  0x00000001984ed494 in _pthread_mutex_lock ()
#2  0x00000001002a523c in -[PFObject(Private) _mergeAfterFetchWithResult:decoder:completeData:] at /Users/nlutsenko/src/parse/ios-client/Parse/PFObject.m:1587
...
#22 0x00000001002a12ac in +[PFObject(Private) _objectFromDictionary:defaultClassName:selectedKeys:] at /Users/nlutsenko/src/parse/ios-client/Parse/PFObject.m:1041
#23 0x00000001002c9724 in __78-[PFQueryController findObjectsAsyncForQueryState:withCancellationToken:user:]_block_invoke26 at /Users/nlutsenko/src/parse/ios-client/Parse/Internal/Query/Controller/PFQueryController.m:84
...
#59 0x00000001002f9db8 in -[PFTaskHTTPRequestOperation _operationDidFinish] at /Users/nlutsenko/src/parse/ios-client/Parse/Internal/HTTPRequest/PFTaskHTTPRequestOperation.m:51
#60 0x000000010028d16c in -[PFCommandNetworkOperation _operationDidFinish] at /Users/nlutsenko/src/parse/ios-client/Parse/Internal/HTTPRequest/PFCommandNetworkOperation.m:78
...
----------
Enqueued from Background Thread:
...
#3  0x00000001002de250 in -[PFRESTCommandRunner _runCommandAsync:withCancellationToken:] at /Users/nlutsenko/src/parse/ios-client/Parse/Internal/Commands/PFRESTCommandRunner.m:168
...
#7  0x00000001002c9398 in __78-[PFQueryController findObjectsAsyncForQueryState:withCancellationToken:user:]_block_invoke at /Users/nlutsenko/src/parse/ios-client/Parse/Internal/Query/Controller/PFQueryController.m:64
...
----------
Enqueued from Main Thread:
#0  0x0000000100743d50 in _dispatch_async_f_slow ()
#1  0x000000010030cf88 in -[BFExecutor execute:] at /Users/chrisp/src/ios-sdk-3/Bolts-IOS/Bolts/Common/BFExecutor.m:109
...
#19 0x00000001002bfaf8 in -[PFQuery findObjectsInBackgroundWithBlock:] at /Users/nlutsenko/src/parse/ios-client/Parse/PFQuery.m:806

Adding a property named `state` to a PFObject causes a crash

As I originally posted here in the Google Forum, if you have a PFObject subclass, where one of the property is named state, Parse will cause a crash, related to PFObjectState trying to set an object that is not a PFObjectState instance.

It was introduced, I guess, in version 1.7 or around that - as it wasn't crashing for me. To fix it temporarily, I needed to replace my property with geographicState instead of state.

To reproduce it, is very simple. One just needs to create a subclass of PFObject, add a property named state (in my case, it was a string), assign it and save.

I hope it's enough information. If not, I can try to reproduce and attach a stack strike.

If this behaviour is expected, that's ok - but it should be documented (maybe I didn't find this in the docs?). But it seems that I'm not the only one, according to the replies in the Google Forum.

Enable query cache and object pinning

Hi, I'm sure this is not easy but... we were surprised to see this caveat:
https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/blob/61f68e9333206f0eebf15d5adab076a0ae7c4b71/Parse/PFQuery.h#L798

Could you please explain why it's not possible to enable a cache policy on a query while pinning is enabled -- even, seemingly, if the query cache policy is set on an object which will never be pinned?

Our solution was to disable pinning (by using a proprietary data store) and then enjoying the benefits of a liberal cache policy.

Thanks!

Push Translation for iOS

Add an automatic locale/language detection and store it in PFInstallation for further processing and smarter query. The locale/language will be stored under localeIdentifier inside PFInstallation.

PFObject thinks 'YES' and 'NO' in BOOL property is a 'number'

I got an error on saveEventually about this when I updated to 1.8.0.

Say I have a custom subclass called MyObject. The following errors out:

MyObject *obj = [MyObject object];
obj.isAwesome = NO;
[obj save];

Just following syntax here: http://blog.parse.com/announcements/stay-classy-objective-c-introducing-native-subclasses-for-parse-objects/

The workaround for now is of course to set a bool value on the object:

...
obj[@"isAwesome"] = @NO;
...

Reset Password Through Email

When implementing our own sign up for a user using Parse, we can set certain restrictions on password requirement (i.e. More than 5 characters, at least one number)
However, when an user reset his or her password through email, there is no restriction for their new password. They are able to set a new password as simple as "1"
Is there a way we can set restriction for email password reset ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.