Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XCode 9 compilation #261

Open
imougy opened this issue Sep 18, 2017 · 8 comments
Open

XCode 9 compilation #261

imougy opened this issue Sep 18, 2017 · 8 comments

Comments

@imougy
Copy link

imougy commented Sep 18, 2017

Seems there are many errors while compiling using Xcode 9.
When do you think we can have those issues fixed?
Thanks,
screen shot 2017-09-17 at 10 15 28 pm

@jsom
Copy link
Contributor

jsom commented Sep 18, 2017

@imougy it's trying to compile as Swift 4 instead of Swift 3. It's a known issue on Cocoapods: CocoaPods/CocoaPods#6791

We have Swift 4 in the works and should be out in a few days. You can try set the Swift version or use the branch here: https://github.com/tradingticket/TradeItIosTicketSDK2/tree/swift-4

@jsom
Copy link
Contributor

jsom commented Sep 25, 2017

@imougy were you able to get this resolved? Version 2.0.0 of the SDK has Swift 4 support

@imougy
Copy link
Author

imougy commented Sep 26, 2017

Can I get this through pod update somehow?

@jsom
Copy link
Contributor

jsom commented Oct 5, 2017

Yes - you update the pod version to ~> 2.0.0

@ekampf
Copy link
Contributor

ekampf commented Oct 11, 2017

Still getting an error on

class TradeItYahooNavigationController: UINavigationController {
    var navigationBarHeight: CGFloat {
        get {
            return self.navigationBar.frame.height + UIApplication.shared.statusBarFrame.height
        }
    }

Saying

.../Pods/TradeItIosTicketSDK2/TradeItIosTicketSDK2/TradeItYahooNavigationController.swift:6:68: 'shared' is unavailable: Use view controller based solutions where appropriate instead.

@jsom
Copy link
Contributor

jsom commented Dec 1, 2017

Hi @ekampf, we've pushed a few updates. Is this still an issue?

@jsom jsom closed this as completed Apr 24, 2018
@ekampf
Copy link
Contributor

ekampf commented Jun 8, 2018

@jsom there's still tons of code in that uses UIApplication.shared ...
For example:

static func isDeviceJailBroken() -> Bool {
        guard TARGET_IPHONE_SIMULATOR != 1 else {
            return false
        }
        
        // Check 1 : existence of files that are common for jailbroken devices
        if !JAIL_BREAK_FILES.filter(FileManager.default.fileExists).isEmpty || UIApplication.shared.canOpenURL(URL(string:"cydia://package/com.example.package")!) {
            return true
        }
        
        // Check 2 : Reading and writing in system directories (sandbox violation)
        let stringToWrite = "Jailbreak Test"
        do {
            try stringToWrite.write(toFile: "/private/JailbreakTest.txt", atomically: true, encoding: String.Encoding.utf8)
            //Device is jailbroken
            return true
        } catch {
            return false
        }
    }

@jsom
Copy link
Contributor

jsom commented Jun 8, 2018

Hello @ekampf. This isn't an issue we've seen with other partners. It looks like it's due to this configuration: https://stackoverflow.com/a/34227172

Is this an intentionally set configuration and what led you to change to that configuration?

@jsom jsom reopened this Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants