tradingticket / TradeItIosTicketSDK2

TradeIt iOS SDK to integrate trading and portfolio management.
https://www.trade.it
Apache License 2.0
39 stars 25 forks source link

XCode 9 compilation #261

Open imougy opened 7 years ago

imougy commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

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

imougy commented 7 years ago

Can I get this through pod update somehow?

jsom commented 7 years ago

Yes - you update the pod version to ~> 2.0.0

ekampf commented 7 years ago

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 commented 6 years ago

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

ekampf commented 6 years ago

@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 commented 6 years ago

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?