feat: Phase 1 mobile tablet — Jenkins APK, PC tab, in-app update
Capacitor 확장으로 git push 시 Mobile Jenkins 빌드, PC 탭 Android/iPad 다운로드, 앱 내 APK 업데이트, iOS TestFlight API 및 Capacitor ios 프로젝트를 추가한다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
App/build
|
||||||
|
App/Pods
|
||||||
|
App/output
|
||||||
|
App/App/public
|
||||||
|
DerivedData
|
||||||
|
xcuserdata
|
||||||
|
|
||||||
|
# Cordova plugins for Capacitor
|
||||||
|
capacitor-cordova-ios-plugins
|
||||||
|
|
||||||
|
# Generated Config files
|
||||||
|
App/App/capacitor.config.json
|
||||||
|
App/App/config.xml
|
||||||
@@ -0,0 +1,408 @@
|
|||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 48;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
2FAD9763203C412B000D30F8 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD9762203C412B000D30F8 /* config.xml */; };
|
||||||
|
50379B232058CBB4000EE86E /* capacitor.config.json in Resources */ = {isa = PBXBuildFile; fileRef = 50379B222058CBB4000EE86E /* capacitor.config.json */; };
|
||||||
|
504EC3081FED79650016851F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504EC3071FED79650016851F /* AppDelegate.swift */; };
|
||||||
|
504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; };
|
||||||
|
504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; };
|
||||||
|
504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; };
|
||||||
|
50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; };
|
||||||
|
A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
2FAD9762203C412B000D30F8 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = "<group>"; };
|
||||||
|
50379B222058CBB4000EE86E /* capacitor.config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = capacitor.config.json; sourceTree = "<group>"; };
|
||||||
|
504EC3041FED79650016851F /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
504EC3071FED79650016851F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
|
504EC30C1FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||||
|
504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
|
504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
|
504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; };
|
||||||
|
AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
504EC3011FED79650016851F /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
27E2DDA53C4D2A4D1A88CE4A /* Frameworks */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */,
|
||||||
|
);
|
||||||
|
name = Frameworks;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
504EC2FB1FED79650016851F = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
504EC3061FED79650016851F /* App */,
|
||||||
|
504EC3051FED79650016851F /* Products */,
|
||||||
|
7F8756D8B27F46E3366F6CEA /* Pods */,
|
||||||
|
27E2DDA53C4D2A4D1A88CE4A /* Frameworks */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
504EC3051FED79650016851F /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
504EC3041FED79650016851F /* App.app */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
504EC3061FED79650016851F /* App */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
50379B222058CBB4000EE86E /* capacitor.config.json */,
|
||||||
|
504EC3071FED79650016851F /* AppDelegate.swift */,
|
||||||
|
504EC30B1FED79650016851F /* Main.storyboard */,
|
||||||
|
504EC30E1FED79650016851F /* Assets.xcassets */,
|
||||||
|
504EC3101FED79650016851F /* LaunchScreen.storyboard */,
|
||||||
|
504EC3131FED79650016851F /* Info.plist */,
|
||||||
|
2FAD9762203C412B000D30F8 /* config.xml */,
|
||||||
|
50B271D01FEDC1A000F3C39B /* public */,
|
||||||
|
);
|
||||||
|
path = App;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
7F8756D8B27F46E3366F6CEA /* Pods */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */,
|
||||||
|
AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */,
|
||||||
|
);
|
||||||
|
name = Pods;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
504EC3031FED79650016851F /* App */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */;
|
||||||
|
buildPhases = (
|
||||||
|
6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */,
|
||||||
|
504EC3001FED79650016851F /* Sources */,
|
||||||
|
504EC3011FED79650016851F /* Frameworks */,
|
||||||
|
504EC3021FED79650016851F /* Resources */,
|
||||||
|
9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = App;
|
||||||
|
productName = App;
|
||||||
|
productReference = 504EC3041FED79650016851F /* App.app */;
|
||||||
|
productType = "com.apple.product-type.application";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
504EC2FC1FED79650016851F /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
LastSwiftUpdateCheck = 0920;
|
||||||
|
LastUpgradeCheck = 0920;
|
||||||
|
TargetAttributes = {
|
||||||
|
504EC3031FED79650016851F = {
|
||||||
|
CreatedOnToolsVersion = 9.2;
|
||||||
|
LastSwiftMigration = 1100;
|
||||||
|
ProvisioningStyle = Automatic;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */;
|
||||||
|
compatibilityVersion = "Xcode 8.0";
|
||||||
|
developmentRegion = en;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
en,
|
||||||
|
Base,
|
||||||
|
);
|
||||||
|
mainGroup = 504EC2FB1FED79650016851F;
|
||||||
|
packageReferences = (
|
||||||
|
);
|
||||||
|
productRefGroup = 504EC3051FED79650016851F /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
504EC3031FED79650016851F /* App */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
504EC3021FED79650016851F /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */,
|
||||||
|
50B271D11FEDC1A000F3C39B /* public in Resources */,
|
||||||
|
504EC30F1FED79650016851F /* Assets.xcassets in Resources */,
|
||||||
|
50379B232058CBB4000EE86E /* capacitor.config.json in Resources */,
|
||||||
|
504EC30D1FED79650016851F /* Main.storyboard in Resources */,
|
||||||
|
2FAD9763203C412B000D30F8 /* config.xml in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-App-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
name = "[CP] Embed Pods Frameworks";
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-frameworks.sh\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
504EC3001FED79650016851F /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
504EC3081FED79650016851F /* AppDelegate.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXVariantGroup section */
|
||||||
|
504EC30B1FED79650016851F /* Main.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
504EC30C1FED79650016851F /* Base */,
|
||||||
|
);
|
||||||
|
name = Main.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
504EC3101FED79650016851F /* LaunchScreen.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
504EC3111FED79650016851F /* Base */,
|
||||||
|
);
|
||||||
|
name = LaunchScreen.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXVariantGroup section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
504EC3141FED79650016851F /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"DEBUG=1",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
504EC3151FED79650016851F /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
504EC3171FED79650016851F /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
INFOPLIST_FILE = App/Info.plist;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.goldenchart.app;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
504EC3181FED79650016851F /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
INFOPLIST_FILE = App/Info.plist;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.goldenchart.app;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
504EC3141FED79650016851F /* Debug */,
|
||||||
|
504EC3151FED79650016851F /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
504EC3171FED79650016851F /* Debug */,
|
||||||
|
504EC3181FED79650016851F /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
};
|
||||||
|
rootObject = 504EC2FC1FED79650016851F /* Project object */;
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?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>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
import UIKit
|
||||||
|
import Capacitor
|
||||||
|
|
||||||
|
@UIApplicationMain
|
||||||
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
|
|
||||||
|
var window: UIWindow?
|
||||||
|
|
||||||
|
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||||
|
// Override point for customization after application launch.
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
func applicationWillResignActive(_ application: UIApplication) {
|
||||||
|
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||||
|
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
|
||||||
|
}
|
||||||
|
|
||||||
|
func applicationDidEnterBackground(_ application: UIApplication) {
|
||||||
|
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||||
|
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
||||||
|
}
|
||||||
|
|
||||||
|
func applicationWillEnterForeground(_ application: UIApplication) {
|
||||||
|
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
|
||||||
|
}
|
||||||
|
|
||||||
|
func applicationDidBecomeActive(_ application: UIApplication) {
|
||||||
|
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||||
|
}
|
||||||
|
|
||||||
|
func applicationWillTerminate(_ application: UIApplication) {
|
||||||
|
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||||
|
}
|
||||||
|
|
||||||
|
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
|
||||||
|
// Called when the app was launched with a url. Feel free to add additional processing here,
|
||||||
|
// but if you want the App API to support tracking app url opens, make sure to keep this call
|
||||||
|
return ApplicationDelegateProxy.shared.application(app, open: url, options: options)
|
||||||
|
}
|
||||||
|
|
||||||
|
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
|
||||||
|
// Called when the app was launched with an activity, including Universal Links.
|
||||||
|
// Feel free to add additional processing here, but if you want the App API to support
|
||||||
|
// tracking app url opens, make sure to keep this call
|
||||||
|
return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "AppIcon-512@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"platform" : "ios",
|
||||||
|
"size" : "1024x1024"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "splash-2732x2732-2.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "splash-2732x2732-1.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "splash-2732x2732.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17132" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||||
|
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17105"/>
|
||||||
|
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<scenes>
|
||||||
|
<!--View Controller-->
|
||||||
|
<scene sceneID="EHf-IW-A2E">
|
||||||
|
<objects>
|
||||||
|
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||||
|
<imageView key="view" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Splash" id="snD-IY-ifK">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||||
|
</imageView>
|
||||||
|
</viewController>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
|
</objects>
|
||||||
|
<point key="canvasLocation" x="53" y="375"/>
|
||||||
|
</scene>
|
||||||
|
</scenes>
|
||||||
|
<resources>
|
||||||
|
<image name="Splash" width="1366" height="1366"/>
|
||||||
|
<systemColor name="systemBackgroundColor">
|
||||||
|
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</systemColor>
|
||||||
|
</resources>
|
||||||
|
</document>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14111" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||||
|
<device id="retina4_7" orientation="portrait">
|
||||||
|
<adaptation id="fullscreen"/>
|
||||||
|
</device>
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||||
|
</dependencies>
|
||||||
|
<scenes>
|
||||||
|
<!--Bridge View Controller-->
|
||||||
|
<scene sceneID="tne-QT-ifu">
|
||||||
|
<objects>
|
||||||
|
<viewController id="BYZ-38-t0r" customClass="CAPBridgeViewController" customModule="Capacitor" sceneMemberID="viewController"/>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||||
|
</objects>
|
||||||
|
</scene>
|
||||||
|
</scenes>
|
||||||
|
</document>
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<?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>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>GoldenChart</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>$(MARKETING_VERSION)</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||||
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
<true/>
|
||||||
|
<key>UILaunchStoryboardName</key>
|
||||||
|
<string>LaunchScreen</string>
|
||||||
|
<key>UIMainStoryboardFile</key>
|
||||||
|
<string>Main</string>
|
||||||
|
<key>UIRequiredDeviceCapabilities</key>
|
||||||
|
<array>
|
||||||
|
<string>armv7</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'
|
||||||
|
|
||||||
|
platform :ios, '14.0'
|
||||||
|
use_frameworks!
|
||||||
|
|
||||||
|
# workaround to avoid Xcode caching of Pods that requires
|
||||||
|
# Product -> Clean Build Folder after new Cordova plugins installed
|
||||||
|
# Requires CocoaPods 1.6 or newer
|
||||||
|
install! 'cocoapods', :disable_input_output_paths => true
|
||||||
|
|
||||||
|
def capacitor_pods
|
||||||
|
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
|
||||||
|
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
|
||||||
|
end
|
||||||
|
|
||||||
|
target 'App' do
|
||||||
|
capacitor_pods
|
||||||
|
# Add your Pods here
|
||||||
|
end
|
||||||
|
|
||||||
|
post_install do |installer|
|
||||||
|
assertDeploymentTarget(installer)
|
||||||
|
end
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# GoldenChart iOS (Capacitor)
|
||||||
|
|
||||||
|
Xcode 네이티브 프로젝트입니다. TestFlight 배포 절차는 [`docs/ios-testflight-setup.md`](../../docs/ios-testflight-setup.md)를 참고하세요.
|
||||||
|
|
||||||
|
## 빠른 시작
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd app
|
||||||
|
npm run cap:sync # CocoaPods 필요 — 없으면 pod install만 수동
|
||||||
|
npx cap open ios
|
||||||
|
```
|
||||||
|
|
||||||
|
CocoaPods 미설치 시:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew install cocoapods
|
||||||
|
cd app/ios/App && pod install
|
||||||
|
```
|
||||||
|
|
||||||
|
또는 저장소 루트:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./scripts/init-ios-capacitor.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Bundle ID
|
||||||
|
|
||||||
|
`com.goldenchart.app` (`capacitor.config.ts`와 동일)
|
||||||
@@ -8,6 +8,7 @@ import { TradeNotificationProvider, useTradeNotification } from './contexts/Trad
|
|||||||
import { useAppSettings, resolveAppDefaults } from './hooks/useAppSettings';
|
import { useAppSettings, resolveAppDefaults } from './hooks/useAppSettings';
|
||||||
import TabBar, { type TabId } from './components/TabBar';
|
import TabBar, { type TabId } from './components/TabBar';
|
||||||
import LiveSignalBridge from './components/LiveSignalBridge';
|
import LiveSignalBridge from './components/LiveSignalBridge';
|
||||||
|
import AppUpdateGate from './components/AppUpdateGate';
|
||||||
import LoginScreen from './screens/LoginScreen';
|
import LoginScreen from './screens/LoginScreen';
|
||||||
import '@frontend/styles/splashScreen.css';
|
import '@frontend/styles/splashScreen.css';
|
||||||
import './theme/global.css';
|
import './theme/global.css';
|
||||||
@@ -116,7 +117,9 @@ function AppRoot() {
|
|||||||
popupEnabled={false}
|
popupEnabled={false}
|
||||||
settingsSessionKey={sessionKey}
|
settingsSessionKey={sessionKey}
|
||||||
>
|
>
|
||||||
|
<AppUpdateGate>
|
||||||
<MainApp />
|
<MainApp />
|
||||||
|
</AppUpdateGate>
|
||||||
</TradeNotificationProvider>
|
</TradeNotificationProvider>
|
||||||
</NavigationProvider>
|
</NavigationProvider>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
import React, { useEffect, useState } from 'react';
|
||||||
|
import { Capacitor } from '@capacitor/core';
|
||||||
|
import { promptAppUpdateIfNeeded } from '../services/appUpdate';
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
children: React.ReactNode;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Android 네이티브 — 시작 시 서버 APK 버전 확인 (무음 스킵, 이후 설정에서 수동 확인) */
|
||||||
|
export default function AppUpdateGate({ children }: Props) {
|
||||||
|
const [ready, setReady] = useState(() =>
|
||||||
|
!Capacitor.isNativePlatform() || Capacitor.getPlatform() !== 'android',
|
||||||
|
);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (ready) return;
|
||||||
|
let cancelled = false;
|
||||||
|
void (async () => {
|
||||||
|
try {
|
||||||
|
const { checkForAppUpdate, openApkDownload } = await import('../services/appUpdate');
|
||||||
|
const check = await checkForAppUpdate();
|
||||||
|
if (!cancelled && check.updateAvailable && check.remoteVersion) {
|
||||||
|
const dismissed = sessionStorage.getItem(`gc_skip_update_${check.remoteVersion}`);
|
||||||
|
if (!dismissed) {
|
||||||
|
const ok = window.confirm(
|
||||||
|
`GoldenChart v${check.remoteVersion} 업데이트가 있습니다.\n`
|
||||||
|
+ `(현재 v${check.currentVersion})\n\n지금 APK를 다운로드하시겠습니까?`,
|
||||||
|
);
|
||||||
|
if (ok) {
|
||||||
|
await openApkDownload(check.release);
|
||||||
|
} else {
|
||||||
|
sessionStorage.setItem(`gc_skip_update_${check.remoteVersion}`, '1');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
/* 네트워크 오류 — 앱 진입 허용 */
|
||||||
|
} finally {
|
||||||
|
if (!cancelled) setReady(true);
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
return () => { cancelled = true; };
|
||||||
|
}, [ready]);
|
||||||
|
|
||||||
|
if (!ready) {
|
||||||
|
return <div className="loading-center">업데이트 확인…</div>;
|
||||||
|
}
|
||||||
|
|
||||||
|
return <>{children}</>;
|
||||||
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
import React, { useCallback, useEffect, useState } from 'react';
|
import React, { useCallback, useEffect, useState } from 'react';
|
||||||
|
import { App } from '@capacitor/app';
|
||||||
|
import { Capacitor } from '@capacitor/core';
|
||||||
import {
|
import {
|
||||||
resetPaperAccount,
|
resetPaperAccount,
|
||||||
sendFcmTest,
|
sendFcmTest,
|
||||||
@@ -20,11 +22,21 @@ export default function SettingsScreen() {
|
|||||||
const [fcmAvailable, setFcmAvailable] = useState(false);
|
const [fcmAvailable, setFcmAvailable] = useState(false);
|
||||||
const [pushPerm, setPushPerm] = useState<string>('—');
|
const [pushPerm, setPushPerm] = useState<string>('—');
|
||||||
const [fcmBusy, setFcmBusy] = useState(false);
|
const [fcmBusy, setFcmBusy] = useState(false);
|
||||||
|
const [updateBusy, setUpdateBusy] = useState(false);
|
||||||
|
const [appVersion, setAppVersion] = useState('—');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
void loadFcmStatus().then(s => setFcmAvailable(!!s?.available));
|
void loadFcmStatus().then(s => setFcmAvailable(!!s?.available));
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (Capacitor.isNativePlatform()) {
|
||||||
|
void App.getInfo().then(i => setAppVersion(i.version ?? '—'));
|
||||||
|
} else {
|
||||||
|
setAppVersion('web');
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
const patch = useCallback((p: AppSettingsDto) => save(p as unknown as Parameters<typeof save>[0]), [save]);
|
const patch = useCallback((p: AppSettingsDto) => save(p as unknown as Parameters<typeof save>[0]), [save]);
|
||||||
|
|
||||||
const onLogout = () => {
|
const onLogout = () => {
|
||||||
@@ -205,6 +217,30 @@ export default function SettingsScreen() {
|
|||||||
</SettingRow>
|
</SettingRow>
|
||||||
</SettingGroup>
|
</SettingGroup>
|
||||||
|
|
||||||
|
<SettingGroup title="앱">
|
||||||
|
<SettingRow label="앱 버전">
|
||||||
|
<span className="text-muted">{appVersion}</span>
|
||||||
|
</SettingRow>
|
||||||
|
{Capacitor.getPlatform() === 'android' && (
|
||||||
|
<SettingRow label="업데이트" description="서버 APK 버전 확인">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="btn-secondary"
|
||||||
|
style={{ padding: '8px 12px', minHeight: 36 }}
|
||||||
|
disabled={updateBusy}
|
||||||
|
onClick={() => {
|
||||||
|
setUpdateBusy(true);
|
||||||
|
void import('../../services/appUpdate')
|
||||||
|
.then(m => m.checkAndPromptAppUpdate())
|
||||||
|
.finally(() => setUpdateBusy(false));
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
업데이트 확인
|
||||||
|
</button>
|
||||||
|
</SettingRow>
|
||||||
|
)}
|
||||||
|
</SettingGroup>
|
||||||
|
|
||||||
<SettingGroup title="네트워크">
|
<SettingGroup title="네트워크">
|
||||||
<SettingRow label="API URL">
|
<SettingRow label="API URL">
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -0,0 +1,91 @@
|
|||||||
|
/**
|
||||||
|
* Android 앱 내 업데이트 — /api/mobile-app/info 버전 비교 후 APK 다운로드
|
||||||
|
*/
|
||||||
|
import { App } from '@capacitor/app';
|
||||||
|
import { Capacitor } from '@capacitor/core';
|
||||||
|
import {
|
||||||
|
isRemoteVersionNewer,
|
||||||
|
loadMobileAppReleaseInfo,
|
||||||
|
type MobileAppReleaseInfoDto,
|
||||||
|
} from '../lib/shared';
|
||||||
|
|
||||||
|
export interface AppUpdateCheckResult {
|
||||||
|
updateAvailable: boolean;
|
||||||
|
currentVersion: string;
|
||||||
|
remoteVersion?: string;
|
||||||
|
release?: MobileAppReleaseInfoDto | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getCurrentAppVersion(): Promise<string> {
|
||||||
|
if (!Capacitor.isNativePlatform()) {
|
||||||
|
return import.meta.env.VITE_APP_VERSION ?? '0.0.0';
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const info = await App.getInfo();
|
||||||
|
return info.version ?? '0.0.0';
|
||||||
|
} catch {
|
||||||
|
return '0.0.0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function checkForAppUpdate(): Promise<AppUpdateCheckResult> {
|
||||||
|
const currentVersion = await getCurrentAppVersion();
|
||||||
|
const release = await loadMobileAppReleaseInfo();
|
||||||
|
const remoteVersion = release?.version?.trim();
|
||||||
|
const updateAvailable = Boolean(
|
||||||
|
release?.available
|
||||||
|
&& remoteVersion
|
||||||
|
&& isRemoteVersionNewer(currentVersion, remoteVersion),
|
||||||
|
);
|
||||||
|
return { updateAvailable, currentVersion, remoteVersion, release };
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function openApkDownload(release?: MobileAppReleaseInfoDto | null): Promise<boolean> {
|
||||||
|
const info = release ?? await loadMobileAppReleaseInfo();
|
||||||
|
const url = info?.downloadUrl?.trim();
|
||||||
|
if (!url) return false;
|
||||||
|
|
||||||
|
window.location.href = url;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function promptAppUpdateIfNeeded(silent = false): Promise<boolean> {
|
||||||
|
if (!Capacitor.isNativePlatform() || Capacitor.getPlatform() !== 'android') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const check = await checkForAppUpdate();
|
||||||
|
if (!check.updateAvailable || !check.remoteVersion) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (silent) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const ok = window.confirm(
|
||||||
|
`새 버전(v${check.remoteVersion})이 있습니다.\n`
|
||||||
|
+ `현재: v${check.currentVersion}\n\n`
|
||||||
|
+ 'APK를 다운로드하여 설치하시겠습니까?',
|
||||||
|
);
|
||||||
|
if (!ok) return false;
|
||||||
|
|
||||||
|
await openApkDownload(check.release);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 설정 화면 등 — 수동 업데이트 확인 */
|
||||||
|
export async function checkAndPromptAppUpdate(): Promise<AppUpdateCheckResult> {
|
||||||
|
const result = await checkForAppUpdate();
|
||||||
|
if (!result.updateAvailable) {
|
||||||
|
window.alert(`최신 버전입니다 (v${result.currentVersion}).`);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
const ok = window.confirm(
|
||||||
|
`새 버전 v${result.remoteVersion} 사용 가능.\nAPK를 다운로드하시겠습니까?`,
|
||||||
|
);
|
||||||
|
if (ok) {
|
||||||
|
await openApkDownload(result.release);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
@@ -15,4 +15,8 @@ public class MobileAppReleaseInfoDto {
|
|||||||
private String downloadUrl;
|
private String downloadUrl;
|
||||||
/** 모바일 설치 안내 페이지 URL */
|
/** 모바일 설치 안내 페이지 URL */
|
||||||
private String installPageUrl;
|
private String installPageUrl;
|
||||||
|
/** iPad TestFlight 초대 URL (App Store 정책상 ipa 직접 배포 불가) */
|
||||||
|
private String iosTestFlightUrl;
|
||||||
|
/** TestFlight 링크 제공 여부 */
|
||||||
|
private boolean iosAvailable;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,13 +36,19 @@ public class MobileAppReleaseService {
|
|||||||
@Value("${goldenchart.mobile-app.public-base-url:}")
|
@Value("${goldenchart.mobile-app.public-base-url:}")
|
||||||
private String configuredPublicBaseUrl;
|
private String configuredPublicBaseUrl;
|
||||||
|
|
||||||
|
@Value("${goldenchart.mobile-app.ios-testflight-url:}")
|
||||||
|
private String iosTestFlightUrl;
|
||||||
|
|
||||||
public MobileAppReleaseInfoDto getInfo(String requestBaseUrl) {
|
public MobileAppReleaseInfoDto getInfo(String requestBaseUrl) {
|
||||||
String publicBaseUrl = resolvePublicBaseUrl(requestBaseUrl);
|
String publicBaseUrl = resolvePublicBaseUrl(requestBaseUrl);
|
||||||
|
boolean iosAvailable = iosTestFlightUrl != null && !iosTestFlightUrl.isBlank();
|
||||||
Optional<Path> apk = resolveApkPath();
|
Optional<Path> apk = resolveApkPath();
|
||||||
if (apk.isEmpty()) {
|
if (apk.isEmpty()) {
|
||||||
return MobileAppReleaseInfoDto.builder()
|
return MobileAppReleaseInfoDto.builder()
|
||||||
.available(false)
|
.available(false)
|
||||||
.installPageUrl(buildInstallPageUrl(publicBaseUrl))
|
.installPageUrl(buildInstallPageUrl(publicBaseUrl))
|
||||||
|
.iosAvailable(iosAvailable)
|
||||||
|
.iosTestFlightUrl(iosAvailable ? iosTestFlightUrl.trim() : null)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
Path file = apk.get();
|
Path file = apk.get();
|
||||||
@@ -61,12 +67,16 @@ public class MobileAppReleaseService {
|
|||||||
.updatedAt(DT_FMT.format(updated))
|
.updatedAt(DT_FMT.format(updated))
|
||||||
.downloadUrl(downloadUrl)
|
.downloadUrl(downloadUrl)
|
||||||
.installPageUrl(buildInstallPageUrl(publicBaseUrl))
|
.installPageUrl(buildInstallPageUrl(publicBaseUrl))
|
||||||
|
.iosAvailable(iosAvailable)
|
||||||
|
.iosTestFlightUrl(iosAvailable ? iosTestFlightUrl.trim() : null)
|
||||||
.build();
|
.build();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.warn("[mobile-app] stat failed: {}", e.getMessage());
|
log.warn("[mobile-app] stat failed: {}", e.getMessage());
|
||||||
return MobileAppReleaseInfoDto.builder()
|
return MobileAppReleaseInfoDto.builder()
|
||||||
.available(false)
|
.available(false)
|
||||||
.installPageUrl(buildInstallPageUrl(publicBaseUrl))
|
.installPageUrl(buildInstallPageUrl(publicBaseUrl))
|
||||||
|
.iosAvailable(iosAvailable)
|
||||||
|
.iosTestFlightUrl(iosAvailable ? iosTestFlightUrl.trim() : null)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,6 +112,14 @@ goldenchart:
|
|||||||
version: ${GC_MOBILE_APP_VERSION:}
|
version: ${GC_MOBILE_APP_VERSION:}
|
||||||
# QR·APK 다운로드 절대 URL (로컬 개발 시에도 exdev 서버 APK 사용)
|
# QR·APK 다운로드 절대 URL (로컬 개발 시에도 exdev 서버 APK 사용)
|
||||||
public-base-url: ${GC_MOBILE_APP_PUBLIC_BASE_URL:http://exdev.co.kr}
|
public-base-url: ${GC_MOBILE_APP_PUBLIC_BASE_URL:http://exdev.co.kr}
|
||||||
|
ios-testflight-url: ${GC_MOBILE_APP_IOS_TESTFLIGHT_URL:}
|
||||||
|
jenkins:
|
||||||
|
enabled: ${GC_MOBILE_JENKINS_ENABLED:true}
|
||||||
|
url: ${GC_MOBILE_JENKINS_URL:http://127.0.0.1:8090}
|
||||||
|
job: ${GC_MOBILE_JENKINS_JOB:goldenChart-Mobile-Pipeline}
|
||||||
|
user: ${GC_MOBILE_JENKINS_USER:}
|
||||||
|
token: ${GC_MOBILE_JENKINS_TOKEN:}
|
||||||
|
trigger-token: ${GC_MOBILE_JENKINS_TRIGGER_TOKEN:goldenchart-mobile-build}
|
||||||
desktop-app:
|
desktop-app:
|
||||||
release-dir: ${GC_DESKTOP_APP_RELEASE_DIR:data/desktop-releases}
|
release-dir: ${GC_DESKTOP_APP_RELEASE_DIR:data/desktop-releases}
|
||||||
version: ${GC_DESKTOP_APP_VERSION:}
|
version: ${GC_DESKTOP_APP_VERSION:}
|
||||||
|
|||||||
@@ -2,7 +2,24 @@
|
|||||||
|
|
||||||
APK는 **Git에 포함하지 않습니다.** 로컬에서 빌드 후 서버 `data/mobile-releases/`에 업로드합니다.
|
APK는 **Git에 포함하지 않습니다.** 로컬에서 빌드 후 서버 `data/mobile-releases/`에 업로드합니다.
|
||||||
|
|
||||||
## exdev.co.kr 업로드 (권장)
|
## exdev.co.kr 업로드
|
||||||
|
|
||||||
|
### Jenkins 자동 (git push main)
|
||||||
|
|
||||||
|
`post-receive` → `trigger-mobile-jenkins-build.sh` → `goldenChart-Mobile-Pipeline`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 서버 최초 1회
|
||||||
|
./scripts/server-install-mobile-jenkins.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
로컬 CI와 동일한 빌드:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./scripts/jenkins-mobile-pipeline.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### 수동 업로드
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1) docker-compose 볼륨 변경을 서버에 반영 (최초 1회)
|
# 1) docker-compose 볼륨 변경을 서버에 반영 (최초 1회)
|
||||||
@@ -51,7 +68,8 @@ docker compose up -d backend # 볼륨 마운트 후
|
|||||||
| 변수 | 설명 |
|
| 변수 | 설명 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| `GC_MOBILE_APP_RELEASE_DIR` | 컨테이너 내부 APK 경로 (compose 기본값 사용) |
|
| `GC_MOBILE_APP_RELEASE_DIR` | 컨테이너 내부 APK 경로 (compose 기본값 사용) |
|
||||||
| `GC_MOBILE_APP_VERSION` | 웹 UI 표시 버전 (`--version` 옵션으로 설정) |
|
| `GC_MOBILE_APP_VERSION` | 웹 UI 표시 버전 (Jenkins가 `build.gradle` versionName 반영) |
|
||||||
|
| `GC_MOBILE_APP_IOS_TESTFLIGHT_URL` | iPad TestFlight 초대 URL |
|
||||||
|
|
||||||
## 앱 API URL
|
## 앱 API URL
|
||||||
|
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ services:
|
|||||||
GC_MOBILE_APP_RELEASE_DIR: /app/data/mobile-releases
|
GC_MOBILE_APP_RELEASE_DIR: /app/data/mobile-releases
|
||||||
GC_MOBILE_APP_VERSION: ${GC_MOBILE_APP_VERSION:-}
|
GC_MOBILE_APP_VERSION: ${GC_MOBILE_APP_VERSION:-}
|
||||||
GC_MOBILE_APP_PUBLIC_BASE_URL: ${GC_MOBILE_APP_PUBLIC_BASE_URL:-http://exdev.co.kr}
|
GC_MOBILE_APP_PUBLIC_BASE_URL: ${GC_MOBILE_APP_PUBLIC_BASE_URL:-http://exdev.co.kr}
|
||||||
|
GC_MOBILE_APP_IOS_TESTFLIGHT_URL: ${GC_MOBILE_APP_IOS_TESTFLIGHT_URL:-}
|
||||||
GC_DESKTOP_APP_RELEASE_DIR: /app/data/desktop-releases
|
GC_DESKTOP_APP_RELEASE_DIR: /app/data/desktop-releases
|
||||||
GC_DESKTOP_APP_PUBLIC_BASE_URL: ${GC_DESKTOP_APP_PUBLIC_BASE_URL:-http://exdev.co.kr}
|
GC_DESKTOP_APP_PUBLIC_BASE_URL: ${GC_DESKTOP_APP_PUBLIC_BASE_URL:-http://exdev.co.kr}
|
||||||
GC_DESKTOP_JENKINS_ENABLED: ${GC_DESKTOP_JENKINS_ENABLED:-true}
|
GC_DESKTOP_JENKINS_ENABLED: ${GC_DESKTOP_JENKINS_ENABLED:-true}
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
# iPad — Capacitor iOS / TestFlight
|
||||||
|
|
||||||
|
## 사전 요구
|
||||||
|
|
||||||
|
- macOS + Xcode
|
||||||
|
- Apple Developer Program ($99/년)
|
||||||
|
- CocoaPods: `brew install cocoapods`
|
||||||
|
|
||||||
|
## iOS 프로젝트 생성 (최초 1회)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd app
|
||||||
|
npm run cap:sync
|
||||||
|
npx cap add ios
|
||||||
|
npx cap open ios
|
||||||
|
```
|
||||||
|
|
||||||
|
Xcode에서 **Signing & Capabilities** → Team 선택, Bundle ID `com.goldenchart.app`.
|
||||||
|
|
||||||
|
## TestFlight 업로드
|
||||||
|
|
||||||
|
1. Xcode → Product → Archive
|
||||||
|
2. Organizer → Distribute App → App Store Connect → Upload
|
||||||
|
3. App Store Connect → TestFlight → 내부/외부 테스터 초대
|
||||||
|
4. 초대 URL을 서버 `.env`에 설정:
|
||||||
|
|
||||||
|
```env
|
||||||
|
GC_MOBILE_APP_IOS_TESTFLIGHT_URL=https://testflight.apple.com/join/XXXXXXXX
|
||||||
|
```
|
||||||
|
|
||||||
|
5. `docker compose up -d --no-deps backend` (또는 deploy)
|
||||||
|
|
||||||
|
PC 프로그램 탭과 `/api/mobile-app/info`의 `iosTestFlightUrl`에 반영됩니다.
|
||||||
|
|
||||||
|
## 참고
|
||||||
|
|
||||||
|
- App Store/TestFlight 배포 앱은 **ipa 직접 다운로드·앱 내 APK식 updater 불가**
|
||||||
|
- iPad와 iPhone은 동일 iOS 빌드 사용 가능 (UI 반응형)
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
# 모바일·태블릿 Phase 1 — Capacitor 확장 (A)
|
||||||
|
|
||||||
|
## 스택 결정
|
||||||
|
|
||||||
|
| 항목 | 선택 |
|
||||||
|
|------|------|
|
||||||
|
| 단기 경로 | **1단계 A — Capacitor 확장** (`app/`) |
|
||||||
|
| 장기(선택) | 2단계 B — Tauri Mobile 이전 (미착수) |
|
||||||
|
| Android 패드 | 동일 APK (반응형 UI) |
|
||||||
|
| iPad | TestFlight 링크 (ipa 직접 다운로드·앱 내 updater 불가) |
|
||||||
|
|
||||||
|
Phase 1 목표: 데스크톱과 동일한 **git push → CI 빌드 → 다운로드 허브** 흐름을 Android에 맞추고, PC 프로그램 탭에서 Android·iPad를 함께 제공한다.
|
||||||
|
|
||||||
|
## 파이프라인
|
||||||
|
|
||||||
|
```
|
||||||
|
git push main
|
||||||
|
→ post-receive (deploy.sh)
|
||||||
|
→ trigger-mobile-jenkins-build.sh
|
||||||
|
→ jenkins-mobile-pipeline.sh
|
||||||
|
→ build-mobile-apk.sh
|
||||||
|
→ data/mobile-releases/goldenchart-android.apk
|
||||||
|
→ GC_MOBILE_APP_VERSION (.env)
|
||||||
|
```
|
||||||
|
|
||||||
|
## 다운로드 UI
|
||||||
|
|
||||||
|
**PC 프로그램** 탭 (`AppDownloadModal`):
|
||||||
|
|
||||||
|
- macOS (.dmg) — 기존
|
||||||
|
- Windows (.exe) — 기존
|
||||||
|
- Android 패드/폰 (.apk) — `/api/mobile-app/info`
|
||||||
|
- iPad (TestFlight) — `GC_MOBILE_APP_IOS_TESTFLIGHT_URL` 링크
|
||||||
|
|
||||||
|
## Android 앱 내 업데이트
|
||||||
|
|
||||||
|
- 시작 시 `/api/mobile-app/info` 버전 vs `@capacitor/app` `version`
|
||||||
|
- 새 버전이면 APK 다운로드 URL 열기 (재설치)
|
||||||
|
|
||||||
|
## iPad / TestFlight
|
||||||
|
|
||||||
|
1. Mac + Xcode + Apple Developer Program
|
||||||
|
2. `cd app && npm run cap:sync && npx cap open ios`
|
||||||
|
3. Archive → TestFlight 업로드
|
||||||
|
4. 서버 `.env`: `GC_MOBILE_APP_IOS_TESTFLIGHT_URL=https://testflight.apple.com/join/...`
|
||||||
|
|
||||||
|
## Jenkins 설치 (서버 1회)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./scripts/server-install-mobile-jenkins.sh
|
||||||
|
# .env 예시
|
||||||
|
# GC_MOBILE_JENKINS_TRIGGER_TOKEN=goldenchart-mobile-build
|
||||||
|
```
|
||||||
|
|
||||||
|
## 환경 변수
|
||||||
|
|
||||||
|
| 변수 | 설명 |
|
||||||
|
|------|------|
|
||||||
|
| `GC_MOBILE_APP_VERSION` | 웹·API 표시 버전 |
|
||||||
|
| `GC_MOBILE_APP_IOS_TESTFLIGHT_URL` | iPad TestFlight 초대 URL |
|
||||||
|
| `GC_MOBILE_JENKINS_*` | Jenkins mobile job (desktop과 동일 패턴) |
|
||||||
@@ -13467,6 +13467,10 @@ html.theme-light .tam-disclaimer { color: #90a4ae; }
|
|||||||
color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
|
color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
|
||||||
}
|
}
|
||||||
.app-download-pc-btn:hover { filter: brightness(1.06); }
|
.app-download-pc-btn:hover { filter: brightness(1.06); }
|
||||||
|
.app-download-pc-btn--link {
|
||||||
|
display: inline-flex; align-items: center; justify-content: center;
|
||||||
|
text-decoration: none; box-sizing: border-box;
|
||||||
|
}
|
||||||
.tmb-desktop-update-btn.busy { opacity: 0.65; cursor: wait; }
|
.tmb-desktop-update-btn.busy { opacity: 0.65; cursor: wait; }
|
||||||
.tmb-desktop-update-btn.busy svg { animation: tmb-update-spin 0.9s linear infinite; }
|
.tmb-desktop-update-btn.busy svg { animation: tmb-update-spin 0.9s linear infinite; }
|
||||||
@keyframes tmb-update-spin { to { transform: rotate(360deg); } }
|
@keyframes tmb-update-spin { to { transform: rotate(360deg); } }
|
||||||
|
|||||||
@@ -147,20 +147,98 @@ const MobileTab: React.FC = () => {
|
|||||||
</details>
|
</details>
|
||||||
|
|
||||||
<p className="app-download-ios-note">
|
<p className="app-download-ios-note">
|
||||||
iOS는 App Store / TestFlight 배포가 필요합니다. 현재 QR·APK 설치는 Android 전용입니다.
|
iPad는 PC 프로그램 탭의 TestFlight 링크를 이용하세요. 이 탭의 QR·APK는 Android 전용입니다.
|
||||||
</p>
|
</p>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const PlatformCard: React.FC<{
|
const PlatformCard: React.FC<{
|
||||||
platform: 'mac' | 'windows';
|
platform: 'mac' | 'windows' | 'android' | 'ipad';
|
||||||
release?: DesktopAppPlatformReleaseDto;
|
release?: DesktopAppPlatformReleaseDto;
|
||||||
}> = ({ platform, release }) => {
|
mobile?: MobileAppReleaseInfoDto | null;
|
||||||
const isMac = platform === 'mac';
|
}> = ({ platform, release, mobile }) => {
|
||||||
const label = isMac ? 'macOS (Apple Silicon · Intel)' : 'Windows (64-bit)';
|
const configs = {
|
||||||
const icon = isMac ? '🍎' : '🪟';
|
mac: { label: 'macOS (Apple Silicon · Intel)', icon: '🍎', ext: '.dmg', isLink: false },
|
||||||
const ext = isMac ? '.dmg' : '.exe';
|
windows: { label: 'Windows (64-bit)', icon: '🪟', ext: '.exe', isLink: false },
|
||||||
|
android: { label: 'Android (패드 · 폰)', icon: '🤖', ext: '.apk', isLink: false },
|
||||||
|
ipad: { label: 'iPad (TestFlight)', icon: '📱', ext: '', isLink: true },
|
||||||
|
} as const;
|
||||||
|
const { label, icon, ext } = configs[platform];
|
||||||
|
|
||||||
|
if (platform === 'android') {
|
||||||
|
if (!mobile?.available || !mobile.downloadUrl) {
|
||||||
|
return (
|
||||||
|
<div className="app-download-pc-card app-download-pc-card--empty">
|
||||||
|
<div className="app-download-pc-icon" aria-hidden>{icon}</div>
|
||||||
|
<div>
|
||||||
|
<strong>{label}</strong>
|
||||||
|
<p className="app-download-muted">설치 파일 준비 중 ({ext})</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div className="app-download-pc-card">
|
||||||
|
<div className="app-download-pc-icon" aria-hidden>{icon}</div>
|
||||||
|
<div className="app-download-pc-body">
|
||||||
|
<strong>{label}</strong>
|
||||||
|
<p className="app-download-meta">
|
||||||
|
{mobile.version && <span>v{mobile.version}</span>}
|
||||||
|
{mobile.sizeBytes != null && <span>{formatBytes(mobile.sizeBytes)}</span>}
|
||||||
|
{mobile.updatedAt && <span>{mobile.updatedAt}</span>}
|
||||||
|
</p>
|
||||||
|
<p className="app-download-muted app-download-url" title={mobile.downloadUrl}>
|
||||||
|
{mobile.fileName ?? `goldenchart-android${ext}`}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="app-download-pc-btn"
|
||||||
|
onClick={() => triggerDownload(mobile.downloadUrl!, mobile.fileName ?? `goldenchart-android${ext}`)}
|
||||||
|
>
|
||||||
|
다운로드
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (platform === 'ipad') {
|
||||||
|
const testFlightUrl = mobile?.iosTestFlightUrl?.trim();
|
||||||
|
if (!mobile?.iosAvailable || !testFlightUrl) {
|
||||||
|
return (
|
||||||
|
<div className="app-download-pc-card app-download-pc-card--empty">
|
||||||
|
<div className="app-download-pc-icon" aria-hidden>{icon}</div>
|
||||||
|
<div>
|
||||||
|
<strong>{label}</strong>
|
||||||
|
<p className="app-download-muted">TestFlight 링크 준비 중</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div className="app-download-pc-card">
|
||||||
|
<div className="app-download-pc-icon" aria-hidden>{icon}</div>
|
||||||
|
<div className="app-download-pc-body">
|
||||||
|
<strong>{label}</strong>
|
||||||
|
<p className="app-download-meta">
|
||||||
|
<span>TestFlight 베타</span>
|
||||||
|
</p>
|
||||||
|
<p className="app-download-muted app-download-url" title={testFlightUrl}>
|
||||||
|
Apple TestFlight 초대 링크
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<a
|
||||||
|
href={testFlightUrl}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="app-download-pc-btn app-download-pc-btn--link"
|
||||||
|
>
|
||||||
|
TestFlight 열기
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (!release?.available || !release.downloadUrl) {
|
if (!release?.available || !release.downloadUrl) {
|
||||||
return (
|
return (
|
||||||
@@ -309,6 +387,7 @@ const DesktopBuildProgressPanel: React.FC<{
|
|||||||
|
|
||||||
const DesktopTab: React.FC<{ canBuildDesktop: boolean }> = ({ canBuildDesktop }) => {
|
const DesktopTab: React.FC<{ canBuildDesktop: boolean }> = ({ canBuildDesktop }) => {
|
||||||
const [info, setInfo] = useState<DesktopAppReleaseInfoDto | null>(null);
|
const [info, setInfo] = useState<DesktopAppReleaseInfoDto | null>(null);
|
||||||
|
const [mobileInfo, setMobileInfo] = useState<MobileAppReleaseInfoDto | null>(null);
|
||||||
const [buildStatus, setBuildStatus] = useState<DesktopAppBuildStatusDto | null>(null);
|
const [buildStatus, setBuildStatus] = useState<DesktopAppBuildStatusDto | null>(null);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
@@ -318,9 +397,13 @@ const DesktopTab: React.FC<{ canBuildDesktop: boolean }> = ({ canBuildDesktop })
|
|||||||
const [elapsedTick, setElapsedTick] = useState(0);
|
const [elapsedTick, setElapsedTick] = useState(0);
|
||||||
|
|
||||||
const reloadRelease = useCallback(async () => {
|
const reloadRelease = useCallback(async () => {
|
||||||
const data = await loadDesktopAppReleaseInfo();
|
const [desktop, mobile] = await Promise.all([
|
||||||
setInfo(data);
|
loadDesktopAppReleaseInfo(),
|
||||||
return data;
|
loadMobileAppReleaseInfo(),
|
||||||
|
]);
|
||||||
|
setInfo(desktop);
|
||||||
|
setMobileInfo(mobile);
|
||||||
|
return desktop;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const reloadBuildStatus = useCallback(async () => {
|
const reloadBuildStatus = useCallback(async () => {
|
||||||
@@ -388,7 +471,8 @@ const DesktopTab: React.FC<{ canBuildDesktop: boolean }> = ({ canBuildDesktop })
|
|||||||
}
|
}
|
||||||
}, [canBuildDesktop, buildBusy, isBuilding, reloadBuildStatus]);
|
}, [canBuildDesktop, buildBusy, isBuilding, reloadBuildStatus]);
|
||||||
|
|
||||||
const hasAny = info?.mac?.available || info?.windows?.available;
|
const hasAny = info?.mac?.available || info?.windows?.available
|
||||||
|
|| mobileInfo?.available || mobileInfo?.iosAvailable;
|
||||||
|
|
||||||
if (loading) return <p className="app-download-muted">PC 프로그램 정보 불러오는 중…</p>;
|
if (loading) return <p className="app-download-muted">PC 프로그램 정보 불러오는 중…</p>;
|
||||||
if (error) return <p className="app-download-error">{error}</p>;
|
if (error) return <p className="app-download-error">{error}</p>;
|
||||||
@@ -450,7 +534,7 @@ const DesktopTab: React.FC<{ canBuildDesktop: boolean }> = ({ canBuildDesktop })
|
|||||||
<div className="app-download-empty-icon" aria-hidden>💻</div>
|
<div className="app-download-empty-icon" aria-hidden>💻</div>
|
||||||
<h3>설치 파일 준비 중</h3>
|
<h3>설치 파일 준비 중</h3>
|
||||||
<p>
|
<p>
|
||||||
macOS(.dmg) 또는 Windows(.exe) 설치 파일이 아직 서버에 없습니다.
|
macOS(.dmg), Windows(.exe), Android(.apk) 또는 iPad TestFlight 링크가 아직 준비되지 않았습니다.
|
||||||
<br />
|
<br />
|
||||||
{canBuildDesktop
|
{canBuildDesktop
|
||||||
? '우측 상단 「앱 빌드」 버튼으로 Jenkins 빌드를 시작하세요.'
|
? '우측 상단 「앱 빌드」 버튼으로 Jenkins 빌드를 시작하세요.'
|
||||||
@@ -469,6 +553,8 @@ const DesktopTab: React.FC<{ canBuildDesktop: boolean }> = ({ canBuildDesktop })
|
|||||||
<div className="app-download-pc-list">
|
<div className="app-download-pc-list">
|
||||||
<PlatformCard platform="mac" release={info?.mac} />
|
<PlatformCard platform="mac" release={info?.mac} />
|
||||||
<PlatformCard platform="windows" release={info?.windows} />
|
<PlatformCard platform="windows" release={info?.windows} />
|
||||||
|
<PlatformCard platform="android" mobile={mobileInfo} />
|
||||||
|
<PlatformCard platform="ipad" mobile={mobileInfo} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -486,7 +572,10 @@ const DesktopTab: React.FC<{ canBuildDesktop: boolean }> = ({ canBuildDesktop })
|
|||||||
<code>xattr -cr /Applications/GoldenChart.app</code> 실행 후 다시 열어보세요.
|
<code>xattr -cr /Applications/GoldenChart.app</code> 실행 후 다시 열어보세요.
|
||||||
</li>
|
</li>
|
||||||
<li><strong>Windows</strong>: setup.exe를 실행하고 안내에 따라 설치합니다.</li>
|
<li><strong>Windows</strong>: setup.exe를 실행하고 안내에 따라 설치합니다.</li>
|
||||||
|
<li><strong>Android (패드·폰)</strong>: APK를 다운로드한 뒤 설치합니다. 패드와 폰은 동일 APK입니다.</li>
|
||||||
|
<li><strong>iPad</strong>: TestFlight 링크로 베타 앱을 설치합니다 (App Store 정책상 ipa 직접 다운로드 불가).</li>
|
||||||
<li>설치된 PC 앱은 메뉴 우측 상단 <strong>업데이트</strong> 버튼으로 자동 업데이트할 수 있습니다.</li>
|
<li>설치된 PC 앱은 메뉴 우측 상단 <strong>업데이트</strong> 버튼으로 자동 업데이트할 수 있습니다.</li>
|
||||||
|
<li>Android 앱은 시작 시 또는 설정에서 새 APK 버전을 안내합니다.</li>
|
||||||
<li>빌드는 Git <code>main</code> 최신 커밋 기준이며, 완료 후 설치 파일이 자동으로 배포됩니다.</li>
|
<li>빌드는 Git <code>main</code> 최신 커밋 기준이며, 완료 후 설치 파일이 자동으로 배포됩니다.</li>
|
||||||
</ol>
|
</ol>
|
||||||
</details>
|
</details>
|
||||||
|
|||||||
@@ -637,6 +637,8 @@ export interface MobileAppReleaseInfoDto {
|
|||||||
updatedAt?: string;
|
updatedAt?: string;
|
||||||
downloadUrl?: string;
|
downloadUrl?: string;
|
||||||
installPageUrl?: string;
|
installPageUrl?: string;
|
||||||
|
iosAvailable?: boolean;
|
||||||
|
iosTestFlightUrl?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function loadMobileAppReleaseInfo(): Promise<MobileAppReleaseInfoDto | null> {
|
export async function loadMobileAppReleaseInfo(): Promise<MobileAppReleaseInfoDto | null> {
|
||||||
|
|||||||
@@ -1506,3 +1506,37 @@ export async function fetchTrendSearchDetail(
|
|||||||
return request<TrendSearchResultDto>(`/trend-search/detail?${params}`);
|
return request<TrendSearchResultDto>(`/trend-search/detail?${params}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ── 모바일 앱 배포 ─────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
export interface MobileAppReleaseInfoDto {
|
||||||
|
available: boolean;
|
||||||
|
fileName?: string;
|
||||||
|
version?: string;
|
||||||
|
sizeBytes?: number;
|
||||||
|
updatedAt?: string;
|
||||||
|
downloadUrl?: string;
|
||||||
|
installPageUrl?: string;
|
||||||
|
iosAvailable?: boolean;
|
||||||
|
iosTestFlightUrl?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function loadMobileAppReleaseInfo(): Promise<MobileAppReleaseInfoDto | null> {
|
||||||
|
return request<MobileAppReleaseInfoDto>('/mobile-app/info');
|
||||||
|
}
|
||||||
|
|
||||||
|
/** semver 유사 비교 — remote > local 이면 true */
|
||||||
|
export function isRemoteVersionNewer(local: string, remote: string): boolean {
|
||||||
|
const parse = (v: string) =>
|
||||||
|
v.trim().replace(/^v/i, '').split(/[.-]/).map(p => parseInt(p, 10)).map(n => (Number.isFinite(n) ? n : 0));
|
||||||
|
const a = parse(local);
|
||||||
|
const b = parse(remote);
|
||||||
|
const len = Math.max(a.length, b.length);
|
||||||
|
for (let i = 0; i < len; i += 1) {
|
||||||
|
const av = a[i] ?? 0;
|
||||||
|
const bv = b[i] ?? 0;
|
||||||
|
if (bv > av) return true;
|
||||||
|
if (bv < av) return false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Executable
+68
@@ -0,0 +1,68 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# GoldenChart Android APK — 로컬(CI) 빌드 → data/mobile-releases/
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
|
cd "$ROOT"
|
||||||
|
|
||||||
|
APK_REMOTE_NAME="${APK_REMOTE_NAME:-goldenchart-android.apk}"
|
||||||
|
LOCAL_APK="${LOCAL_APK:-$ROOT/data/mobile-releases/$APK_REMOTE_NAME}"
|
||||||
|
|
||||||
|
log() { echo "[build-mobile-apk $(date '+%H:%M:%S')] $*"; }
|
||||||
|
|
||||||
|
sign_release_apk() {
|
||||||
|
local unsigned="$ROOT/app/android/app/build/outputs/apk/release/app-release-unsigned.apk"
|
||||||
|
local signed="$ROOT/app/android/app/build/outputs/apk/release/app-release.apk"
|
||||||
|
local keystore="$ROOT/app/android/goldenchart-release.keystore"
|
||||||
|
|
||||||
|
if [[ ! -f "$unsigned" ]]; then
|
||||||
|
echo "unsigned APK 없음: $unsigned" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f "$keystore" ]]; then
|
||||||
|
log "keystore 생성..."
|
||||||
|
"${JAVA_HOME}/bin/keytool" -genkeypair -v -keystore "$keystore" -alias goldenchart \
|
||||||
|
-keyalg RSA -keysize 2048 -validity 10000 \
|
||||||
|
-storepass goldenchart -keypass goldenchart \
|
||||||
|
-dname "CN=GoldenChart, OU=Mobile, O=GoldenChart, L=Seoul, ST=Seoul, C=KR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local apksigner
|
||||||
|
apksigner="${ANDROID_HOME:-$HOME/Library/Android/sdk}/build-tools/35.0.0/apksigner"
|
||||||
|
if [[ ! -x "$apksigner" ]]; then
|
||||||
|
apksigner=$(command -v apksigner 2>/dev/null || true)
|
||||||
|
fi
|
||||||
|
if [[ -z "$apksigner" || ! -x "$apksigner" ]]; then
|
||||||
|
echo "apksigner 없음. Android SDK build-tools 설치 필요." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp "$unsigned" "$signed"
|
||||||
|
"$apksigner" sign --ks "$keystore" --ks-key-alias goldenchart \
|
||||||
|
--ks-pass pass:goldenchart --key-pass pass:goldenchart "$signed"
|
||||||
|
mkdir -p "$(dirname "$LOCAL_APK")"
|
||||||
|
cp "$signed" "$LOCAL_APK"
|
||||||
|
log "서명 완료: $LOCAL_APK"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ -z "${JAVA_HOME:-}" ]] && [[ -x "$HOME/.local/jdk-21.0.11+10/Contents/Home/bin/java" ]]; then
|
||||||
|
export JAVA_HOME="$HOME/.local/jdk-21.0.11+10/Contents/Home"
|
||||||
|
fi
|
||||||
|
if [[ -z "${JAVA_HOME:-}" ]]; then
|
||||||
|
echo "JAVA_HOME 미설정" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "google-services.json 확인"
|
||||||
|
"$ROOT/scripts/ensure-android-google-services.sh"
|
||||||
|
|
||||||
|
log "cap:sync"
|
||||||
|
npm run cap:sync
|
||||||
|
|
||||||
|
log "assembleRelease"
|
||||||
|
(cd "$ROOT/app/android" && ./gradlew assembleRelease --no-daemon)
|
||||||
|
|
||||||
|
sign_release_apk
|
||||||
|
|
||||||
|
log "완료 $(du -h "$LOCAL_APK" | cut -f1)"
|
||||||
Executable
+30
@@ -0,0 +1,30 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Capacitor iOS 플랫폼 추가·동기화 (Mac + CocoaPods 권장)
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
|
cd "$ROOT/app"
|
||||||
|
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
if command -v pod >/dev/null 2>&1; then
|
||||||
|
npx cap add ios 2>/dev/null || true
|
||||||
|
npx cap sync ios
|
||||||
|
else
|
||||||
|
echo "CocoaPods 없음 — iOS 템플릿만 추출합니다 (pod install은 나중에)."
|
||||||
|
node --input-type=module <<'NODE'
|
||||||
|
import { loadConfig } from '@capacitor/cli/dist/config.js';
|
||||||
|
import { addIOS } from '@capacitor/cli/dist/ios/add.js';
|
||||||
|
import { editProjectSettingsIOS } from '@capacitor/cli/dist/ios/common.js';
|
||||||
|
const config = await loadConfig({ cwd: process.cwd() });
|
||||||
|
const fs = await import('fs');
|
||||||
|
if (!fs.existsSync('ios')) {
|
||||||
|
await addIOS(config);
|
||||||
|
await editProjectSettingsIOS(config);
|
||||||
|
}
|
||||||
|
NODE
|
||||||
|
echo "완료. brew install cocoapods 후: cd ios/App && pod install"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Xcode: npm run cap:open:ios"
|
||||||
|
echo "TestFlight: docs/ios-testflight-setup.md"
|
||||||
Executable
+49
@@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Jenkins goldenChart-Mobile-Pipeline — Android APK 빌드·배포
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
|
WORK_TREE="${WORK_TREE:-/Users/aidev/apps/goldenChart}"
|
||||||
|
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:${PATH:-/usr/bin:/bin}"
|
||||||
|
for prefix in "$HOME/homebrew" /opt/homebrew; do
|
||||||
|
[[ -x "$prefix/bin/brew" ]] && eval "$("$prefix/bin/brew" shellenv)"
|
||||||
|
done
|
||||||
|
|
||||||
|
log() { echo "[mobile-pipeline $(date '+%H:%M:%S')] $*"; }
|
||||||
|
|
||||||
|
log "=== goldenChart Mobile Pipeline #${BUILD_NUMBER:-local} ==="
|
||||||
|
log "WORK_TREE=$WORK_TREE"
|
||||||
|
|
||||||
|
cd "$WORK_TREE"
|
||||||
|
|
||||||
|
if [[ -d "${GIT_DIR:-/Volumes/ADATA/git/goldenChart.git}" ]]; then
|
||||||
|
git --git-dir="${GIT_DIR:-/Volumes/ADATA/git/goldenChart.git}" \
|
||||||
|
--work-tree="$WORK_TREE" checkout -f main 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
chmod +x "$ROOT/scripts/"*.sh 2>/dev/null || true
|
||||||
|
|
||||||
|
"$ROOT/scripts/build-mobile-apk.sh"
|
||||||
|
|
||||||
|
VERSION_NAME="$(grep -E 'versionName\s+"' "$ROOT/app/android/app/build.gradle" | head -1 | sed -E 's/.*versionName\s+"([^"]+)".*/\1/' || true)"
|
||||||
|
|
||||||
|
if [[ -n "$VERSION_NAME" ]]; then
|
||||||
|
log "APK version → $VERSION_NAME"
|
||||||
|
ENV_FILE="$WORK_TREE/.env"
|
||||||
|
if [[ -f "$ENV_FILE" ]]; then
|
||||||
|
{ grep -v '^GC_MOBILE_APP_VERSION=' "$ENV_FILE" || true; echo "GC_MOBILE_APP_VERSION=${VERSION_NAME}"; } > "${ENV_FILE}.tmp"
|
||||||
|
mv "${ENV_FILE}.tmp" "$ENV_FILE"
|
||||||
|
else
|
||||||
|
echo "GC_MOBILE_APP_VERSION=${VERSION_NAME}" >> "$ENV_FILE"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -x "$WORK_TREE/scripts/restart-backend-if-running.sh" ]]; then
|
||||||
|
WORK_TREE="$WORK_TREE" "$WORK_TREE/scripts/restart-backend-if-running.sh" || true
|
||||||
|
elif docker compose -f "$WORK_TREE/docker-compose.yml" ps -q backend 2>/dev/null | grep -q .; then
|
||||||
|
log "backend 재시작 (APK 볼륨 반영)"
|
||||||
|
(cd "$WORK_TREE" && docker compose up -d --no-deps backend) || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "Artifacts: $WORK_TREE/data/mobile-releases/"
|
||||||
|
log "Pipeline complete."
|
||||||
@@ -62,6 +62,19 @@ while read -r OLDREV NEWREV REFNAME; do
|
|||||||
else
|
else
|
||||||
echo "$(date '+%Y-%m-%d %H:%M:%S') $HOOK_TAG [WARN] trigger-desktop-jenkins-build.sh 없음: $TRIGGER"
|
echo "$(date '+%Y-%m-%d %H:%M:%S') $HOOK_TAG [WARN] trigger-desktop-jenkins-build.sh 없음: $TRIGGER"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Mobile(Android APK) Jenkins 빌드 — git push 성공 후 자동
|
||||||
|
TRIGGER_MOBILE="${WORK_TREE}/scripts/trigger-mobile-jenkins-build.sh"
|
||||||
|
if [ -x "$TRIGGER_MOBILE" ]; then
|
||||||
|
echo "$(date '+%Y-%m-%d %H:%M:%S') $HOOK_TAG Mobile Jenkins 빌드 트리거"
|
||||||
|
if "$TRIGGER_MOBILE" >> "$DEPLOY_LOG" 2>&1; then
|
||||||
|
echo "$(date '+%Y-%m-%d %H:%M:%S') $HOOK_TAG Mobile 빌드 큐 등록 완료"
|
||||||
|
else
|
||||||
|
echo "$(date '+%Y-%m-%d %H:%M:%S') $HOOK_TAG [WARN] Mobile Jenkins 트리거 실패 (웹 배포는 성공)"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "$(date '+%Y-%m-%d %H:%M:%S') $HOOK_TAG [WARN] trigger-mobile-jenkins-build.sh 없음: $TRIGGER_MOBILE"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "$(date '+%Y-%m-%d %H:%M:%S') $HOOK_TAG '$BRANCH_NAME' — 배포 스킵 (main만)"
|
echo "$(date '+%Y-%m-%d %H:%M:%S') $HOOK_TAG '$BRANCH_NAME' — 배포 스킵 (main만)"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Executable
+11
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# docker compose backend가 실행 중이면 재시작 (APK·env 반영)
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
WORK_TREE="${WORK_TREE:-$(cd "$(dirname "$0")/.." && pwd)}"
|
||||||
|
cd "$WORK_TREE"
|
||||||
|
|
||||||
|
if docker compose ps -q backend 2>/dev/null | grep -q .; then
|
||||||
|
echo "[restart-backend] docker compose up -d --no-deps backend"
|
||||||
|
docker compose up -d --no-deps backend
|
||||||
|
fi
|
||||||
Executable
+81
@@ -0,0 +1,81 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# exdev Jenkins — goldenChart-Mobile-Pipeline Job 생성
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:${PATH:-/usr/bin:/bin}"
|
||||||
|
|
||||||
|
JENKINS_HOME="${JENKINS_HOME:-$HOME/.jenkins}"
|
||||||
|
JENKINS_JOB="goldenChart-Mobile-Pipeline"
|
||||||
|
JENKINS_TRIGGER_TOKEN="${JENKINS_MOBILE_TRIGGER_TOKEN:-${GC_MOBILE_JENKINS_TRIGGER_TOKEN:-goldenchart-mobile-build}}"
|
||||||
|
GIT_DIR="${GIT_DIR:-/Volumes/ADATA/git/goldenChart.git}"
|
||||||
|
WORK_TREE="${WORK_TREE:-/Users/aidev/apps/goldenChart}"
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
log() { echo "[install-mobile-jenkins] $*"; }
|
||||||
|
|
||||||
|
log "Jenkins job 생성: $JENKINS_JOB"
|
||||||
|
mkdir -p "${JENKINS_HOME}/jobs/${JENKINS_JOB}"
|
||||||
|
|
||||||
|
cat > "${JENKINS_HOME}/jobs/${JENKINS_JOB}/config.xml" << JENKINS_XML
|
||||||
|
<?xml version='1.1' encoding='UTF-8'?>
|
||||||
|
<project>
|
||||||
|
<description>GoldenChart Mobile — Capacitor Android APK</description>
|
||||||
|
<keepDependencies>false</keepDependencies>
|
||||||
|
<properties/>
|
||||||
|
<scm class="hudson.plugins.git.GitSCM" plugin="git@5.0.0">
|
||||||
|
<configVersion>2</configVersion>
|
||||||
|
<userRemoteConfigs>
|
||||||
|
<hudson.plugins.git.UserRemoteConfig>
|
||||||
|
<url>file://${GIT_DIR}</url>
|
||||||
|
</hudson.plugins.git.UserRemoteConfig>
|
||||||
|
</userRemoteConfigs>
|
||||||
|
<branches>
|
||||||
|
<hudson.plugins.git.BranchSpec>
|
||||||
|
<name>*/main</name>
|
||||||
|
</hudson.plugins.git.BranchSpec>
|
||||||
|
</branches>
|
||||||
|
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
|
||||||
|
<submoduleCfg class="empty-list"/>
|
||||||
|
<extensions/>
|
||||||
|
</scm>
|
||||||
|
<canRoam>true</canRoam>
|
||||||
|
<disabled>false</disabled>
|
||||||
|
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
|
||||||
|
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
|
||||||
|
<authToken>${JENKINS_TRIGGER_TOKEN}</authToken>
|
||||||
|
<triggers/>
|
||||||
|
<concurrentBuild>false</concurrentBuild>
|
||||||
|
<builders>
|
||||||
|
<hudson.tasks.Shell>
|
||||||
|
<command>#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:\$PATH"
|
||||||
|
export WORK_TREE="${WORK_TREE}"
|
||||||
|
export GIT_DIR="${GIT_DIR}"
|
||||||
|
export BUILD_NUMBER="\${BUILD_NUMBER}"
|
||||||
|
export ANDROID_HOME="\${ANDROID_HOME:-\$HOME/Library/Android/sdk}"
|
||||||
|
export JAVA_HOME="\${JAVA_HOME:-\$HOME/.local/jdk-21.0.11+10/Contents/Home}"
|
||||||
|
"${WORK_TREE}/scripts/jenkins-mobile-pipeline.sh"
|
||||||
|
</command>
|
||||||
|
</hudson.tasks.Shell>
|
||||||
|
</builders>
|
||||||
|
<publishers>
|
||||||
|
<hudson.tasks.ArtifactArchiver>
|
||||||
|
<artifacts>data/mobile-releases/**</artifacts>
|
||||||
|
<allowEmptyArchive>true</allowEmptyArchive>
|
||||||
|
<onlyIfSuccessful>false</onlyIfSuccessful>
|
||||||
|
<fingerprint>false</fingerprint>
|
||||||
|
<defaultExcludes>true</defaultExcludes>
|
||||||
|
</hudson.tasks.ArtifactArchiver>
|
||||||
|
</publishers>
|
||||||
|
<buildWrappers/>
|
||||||
|
</project>
|
||||||
|
JENKINS_XML
|
||||||
|
|
||||||
|
if curl -sf -o /dev/null "http://127.0.0.1:8090/login" 2>/dev/null; then
|
||||||
|
curl -sf -X POST "http://127.0.0.1:8090/reload" 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "완료: http://127.0.0.1:8090/job/${JENKINS_JOB}/"
|
||||||
|
log "원격 트리거 토큰: $JENKINS_TRIGGER_TOKEN"
|
||||||
|
log "post-receive: trigger-mobile-jenkins-build.sh (git push main)"
|
||||||
Executable
+80
@@ -0,0 +1,80 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Git push(main) 후 Jenkins goldenChart-Mobile-Pipeline 트리거
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
JENKINS_URL="${JENKINS_URL:-${GC_MOBILE_JENKINS_URL:-http://127.0.0.1:8090}}"
|
||||||
|
JENKINS_JOB="${JENKINS_JOB:-${GC_MOBILE_JENKINS_JOB:-goldenChart-Mobile-Pipeline}}"
|
||||||
|
JENKINS_USER="${JENKINS_USER:-${GC_MOBILE_JENKINS_USER:-}}"
|
||||||
|
JENKINS_TOKEN="${JENKINS_TOKEN:-${GC_MOBILE_JENKINS_TOKEN:-}}"
|
||||||
|
JENKINS_TRIGGER_TOKEN="${JENKINS_TRIGGER_TOKEN:-${GC_MOBILE_JENKINS_TRIGGER_TOKEN:-goldenchart-mobile-build}}"
|
||||||
|
LOG_TAG="[trigger-mobile]"
|
||||||
|
|
||||||
|
log() { echo "$(date '+%Y-%m-%d %H:%M:%S') $LOG_TAG $*"; }
|
||||||
|
|
||||||
|
JENKINS_URL="${JENKINS_URL%/}"
|
||||||
|
JOB_API="${JENKINS_URL}/job/${JENKINS_JOB// /%20}"
|
||||||
|
|
||||||
|
curl_get() {
|
||||||
|
if [[ -n "$JENKINS_USER" && -n "$JENKINS_TOKEN" ]]; then
|
||||||
|
curl -sf -u "${JENKINS_USER}:${JENKINS_TOKEN}" "$@"
|
||||||
|
else
|
||||||
|
curl -sf "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
curl_post() {
|
||||||
|
if [[ -n "$JENKINS_USER" && -n "$JENKINS_TOKEN" ]]; then
|
||||||
|
curl -sf -X POST -u "${JENKINS_USER}:${JENKINS_TOKEN}" "$@"
|
||||||
|
else
|
||||||
|
curl -sf -X POST "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
log "Jenkins mobile build — $JENKINS_JOB @ $JENKINS_URL"
|
||||||
|
|
||||||
|
if ! curl -sf -o /dev/null "${JENKINS_URL}/login" 2>/dev/null; then
|
||||||
|
log "[ERROR] Jenkins unreachable: $JENKINS_URL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if curl_get "${JOB_API}/lastBuild/api/json?tree=building" 2>/dev/null | grep -q '"building":true'; then
|
||||||
|
log "[SKIP] 이미 빌드 진행 중"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
CRUMB_HDR=()
|
||||||
|
CRUMB_JSON="$(curl_get "${JENKINS_URL}/crumbIssuer/api/json" 2>/dev/null || true)"
|
||||||
|
if [[ -n "$CRUMB_JSON" ]]; then
|
||||||
|
FIELD="$(node -e "try{console.log(JSON.parse(process.argv[1]).crumbRequestField||'')}catch{}" "$CRUMB_JSON" 2>/dev/null || true)"
|
||||||
|
VAL="$(node -e "try{console.log(JSON.parse(process.argv[1]).crumb||'')}catch{}" "$CRUMB_JSON" 2>/dev/null || true)"
|
||||||
|
if [[ -n "$FIELD" && -n "$VAL" ]]; then
|
||||||
|
CRUMB_HDR=(-H "${FIELD}: ${VAL}")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ((${#CRUMB_HDR[@]})); then
|
||||||
|
if curl_post "${CRUMB_HDR[@]}" -H "Content-Type: application/x-www-form-urlencoded" \
|
||||||
|
"${JOB_API}/build?token=${JENKINS_TRIGGER_TOKEN}"; then
|
||||||
|
log "빌드 큐 등록 완료 (token)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if curl_post "${CRUMB_HDR[@]}" -H "Content-Type: application/x-www-form-urlencoded" "${JOB_API}/build"; then
|
||||||
|
log "빌드 큐 등록 완료"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if curl_post -H "Content-Type: application/x-www-form-urlencoded" \
|
||||||
|
"${JOB_API}/build?token=${JENKINS_TRIGGER_TOKEN}"; then
|
||||||
|
log "빌드 큐 등록 완료 (token)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if curl_post -H "Content-Type: application/x-www-form-urlencoded" "${JOB_API}/build"; then
|
||||||
|
log "빌드 큐 등록 완료"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "[ERROR] Jenkins build trigger failed"
|
||||||
|
exit 1
|
||||||
Reference in New Issue
Block a user