Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions HandsApp iOS App Template.xctemplate/ApiKeys.swift
Original file line number Diff line number Diff line change
@@ -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"
}
13 changes: 12 additions & 1 deletion HandsApp iOS App Template.xctemplate/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
9 changes: 9 additions & 0 deletions HandsApp iOS App Template.xctemplate/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>appcenter-APP_CENTER_API_KEY</string>
</array>
</dict>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
17 changes: 10 additions & 7 deletions HandsApp iOS App Template.xctemplate/TemplateInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<string>Resources/Assets.xcassets</string>
<string>Resources/Strings/.gitkeep</string>
<string>Resources/Images/.gitkeep</string>
<string>Resources/Constants/.gitkeep</string>
<string>Resources/Constants/ApiKeys.swift</string>
<string>Resources/Fonts/.gitkeep</string>
<string>Models/.gitkeep</string>
<string>Library/Base Classes/.gitkeep</string>
Expand Down Expand Up @@ -181,14 +181,19 @@ inhibit_all_warnings!

platform :ios, &apos;11.0&apos;

def appcenter
pod &apos;AppCenter&apos;
pod &apos;AppCenter/Distribute&apos;
end

target &apos;___PACKAGENAME___&apos; do
pod &apos;R.swift&apos;
pod &apos;SwiftFormat/CLI&apos;
pod &apos;SwiftLint&apos;
</string>
appcenter
end</string>
<key>End</key>
<string>
end
</string>
<key>Group</key>
<array>
Expand Down Expand Up @@ -321,17 +326,15 @@ end
<key>TargetIndices</key>
<array/>
</dict>
<key>Resources/Constants/.gitkeep</key>
<key>Resources/Constants/ApiKeys.swift</key>
<dict>
<key>Group</key>
<array>
<string>Resources</string>
<string>Constants</string>
</array>
<key>Path</key>
<string>.gitkeep</string>
<key>TargetIndices</key>
<array/>
<string>ApiKeys.swift</string>
</dict>
<key>Resources/Fonts/.gitkeep</key>
<dict>
Expand Down