diff --git a/HandsApp iOS App Template.xctemplate/ApiKeys.swift b/HandsApp iOS App Template.xctemplate/ApiKeys.swift
new file mode 100755
index 0000000..e2dc1a4
--- /dev/null
+++ b/HandsApp iOS App Template.xctemplate/ApiKeys.swift
@@ -0,0 +1,12 @@
+//
+// ___FILENAME___
+// ___PACKAGENAME___
+//
+// Created by ___FULLUSERNAME___ on ___DATE___.
+// ___COPYRIGHT___
+//
+
+enum ApiKeys {
+ #warning("Replace with real key via global search (Cmd + Shift + F)")
+ static let appCenter = "APP_CENTER_API_KEY"
+}
diff --git a/HandsApp iOS App Template.xctemplate/AppDelegate.swift b/HandsApp iOS App Template.xctemplate/AppDelegate.swift
index 2844c80..be11115 100755
--- a/HandsApp iOS App Template.xctemplate/AppDelegate.swift
+++ b/HandsApp iOS App Template.xctemplate/AppDelegate.swift
@@ -6,11 +6,22 @@
// ___COPYRIGHT___
//
+import AppCenter
+import AppCenterAnalytics
+import AppCenterDistribute
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
-
var window: UIWindow?
+ func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
+ startAppCenter()
+ return true
+ }
+
+ private func startAppCenter() {
+ let services: [AnyClass] = [MSAnalytics.self, MSDistribute.self]
+ MSAppCenter.start(ApiKeys.appCenter, withServices: services)
+ }
}
diff --git a/HandsApp iOS App Template.xctemplate/Info.plist b/HandsApp iOS App Template.xctemplate/Info.plist
index 7624f9c..b0e3d57 100644
--- a/HandsApp iOS App Template.xctemplate/Info.plist
+++ b/HandsApp iOS App Template.xctemplate/Info.plist
@@ -18,6 +18,15 @@
1.0
CFBundleVersion
1
+ CFBundleURLTypes
+
+
+ CFBundleURLSchemes
+
+ appcenter-APP_CENTER_API_KEY
+
+
+
LSRequiresIPhoneOS
UILaunchStoryboardName
diff --git a/HandsApp iOS App Template.xctemplate/TemplateInfo.plist b/HandsApp iOS App Template.xctemplate/TemplateInfo.plist
index 1f00564..15ecbfb 100644
--- a/HandsApp iOS App Template.xctemplate/TemplateInfo.plist
+++ b/HandsApp iOS App Template.xctemplate/TemplateInfo.plist
@@ -122,7 +122,7 @@
Resources/Assets.xcassets
Resources/Strings/.gitkeep
Resources/Images/.gitkeep
- Resources/Constants/.gitkeep
+ Resources/Constants/ApiKeys.swift
Resources/Fonts/.gitkeep
Models/.gitkeep
Library/Base Classes/.gitkeep
@@ -181,14 +181,19 @@ inhibit_all_warnings!
platform :ios, '11.0'
+def appcenter
+ pod 'AppCenter'
+ pod 'AppCenter/Distribute'
+end
+
target '___PACKAGENAME___' do
pod 'R.swift'
pod 'SwiftFormat/CLI'
pod 'SwiftLint'
-
+ appcenter
+end
End
-end
Group
@@ -321,7 +326,7 @@ end
TargetIndices
- Resources/Constants/.gitkeep
+ Resources/Constants/ApiKeys.swift
Group
@@ -329,9 +334,7 @@ end
Constants
Path
- .gitkeep
- TargetIndices
-
+ ApiKeys.swift
Resources/Fonts/.gitkeep