블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2738)
Unity3D (817)
Programming (475)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
05-05 05:15

[링크] https://dev.classmethod.jp/articles/xcode-no-signing-certificate-ios-development-found-error/

 

[Xcode] アプリをArchiveしようとして「No signing certificate “iOS Development” found」エラーになった場合

App Storeに申請するためにアプリをArchiveしようとしたら 「No signing certificate "iOS Development" found」 という署名証明書のエラーが出てしまいました。 本記事ではこのエラーが起きた場合の解決方

dev.classmethod.jp

 

반응형
Posted by blueasa
, |
ld: '/Users/tomykim/Documents/FacebookSDK/FacebookSDKs-iOS-4.28.0/FBSDKLoginKit.framework/FBSDKLoginKit(FBSDKLoginButton.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

 

위와같은 오류메세지가 뜬다면

 

Build Settings 에서 Enable Bitcode를 "No"로 바꿔주세요.



출처: https://tom7930.tistory.com/50 [Dr.kim의 나를 위한 블로그]

 

IOS SWIFT bitcode 오류 해결 (does not contain bitcode)

ld: '/Users/tomykim/Documents/FacebookSDK/FacebookSDKs-iOS-4.28.0/FBSDKLoginKit.framework/FBSDKLoginKit(FBSDKLoginButton.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode..

tom7930.tistory.com

 

 

[참조] gigas-blog.tistory.com/236

 

[Xcode] ENABLE_BITCODE

# Xcode11 Version 11.6 (11E708) 을 사용하고 있습니다. 은행권 보안 솔루션을 적용중에 아래와 같은 오류가 발생하였습니다. ld: '/Users/gigas/Documents/...)' does not contain bitcode. You must rebuild it..

gigas-blog.tistory.com

 

반응형
Posted by blueasa
, |

Xcode의 계정 변경 등의 상황에서 Provisioning Profiles을 삭제하여 깔끔하게 정리해야 할 경우가 아주 가끔 있습니다.

다음 경로에서 Provisioning Profiles을 삭제할 수 있습니다.

 

~/Library/MobileDevice/Provisioning Profiles

 

[출처] minsone.github.io/mac/ios/delete-provisioning-profiles

 

[Xcode]Provisioning Profiles 삭제하기

Xcode의 계정 변경 등의 상황에서 Provisioning Profiles을 삭제하여 깔끔하게 정리해야 할 경우가 아주 가끔 있습니다. 다음 경로에서 Provisioning Profiles을 삭제할 수 있습니다. ~/Library/MobileDevice/Provisionin

minsone.github.io

 

반응형
Posted by blueasa
, |

[정리]

1. 아이폰 완전 종료 후, 재실행

1.1. Unpair Device 권장(Xcode - Window > Devices and Simulators > 해당 디바이스에서 우클릭 > Unpari Device)

2. 아이폰 케이블 연결해서 '신뢰' 체크

3. Xcode 다시 켜서 Devices and Simulators에 들어가서 에러 없는지 확인

4. 없으면 OK

 


Follow this: https://developer.apple.com/forums/thread/650077

Also make sure to shut down your iPhone, start it back up. 
Then I would also suggest unpairing the device from Xcode (Window > Devices Simulator....). 
And then Clean build folder, and quit and restart xcode again!

 

 

[출처] www.reddit.com/r/swift/comments/jtbcqa/iphone_not_available_please_reconnect_the_device/

 

iPhone Not Available. Please reconnect the device / Xcode 12.2 iOS 14.2

When I try to run my Xcode with my iPhone X I get this: iPhone Not Available. Please reconnect the device I've looked through and tried the...

www.reddit.com

 

반응형
Posted by blueasa
, |

Error: 

Finally solved the problem. Need to update CocoPods.sudo gem install cocoapods

 

sudo gem install cocoapods

 

 

[출처]

stackoverflow.com/questions/64623288/framework-not-found-usermessagingplatform-xcframework-in-react-native

 

framework not found UserMessagingPlatform.xcframework in react native

I update my react native project after I encountered an error in xcode there is no problem in android Error: My new package.json "@react-native-firebase/admob": "^7.6.10", "@

stackoverflow.com

 

반응형
Posted by blueasa
, |

Unity Script에서 UIApplicationExitsOnSuspend Key 제거(with PostProcessBuild)

----

 

using UnityEditor;
using UnityEditor.Callbacks;
#if UNITY_IOS
using System.IO;
using UnityEditor.iOS.Xcode;
#endif
 
public class BuildProcessor
{
   [PostProcessBuild(1)]
   public static void OnPostprocessBuild(BuildTarget buildTarget, string pathToBuiltProject)
   {
#if UNITY_IOS
      // Get plist
      string plistPath = pathToBuiltProject + "/Info.plist";
      PlistDocument plist = new PlistDocument();
      plist.ReadFromString(File.ReadAllText(plistPath));
 
      // Get root
      PlistElementDict rootDict = plist.root;
 
      // Set encryption usage boolean
      string encryptKey = "ITSAppUsesNonExemptEncryption";
        rootDict.SetBoolean(encryptKey, false);
 
      // remove exit on suspend if it exists.
      string exitsOnSuspendKey = "UIApplicationExitsOnSuspend";
      if(rootDict.values.ContainsKey(exitsOnSuspendKey))
      {
         rootDict.values.Remove(exitsOnSuspendKey);
      }
 
      // Write to file
      File.WriteAllText(plistPath, plist.WriteToString());
#endif
   }
}

 

[출처] https://forum.unity.com/threads/the-info-plist-contains-a-key-uiapplicationexitsonsuspend.689200/

 

The Info.plist contains a key 'UIApplicationExitsOnSuspend

I have this error after updated my inapp module. Using unity 2018.3.13f1 ITMS-90339: Deprecated Info.plist Key - The Info.plist contains a key...

forum.unity.com

 

 

[참조] https://blog.naver.com/yoohee2018/221566174487

 

[Unity] Deprecated Info.plist Key - The Info.plist contains a key 'UIApplicationExitsOnSuspend'

Unity 2019.1.4.1f​[19.06.19 기준 에러발생]유니티 iOS 빌드하여 Xcode에서 Archive 제출 시 다음과...

blog.naver.com

 

반응형
Posted by blueasa
, |

[사용도구]

Unity 5.6.7

Xcode 10.2.1

 

최근 iOS빌드에서 XCode-Capabilities-Push Notifications를 수동으로 ON 시켜야 되는 문제가 귀찮아서 자동으로 하는 방법을 찾아보고 정리해둠.

(유니티 5.x에서 되는 방법을 찾느라 이래저래 삽질을..)

 

[순서]

1) https://bitbucket.org/Unity-Technologies/xcodeapi 소스 다운로드.

 

2) 다운로드 받은 소스를 유니티 해당 프로젝트의 Editor 폴더 아래 추가

   나의 경우는 ../Assets/Editor/XCodeApi 아래에 추가. 

   2-1) Xcode.Tests는 에러나서 제거 함.(2017 이후 버전 API를 사용하는 듯 함)

 

3) iOS PostProcessBuild 소스에 PBXCapabilityType.PushNotifications 추가(AddCapability)

using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.iOS.Xcode;
using UnityEditor.Callbacks;
using System.Collections;

public class XCodeSettingsPostProcesser
{

    [PostProcessBuild]
    public static void OnPostprocessBuild(BuildTarget buildTarget, string pathToBuiltProject)
    {
        // Stop processing if targe is NOT iOS
        if (buildTarget != BuildTarget.iOS)
        {
            return;
        }

            /// Initialize PbxProject
            var projectPath = PBXProject.GetPBXProjectPath(pathToBuiltProject);
            PBXProject pbxProject = new PBXProject();
            pbxProject.ReadFromFile(projectPath);
            // Unity 2019 대응
#if UNITY_2019_3_OR_NEWER
            //string targetGuid = pbxProject.GetUnityFrameworkTargetGuid();
            string strMainTargetGuid = pbxProject.GetUnityMainTargetGuid();
            string strFrameworkTargetGuid = pbxProject.GetUnityFrameworkTargetGuid();
#else
            string targetGuid = pbxProject.TargetGuidByName("Unity-iPhone");
#endif

        // Add push notifications as a capability on the target
        pbxProject.AddCapability(targetGuid, UnityEditor.iOS.Xcode.Custom.PBXCapabilityType.PushNotifications);

        // Apply settings
        File.WriteAllText(projectPath, pbxProject.WriteToString());
    }
}

    3-1) 주의사항

         기존 PBXProjectUnityEditor.iOS.Xcode.PBXProject인데, 추가 된 플러그인을 사용하기 위해 UnityEditor.iOS.Xcode.Custom.PBXProject로 변경필요.

         예1) UnityEditor.iOS.Xcode.PBXProject -> UnityEditor.iOS.Xcode.Custom.PBXProject

         예2) UnityEditor.iOS.Xcode.PBXCapabilityType -> UnityEditor.iOS.Xcode.Custom.PBXCapabilityType

 

4) entitlements 생성을 위해 아래 클래스를 Editor 폴더에 추가

    (entitlements 파일 내용을 스크립트 내부에 넣어서 생성해서 별도의 파일 추가를 안해도 돼서 편한 듯)

using UnityEditor;
 using UnityEditor.Callbacks;
 using UnityEngine;
 using System.IO;
 using UnityEditor.iOS.Xcode;
 
 public class EntitlementsPostProcess
 {
     private const string entitlements = @"
     <?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>aps-environment</key>
             <string>development</string>
         </dict>
     </plist>";
     
     [PostProcessBuild]
     public static void OnPostProcess(BuildTarget buildTarget, string buildPath)
     {
         if (buildTarget != BuildTarget.iOS) return;
 
         var file_name = "unity.entitlements";
         var proj_path = PBXProject.GetPBXProjectPath(buildPath);
         var proj = new PBXProject();
         proj.ReadFromFile(proj_path);
 
         // target_name = "Unity-iPhone"
         var target_name = PBXProject.GetUnityTargetName();
         var target_guid = proj.TargetGuidByName(target_name);        
         var dst = buildPath + "/" + target_name + "/" + file_name;
         try
         {
             File.WriteAllText(dst, entitlements);
             proj.AddFile(target_name + "/" + file_name, file_name);
             proj.AddBuildProperty(target_guid, "CODE_SIGN_ENTITLEMENTS", target_name + "/" + file_name);
             proj.WriteToFile(proj_path);
         }
         catch (IOException e)
         {
             Debug.LogWarning($"Could not copy entitlements. Probably already exists. ({e})");
         }
     }
 }

 

[1) 참조] https://bitbucket.org/Unity-Technologies/xcodeapi

 

Bitbucket

 

bitbucket.org

[3) 참조] https://qiita.com/fullcorder/items/b82c48022acd0b4ff957

 

Unity5のPostProcessBuildでXcode Capabilityの設定する方法 - Qiita

XcodeのCapabilityの各種設定を`PostProcessBuild`で行う方法です。 Pushの設定などを有効にするアレです。 # ざっくり流れ ### In-App Purchaseなどentitlementsフ...

qiita.com

[4) 참조] https://answers.unity.com/questions/1224123/enable-push-notification-in-xcode-project-by-defau.html

 

Enable Push Notification in XCode project by default? - Unity Answers

 

answers.unity.com

 

반응형
Posted by blueasa
, |

Unity에서 Xcode 출력 후 필요한 설정을 자동화하는 방법입니다. 
이번에는 잘 사용할 것 같은 것을 샘플 형식으로 정리했습니다.

■ 이용하는 기능 
Unity5에서 표준 이용할 수있게되었다 XcodeAPI을 이용 
Unity - Scripting API : PBXProject

■ 자동화 항목 
빌드 설정 편집 
프레임 워크의 추가 
컴파일 플래그의 설정 
· Info.plist 추가

■ 전 준비 
PostProcessBuildAttribute를 이용하여 빌드 후 메소드를 호출

using System.IO;
 using UnityEngine;
 using UnityEditor;
 using UnityEditor.iOS.Xcode;
 using UnityEditor.Callbacks;
 using System.Collections;

public  class XcodeSettingsPostProcesser
{
    [PostProcessBuildAttribute ( 0 )]
     public  static  void OnPostprocessBuild (BuildTarget buildTarget, string pathToBuiltProject)
    {
        // iOS 이외 플랫폼은 처리를하지 
        if (buildTarget! = BuildTarget.iOS) return ;

        // PBXProject 초기화 
        var projectPath = pathToBuiltProject + "/Unity-iPhone.xcodeproj/project.pbxproj" ;
        PBXProject pbxProject = new PBXProject ();
        pbxProject.ReadFromFile (projectPath);
        string targetGuid = pbxProject.TargetGuidByName ( "Unity-iPhone" );
        
        // 여기에 자동화 처리 기술

        // 설정을 반영
        File.WriteAllText (projectPath, pbxProject.WriteToString ());
    }
}

■ 빌드 설정 편집

// 빌드 설정 추가 
pbxProject.AddBuildProperty (targetGuid, "OTHER_LDFLAGS" , "-all_load" );

// 빌드 설정 추가 
pbxProject.SetBuildProperty (targetGuid, "ENABLE_BITCODE" , "NO" );

// 빌드 설정 편집, 제 3 인수는 추가 설정 제 4 인수는 삭제 설정 
pbxProject.UpdateBuildProperty (targetGuid, "OTHER_LDFLAGS" , new  string [] { "-ObjC" }, new  string [] { "- weak_framework " });

■ 프레임 워크 추가

// 필수 프레임 워크의 추가 
pbxProject.AddFrameworkToProject (targetGuid, "Security.framework" , false );

// 옵션 프레임 워크의 추가 
pbxProject.AddFrameworkToProject (targetGuid, "SafariServices.framework" , true );

■ 컴파일 플래그 설정

// Keyboard.mm에 -fno-objc-arc를 설정 
var guid = pbxProject.FindFileGuidByProjectPath ( "Classes / UI / Keyboard.mm" );
var flags = pbxProject.GetCompileFlagsForFile (targetGuid, guid);
flags.Add ( "-fno-objc-arc" );
pbxProject.SetCompileFlagsForFile (targetGuid, guid, flags);

■ Info.plist 추가

// Plist 설정을위한 초기화 

var plistPath = Path.Combine (pathToBuiltProject, "Info.plist" );

var plist = new PlistDocument ();

plist.ReadFromFile (plistPath);



// 문자열의 설정 

plist.root.SetString ( "hogehogeId" , "dummyid" );



// URL 스키마 추가 var array = plist.root.CreateArray ( "CFBundleURLTypes");

var urlDict = array.AddDict ();

urlDict.SetString ( "CFBundleURLName" , "hogehogeName" );

var urlInnerArray = urlDict.CreateArray ( "CFBundleURLSchemes" );

urlInnerArray.AddString ( "hogehogeValue" );



// 설정을 반영

plist.WriteToFile (plistPath);

■ 정리 
Unity5되어 설정이 상당히 쉬워졌습니다

■ 코드 전체

using System.IO ;
using UnityEngine ;
using UnityEditor ;
using UnityEditor.iOS.Xcode ;
using UnityEditor.Callbacks ;
using System.Collections ;
public class XcodeSettingsPostProcesser
{
[PostProcessBuildAttribute ( 0 )
public static void OnPostprocessBuild ( BuildTarget buildTarget , string pathToBuiltProject )
{
// Stop processing if targe is NOT iOS
if (buildTarget! = BuildTarget.iOS)
return ;
// Initialize PbxProject
var projectPath = pathToBuiltProject + " /Unity-iPhone.xcodeproj/project.pbxproj " ;
PBXProject pbxProject = new PBXProject ();
pbxProject.ReadFromFile (projectPath);
string targetGuid = pbxProject.TargetGuidByName ( " Unity-iPhone " );
// Sample of adding build property
pbxProject.AddBuildProperty (targetGuid, " OTHER_LDFLAGS " , " -all_load " );
// Sample of setting build property
pbxProject.SetBuildProperty (targetGuid, " ENABLE_BITCODE " , " NO " );
// Sample of update build property
pbxProject.UpdateBuildProperty (targetGuid, " OTHER_LDFLAGS " , new string [] { " -ObjC " }, new string [] { " -weak_framework " });
// Sample of adding REQUIRED framwrok
pbxProject.AddFrameworkToProject (targetGuid, " Security.framework " , false );
// Sample of adding OPTIONAL framework
pbxProject.AddFrameworkToProject (targetGuid, " SafariServices.framework " , true );
// Sample of setting compile flags
var guid = pbxProject.FindFileGuidByProjectPath ( " Classes / UI / Keyboard.mm " );
var flags = pbxProject.GetCompileFlagsForFile (targetGuid, guid);
flags.Add ( " -fno-objc-arc " );
pbxProject.SetCompileFlagsForFile (targetGuid, guid, flags);
// Apply settings
File.WriteAllText (projectPath, pbxProject.WriteToString ());
// Samlpe of editing Info.plist
var plistPath = Path.Combine (pathToBuiltProject, " Info.plist " );
var plist = new PlistDocument ();
plist.ReadFromFile (plistPath);
// Add string setting
plist.root.SetString ( " hogehogeId " , " dummyid " );
// Add URL Scheme
var array = plist.root.CreateArray ( " CFBundleURLTypes " );
var urlDict = array.AddDict ();
urlDict.SetString ( " CFBundleURLName " , " hogehogeName " );
var urlInnerArray = urlDict.CreateArray ( " CFBundleURLSchemes " );
urlInnerArray.AddString ( " hogehogeValue " );

// Localizations [added blueasa / 2018-03-28] // need Language Code(ref:https://ko.wikipedia.org/wiki/ISO_639) var arrayLocalizations = plist.root.CreateArray("CFBundleLocalizations"); arrayLocalizations.AddString("en"); // 영어 arrayLocalizations.AddString("ko"); // 한국어

//arrayLocalizations.AddString("zh"); // 중국어

arrayLocalizations.AddString("zh_CN"); // 중국어(간체) : 중국 arrayLocalizations.AddString("zh_TW"); // 중국어(번체) : 대만 arrayLocalizations.AddString("ja"); // 일본어 arrayLocalizations.AddString("de"); // 독일어

// Apply editing settings to Info.plist
plist.WriteToFile (plistPath);
}
}

gist.github.com



[출처] http://smartgames.hatenablog.com/entry/2016/06/19/164052

반응형
Posted by blueasa
, |

XCode 최신 버전으로 업데이트 하고나서 빌드 하려니 GA 관련 Link 에러가 나서 찾아봤더니 아래 프레임워크가 필요하다고 한다.


리스트를 살펴보니 CoreData.framework가 빠져 있어서 수동 추가 후 정상 빌드 확인..




The Google Analytics SDK uses the CoreData and SystemConfiguration frameworks, so you will need to add the following to your application target's linked libraries:

  • libGoogleAnalyticsServices.a
  • AdSupport.framework
  • CoreData.framework
  • SystemConfiguration.framework
  • libz.dylib



[출처] https://stackoverflow.com/questions/22008892/google-analytics-doesnt-work-on-new-ios-project

반응형
Posted by blueasa
, |