728x90

이 방법으로 꼭 해결된다기보다 해볼 수 있는 것들

 

1. Podfile이 잘못되었는지 확인

: 잘못된 프로젝트 타겟 네임 수정하거나 주석처리

#target 'react_app-tvOS' do
  # Pods for react_app-tvOS

#  target 'react_app-tvOSTests' do
#    inherit! :search_paths
 
  ### Pods for testing
  
  #end

2. 리액트 네이티브 CLI 전역 제거

npm uninstall -g react-native-cli

 

3. 특정 환경변수 제거

 unset NODE_EXTRA_CA_CERTS

 

4. cocopods 파일 제거

rm -rf ~/.cocoapods/repos/trunk/\n

 

5. m1 mac에서 pod install하면 ffi 에러날 시

(...) tried: '/opt/homebrew/lib/ruby/gems/3.1.0/gems/ffi-1.15.5/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')) - /opt/homebrew/lib/ruby/gems/3.1.0/gems/ffi-1.15.5/lib/ffi_c.bundle (LoadError)

( ... )

 

- 기존 패키지 제거하고 재설치

brew uninstall --ignore-dependencies ruby
sudo gem uninstall cocoapods
sudo gem uninstall cocoapods-core
sudo gem uninstall cocoapods-downloader

6. 저장소 업데이트하고 다시 install

pod repo update

pod install

 

 

7. Podfile

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false

target 'reactApp' do
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'reactAppTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end

8. requireNativeComponent: "RNCWebView" was not found in the UIManager 에러 날 시

-> 리액티 네이티브, 웹뷰 패키지 설치 확인 후 npm i

 "react": "18.0.0",
    "react-native": "0.69.0",
    "react-native-webview": "11.22.3"

-> pod install 명령어를 vs code 터미널이 아닌 iTerm을 사용해 입력

 

9. target error 시

[!] CocoaPods could not find compatible versions for pod "React-RCTSettings":
  In Podfile:
    React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)

Specs satisfying the `React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)` dependency were found, but they required a higher minimum deployment target.

위와 같은 오류가 나면 Podfile의 타겟을 올린다.

platform :ios, '12.4'

 

이런저런 과정들을 수행했는데도 제대로 pod install 이나 빌드, 앱 실행이 잘 안된다면 package, package-lock.json 의존성을 잘 살펴보자. 필요한 의존성 패키지가 설치되지 않아서일 가능성이 있다.

(...)
 "node_modules/@react-navigation/stack": {
      "version": "6.2.1",
      "resolved": "https://registry.npmjs.org/@react-navigation/stack/-/stack-6.2.1.tgz",
      "integrity": "sha512-JI7boxtPAMCBXi4VJHVEq61jLVHFW5f3npvbndS+XfOsv7Gf0f91HOVJ28DS5c2Fn4+CO4AByjUozzlN296X+A==",
      "dependencies": {
        "@react-navigation/elements": "^1.3.3",
        "color": "^3.1.3",
        "warn-once": "^0.1.0"
      },
      "peerDependencies": {
        "@react-navigation/native": "^6.0.0",
        "react": "*",
        "react-native": "*",
        "react-native-gesture-handler": ">= 1.0.0",
        "react-native-safe-area-context": ">= 3.0.0",
        "react-native-screens": ">= 3.0.0"
      }
(...)

 

728x90

| SSH 접속

ssh root@asdf@cafe24.com

경로이동 : cd /var/www

 

| GIT 연동

git 설치

yum install git

 

ssh 접속 키 생성

ssh-keygen -t rsa -b 4096 -C "test@gmail.com'

 

공개 키 경로 확인하고 열어서 안의 내용을 복사 -> github에 ssh키 입력 ( https://github.com/settings/keys )

권한 문제 발생 시 chmod 400 [공개키파일이름]

 

깃 ssh host 등록

vi ~/.ssh/config

Host github.com
  IdentityFile  /root/.ssh/id_rsa
  User git

git clone [ssh저장소 주소]

 

 

| 노드 및 NPM 설치

저장소 확인

yum repolist

 

epel 저장소가 없으면 설치

yum install epel-release

 

특정 노드버전 설치 스크립트 실행

yum install -y gcc-c++ make

 

 curl -fsSL https://rpm.nodesource.com/setup_16.x | bash -

 

node.js 설치

yum -y install nodejs

 

npm install 시 오류나는 경우 아래항목들 설치

 

python3 설치

yum -y install python3

 

curl 최신 설치

vi /etc/yum.repos.d/city-fan.repo

 

[CityFan]
name=City Fan Repo
baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel$releasever/$basearch/
enabled=1
gpgcheck=0

yum install curl 

 

 

node에서 jar연동하고 있다면..

 

자바 설치

readlink /etc/alternatives/javac

jdk경로 확인

 

vi /etc/profile

JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64
JAVA_PATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64/bin
export JAVA_HOME JAVA_PATH

혹시나 환경변수 편집하다가 ls같은 기본명령어도 안 먹는다면 아래 항목으로 인식시키고 프로필파일 수정 후에 다시 source하면 된다

export PATH=%PATH:/bin:/usr/local/bin:/usr/bin

 

gcc버전이 낮아도 npm install이 안될 수 있으므로 아래 항목들 설치

sudo yum install centos-release-scl
sudo yum install devtoolset-7
scl enable devtoolset-7 bash

| 프로젝트 관리 (PM2)

pm2 설치하여 pm2 start

 

| SSL 인증서 발급

무료 인증서인 certbot 사용

스탠드얼론 방식으로 nginx 사용

 

nginx 설정파일 수정

vi /etc/nginx/conf.d/default.conf 

server {
        client_max_body_size 50M;

        listen 80;
        server_name domain.co.kr domain.kr;
        return 301 https://$host$request_uri;
}

server {
        client_max_body_size 50M;

        listen 443 ssl;
        server_name domain.co.kr domain.kr;

        #root  /var/www/project/dist;
        #index index.html;

        #ssl on;
        ssl_certificate /etc/letsencrypt/live/www.domain.co.kr/fullchain.pem;
        ssl_certificate_key     /etc/letsencrypt/live/www.domain.co.kr/privkey.pem;
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

        set $service_url http://127.0.0.1:3000;

        location / {
                proxy_pass http://localhost:3000;
        }
}

| mysql 설치

5.7 설치 실패 시 아래 항목 수정 (gpgcheck=0)

vi /etc/yum.repos.d/mysql-community.repo

[mysql57-community]

name=MySQL 5.7 Community Server

baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

728x90
$object = new User; // new 키워드로 User 객체를 생성한다.

class User{ // User 클래스 선언

public $id = "test", $email, $name, $birthday; //public으로 변수 선언

function printUser(){ // User 클래스에 printUser 메소드 선언
print_r($this); // User 클래스 Print
}
}

// 객체 내 속성 접근 시에는 -> 사용하며 속성명 앞엔 $ 붙이지 않는다.
if ($object -> id === 'test' ) {
echo $object -> id;
//console.log(json_encode($object));
} else {
echo 'tt';
}

객체 배열 접근

if ($obj['id'] === 'testid') {
	( ...)
}

JSON 객체 변환

<!DOCTYPE html>
<html>
<body>

<?php

$postData = '{"eventType":"PAYMENT_STATUS_CHANGED","data":{"paymentKey":"kWzn16mywdYPBal2vxj81gvOa0ORAV5RQgOAND7pJe9KE0qL","status":"DONE","orderId":"CDD-7A7VCXTN"}}';
$json = (array)json_decode($postData);
echo $json['data']->orderId;

//echo substr("Hello world",6);
?>

</body>
</html>

 

php에서 콘솔 로그 찍기

function debug_to_console($data) {
    $output = $data;
    if (is_array($output))
        $output = implode(',', $output);

    echo "<script>console.log('Debug Objects: " . json_encode($output) . "' );</script>";
}

usage : 

debug_to_console($object->id);
728x90
             if #available(iOS 13.0, *) {
                            /**
                             In iOS 13 and above WKWebViews in iPad has the ability to render desktop versions of web pages.
                             One of the properties they change to support this is the User-Agent.
                             Therefore forcing the WKWebView to load the mobile version.
                             */
                            let pref = WKWebpagePreferences.init()
                            pref.preferredContentMode = .mobile
                            config.defaultWebpagePreferences = pref
                        }

위와 같이 iOS13에서는 WKWebpagePreferences의 속성에 preferredContentMode를 설정할 수 있다. 

https://developer.apple.com/documentation/webkit/wkwebpagepreferences/3194426-preferredcontentmode?language=objc 

 

Apple Developer Documentation

 

developer.apple.com

preferredContentMode는 enum상수로 3가지 옵션이 정의되어있다 (2022.4.6 기준)

extension WKWebpagePreferences {

    
    /** @enum WKContentMode
     @abstract A content mode represents the type of content to load, as well as
     additional layout and rendering adaptations that are applied as a result of
     loading the content
     @constant WKContentModeRecommended  The recommended content mode for the current platform
     @constant WKContentModeMobile       Represents content targeting mobile browsers
     @constant WKContentModeDesktop      Represents content targeting desktop browsers
     @discussion WKContentModeRecommended behaves like WKContentModeMobile on iPhone and iPad mini
     and WKContentModeDesktop on other iPad models as well as Mac.
     */
    @available(iOS 13.0, *)
    public enum ContentMode : Int, @unchecked Sendable {

        
        case recommended = 0

        case mobile = 1

        case desktop = 2
    }
}

 

웹뷰 초기화시 정의한 config를 넘기면 된다.

WKWebView(frame: rect, configuration: config)

 

 

참고

https://developer.apple.com/forums/thread/674232

 

How to force WKWebView to show mob… | Apple Developer Forums

Assuming the website you are loading uses User-Agent to change content/layout/presentation the following will work. let config = WKWebViewConfiguration() if #available(iOS 13.0, *) { /** In iOS 13 and above WKWebViews in iPad has the ability to render desk

developer.apple.com

 

728x90

서드파티앱에서 내 앱으로 이동할 수 있게 하려면 (예: 결제취소,완료 시의 리다이렉트) 앱 스키마를 등록해줘야한다.

info.plist 의 URL types에 Add Row하여 URL types와 그 하위 항목들 추가

 

value에는 URL identifier에 패키지 이름 작성, URL Schemes의 아이템에는 (0부터 시작) 식별할 수 있는 앱 스키마 이름을 작성한다.

이후 새로 빌드

 

728x90

앱 내의 기본 텍스트가 영어로 나온다면 

info.plist 의 Localization native development region의 Value를 ko로 수정 후 새로 빌드

728x90

Xcode에서 Info.plist 에 Row 추가

 

아래와 같이 key 선택 후 value는 자유롭게 추가 후 새로 빌드

728x90

 

1. Oracle VM Virtual Box 포트포워딩 설정

1) 설정 - 네트워크 - 포트포워딩

2) 포트포워딩 규칙 설정

IP는 비워두면 호스트의 IP를 그대로 쓴다. (ipconfig하여 본인 컴퓨터 ip확인)

게스트 IP는 말그대로 가상 머신의 IP이며 포트는 SSH의 기본포트인 22

 

리눅스 가상머신에서 ssh 서비스 상태와 포트는 아래 명령어로 확인가능

 

 service sshd status

 

 

ssh클라이언트가 설치되어있다면  2의 과정 생략 

 

2. ssh 클라이언트 설치

1) 윈도우키 누르고 "앱 및 기능" 검색하여 엔터

2) 선택적 기능 클릭

3) 기능추가 클릭

4) 선택적 기능 추가 아래의 검색상자에 ssh 입력

 

5) ssh 클라이언트 선택하면 설치가 진행됩니다.

 

3. ssh 접속

cmd창 열어 아래 명령어 입력

ssh 계정명@[호스트ip]:[호스트 포트]

ssh root@192.168.7.16:2222

호스트 최초 접속 시 RSA 인증관련해서 접속을 계속할건지 물어보는데 yes를 입력 하고

password 입력하면 접속이 된다.

728x90

1. Windows - Preferences

 

2. html files로 키워드 검색하여 Encoding 드랍다운박스에서 UTF-8 선택하여 Apply

(JSP는 jsp files로 검색)

3. 새 파일 생성하면 아래와 같이 기본 캐릭터셋이 UTF-8로 바뀐 걸 볼 수 있습니다.

(jsp 파일도 동일방법으로 설정가능)

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
(...)
728x90

UDK 3 자습서

https://docs.unrealengine.com/udk/Three/WebHomeKR.html

폰트 만들고 임포트하기

https://docs.unrealengine.com/udk/Three/ImportingFontsKR.html

Previous platform downloads
UDKInstall-2009-11-BETA.exe
UDKInstall-2009-11-BETA-2.exe
UDKInstall-2009-12-BETA.exe
UDKInstall-2010-01-BETA.exe
UDKInstall-2010-02-BETA.exe
UDKInstall-2010-03-BETA.exe
UDKInstall-2010-05-BETA.exe
UDKInstall-2010-06-BETA.exe
UDKInstall-2010-07-BETA.exe
UDKInstall-2010-08-BETA.exe
UDKInstall-2010-09.exe
UDKInstall-2010-10-BETA.exe
UDKInstall-2010-11-BETA.exe
UDKInstall-2010-12-BETA.exe
UDKInstall-2011-01-BETA.exe
UDKInstall-2011-02-BETA.exe
UDKInstall-2011-03-BETA.exe
UDKInstall-2011-03-BETA2.exe
UDKInstall-2011-04-BETA.exe
UDKInstall-2011-05-BETA.exe
UDKInstall-2011-06-BETA.exe
UDKInstall-2011-07-BETA.exe
UDKInstall-2011-08-BETA.exe
UDKInstall-2011-09-BETA.exe
UDKInstall-2011-10-BETA.exe
UDKInstall-2011-11-BETA.exe
UDKInstall-2011-12-BETA.exe
UDKInstall-2012-01-BETA.exe
UDKInstall-2012-02-BETA.exe
UDKInstall-2012-03-BETA.exe
UDKInstall-2012-05-BETA.exe
UDKInstall-2012-07-BETA2.exe
UDKInstall-2012-11-BETA.exe
UDKInstall-2012-11-BETA2.exe
UDKInstall-2013-02-BETA.exe
UDKInstall-2013-02-BETA2.exe
UDKInstall-2013-05.exe
UDKInstall-2013-07.exe
UDKInstall-2014-02.exe
UDKInstall-2014-05.exe
UDKInstall-2014-08.exe
UDKInstall-2015-02.exe

 

2015-02

미러#1

https://www.moddb.com/engines/unreal-development-kit/downloads/february-2015-unreal-development-kit-udk

미러#2

https://drive.google.com/uc?id=0Bylc7BJ0M9nCYkQxZU13VjFCRzQ&export=download

 

 

 

+ Recent posts