Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

112 Compile errors with XCode 6.4 #17

Closed
ptarjan opened this issue Oct 2, 2015 · 6 comments
Closed

112 Compile errors with XCode 6.4 #17

ptarjan opened this issue Oct 2, 2015 · 6 comments
Labels

Comments

@ptarjan
Copy link
Contributor

ptarjan commented Oct 2, 2015

Do you support XCode 6.4? Ionic needs me to be on that version until they fix themselves for 7.0.

/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:116:23: warning: 'fast fast' can be expressed more succinctly as '#fast'
    public func close(fast fast: Bool) {
                      ^   ~~~~~
                      #
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:365:14: error: consecutive statements on a line must be separated by ';'
        guard let ws = self.ws else {return}
             ^
             ;
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:365:31: error: consecutive statements on a line must be separated by ';'
        guard let ws = self.ws else {return}
                              ^
                              ;
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:365:32: error: expected expression
        guard let ws = self.ws else {return}
                               ^
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:365:37: error: braced block of statements is an unused closure
        guard let ws = self.ws else {return}
                                    ^
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:391:27: error: consecutive statements on a line must be separated by ';'
            let json = try NSJSONSerialization.JSONObjectWithData(mesData,
                          ^
                          ;
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:414:11: error: expected 'while' in 'do-while' loop
        } catch {
          ^
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:414:17: error: braced block of statements is an unused closure
        } catch {
                ^
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:488:14: error: consecutive statements on a line must be separated by ';'
        guard str.characters.count != 1 else {
...
@nikDemyankov
Copy link
Member

No, as stated in the documentation, you need to have Xcode 7. This is because of the Socket.IO library. If you don't use local development feature of the plugin, and need Xcode 6.4 support - just remove all Socket.IO code from the plugin:

  • all .swift files
  • from HCPPlugin.m all code, that works with sockets. It is in the separate methods and marked, so you can find them easily.

Maybe later I can create a branch with no local development mode.

By the way, what are the issues with Ionic and Xcode 7 you are having?

@pablomaurer
Copy link
Contributor

I think you should split this plugin. Cause development mode and Update Plugin are some really different things. And somebody who needs dev mode maybe doesn't need update stuff and also the other way around.

Splitting makes it also easier to maintain and use for everyone. And somebody who only needs the update stuff deosn't get the unneeded socket.io library.

Then you have a Set of 3 Cordova Tools and everybody can download what he needs.

@nikDemyankov
Copy link
Member

Development mode is more like a feature, while update stuff is a core. So, probably, we can make development mode as another plugin, or a plugin hook. For example, when you specify in config.xml:

<chcp>
  <local-development enabled="true" />
</chcp>

plugin reads it on the before_build phase, and copies socket.io library in the project. But if local-development is disabled - it removes socket.io files.

@pablomaurer
Copy link
Contributor

This would be a solution i can live with. But I prefer the solution with an other plugin, cause then you have a clean git history to it's related stuff. And Issues are opened directly to the plugin it belongs to.

And it's easier the promote a plugin-set than a plugin which can do everything a little bit. But that's up to you =)

@ptarjan
Copy link
Contributor Author

ptarjan commented Oct 5, 2015

The two XCode 7.0 things I ran into have both been fixed by cordova-ios but haven't been released yet. If I use master of cordova-ios then two of my plugins don't compile so I'm stuck on XCode 6.4.

https://issues.apache.org/jira/browse/CB-9729

@nikDemyankov
Copy link
Member

After migrating to v1.1.0 you can use this plugin in Xcode 6.4. But if you add local development add-on to the project - you can't, because it uses Socket.IO library.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants