728x90

https://github.com/microsoft/vscode-eslint/issues/696#issuecomment-512252381

 

ESLint fails to load plugins when using ESLint 6.x · Issue #696 · microsoft/vscode-eslint

I have the following packages installed as dev deps: { "babel-eslint": "^10.0.2", "eslint": "^6.0.1", "eslint-config-prettier": "^5.1.0",...

github.com

eslint 플러긴 호환성 문제인듯하다

 

1. cmd + shift + p 를 눌러

>user setting 를 검색

 

2. settings.json에서 아래 항목 추가

{
    "eslint.workingDirectories": [
        { "mode": "auto" }
    ],
 }
728x90

프로젝트 폴더에서 node api 로 백엔드를 실행해본다

 

import dayjs from 'dayjs';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:1001:16)

 

위와 같은 오류를 발견하면 해당 구문을 수정 후 다시 nuxt를 실행하면 된다. (혹은 package.json에 type moduel 지정 후 백엔드 소스 수정)

 

예시) 

변경 전

import dayjs from 'dayjs';
import isSameOrAfter from 'dayjs/plugin/isSameOrAfter';

dayjs.extend(isSameOrAfter);

export default dayjs;

 

변경 후

const dayjs = require('dayjs');
const isSameOrAfter = require('dayjs/plugin/isSameOrAfter');

dayjs.extend(isSameOrAfter);

module.exports = dayjs;

'Development Environment' 카테고리의 다른 글

[Windows] Node 및 Nvm 설치  (0) 2022.02.22
[VS CODE] nuxt.js 디버깅하기  (0) 2021.10.28
728x90
<script>
const TYPE = Object.freeze({
    ONE: 0, TWO: 1,THREE: 2
})
export default{
 ( ... )
}
</script>

위와 같이 const로 정의하고 Object.freeze하면 변경 불가능한 enum 상수가 된다.

 

TYPE.ONE과 같이 접근가능하고

백엔드에서는 value인 0값을 받아 처리가능하다.

728x90

Module Warning (from ./node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js):                                                                               friendly-errors 15:44:51

과 같은 워닝뜰 때

 

 

1. npm install @nuxt/postcss8. ( or yarn add )

2. nuxt.config.js → buildModules → '@nuxt/postcss8' 추가

728x90
<input v-model="inputText" @keyup.enter="input_key" type="text" placeholder="입력후 엔터를 눌러주세요">

위와 같은 input이 있을 경우 안드로이드 앱의 웹뷰에서 엔터를 감지하지 못하는 현상이 있다.

 

참고 : https://blog.naver.com/crucifyer/222749456743

 

Android Web Form - Enter Event 동작의 이상함.

평소 안드로이드를 안써서 몰랐는데, input type=text 에서 엔터를 눌렀을 경우 모든경우에 엔터로 ...

blog.naver.com

 

iOS에는 해당 문제가 없다.

textarea로 바꾸니 해결. 스타일을 input 박스와 동일하게 해주기 위해 인라인 태그도 추가해주었다.

<textarea rows="1" v-model="inputText" @keyup.enter="input_key" 
 style="min-height: 0px; resize: none; "  placeholder="입력후 엔터를 눌러주세요">
</textarea>

 

아주 오래된 글이지만 아래와 같은 포럼글도 있으니 참고

https://issuetracker.google.com/issues/36993179

 

Google Issue Tracker

 

issuetracker.google.com

 

728x90

// AppDelegate.h

UserNotifications을 import하고 인터페이스에 UNUserNotificationCenterDelegate를 추가한다

#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>
#import <Firebase.h>
#import <UserNotifications/UserNotifications.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate, UNUserNotificationCenterDelegate> 

@property (nonatomic, strong) UIWindow *window;

@end

 

// AppDelegate.mm

파이어베이스 설정 초기화 후에 delegate를 등록하는 코드 추가

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//  [FIRApp configure];
  
  // Add me --- \/
    if ([FIRApp defaultApp] == nil) {
      [FIRApp configure];
    }
    // Add me --- /\
    
    (...)
    [self initializeRemoteNotification];

	(...)
    
 }
#pragma mark - Initialize Remote Notification
- (void)initializeRemoteNotification {
    
        UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
        center.delegate = self;
        
    
}

그리고 마찬가지로 AppDelegate.mm에 아래 소스를 추가한다.

 

// Receive displayed notifications for iOS 10 devices.
// Handle incoming notification messages while app is in the foreground.
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
       willPresentNotification:(UNNotification *)notification
         withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler {
  NSDictionary *userInfo = notification.request.content.userInfo;

  // With swizzling disabled you must let Messaging know about the message, for Analytics
  // [[FIRMessaging messaging] appDidReceiveMessage:userInfo];

  // ...

  // Print full message.
  NSLog(@"%@", userInfo); 
  

  // Change this to your preferred presentation option
  completionHandler(UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionSound);
}

// Handle notification messages after display notification is tapped by the user.
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
didReceiveNotificationResponse:(UNNotificationResponse *)response
         withCompletionHandler:(void(^)(void))completionHandler {
  NSDictionary *userInfo = response.notification.request.content.userInfo;
  if (userInfo) {
    NSLog(@"Message ID: %@", userInfo);
  }

  // With swizzling disabled you must let Messaging know about the message, for Analytics
  // [[FIRMessaging messaging] appDidReceiveMessage:userInfo];

  // Print full message.
  NSLog(@"%@", userInfo);

  completionHandler();
}

핸들러 param에는 원하는 프레젠테이션 옵션을 넣어주면 된다 (배너,배지,사운드)

  completionHandler(UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionSound);

 

 

위와같이 코드를 추가해주면 알람을 받았을 때 앱 실행상태에서도 푸시가 표시되는 걸 확인할 수 있다.

728x90

 sudo vi /etc/httpd/conf.d/vhost.conf 

 

<VirtualHost *:80>
        ServerName test.site.net
        ProxyRequests Off
        ProxyPreserveHost On
        ProxyPass / http://localhost:8012/
        ProxyPassReverse / http://localhost:8012/
        RewriteEngine On
        RewriteCond %{REQUEST_METHOD} ^OPTIONS
        RewriteRule .* - [F]
</VirtualHost>

 

E2C Route53 설정

  1. Route 53 > Hosted zones 에서 domain.net 선택
  2. Create reacord에서 Routing policy 종류를 심플 라우팅으로 선택
  3. Configure records - Define simple record 선택
728x90

업데이트 심사는 어려운 부분은 없었는데 새 버전 추가를 어디서하는지 헤맸는데 그냥 저 + 버튼을 누르면 되는 거였다...

앱스토어 커넥트 - 나의 앱에서 + 눌러서 새버전 생성

 

xcode 프로젝트의 빌드버전에 맞춰 생성 후 

이 버전에서 업그레이드된 사항을 적고 새 빌드를 제출하면 된다.

 

빌드버전은 해당 프로젝트의 TARGETS - General - Identity에서 확인할 수 있다. (업데이트 시 반드시 Version외에도 Build 숫자를 올려야한다. 일반적으로 1씩 증가)

빌드 제출은 아카이브 후에 Window - Organizer에서 해당 아카이브 선택 해 Distribute App을 선택 해 전행하면 된다.

728x90

This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your mac and device in order to correctly detect compatibility.

 

xcode에서 빌드는 성공했는데 이런 오류가 뜨면서 앱 실행이 안된다면 확인해볼게 3가지

 

1. xcode 버전 확인

2. iOS 버전 확인

3. 버전의 문제가 아니라면 폰 재시작

728x90

https://github.com/react-native-webview/react-native-webview/blob/master/docs/Debugging.md

 

GitHub - react-native-webview/react-native-webview: React Native Cross-Platform WebView

React Native Cross-Platform WebView. Contribute to react-native-webview/react-native-webview development by creating an account on GitHub.

github.com

위 사이트 참고

 

 

// MainApplication.java 에 디버깅 허용 소스 추가

import android.webkit.WebView;

  @Override
  public void onCreate() {
    super.onCreate();
	  ...
    WebView.setWebContentsDebuggingEnabled(true);
  }

크롬에서 아래 주소로 열기

chrome://inspect/#devices

 

앱을 실행 중인 기기명 확인 후 inspect 클릭

 

+ Recent posts