_BSMachError while running Stanford's CS193p Smashtag app

后端 未结 5 2163
北恋
北恋 2021-02-14 01:06

I downloaded the Smasthag demo app from course\'s site. Project builds fine (after small changes in Twitter, TwitterRequest etc. classes, because I use the latest Xcode 7b4) and

相关标签:
5条回答
  • 2021-02-14 01:38

    I meet the same problem since I switch the keyboard form the system keyboard to self-defined keyboard.However it doesn`t affect my app running.

    0 讨论(0)
  • 2021-02-14 01:38

    If there are any opaque attribute for any components in that control, just remove and it and use hidden attribute.

    Example:

    //invisibleTextView.alpha = 0.0f;
    invisibleTextView.hidden = YES;
    
    0 讨论(0)
  • 2021-02-14 01:46

    To fix this issue you should set locale to en_US.

    Change the private extension asTwitterDate in Tweet.swift to the following to fix issue on non en_US devices.

    ...
    private extension String {
      var asTwitterDate: NSDate? {
        get {
            let dateFormatter = NSDateFormatter()
            dateFormatter.dateFormat = "EEE MMM dd HH:mm:ss Z yyyy"
            dateFormatter.locale = NSLocale(localeIdentifier: "en_US")
            let createdAt = dateFormatter.dateFromString(self)
            return createdAt
        }
      }
    }
    

    After this your application should load and show all data correctly.

    0 讨论(0)
  • 2021-02-14 01:56

    This seems to be an iOS 9 Beta bug. It definitely is related to presentation and dismissal of UIKeyboard (the system one). And, at that it doesn't happen all the time.

    It's harmless, just annoying. The bug will probably be resolved in the next beta since its in a core system object.

    0 讨论(0)
  • 2021-02-14 02:04

    You will need to add NSAppTransportSecurity as a dictionary and as the first child should be a bool named NSAllowsArbitraryLoads set to YES. Note that this opts out of NSAppTransportSecurity feature.

    See the App Transport Security configuration notes here. Note that this documentation is brand new and has an error in it, if you want to opt out completely. The error is that the NSAllowsArbitraryLoads key isn't shown as a direct child of NSAppTransportSecurity.

    Ideally what you should do is set the appropriate whitelisted domains and security settings.

    https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/index.html

    0 讨论(0)
提交回复
热议问题