Closed jakubknejzlik closed 8 years ago
Thanks. I don't have much experience with pull requests. Should I use the Github feature to automatically merge, thereby bringing your podspec in, and then update that to point to my repository? Or should I just merge the CustomElements change via the command line?
Didn't try it from the command line (also I'm not sure, if it's possible from command line to accept pull request)...github worked fine for me in all cases.
Ouch, my bad! I've watched the commited changes again, and it contains edits from another commit (cocoapods pull request). I'll create new or, if you want to update it manualy. Just please don't accept this PR. I'm sorry for troubles.
It's all just about this line
Great, I'll just make that change. FYI, this a wiki page on using custom elements in case you didn't see it: https://github.com/robreuss/VirtualGameController/wiki/Custom-Elements
Let me know if you notice any errors. Can you tell me in general terms how you're using custom elements, just so I can get a feel for use cases?
Well, I've copied it from example :). Also when I've specified nil value for customElements and customMappings, the app crashes right after peripheral (ios in my case) controller gets connected.
Yeah, I tried setting things up to allow nil for those parameters but it was seeming like a pain, so I created an alternative startAs method in VgcManager that doesn't take those parameters, and initializes them using the superclass, which has the net effect of creating an empty set of elements/mappings:
public class func startAs(appRole: AppRole, appIdentifier: String) {
VgcManager.startAs(appRole, appIdentifier: appIdentifier, customElements: CustomElementsSuperclass(), customMappings: CustomMappingsSuperclass())
}
Ah, I see...ok then:) ... btw you can also create it this way:
public class func startAs(appRole: AppRole, appIdentifier: String, customElements: CustomElements = CustomElements(), customMappers: CustomMappers = CustomMappers()) {
...
When trying running as .Central I've found that the CustomElements overridden init method wasn't public, making it impossible to initialize from another module.