2013-04-01 55 views
1

在這裏問一下會更好,因爲我無法看到我的谷歌搜索結果。ios coredata表模式同步

最後,我的iOS應用程序和網絡應用程序可以平滑地同步數據。在iOS端,核心數據用於離線數據的播放。在Web應用程序中,用戶可以將自定義字段添加到任何數據庫表。因此,新添加的字段存在於較新的請求結果中。我應該如何管理我的應用程序,以便它可以繼續使用包含新添加字段的離線數據。

解決此問題的最佳模式是什麼?有沒有相關的框架?

編輯: 老REST得到結果

{ 
    "status":"SUCCESS", 
    "data":{ 
    "id":1, 
    "createdDateTime":"2012-05-07 08:18:11", 
    "modifiedDateTime":"2012-05-07 08:18:11", 
    "createdByUser":{ 
     "id":1, 
     "username":"super" 
    }, 
    "modifiedByUser":{ 
     "id":1, 
     "username":"super" 
    }, 
    "owner":{ 
     "id":1, 
     "username":"super" 
    }, 
    "department":null, 
    "firstName":"First", 

    }, 
    "message":null, 
    "errors":null 
} 

自定義字段此外,新的REST結果後:

{ 
     "status":"SUCCESS", 
     "data":{ 
     "id":1, 
     "createdDateTime":"2012-05-07 08:18:11", 
     "modifiedDateTime":"2012-05-07 08:18:11", 
     "createdByUser":{ 
      "id":1, 
      "username":"super" 
     }, 
     "modifiedByUser":{ 
      "id":1, 
      "username":"super" 
     }, 
     "owner":{ 
      "id":1, 
      "username":"super" 
     }, 
     "department":null, 
     "firstName":"First", 
     "customField":"hello", 
     }, 
     "message":null, 
     "errors":null 
    } 
+0

你的意思是場OR記錄? – viral

+0

@Matt我的意思是 – tugce

回答

0

有上動態地將核心數據屬性here的詳細討論。

+0

感謝您指出,我也發現這個http://stackoverflow.com/a/4977327/587669,但沒有發現在谷歌作爲「DynamicCatalog」,你有什麼想法,它有用嗎? – tugce