Skip to content

StreetHawk iOS SDK works on iOS 9 and XCode 7

StreetHawk iOS SDK upgrades smoothly to iOS 9 and XCode 7. Customer developer mostly won't meet trouble when use SDK in iOS 9, however due to iOS 9 and XCode changes, there is some useful tips worth paying attention:

  • Bitcode

XCode 7 introduced a new concept of "Bitcode" which represents intermediate compiled program. It requires all dependency to build with bitcode. StreetHawk SDK leverages PLCrashReport to collect crash report, and this library is not upgrade to enable bitcode yet. PLCrashReport plans to release soon, before that customer's project needs to disable bitcode.

As soon as PLCrashReport upgrades, StreetHawk iOS SDK will follow to upgrade, and this step is unnecessary at that time.

  • ATS

One big change in iOS 9 is ATS (App Transport Security). It requires http server must support TLS v1.2 with forward security. StreetHawk server has fully upgraded to support this, there is no special steps to connect to StreetHawk server. If you would like to connect to other http server inside your App, please make sure to confirm whether the http server is conform to ATS. If not please add exception in Info.plist to allow the connection work.

<key>NSAppTransportSecurity</key>  
<dict>  
      <key>NSAllowsArbitraryLoads</key><true/>  
</dict>  
  • Open App confirm dialog

Growth share sends a link to friend. When click the link and device not have App installed, previously it directs to AppStore page to let user install. Since iOS 9, it first show a dialog saying "address invalid" and after dismiss the dialog, directs to AppStore. It's an iOS 9 system security change: before opening App by clicking a URL, a confirm dialog saying "Are you sure to open App?" will promote to let user to confirm. Since the App is not installed and scheme not recognizable, "address invalid" dialog promotes. It's inevitable currently.

  • Add library

XCode 7 has bug that fails to add SQLite library. The "frameworks and libraries" list shows "tbd". What a shame for Apple!

Fortunately there is workaround to add libraries by Build Settings->Other Linker Flags, adding -l"sqlite3".

  • Open url needs white scheme list

Since iOS 9 if your App would like to open url to another App, such as "fbauth2://...", you need to add scheme "fbauth2" to Info.plist key LSApplicationQueriesSchemes .