merging swift3 migration back into github

This commit is contained in:
scotts@microsoft.com 2016-09-22 15:48:25 -07:00
Родитель 166c527d6a
Коммит fa27a9ca1b
7 изменённых файлов: 44 добавлений и 69 удалений

Просмотреть файл

@ -1,3 +1,2 @@
github "Alamofire/Alamofire" ~> 4.0
github "bitstadium/HockeySDK-iOS"
github "LpDevBuilder/Loop-iOS-SDK-Framework" ~>2.1

Просмотреть файл

@ -1,3 +1,2 @@
github "Alamofire/Alamofire" "4.0.0"
github "bitstadium/HockeySDK-iOS" "4.1.1"
github "LpDevBuilder/Loop-iOS-SDK-Framework" "2.1.0"

Просмотреть файл

@ -9,15 +9,14 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) LOOP_APP_ID_PROP=@\"$(LOOP_APP_ID_PR
SDKROOT = iphoneos
PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.loop.trip-df
PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.loop.trip-test
CODE_SIGN_IDENTITY = iPhone Distribution: Microsoft Corporation
CODE_SIGN_IDENTITY = iPhone Developer
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
DEVELOPMENT_TEAM = 9KBH5RKYEW
PROVISIONING_PROFILE_SPECIFIER =
PROVISIONING_PROFILE_SPECIFIER = Microsoft Dogfood Provisioning Profile
PROVISIONING_PROFILE = 9d5ad481-1f6a-4cd2-8077-963f0ec267ad
PROVISIONING_PROFILE =
ENABLE_BITCODE = NO

Просмотреть файл

@ -26,7 +26,6 @@
import UIKit
import CoreData
import LoopSDK
import HockeySDK
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, LoopSDKListener {
@ -35,10 +34,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, LoopSDKListener {
var loopInitialized = false
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
BITHockeyManager.shared().configure(withIdentifier: "fd8801c521a8498caa4f093c4a782f45")
BITHockeyManager.shared().start()
BITHockeyManager.shared().authenticator.authenticateInstallation() // This line is obsolete in the crash only builds
var appID = ""
var appToken = ""
@ -117,7 +112,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, LoopSDKListener {
application to it. This property is optional since there are legitimate
error conditions that could cause the creation of the store to fail.
*/
let container = NSPersistentContainer(name: "Trips")
let container = NSPersistentContainer(name: "Trips.app")
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
if let error = error as NSError? {
// Replace this implementation with code to handle the error appropriately.

Просмотреть файл

@ -48,7 +48,7 @@ class MapViewController: UIViewController, MKMapViewDelegate {
private var mapViewUpdateObserver: NSObjectProtocol!
var tripData: LoopTrip?
var isSample: Bool?
var isSample: Bool = false
var transportMode = MKDirectionsTransportType.walking
let mapRouteLineCache = MapRouteLineCache.sharedInstance
let knownLocationRepository = KnownLocationRepository.sharedInstance
@ -66,10 +66,12 @@ class MapViewController: UIViewController, MKMapViewDelegate {
self.tripDetailsView.layer.shadowOpacity = 0.7
self.tripDetailsView.layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
self.tripDetailsView.setData(trip: self.tripData!, sampleTrip: self.isSample!)
self.tripDetailsView.setData(trip: self.tripData!, sampleTrip: self.isSample)
// adjust height of details view based on whether this is a sample trip
tripDetailsViewHeightConstraint.constant += 26
if (self.isSample) {
tripDetailsViewHeightConstraint.constant += 26
}
self.mapView.delegate = self
@ -110,7 +112,7 @@ class MapViewController: UIViewController, MKMapViewDelegate {
}
}
// MARK - Internal
extension MapViewController {

Просмотреть файл

@ -1,25 +1,20 @@
# LOOP iOS Sample - Trips
## Overview
This is the HockeyApp fork of the [Loop-Sample-Trips-IOS](https://github.com/Microsoft/Loop-Sample-Trips-IOS.git) project on GitHub. This is not a real fork of the project, but rather a cross-sync from GibHub to VSO. The purpose of this is to keep the HockeyApp modifications to the project private and internal for Microsoft only internal distribution and testing.
## Prerequisites:
* You will need the latest version of XCode (8.x or greater) to run this sample app.
* You will need to install [Carthage](https://github.com/Carthage/Carthage)
The process for building and distribution relies on HockeyApp as the distribution mechanism. The source is synce'ed to this VSO repo, then modified to support HockeyApp distribution. This requires just a few steps:
1. Update Cartfile to include the HockeyApp SDK Framework
1. From a command line in the project
```
carthage update --platform 'iOS'
```
1. Modify the main project file to include the HockeySDK.framework
1. Modify AppDelegate.swift to include the HockeyApp SDk initialization
```
#import HockeySDK
```
```
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
BITHockeyManager.sharedHockeyManager().configureWithIdentifier("fd8801c521a8498caa4f093c4a782f45")
BITHockeyManager.sharedHockeyManager().startManager()
BITHockeyManager.sharedHockeyManager().authenticator.authenticateInstallation() // This line is obsolete in the crash only builds
...
```
## Build instructions:
These instructions will get you a copy of the Location and observation platform (LOOP) sample app that will download and display trips.
These files are keep modified in this project and changes from the main GitHub release branch (usually the `develop` branch) are merged into working branches here and tested. Once tested the releases are imported into HockeyApp as new version releases.
0. Signup for a LOOP account and create an app on the [Loop Developer Site](https://www.loop.ms)
0. Get the sample app
0. Clone this sample app `https://github.com/Microsoft/Loop-Sample-Trips-IOS.git`
0. Open it in XCode
0. In the `Keys.xcconfig` file provide values for the `LOOP_APP_ID_PROP` and `LOOP_APP_TOKEN_PROP` using your LOOP app ID and token.
0. Create test users in the user dashboard at the [LOOP Developer Site](https://www.loop.ms)
0. In the `Keys.xcconfig` file provide values for the `LOOP_USER_ID_PROP` and `LOOP_DEVICE_ID_PROP` using a test user id and device id from the dashboard.
0. From the command line in the project directory run `carthage update --platform iOS`
0. Build and run the app
After the app runs for a while you will see your trips and drives. This should only take a few hours but no longer than 24 hours as you move between locations.

Просмотреть файл

@ -7,14 +7,12 @@
objects = {
/* Begin PBXBuildFile section */
B505DC511D148FD1008646FE /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B505DC4F1D148FD1008646FE /* Alamofire.framework */; };
B58887131CF3A6AD00B25BCD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B58887121CF3A6AD00B25BCD /* AppDelegate.swift */; };
B58887181CF3A6AD00B25BCD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B58887161CF3A6AD00B25BCD /* Main.storyboard */; };
B588871A1CF3A6AD00B25BCD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B58887191CF3A6AD00B25BCD /* Assets.xcassets */; };
B588871D1CF3A6AD00B25BCD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B588871B1CF3A6AD00B25BCD /* LaunchScreen.storyboard */; };
B5CEBD531CFD051A00EC3F20 /* MapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5CEBD521CFD051A00EC3F20 /* MapViewController.swift */; };
B5CEFDCA1D024A7600E0B799 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5CEFDC91D024A7600E0B799 /* Logger.swift */; };
F60A2FA81D7E80EF00E297B0 /* HockeySDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F60A2FA71D7E80EF00E297B0 /* HockeySDK.framework */; };
F60A2FAD1D80D19D00E297B0 /* Text.swift in Sources */ = {isa = PBXBuildFile; fileRef = F60A2FAC1D80D19D00E297B0 /* Text.swift */; };
F60A2FAF1D81357500E297B0 /* Alert.swift in Sources */ = {isa = PBXBuildFile; fileRef = F60A2FAE1D81357500E297B0 /* Alert.swift */; };
F654898A1D76AA760005BB9B /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = F65489851D76AA760005BB9B /* Color.swift */; };
@ -29,9 +27,12 @@
F65A938A1D6CCD3C006F5358 /* TripCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F65A93891D6CCD3C006F5358 /* TripCell.xib */; };
F65A938C1D6CD473006F5358 /* TripCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F65A938B1D6CD473006F5358 /* TripCell.swift */; };
F6825FF21D73DA7B00D6F926 /* TripViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6825FF11D73DA7B00D6F926 /* TripViewController.swift */; };
F69E72B61D9476F700127752 /* LoopSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F69E72B41D9476CD00127752 /* LoopSDK.framework */; };
F6A483311D8937BD00B885D0 /* MapDetailsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6A483301D8937BD00B885D0 /* MapDetailsView.xib */; };
F6A483331D89381800B885D0 /* MapDetailsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6A483321D89381800B885D0 /* MapDetailsView.swift */; };
F6E517801D948F280032A699 /* LoopSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F6E5177F1D948F280032A699 /* LoopSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
F6E517821D948F350032A699 /* Alamofire.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F6E517811D948F350032A699 /* Alamofire.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
F6E517831D948F430032A699 /* LoopSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6E5177F1D948F280032A699 /* LoopSDK.framework */; };
F6E517841D948F570032A699 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6E517811D948F350032A699 /* Alamofire.framework */; };
F6F13F661D93A56B000DD3EF /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F6F13F681D93A56B000DD3EF /* Localizable.strings */; };
/* End PBXBuildFile section */
@ -42,6 +43,8 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
F6E517821D948F350032A699 /* Alamofire.framework in Embed Frameworks */,
F6E517801D948F280032A699 /* LoopSDK.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@ -49,7 +52,6 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
B505DC4F1D148FD1008646FE /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/iOS/Alamofire.framework; sourceTree = "<group>"; };
B55568BA1D10D3D1000174F8 /* Keys.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Keys.xcconfig; sourceTree = "<group>"; };
B588870F1CF3A6AD00B25BCD /* Trips.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Trips.app; sourceTree = BUILT_PRODUCTS_DIR; };
B58887121CF3A6AD00B25BCD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@ -58,7 +60,6 @@
B588871C1CF3A6AD00B25BCD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
B5CEBD521CFD051A00EC3F20 /* MapViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MapViewController.swift; sourceTree = "<group>"; };
B5CEFDC91D024A7600E0B799 /* Logger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = "<group>"; };
F60A2FA71D7E80EF00E297B0 /* HockeySDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HockeySDK.framework; path = Carthage/Build/iOS/HockeySDK.framework; sourceTree = "<group>"; };
F60A2FAC1D80D19D00E297B0 /* Text.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Text.swift; sourceTree = "<group>"; };
F60A2FAE1D81357500E297B0 /* Alert.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Alert.swift; sourceTree = "<group>"; };
F65489851D76AA760005BB9B /* Color.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = "<group>"; };
@ -74,13 +75,14 @@
F65A938B1D6CD473006F5358 /* TripCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TripCell.swift; sourceTree = "<group>"; };
F6825FF11D73DA7B00D6F926 /* TripViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TripViewController.swift; sourceTree = "<group>"; };
F69E72B11D93B28300127752 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = LoopTripIOS/Info.plist; sourceTree = "<group>"; };
F69E72B41D9476CD00127752 /* LoopSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LoopSDK.framework; path = Carthage/Build/iOS/LoopSDK.framework; sourceTree = "<group>"; };
F6A483301D8937BD00B885D0 /* MapDetailsView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MapDetailsView.xib; sourceTree = "<group>"; };
F6A483321D89381800B885D0 /* MapDetailsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MapDetailsView.swift; sourceTree = "<group>"; };
F6E0F6671D1066A8005A13E5 /* Trips.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Trips.xcconfig; sourceTree = "<group>"; };
F6E0F6681D1066B2005A13E5 /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
F6E0F6691D1066BC005A13E5 /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
F6E0F66B1D1066EE005A13E5 /* Keys.example.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Keys.example.xcconfig; sourceTree = "<group>"; };
F6E5177F1D948F280032A699 /* LoopSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LoopSDK.framework; path = Carthage/Build/iOS/LoopSDK.framework; sourceTree = "<group>"; };
F6E517811D948F350032A699 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/iOS/Alamofire.framework; sourceTree = "<group>"; };
F6F13F671D93A56B000DD3EF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
F6F13F6C1D93AB1C000DD3EF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = "<group>"; };
F6F13F6E1D93AB23000DD3EF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
@ -92,9 +94,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F69E72B61D9476F700127752 /* LoopSDK.framework in Frameworks */,
B505DC511D148FD1008646FE /* Alamofire.framework in Frameworks */,
F60A2FA81D7E80EF00E297B0 /* HockeySDK.framework in Frameworks */,
F6E517841D948F570032A699 /* Alamofire.framework in Frameworks */,
F6E517831D948F430032A699 /* LoopSDK.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -104,9 +105,8 @@
B58887061CF3A6AD00B25BCD = {
isa = PBXGroup;
children = (
F69E72B41D9476CD00127752 /* LoopSDK.framework */,
F60A2FA71D7E80EF00E297B0 /* HockeySDK.framework */,
B505DC4F1D148FD1008646FE /* Alamofire.framework */,
F6E517811D948F350032A699 /* Alamofire.framework */,
F6E5177F1D948F280032A699 /* LoopSDK.framework */,
F6E0F6661D10666B005A13E5 /* Config */,
B58887111CF3A6AD00B25BCD /* LoopTripIOS */,
F6F13F631D939685000DD3EF /* Supporting Files */,
@ -245,9 +245,9 @@
TargetAttributes = {
B588870E1CF3A6AD00B25BCD = {
CreatedOnToolsVersion = 7.3;
DevelopmentTeam = 9KBH5RKYEW;
DevelopmentTeam = 586WTGM8MR;
LastSwiftMigration = 0800;
ProvisioningStyle = Manual;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.BackgroundModes = {
enabled = 1;
@ -355,7 +355,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = F6E0F6671D1066A8005A13E5 /* Trips.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
};
name = Debug;
};
@ -363,7 +362,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = F6E0F6671D1066A8005A13E5 /* Trips.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
};
name = Release;
};
@ -371,13 +369,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = F6E0F6681D1066B2005A13E5 /* Debug.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Distribution: Microsoft Corporation";
DEVELOPMENT_TEAM = 9KBH5RKYEW;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.microsoft.loop.trip-df";
PROVISIONING_PROFILE = "9d5ad481-1f6a-4cd2-8077-963f0ec267ad";
PROVISIONING_PROFILE_SPECIFIER = "Microsoft Dogfood Provisioning Profile";
DEVELOPMENT_TEAM = 586WTGM8MR;
};
name = Debug;
};
@ -385,13 +377,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = F6E0F6691D1066BC005A13E5 /* Release.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Distribution: Microsoft Corporation";
DEVELOPMENT_TEAM = 9KBH5RKYEW;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.microsoft.loop.trip-df";
PROVISIONING_PROFILE = "9d5ad481-1f6a-4cd2-8077-963f0ec267ad";
PROVISIONING_PROFILE_SPECIFIER = "Microsoft Dogfood Provisioning Profile";
DEVELOPMENT_TEAM = 586WTGM8MR;
};
name = Release;
};