Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Appstore rest api (#83)
Browse files Browse the repository at this point in the history
* Try appstore rest api

* Try raw

* Add each json

* add print token

* Try admin api key

* Update ci

* fixed get latests tag
gp

* Fixed get previues tag

* Fixed get previues tag

* Fixed get previues tag

* Fixed get previues tag

* Fixed get previues tag

* change push

* reforamet

* Add create tag

* Remove ad id

* try create versio

* Change cer

* change ids

* add test ymal

* Move create version to prod pipeline

* add export option for production ios build

* Add google service to project

* Fix google file

* Fix google file

* Fix provision provide
gp
gss
  • Loading branch information
VovaStelmashchuk authored Jul 2, 2023
1 parent 0069ba8 commit 34f3ce0
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 20 deletions.
1 change: 1 addition & 0 deletions .github/workflows/prod_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ jobs:
code-signing-identity: "iPhone Distribution"
team-id: ${{ secrets.MIXDRINKS_IOS_TEAM_ID }}
certificate-password: ${{ secrets.MIXDRINKS_IOS_CERTIFICATE_PASSWORD }}
export-options: iosApp/exportOptionsRelease.plist
workspace-path: iosApp/iosApp.xcworkspace
export-method: "app-store"
- name: "Upload IPA file as artifact"
Expand Down
36 changes: 36 additions & 0 deletions iosApp/GoogleService-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>18528209355-huqbcrn38tkgv9g1kvpt1l5r24jlt29v.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.18528209355-huqbcrn38tkgv9g1kvpt1l5r24jlt29v</string>
<key>ANDROID_CLIENT_ID</key>
<string>18528209355-ei9b3v6gkcr9rjk29lspvdpfs5e7uvq0.apps.googleusercontent.com</string>
<key>API_KEY</key>
<string>AIzaSyBX4aFClqVRN1n6StMYr-kpUI41ra18afI</string>
<key>GCM_SENDER_ID</key>
<string>18528209355</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>org.mixdrinks.app9LJW42P73L</string>
<key>PROJECT_ID</key>
<string>mixdrinks-bb828</string>
<key>STORAGE_BUCKET</key>
<string>mixdrinks-bb828.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:18528209355:ios:45e2d12f94ef0428e5ce4e</string>
</dict>
</plist>
13 changes: 13 additions & 0 deletions iosApp/exportOptionsRelease.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>provisioningProfiles</key>
<dict>
<key>org.mixdrinks.app9LJW42P73L</key>
<string>Production(signIn)</string>
</dict>
</dict>
</plist>
4 changes: 0 additions & 4 deletions iosApp/iosApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
6203DCF02A481D4A00F64586 /* MainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6203DCEF2A481D4A00F64586 /* MainViewModel.swift */; };
621F45832A42371300920E95 /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = 621F45822A42371300920E95 /* FirebaseAnalytics */; };
621F45852A42371300920E95 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = 621F45842A42371300920E95 /* FirebaseCrashlytics */; };
62C914A32A49C03200FECD3A /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 62C914A22A49C03200FECD3A /* GoogleService-Info.plist */; };
62FBF4DA2A42388700B31CDC /* FirebaseAuth in Frameworks */ = {isa = PBXBuildFile; productRef = 62FBF4D92A42388700B31CDC /* FirebaseAuth */; };
7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; };
CFDB58B53BB94DE262B13C24 /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */; };
Expand All @@ -26,7 +25,6 @@
4FF3202A603A284706412EDC /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = "<group>"; };
6203DCEF2A481D4A00F64586 /* MainViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewModel.swift; sourceTree = "<group>"; };
6252FC0D2A3F5B2000D38B32 /* iosApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = iosApp.entitlements; sourceTree = "<group>"; };
62C914A22A49C03200FECD3A /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../../Downloads/GoogleService-Info.plist"; sourceTree = "<group>"; };
6B1049432C0C2B312090ABF6 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7555FF7B242A565900829871 /* MixDrinks.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MixDrinks.app; sourceTree = BUILT_PRODUCTS_DIR; };
7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -69,7 +67,6 @@
7555FF72242A565900829871 = {
isa = PBXGroup;
children = (
62C914A22A49C03200FECD3A /* GoogleService-Info.plist */,
AB1DB47929225F7C00F7AF9C /* Configuration */,
7555FF7D242A565900829871 /* iosApp */,
7555FF7C242A565900829871 /* Products */,
Expand Down Expand Up @@ -189,7 +186,6 @@
files = (
058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */,
058557BB273AAA24004C7B11 /* Assets.xcassets in Resources */,
62C914A32A49C03200FECD3A /* GoogleService-Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
14 changes: 14 additions & 0 deletions iosApp/iosApp/MainViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ class MainViewModel: NSObject, ObservableObject, ASAuthorizationControllerDelega

override init() {
super.init()

let firebaseAuth = Auth.auth()
firebaseAuth.currentUser?.getIDTokenForcingRefresh(true) { (token, error) in
if let error = error {
print("Error retrieving token: \(error.localizedDescription)")
} else {
print("token \(token ?? "")")

if let unwrappedToken = token {
Main_iosKt.NewToken(token: unwrappedToken)
}
}
}

Main_iosKt.setGoogleAuthStart {
self.googleSignIn()
}
Expand Down
28 changes: 14 additions & 14 deletions iosApp/iosApp/iOSApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@ import GoogleSignIn
import AuthenticationServices
import UIKit

class AppDelegate: NSObject, UIApplicationDelegate{
class AppDelegate: NSObject, UIApplicationDelegate {

func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
FirebaseApp.configure()
return true
}

func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
FirebaseApp.configure()
return true
}

func application(_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
return GIDSignIn.sharedInstance.handle(url)
return GIDSignIn.sharedInstance.handle(url)
}

}

@main
struct iOSApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
var body: some Scene {
WindowGroup {
ContentView()
}
}

var body: some Scene {
WindowGroup {
ContentView()
}
}
}
7 changes: 5 additions & 2 deletions shared/src/iosMain/kotlin/main.ios.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import com.arkivanov.essenty.lifecycle.LifecycleRegistry
import org.mixdrinks.app.MixDrinksApp
import org.mixdrinks.di.GraphHolder
import org.mixdrinks.ui.auth.AuthCallbacks
import platform.UIKit.UIViewController

@Suppress("FunctionNaming")
fun MainViewController() = ComposeUIViewController {
MixDrinksApp(DefaultComponentContext(LifecycleRegistry()), null)
fun MainViewController(): UIViewController {
return ComposeUIViewController {
MixDrinksApp(DefaultComponentContext(LifecycleRegistry()), null)
}
}

@Suppress("FunctionNaming")
Expand Down

0 comments on commit 34f3ce0

Please sign in to comment.