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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,8 @@ iOSInjectionProject/
/*.gcno
**/xcshareddata/WorkspaceSettings.xcsettings

# Firebase
GoogleService-staging-Info.plist
GoogleService-release-Info.plist

# End of https://www.toptal.com/developers/gitignore/api/swift,xcode,macos
68 changes: 68 additions & 0 deletions ONMIR.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
objects = {

/* Begin PBXBuildFile section */
460F8D4C2DC77401003F019A /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = 460F8D4B2DC77401003F019A /* FirebaseAnalytics */; };
460F8D4E2DC77401003F019A /* FirebaseCore in Frameworks */ = {isa = PBXBuildFile; productRef = 460F8D4D2DC77401003F019A /* FirebaseCore */; };
460F8D502DC77401003F019A /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = 460F8D4F2DC77401003F019A /* FirebaseCrashlytics */; };
460F8D522DC77402003F019A /* FirebaseRemoteConfig in Frameworks */ = {isa = PBXBuildFile; productRef = 460F8D512DC77402003F019A /* FirebaseRemoteConfig */; };
46EE698D2DC10341001736D6 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = 46EE698C2DC10341001736D6 /* SnapKit */; };
46EE6A232DC196D9001736D6 /* Nuke in Frameworks */ = {isa = PBXBuildFile; productRef = 46EE6A222DC196D9001736D6 /* Nuke */; };
D0FD53152DB4DDC400F2593B /* .gitignore in Resources */ = {isa = PBXBuildFile; fileRef = D0FD53142DB4DDC400F2593B /* .gitignore */; };
Expand Down Expand Up @@ -41,6 +45,8 @@
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
Info.plist,
"Support/Firebase/Production/GoogleService-release-Info.plist",
"Support/Firebase/Staging/GoogleService-staging-Info.plist",
);
target = D011D3022DB4DAAB00412C5C /* ONMIR */;
};
Expand Down Expand Up @@ -74,6 +80,10 @@
files = (
46EE698D2DC10341001736D6 /* SnapKit in Frameworks */,
46EE6A232DC196D9001736D6 /* Nuke in Frameworks */,
460F8D502DC77401003F019A /* FirebaseCrashlytics in Frameworks */,
460F8D522DC77402003F019A /* FirebaseRemoteConfig in Frameworks */,
460F8D4E2DC77401003F019A /* FirebaseCore in Frameworks */,
460F8D4C2DC77401003F019A /* FirebaseAnalytics in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -124,6 +134,7 @@
buildPhases = (
D011D2FF2DB4DAAB00412C5C /* Sources */,
D011D3002DB4DAAB00412C5C /* Frameworks */,
460F8D5B2DC77850003F019A /* Firebase Info configure */,
D011D3012DB4DAAB00412C5C /* Resources */,
);
buildRules = (
Expand All @@ -137,6 +148,10 @@
packageProductDependencies = (
46EE698C2DC10341001736D6 /* SnapKit */,
46EE6A222DC196D9001736D6 /* Nuke */,
460F8D4B2DC77401003F019A /* FirebaseAnalytics */,
460F8D4D2DC77401003F019A /* FirebaseCore */,
460F8D4F2DC77401003F019A /* FirebaseCrashlytics */,
460F8D512DC77402003F019A /* FirebaseRemoteConfig */,
);
productName = ONMIR;
productReference = D011D3032DB4DAAB00412C5C /* ONMIR.app */;
Expand Down Expand Up @@ -223,6 +238,7 @@
packageReferences = (
46EE698B2DC10341001736D6 /* XCRemoteSwiftPackageReference "SnapKit" */,
46EE6A212DC196D9001736D6 /* XCRemoteSwiftPackageReference "Nuke" */,
460F8D4A2DC77401003F019A /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = D011D3042DB4DAAB00412C5C /* Products */;
Expand Down Expand Up @@ -261,6 +277,28 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
460F8D5B2DC77850003F019A /* Firebase Info configure */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Firebase Info configure";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\nGOOGLESERVICE_INFO_STAGING=\"${PROJECT_DIR}/${TARGET_NAME}/Support/Firebase/Staging/GoogleService-staging-Info.plist\"\nGOOGLESERVICE_INFO_PROD=\"${PROJECT_DIR}/${TARGET_NAME}/Support/Firebase/Production/GoogleService-release-Info.plist\"\n\necho \"${PROJECT_DIR}\"\n\necho \"${CONFIGURATION}\"\nif [ \"${CONFIGURATION}\" == \"Debug\" ]; then\n cp \"${GOOGLESERVICE_INFO_STAGING}\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\"\nelif [ \"${CONFIGURATION}\" == \"Release\" ]; then\n cp \"${GOOGLESERVICE_INFO_PROD}\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\"\nelse\n echo \"Error: Invalid Build Configuration. Expected 'Debug' or 'Release'.\"\n exit 1\nfi\n\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
D011D2FF2DB4DAAB00412C5C /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -306,6 +344,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = ONMIR/Info.plist;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
Expand Down Expand Up @@ -333,6 +372,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = ONMIR/Info.plist;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
Expand Down Expand Up @@ -582,6 +622,14 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
460F8D4A2DC77401003F019A /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/firebase/firebase-ios-sdk.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 11.12.0;
};
};
46EE698B2DC10341001736D6 /* XCRemoteSwiftPackageReference "SnapKit" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SnapKit/SnapKit.git";
Expand All @@ -601,6 +649,26 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
460F8D4B2DC77401003F019A /* FirebaseAnalytics */ = {
isa = XCSwiftPackageProductDependency;
package = 460F8D4A2DC77401003F019A /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseAnalytics;
};
460F8D4D2DC77401003F019A /* FirebaseCore */ = {
isa = XCSwiftPackageProductDependency;
package = 460F8D4A2DC77401003F019A /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseCore;
};
460F8D4F2DC77401003F019A /* FirebaseCrashlytics */ = {
isa = XCSwiftPackageProductDependency;
package = 460F8D4A2DC77401003F019A /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseCrashlytics;
};
460F8D512DC77402003F019A /* FirebaseRemoteConfig */ = {
isa = XCSwiftPackageProductDependency;
package = 460F8D4A2DC77401003F019A /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
productName = FirebaseRemoteConfig;
};
46EE698C2DC10341001736D6 /* SnapKit */ = {
isa = XCSwiftPackageProductDependency;
package = 46EE698B2DC10341001736D6 /* XCRemoteSwiftPackageReference "SnapKit" */;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 34 additions & 24 deletions ONMIR/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,41 @@
//

import UIKit
import Firebase

@main
class AppDelegate: UIResponder, UIApplicationDelegate {



func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

// MARK: UISceneSession Lifecycle

func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}

func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}

final class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication
.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
return true
}

// MARK: UISceneSession Lifecycle

func application(
_ application: UIApplication,
configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions
) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(
name: "Default Configuration",
sessionRole: connectingSceneSession.role
)
}

func application(
_ application: UIApplication,
didDiscardSceneSessions sceneSessions: Set<UISceneSession>
) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}

}