TradeItIosTicketSDK2 icon indicating copy to clipboard operation
TradeItIosTicketSDK2 copied to clipboard

XCode 9 compilation

Open imougy opened this issue 7 years ago • 8 comments

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

imougy avatar Sep 18 '17 05:09 imougy

@imougy it's trying to compile as Swift 4 instead of Swift 3. It's a known issue on Cocoapods: https://github.com/CocoaPods/CocoaPods/issues/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 avatar Sep 18 '17 20:09 jsom

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

jsom avatar Sep 25 '17 17:09 jsom

Can I get this through pod update somehow?

imougy avatar Sep 26 '17 17:09 imougy

Yes - you update the pod version to ~> 2.0.0

jsom avatar Oct 05 '17 19:10 jsom

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.

ekampf avatar Oct 11 '17 08:10 ekampf

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

jsom avatar Dec 01 '17 17:12 jsom

@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
        }
    }

ekampf avatar Jun 08 '18 17:06 ekampf

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 avatar Jun 08 '18 17:06 jsom