diff --git a/.idea/modules.xml b/.idea/modules.xml index b0a1eb4..c241992 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,8 +2,8 @@ - - + + diff --git a/README.md b/README.md index 4a680c8..0f621ef 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# nomadcode +# nomadcode-app -A new Flutter project. +nomadcode-app Flutter project. ## Getting Started diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 67a97f0..b4856ef 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -6,7 +6,7 @@ diff --git a/android/nomadcode_android.iml b/android/nomadcode_app_android.iml similarity index 100% rename from android/nomadcode_android.iml rename to android/nomadcode_app_android.iml diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 93cd453..0ad5321 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -7,7 +7,7 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Nomadcode + nomadcode-app CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -15,7 +15,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - nomadcode + nomadcode-app CFBundlePackageType APPL CFBundleShortVersionString diff --git a/lib/main.dart b/lib/main.dart index 283acbb..ded0e85 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -47,12 +47,12 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( - title: 'NomadCode', + title: 'nomadcode-app', navigatorKey: _navigatorKey, theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), ), - home: const MyHomePage(title: 'NomadCode'), + home: const MyHomePage(title: 'nomadcode-app'), builder: (context, child) { _pushService.onNavigateToChannel = (serverUrl, channelId) { print('[Nav] Navigate to channel: $channelId on $serverUrl'); @@ -113,7 +113,7 @@ class _MyHomePageState extends State { Widget build(BuildContext context) { return Scaffold( body: const Center( - child: Text('NomadCode'), + child: Text('nomadcode-app'), ), ); } diff --git a/lib/services/mattermost_auth_service.dart b/lib/services/mattermost_auth_service.dart index 19ba2f0..46ad383 100644 --- a/lib/services/mattermost_auth_service.dart +++ b/lib/services/mattermost_auth_service.dart @@ -1,4 +1,5 @@ import 'dart:convert'; +import 'package:flutter/foundation.dart' show FlutterError; import 'package:flutter/services.dart' show rootBundle; import 'package:http/http.dart' as http; import 'push_notification_service.dart'; @@ -20,6 +21,10 @@ class MattermostAuthService { /// assets/mattermost_credentials.json 로드 → 로그인 → FCM 등록까지 자동 수행. Future autoLoginAndRegister() async { final creds = await _loadCredentials(); + if (creds == null) { + print('[MattermostAuth] Credentials asset not found, skipping auto login.'); + return; + } _serverUrl = creds['serverUrl']!; print('[MattermostAuth] Logging in to $_serverUrl ...'); @@ -43,9 +48,13 @@ class MattermostAuthService { print('[MattermostAuth] Auto login & FCM registration complete.'); } - Future> _loadCredentials() async { - final jsonStr = - await rootBundle.loadString('assets/mattermost_credentials.json'); + Future?> _loadCredentials() async { + final String jsonStr; + try { + jsonStr = await rootBundle.loadString('assets/mattermost_credentials.json'); + } on FlutterError { + return null; + } final map = json.decode(jsonStr) as Map; return { 'serverUrl': map['serverUrl'] as String, diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index ea9f018..d980f5e 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -4,7 +4,7 @@ project(runner LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "nomadcode") +set(BINARY_NAME "nomadcode-app") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID set(APPLICATION_ID "com.nomadcode.nomadcode") diff --git a/linux/runner/my_application.cc b/linux/runner/my_application.cc index c2891c0..4c6fb83 100644 --- a/linux/runner/my_application.cc +++ b/linux/runner/my_application.cc @@ -45,11 +45,11 @@ static void my_application_activate(GApplication* application) { if (use_header_bar) { GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, "nomadcode"); + gtk_header_bar_set_title(header_bar, "nomadcode-app"); gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); } else { - gtk_window_set_title(window, "nomadcode"); + gtk_window_set_title(window, "nomadcode-app"); } gtk_window_set_default_size(window, 1280, 720); diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index b29ac57..8c46b9c 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -64,7 +64,7 @@ 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* nomadcode.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "nomadcode.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10ED2044A3C60003C045 /* nomadcode-app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "nomadcode-app.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; @@ -131,7 +131,7 @@ 33CC10EE2044A3C60003C045 /* Products */ = { isa = PBXGroup; children = ( - 33CC10ED2044A3C60003C045 /* nomadcode.app */, + 33CC10ED2044A3C60003C045 /* nomadcode-app.app */, 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, ); name = Products; @@ -217,7 +217,7 @@ ); name = Runner; productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* nomadcode.app */; + productReference = 33CC10ED2044A3C60003C045 /* nomadcode-app.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -388,7 +388,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.nomadcode.nomadcode.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/nomadcode.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/nomadcode"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/nomadcode-app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/nomadcode-app"; }; name = Debug; }; @@ -402,7 +402,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.nomadcode.nomadcode.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/nomadcode.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/nomadcode"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/nomadcode-app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/nomadcode-app"; }; name = Release; }; @@ -416,7 +416,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.nomadcode.nomadcode.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/nomadcode.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/nomadcode"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/nomadcode-app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/nomadcode-app"; }; name = Profile; }; diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 566d7ae..838b165 100644 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -15,7 +15,7 @@ @@ -31,7 +31,7 @@ @@ -66,7 +66,7 @@ @@ -83,7 +83,7 @@ diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig index 30f214a..ca5b29b 100644 --- a/macos/Runner/Configs/AppInfo.xcconfig +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -5,7 +5,7 @@ // 'flutter create' template. // The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = nomadcode +PRODUCT_NAME = nomadcode-app // The application's bundle identifier PRODUCT_BUNDLE_IDENTIFIER = com.nomadcode.nomadcode diff --git a/nomadcode.iml b/nomadcode_app.iml similarity index 100% rename from nomadcode.iml rename to nomadcode_app.iml diff --git a/pubspec.yaml b/pubspec.yaml index ee5a5af..ac7c1b2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,6 @@ -name: nomadcode -description: "A new Flutter project." +name: nomadcode_app +description: "nomadcode-app Flutter project." +repository: https://git.toki-labs.com/toki/nomadcode-app.git # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev @@ -67,9 +68,6 @@ flutter: # the material Icons class. uses-material-design: true - assets: - - assets/mattermost_credentials.json - # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/to/resolution-aware-images diff --git a/push-notification-todo.md b/push-notification-todo.md index ba33c61..e66e370 100644 --- a/push-notification-todo.md +++ b/push-notification-todo.md @@ -2,7 +2,7 @@ ## 배경 -mattermost-mobile(React Native) 프로젝트의 안드로이드 푸시 알림 시스템을 이 Flutter 프로젝트(nomadcode)로 마이그레이션한 작업 기록 및 잔여 TODO. +mattermost-mobile(React Native) 프로젝트의 안드로이드 푸시 알림 시스템을 이 Flutter 프로젝트(nomadcode-app)로 마이그레이션한 작업 기록 및 잔여 TODO. **패키지명:** `com.tokilabs.mattermost` (google-services.json과 일치) **원본 참조:** `/config/workspace/mattermost-mobile` diff --git a/test/widget_test.dart b/test/widget_test.dart index d3998ee..84cea8f 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -5,26 +5,14 @@ // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:nomadcode/main.dart'; +import 'package:nomadcode_app/main.dart'; void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. + testWidgets('App renders project name', (WidgetTester tester) async { await tester.pumpWidget(const MyApp()); - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); + expect(find.text('nomadcode-app'), findsOneWidget); }); } diff --git a/web/index.html b/web/index.html index c562ebf..34e35ac 100644 --- a/web/index.html +++ b/web/index.html @@ -18,18 +18,18 @@ - + - + - nomadcode + nomadcode-app diff --git a/web/manifest.json b/web/manifest.json index c76897c..2b35044 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -1,11 +1,11 @@ { - "name": "nomadcode", - "short_name": "nomadcode", + "name": "nomadcode-app", + "short_name": "nomadcode-app", "start_url": ".", "display": "standalone", "background_color": "#0175C2", "theme_color": "#0175C2", - "description": "A new Flutter project.", + "description": "nomadcode-app Flutter project.", "orientation": "portrait-primary", "prefer_related_applications": false, "icons": [ diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 7f79357..e4d035f 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -1,10 +1,10 @@ # Project-level configuration. cmake_minimum_required(VERSION 3.14) -project(nomadcode LANGUAGES CXX) +project(nomadcode_app LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "nomadcode") +set(BINARY_NAME "nomadcode-app") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc index 7eefe46..7cd84b4 100644 --- a/windows/runner/Runner.rc +++ b/windows/runner/Runner.rc @@ -90,12 +90,12 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "com.nomadcode" "\0" - VALUE "FileDescription", "nomadcode" "\0" + VALUE "FileDescription", "nomadcode-app" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "nomadcode" "\0" + VALUE "InternalName", "nomadcode-app" "\0" VALUE "LegalCopyright", "Copyright (C) 2026 com.nomadcode. All rights reserved." "\0" - VALUE "OriginalFilename", "nomadcode.exe" "\0" - VALUE "ProductName", "nomadcode" "\0" + VALUE "OriginalFilename", "nomadcode-app.exe" "\0" + VALUE "ProductName", "nomadcode-app" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" END END diff --git a/windows/runner/main.cpp b/windows/runner/main.cpp index e62d737..9f82844 100644 --- a/windows/runner/main.cpp +++ b/windows/runner/main.cpp @@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, FlutterWindow window(project); Win32Window::Point origin(10, 10); Win32Window::Size size(1280, 720); - if (!window.Create(L"nomadcode", origin, size)) { + if (!window.Create(L"nomadcode-app", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true);