GithubHelp home page GithubHelp logo

simperium-ios's Introduction

simperium-ios

Pod Version Pod Platform Pod Platform Pod License

Simperium is a simple way for developers to move data as it changes, instantly and automatically. This is the iOS / OSX library. You can browse the documentation or try a tutorial.

You can sign up for a hosted version of Simperium. There are Simperium libraries for other languages too.

Adding Simperium to your project

The easiest way to add Simperium is to download the latest release. Unzip the source code somewhere convenient.

Then, drag and drop Simperium.xcodeproj into your application's project, and add Simperium.framework in your target's Build Phase tab (under Link Binary with Libraries). You'll still need to add some dependencies.

OSX

Everything works pretty much the same on OSX. Some changes are noted in the online documentation.

Releases

The master branch always has the latest stable release, and is tagged. Simperium is used by hundreds of thousands of people across many different apps and devices, and is considered production-ready.

The develop branch has an ongoing development build (not intended for production use).

Folder structure

Simperium. Everything is accessed from a Simperium instance. This class can be safely instantiated more than once in the same app (e.g. for unit testing).

Object. Simperium does a lot of diffing in order to send only data that changes. Any object class that conforms to the SPDiffable protocol can be supported. SPManagedObject is for Core Data, and SPObject is a container for raw JSON (not yet supported). SPGhost is an object's opinion of its own state on the server (the name "ghost" was borrowed from the Tribes Networking Model).

Diffing. An SPDiffer can perform diffs on any SPDiffable object. Each differ adheres to an SPSchema. The schema stores a list of members/properties (of type SPMember) for an object of a particular type. Each subclass of SPMember corresponds to a data type, and knows how to diff itself. In the future these will be parameterized for custom diffing, conflict resolution, validation, etc.

System. An SPBucket provides access to a synchronized bucket of objects of a particular type. The SPBucket has an SPDiffer to perform diffs, an SPStorageProvider for locally reading and writing data, an SPChangeProcessor for processing incoming and outgoing changes, and an SPIndexProcessor for processing indexes retrieved from the server. The processors run in their own threads.

Storage. An SPStorageProvider defines an interface for local reading and writing of objects. In particular it defines a threadSafeStorage method that returns a thread safe instance. SPCoreDataProvider is currently the only fully functional storage provider.

Authentication. An SPAuthenticator handles all authentication with Simperium, and can be customized or overridden as necessary. There are companion classes for iOS and OSX that provide a code-driven UI for signing in and signing up (SPAuthenticationViewController and SPAuthenticationWindowController).

Networking. An SPNetworkProvider defines an interface for remote reading and writing of objects in an SPBucket. The network provider sends local data and receives remote data in the background, passing it through threaded processors as necessary. Although there is an HTTP provider, the WebSockets provider is intended to become the default (but is still under development).

User. Basic access to a user's data. In the future this will hold custom properties and presence information.

Helpers. Exporter, keychain, etc.

License

The Simperium iOS library is available for free and commercial use under the MIT license.

simperium-ios's People

Contributors

a2 avatar aerych avatar cablehead avatar chengfred avatar danieljimenez avatar frosty avatar irbrad avatar jamesmoschou avatar jeduan avatar jleandroperez avatar jonrcahill avatar jp-foreflight avatar koke avatar lukman-foreflight avatar mackross avatar mattstevens avatar mdawaffe avatar mikejohnstn avatar mokagio avatar prvnl avatar rayvace avatar roundhill avatar tomwitkin avatar

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

simperium-ios's Issues

Periodic duplication of content in synced text

Certain users report that Simperium sync will create duplications of words or segments of text in their records. Seems to effect only certain users, though those users see it regularly. Possibly happening most with longer texts.

I have not been able to pin down any cases on this issue yet, advice for debugging would be useful. More than one of the users reporting this have said Simplenote did the same thing to them when syncing.

After App Update LoginController appears and can not be closed

It's not possible for the user to login and cancel button is disabled.
The only solution is to exit the app via the multitasking bar, after that all is working fine, as well.
But some user do not realize this and rate the app with only one star...quite annoying

Decimal type attributes are not supported

It seems that simperium doesn't support all the Core Data attribute types. I'm getting an exception when calling startWithAppID:APIKey:model:context:coordinator:

2012-05-12 10:48:59:405 Squirrel[1502:c07] Simperium starting...
2012-05-12 10:48:59.405 Squirrel[1502:c07] *** Assertion failure in -[SPCoreDataExporter addMembersFrom:to:], /Users/kineticpoet/dev/simperium-ios-private/Simperium/SPCoreDataExporter.m:94
2012-05-12 10:48:59.407 Squirrel[1502:c07] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Simperium couldn't load member initialExchangeRate (unsupported type)'

initialExchangeRate is a decimal attribute in this case. Are there any other attributes types not supported?

LoginView animation and landscape

If the iPad LoginView is used and the iPad is rotated to landscape, the login fields are animated of the screen. This is because there is a specific animation that moves up the login fields by the size of the keyboard. This is only for the iPad when the keyboard is shown in 'SPLoginViewController.m' for the method '-(void)keyboardWillShow:(NSNotification *)notification'.

To get this working I've removed the animation for the iPad and moved the fields slightly up in the LoginView-iPad.xib. It's also possible to keep the animation but if the iPad is in landscape orientation the animation should not be a big as in portrait orientation.

Please change this in the sources

The iOS todo tutorial incorrectly states libraries needed

The Todo tutorial states that the needes libraries for a project to build are

  • CoreData
  • SystemConfiguration
  • MobileCoreServices
  • CFNetwork
  • libz.dylib

However building a project with just those added libraries will end up with the following linker errors


Undefined symbols for architecture i386:
  "_SecCertificateCopyData", referenced from:
      -[SRWebSocket stream:handleEvent:] in Simperium(SRWebSocket.o)
  "_SecItemAdd", referenced from:
      +[SPSimpleKeychain save:data:] in Simperium(SPSimpleKeyChain.o)
  "_SecItemCopyMatching", referenced from:
      +[SPSimpleKeychain load:] in Simperium(SPSimpleKeyChain.o)
  "_SecItemDelete", referenced from:
      +[SPSimpleKeychain save:data:] in Simperium(SPSimpleKeyChain.o)
      +[SPSimpleKeychain delete:] in Simperium(SPSimpleKeyChain.o)
  "_SecRandomCopyBytes", referenced from:
      -[SRWebSocket didConnect] in Simperium(SRWebSocket.o)
      -[SRWebSocket _sendFrameWithOpcode:data:] in Simperium(SRWebSocket.o)
  "_SecTrustGetCertificateAtIndex", referenced from:
      -[SRWebSocket stream:handleEvent:] in Simperium(SRWebSocket.o)
  "_SecTrustGetCertificateCount", referenced from:
      -[SRWebSocket stream:handleEvent:] in Simperium(SRWebSocket.o)
  "_kSecAttrAccessible", referenced from:
      +[SPSimpleKeychain getKeychainQuery:] in Simperium(SPSimpleKeyChain.o)
  "_kSecAttrAccessibleAfterFirstUnlock", referenced from:
      +[SPSimpleKeychain getKeychainQuery:] in Simperium(SPSimpleKeyChain.o)
  "_kSecAttrAccount", referenced from:
      +[SPSimpleKeychain getKeychainQuery:] in Simperium(SPSimpleKeyChain.o)
  "_kSecAttrService", referenced from:
      +[SPSimpleKeychain getKeychainQuery:] in Simperium(SPSimpleKeyChain.o)
  "_kSecClass", referenced from:
      +[SPSimpleKeychain getKeychainQuery:] in Simperium(SPSimpleKeyChain.o)
  "_kSecClassGenericPassword", referenced from:
      +[SPSimpleKeychain getKeychainQuery:] in Simperium(SPSimpleKeyChain.o)
  "_kSecMatchLimit", referenced from:
      +[SPSimpleKeychain load:] in Simperium(SPSimpleKeyChain.o)
  "_kSecMatchLimitOne", referenced from:
      +[SPSimpleKeychain load:] in Simperium(SPSimpleKeyChain.o)
  "_kSecRandomDefault", referenced from:
      -[SRWebSocket didConnect] in Simperium(SRWebSocket.o)
      -[SRWebSocket _sendFrameWithOpcode:data:] in Simperium(SRWebSocket.o)
  "_kSecReturnData", referenced from:
      +[SPSimpleKeychain load:] in Simperium(SPSimpleKeyChain.o)
  "_kSecValueData", referenced from:
      +[SPSimpleKeychain save:data:] in Simperium(SPSimpleKeyChain.o)
  "_utf8_countTrailBytes", referenced from:
      _validate_dispatch_data_partial_string in Simperium(SRWebSocket.o)
  "_utf8_nextCharSafeBody", referenced from:
      _validate_dispatch_data_partial_string in Simperium(SRWebSocket.o)
ld: symbol(s) not found for architecture i386

To fix this just add the following two libraries to the project

  • Security
  • libicucore.dylib

The project builds correctly with them

iOS: Entities with custom class named differently as entity are not synced

When an entity is implemented by a custom class that's named differently as the entity itself the sync does not work.

Simperium reports: "Simperium managing x object instances" but the data of the x objects is not available in Simperium's Data Browser.

(as reported via Twitter by me (@christian_beer) a day ago. Just to have it tracked here)

Use ARC

Boost the version requirement to iOS 5.0 and use ARC exclusively.

Cancel button not responding after failed login

If the property 'authenticationOptional' is set to true, the Cancel button is presented. This works as expected. But if the login fails, the Cancel button fails to work after that. This is because the login view is presented on top of the existing login view.

To fix this issue, in 'Simperium.m' I had to change 'openAuthViewControllerAnimated'. This method is called when the login view is initialized or the login fails. The first line in this method is to check if the login view is already presented, if this is the case the method returns and prevents the login view to be presented again. This works when the Cancel button is not activated, but the check always fails when the Cancel button is active so the login view is presented over the existing login view..

Current check if login view is already presented:
if (self.loginViewController && self.rootViewController.presentedViewController == self.loginViewController)

Suggested check if login view is already presented:
if (self.loginViewController)

Ruby: Namespace classes

Would it be possible to namespace the ruby classes? I already have a class called User in my app.

Obj-C framework defines categories on NSDate and NSString without prefixes

See NSString+Simperium.h and NSDate+Simperium.h. It is not safe to define methods like +[NSString makeUUID] because you may collide with an identically-named method defined in another framework linked by your clientโ€”or worse, in a future version of a system framework.

You must prefix all category methods you define: for instance, +[NSString sp_makeUUID].

Relationships Must Be Marked As Optional

In order for Simperium to correct sync an object graph, relationships must always be marked as optional. This appears to be a requirement since entity data may arrive at the client in an undefined sequence. However, the client's own validation logic may require certain relationships to be properly indicated as mandatory.

It would be helpful for relationships to be defined as either optional or mandatory, as required by a specific application, and for simperium to sync correctly, regardless of whether or not relationships are marked as optional.

OSX fails to authenticate

Am getting the following error when launching a Mac app as it tries to display the authentication form:

2012-05-18 16:48:24:254 ******[6057:503] Simperium didn't find an existing auth token
2012-05-18 16:48:25.073 ******[6057:503] Unknown class AuthView in Interface Builder file at path ******/build/Debug/******.app/Contents/Resources/en.lproj/AuthWindow.nib.
2012-05-18 16:48:25.079 ******[6057:503] Could not connect the action signupToggle: to target of class SPAuthWindowController
2012-05-18 16:48:25.079 ******[6057:503] Could not connect the action signinToggle: to target of class SPAuthWindowController

OSX Crashes on Login

I'm using the standard AuthWindow.xib and the Simperium-OSX.framework on 10.7. The login window pops up fine, but when I try to login using an existing account, I get this crash:

2012-09-09 11:52:00.765 Sample[19068:1703] Could not connect the action signupToggle: to target of class SPAuthWindowController
2012-09-09 11:52:00.765 Sample[19068:1703] Could not connect the action signinToggle: to target of class SPAuthWindowController
2012-09-09 11:52:20:947 Sample[19233:1703] https://auth.simperium.com/1/pecks-sacks-64a/authorize/

Missing documentation for seeding data while avoiding duplicates

General strategy is to create an object and assign it a fixed simperiumKey. As multiple devices try to seed that object when an app launches for the first time, Simperium will prevent duplicates from being created. The documentation should explain this in detail.

Python versions < 2.6

Using Python 2.5.6 on a mac laptop. Trying to import the library but it fails trying to import json library. I can add one easily enough, but I imagine you want this to work out of the box as much as possible!

Python 2.5.6 (r256:88840, Jul 31 2011, 19:30:45) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from simperium.core import Auth
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "simperium/core.py", line 6, in <module>
    import json
ImportError: No module named json
>>> 

Ruby api.changes method fails because it passes an extra parameter to _request

The api.changes method passes five parameters to the _request method.

One of these, "timeout", is an extra parameter that _request doesn't know how to handle.

As a result, _request fails with an error.

The fix would be to stop .changes from passing that parameter to the _request call or update the method definition on _request to allow the parameter, IE:

    def _request(url, data=nil, headers=nil, method=nil)

    would be updated to 

    def _request(url, data=nil, headers=nil, method=nil, timeout=nil)

For consistency, and to achieve the intended functionality (provide a custom timeout for requests done through the .changes method), we would also want to update line 131 to read:

return Simperium._request(url, data=data, headers=headers, method=method, timeout=timeout)

Synchronization status

Currently there is no way to check if a sync is running or if finished successful. An API to check sync status and delegate methods to get informed about syncing process would be awesome

defaults is misspelled as "defautls" at /ruby/lib/simperium.rb:302

I was getting an error message saying "NameError: undefined local variable or method defaults' for #<Simperium::Bucket:0x007fa80418d2c0> from /Users/newyork/.rvm/gems/ruby-1.9.3-p194@rails323/gems/simperium-0.0.2.4/lib/simperium.rb:304:inchanges'"

The fix is to just rename defautls at line 302 to defaults and the error is fixed.

FixCategoryBug warnings in Xcode 4.6

In the Category files the FixCategoryBug is used to hide warnings when supporting armv6 & armv7. In Xcode 4.6 this fix raises a warning, I resolved this by removing the FixCategoryBug completely in all category files. It should be save now to remove this fix, had no problems running without this fix.

Also see the following link as reference, it's about a different framework but with the same issue:

http://stackoverflow.com/questions/14581605/kobold2d-generates-errors-after-upgraded-xcode-to-4-6

Rename authenticate/create methods in the SPAuthenticationManager

To conform to Apple's naming conventions the follow methods should describe the first argument:

-(void)authenticate:(NSString *)username password:(NSString *)password success:(SucceededBlockType)successBlock failure:(FailedBlockType)failureBlock;
-(void)create:(NSString *)username password:(NSString *)password success:(SucceededBlockType)successBlock failure:(FailedBlockType)failureBlock;

Should be named:

-(void)authenticateWithUsername:(NSString *)username password:(NSString *)password success:(SucceededBlockType)successBlock failure:(FailedBlockType)failureBlock;
-(void)createWithUsername:(NSString *)username password:(NSString *)password success:(SucceededBlockType)successBlock failure:(FailedBlockType)failureBlock;

Simperium crashes on 10.7.4!!

Simperium seems to work on 10.7.3 (although I got errors because of empty managed objects; so I'm not sure) but crashes on 10.7.4:

(Breakpoint is an exception breakpoint)

2012-07-15 17:52:13:006 iVocabulary[15845:b03] https://auth.simperium.com/1/practice-game-30c/authorize/
(lldb) bt
* thread #9: tid = 0x3b03, 0x00007fff8eeb20e0 libc++abi.dylib`__cxa_throw, stop reason = breakpoint 2.2
    frame #0: 0x00007fff8eeb20e0 libc++abi.dylib`__cxa_throw
    frame #1: 0x00007fff8bbbf5a8 Security`Security::CssmError::throwMe(int) + 54
    frame #2: 0x00007fff8bb963fc Security`Security::DbVersion::findTable(unsigned int) const + 58
    frame #3: 0x00007fff8bb96397 Security`Security::DbVersion::createCursor(cssm_query const*) const + 85
    frame #4: 0x00007fff8bb962db Security`Security::DbModifier::createCursor(cssm_query const*) + 65
    frame #5: 0x00007fff8bcc9079 Security`Security::AppleDatabase::dataGetFirst(Security::DbContext&, Security::CssmQuery const*, cssm_db_record_attribute_data*, Security::CssmData*, cssm_db_unique_record*&) + 49
    frame #6: 0x00007fff8bcd46b0 Security`Security::DatabaseSession::DataGetFirst(long, Security::CssmQuery const*, cssm_db_record_attribute_data*, Security::CssmData*, cssm_db_unique_record*&) + 174
    frame #7: 0x00007fff8bba5681 Security`_ZL17cssm_DataGetFirst17cssm_dl_db_handlePK10cssm_queryPlP29cssm_db_record_attribute_dataP9cssm_dataPP21cssm_db_unique_record + 148
    frame #8: 0x00007fff8bba550c Security`CSSM_DL_DataGetFirst + 120
    frame #9: 0x00007fff8bca6103 Security`SSDLSession::DataGetFirst(long, Security::CssmQuery const*, cssm_db_record_attribute_data*, Security::CssmData*, cssm_db_unique_record*&) + 171
    frame #10: 0x00007fff8bba5681 Security`_ZL17cssm_DataGetFirst17cssm_dl_db_handlePK10cssm_queryPlP29cssm_db_record_attribute_dataP9cssm_dataPP21cssm_db_unique_record + 148
    frame #11: 0x00007fff8bba550c Security`CSSM_DL_DataGetFirst + 120
    frame #12: 0x00007fff8bc96570 Security`tpDbFindIssuerCrl + 728
    frame #13: 0x00007fff8bbdc622 Security`tpVerifyCertGroupWithCrls + 1559
    frame #14: 0x00007fff8bbc3c38 Security`AppleTPSession::CertGroupVerify(long, long, cssm_certgroup const&, cssm_tp_verify_context const*, cssm_tp_verify_context_result*) + 3262
    frame #15: 0x00007fff8bbc2ecf Security`_ZL20cssm_CertGroupVerifylllPK14cssm_certgroupPK22cssm_tp_verify_contextP29cssm_tp_verify_context_result + 129
    frame #16: 0x00007fff8bbc2ca9 Security`CSSM_TP_CertGroupVerify + 111
    frame #17: 0x00007fff8bbc2509 Security`Security::CssmClient::TPImpl::certGroupVerify(Security::CertGroup const&, Security::TPVerifyContext const&, Security::TPVerifyResult*) + 133
    frame #18: 0x00007fff8bbbcc54 Security`Security::KeychainCore::Trust::evaluate(bool) + 2190
    frame #19: 0x00007fff8bbbc2c3 Security`SecTrustEvaluate + 49
    frame #20: 0x00007fff8bbeb8ed Security`sslVerifyCertChain + 1104
    frame #21: 0x00007fff8bbeb3b5 Security`SSLProcessCertificate + 303
    frame #22: 0x00007fff8bbe3146 Security`SSLProcessHandshakeRecord + 330
    frame #23: 0x00007fff8bbe2fa7 Security`SSLProcessProtocolMessage + 82
    frame #24: 0x00007fff8bbe2995 Security`SSLHandshakeProceed + 390
    frame #25: 0x00007fff8bbe27ff Security`SSLHandshake + 107
    frame #26: 0x00007fff8d837e2b CFNetwork`SocketStream::_PerformSecurityHandshake_NoLock() + 159
    frame #27: 0x00007fff8d837206 CFNetwork`SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*) + 184
    frame #28: 0x00007fff8d837136 CFNetwork`SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 100
    frame #29: 0x00007fff8e0240c4 CoreFoundation`__CFSocketPerformV0 + 980
    frame #30: 0x00007fff8dfdc4f1 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    frame #31: 0x00007fff8dfdbd5d CoreFoundation`__CFRunLoopDoSources0 + 253
    frame #32: 0x00007fff8e002b49 CoreFoundation`__CFRunLoopRun + 905
    frame #33: 0x00007fff8e002486 CoreFoundation`CFRunLoopRunSpecific + 230
    frame #34: 0x00007fff8e01219f CoreFoundation`CFRunLoopRun + 95
    frame #35: 0x000000010919b17c Simperium-OSX`+[ASIHTTPRequest runRequests] + 172
    frame #36: 0x00007fff9076d72a Foundation`-[NSThread main] + 68
    frame #37: 0x00007fff9076d6a2 Foundation`__NSThread__main__ + 1575
    frame #38: 0x00007fff9001f8bf libsystem_c.dylib`_pthread_start + 335
    frame #39: 0x00007fff90022b75 libsystem_c.dylib`thread_start + 13

Cancel button is not localized

In class SPLoginViewController.m on row 59, the Cancel button is initialized with title @"Cancel". If a localized App is used, this button is not translated.

Please localize this string!

Received an invalid change for...

Hi,

how to handle an invalid change?

It never stops logging - here some details :

2012-10-17 13:30:43:810 Hochzeit[21387:7303] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:44:174 Hochzeit[21387:7303] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:44:459 Hochzeit[21387:7303] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:44:781 Hochzeit[21387:4a0b] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:45:065 Hochzeit[21387:1e03] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:45:393 Hochzeit[21387:4a0b] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:45:821 Hochzeit[21387:7303] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:46:235 Hochzeit[21387:7203] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:46:521 Hochzeit[21387:7203] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:46:808 Hochzeit[21387:7203] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:47:129 Hochzeit[21387:7203] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:47:538 Hochzeit[21387:4a0b] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:50:094 Hochzeit[21387:4a0b] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:50:375 Hochzeit[21387:4a0b] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:50:662 Hochzeit[21387:7203] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:50:954 Hochzeit[21387:7203] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:51:240 Hochzeit[21387:7203] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:51:583 Hochzeit[21387:5407] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:51:874 Hochzeit[21387:5407] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)
2012-10-17 13:30:52:164 Hochzeit[21387:5407] Simperium error (EysGaeste), received an invalid change for (7a6b31096f474b95b81ad769e7038e10)

edit:
First i thought simperium is absolutely great.
But after long time testing with 4 devices, I had to find that some entities get out of sync.

clearLocalData helps, but after short time same problem.

is there another workaround?

Entity Name Cannot Be "User"

If a Simperium client's model includes an entity named "User", it appears to conflict with an existing Simperium entity by the same name. At the very least this should be documented. But a better solution would be for Simperium to define a separate namespace for internal entity names and use a custom prefix for those names, like "SPUser".

I have an existing app with many customers that have much data. That app already uses an entity named User and I don't want to risk corrupting customer's data or introduce bugs because Simperium requires me to use a different entity name than User. That would be okay for a brand new app, but not so good for an existing app. I recommend you figure out a way to switch to using a documented, adhoc namespace for internal entities.

iOS: Simperium ignores authenticationEnabled after its been started

When disabling authenticationEnabled to implement my own login flow using SPAuthenticationManager Simperium will not start pushing/pulling changes until the app is restarted with authenticationEnabled set to YES.

Setting the property to YES after the fact has no effect.

iPad LoginView needs to be renamed

The iPad LoginView xib is now named 'LoginView-iPad.xib', also the code comments in 'SPLoginViewController.h' states it needs to be named this way. But to use the iPad LoginView and to select it automatically it needs to be named 'LoginViewipad.xib'. So when the device is an iPad it will use 'LoginViewipad.xib' and when it's an iPhone/iPod it will use 'LoginView.xib'.

This might be obvious to everyone, but because the comments don't mention this it can take some time to get this sorted out.

Please change the filename or update the documentation!

Allow syncing without Core Data

There is some support for this already in the form of SPJSONStorage as an alternative to SPCoreDataStorage as a storage provider, but it's not considered production ready (and should ideally be tucked away inside its own feature branch).

We'll mark this issue closed when the feature is ready.

Table Cell Redraw Issue

I successfully compiled and built on two iPhones:

iPhone 4: running 5.0.1 (no mobile services)
iPhone 4S: running 5.1.1 ATT mobile service

non-jailbroken

all tests done on my local wifi.

Note: this issue occurs even with just a few items in the table.

on either phone:

launch the "to do" tut app (i did the red minus to kill the app just to be sure on both phones) on phone 1
launch the "to do" tut app on phone 2
add a "to do" on phone 1
name it "order rum" (or whatever if you are not feeling like a pirate.) and go back to table view

on phone 1 it correctly shows an item for "order rum"

on phone 2 a cell has correctly shown, but it is "blank" and has no text is shown.
on phone 2 clicking on the blank item will mark it "checked" and the text will show.

so the issue seems to be a redraw issue and touching the cell will correctly draw the text for the cell.

if i do the same thing but starting on phone 2 (but with a different task name), the same blank cell issue happens on iPhone 1.

quitting and launching the app does not fix or draw the text.

doing the red minus kill on the problem app does fix and draw the text when restarted.

note: creating tasks on the web correctly adds them to both my iOS devices.

this is with the "final to do" code.

Crash when the Simperium object deallocates

When attempting to dealloc Simperium the debugger crashes with the following message:

-[SPAuthenticationManager setFailedBlock:]: message sent to deallocated instance

The stack trace is:
`
#0 0x01afddee in _forwarding_ ()
#1 0x01afdcb2 in _CF_forwarding_prep_0 ()
#2 0x000d7239 in -[SPAuthenticationManager dealloc] at /Users/kineticpoet/dev/scratch/simperium-ios-json/simperium-ios-private/Simperium/SPAuthenticationManager.m:62
#3 0x01999e3d in _objc_rootRelease ()
#4 0x01999e00 in objc_release ()
#5 0x01983b39 in objc_setProperty_non_gc ()
#6 0x01983b70 in objc_setProperty ()
#7 0x0004200b in -[Simperium setAuthManager:] at /Users/kineticpoet/dev/scratch/simperium-ios-json/simperium-ios-private/Simperium/Simperium.m:44
#8 0x0003d848 in -[Simperium dealloc] at /Users/kineticpoet/dev/scratch/simperium-ios-json/simperium-ios-private/Simperium/Simperium.m:163
#9 0x01999e3d in _objc_rootRelease ()
#10 0x01999e00 in objc_release ()
#11 0x0199b047 in objc_storeStrong ()

...
`

More info about using Simperium without CoreData on iOS

The reference states that "Simperium can work with Core Data or JSON data stored in NSDictionary objects" however, all tutorials point to CoreData bindings. Is there some pointers I can find WRT to using Simperium witout commiting to CoreData?

iOS: Simperium is randomly crashing with the following crash log

The application was working fine for a number of hours, and then randomly starting crashing on launch with the following crash log.

Putting the device into Airplane mode seems to prevent the crash from happening.

0 CoreFoundation 0x3461a2a3 <redacted> + 163
1 libobjc.A.dylib 0x3292a97f objc_exception_throw + 31
2 CoreFoundation 0x3457c313 <redacted> + 143
3 AppName 0x0011fded -[ASIHTTPRequest addRequestHeader:value:] (ASIHTTPRequest.m:481)
4 AppName 0x00114709 __block_global_0 (SPHttpManager.m:274)
5 libdispatch.dylib 0x3330b11f <redacted> + 11
6 libdispatch.dylib 0x3330a4b7 <redacted> + 23
7 libdispatch.dylib 0x3330f1bd <redacted> + 225
8 CoreFoundation 0x345edf3b <redacted> + 1291
9 CoreFoundation 0x34560ebd CFRunLoopRunSpecific + 357
10 CoreFoundation 0x34560d49 CFRunLoopRunInMode + 105
11 GraphicsServices 0x34a9d2eb GSEventRunModal + 75
12 UIKit 0x3593f301 UIApplicationMain + 1121
13 AppName 0x0005f8b5 main (main.m:16)
14 AppName 0x0005f850 start + 40

iOS: Open source the framework

It's incredibly difficult to integrate with the framework beyond the basic examples due to poor/lacking documentation, and the "closed" framework.

iOS: Deleting object (tree) gives 409 errors and doesn't sync

Deleting an entity on one device gives HTTP 409 errors and doesn't get synced to a second device. The error looks like:

(verbose logging not activated)
2012-06-18 07:03:10:464 iVocabulary3[84744:23487] Simperium POST returned error 409 for change {
ccid = 28875800c0214c2e87f4f534023efd69;
clientid = "ios-d682c395ebd53ca4853e8df0900b3d80";
error = 409;
id = 7bd6ba3b1f1e4330b1610d6912529ff1;
r = (
4fc5236437a4014a1a000018
);
}

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.