Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shopify_iossdk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cemarose
shopify_iossdk
Commits
05cc85b4
Commit
05cc85b4
authored
May 06, 2016
by
Brent Gulanowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support default initializer and rename method to be less ambiguous.
parent
8472edab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
BUYModelManager.h
Mobile Buy SDK/Mobile Buy SDK/Models/BUYModelManager.h
+1
-3
BUYModelManager.m
Mobile Buy SDK/Mobile Buy SDK/Models/BUYModelManager.m
+7
-2
No files found.
Mobile Buy SDK/Mobile Buy SDK/Models/BUYModelManager.h
View file @
05cc85b4
...
...
@@ -40,15 +40,13 @@
*/
@property
(
nonatomic
,
strong
,
readonly
)
NSManagedObjectModel
*
model
;
-
(
instancetype
)
init
NS_UNAVAILABLE
;
/**
*
* @param model The Core Data managed object model for your given model. Should be the Buy model.
*
* @return A new model manager object.
*/
-
(
instancetype
)
initWithModel
:(
NSManagedObjectModel
*
)
model
NS_DESIGNATED_INITIALIZER
;
-
(
instancetype
)
initWithM
anagedObjectM
odel
:(
NSManagedObjectModel
*
)
model
NS_DESIGNATED_INITIALIZER
;
/**
* Convenience initializer. Instantiates a model using the -mergedModelFromBundles: method and the Buy.framework as the bundle.
...
...
Mobile Buy SDK/Mobile Buy SDK/Models/BUYModelManager.m
View file @
05cc85b4
...
...
@@ -64,7 +64,12 @@ NSString * const BUYPublicationsDateFormat = @"yyyy-MM-dd'T'HH:mm:ssZ";
});
}
-
(
instancetype
)
initWithModel
:
(
NSManagedObjectModel
*
)
model
-
(
instancetype
)
init
{
return
[
self
initWithManagedObjectModel
:[
NSManagedObjectModel
mergedModelFromBundles
:@[[
NSBundle
bundleForClass
:[
self
class
]]]]];
}
-
(
instancetype
)
initWithManagedObjectModel
:
(
NSManagedObjectModel
*
)
model
{
self
=
[
super
init
];
if
(
self
)
{
...
...
@@ -75,7 +80,7 @@ NSString * const BUYPublicationsDateFormat = @"yyyy-MM-dd'T'HH:mm:ssZ";
+
(
instancetype
)
modelManager
{
return
[[
self
alloc
]
init
WithModel
:[
NSManagedObjectModel
mergedModelFromBundles
:@[[
NSBundle
bundleForClass
:[
BUYObject
class
]]]]
];
return
[[
self
alloc
]
init
];
}
-
(
NSEntityDescription
*
)
buy_entityWithName
:
(
NSString
*
)
entityName
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment