Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unity 2019.4.10f1] Get an error when exporting to Xcode. #29

Closed
consolesoup opened this issue Feb 16, 2021 · 8 comments
Closed

[Unity 2019.4.10f1] Get an error when exporting to Xcode. #29

consolesoup opened this issue Feb 16, 2021 · 8 comments

Comments

@consolesoup
Copy link

最初に、バージョンについて説明します | First, I will describe the version

LINE SDK for Unity : 1.1.4
Unity Hub : 2.4.2
Unity Editor : 2019.4.10f1
Xcode : 12.4
Mac OS : Big Sur (11.2)

私が行った操作 | The operation I did

新規でUnityプロジェクトを作成し、LINE SDK for Unityのパッケージをロードし、iOS用にビルドしました。
I created a new Unity project, loaded the LINE SDK for Unity package, and built it for iOS.

私が期待した動作 | The behavior I expected

UnityからビルドしてXcodeプロジェクトが起動するのか普通だと思います。
I think it's normal to build from Unity and launch an Xcode project.

発生した現象 | Phenomenon that occurred

その結果、ビルドはエラーが出て中断されました。
Result, the build was interrupted with an error.

以下はその際のエラーです。
The following is the error at that time.

Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
    �[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
    Consider adding the following to ~/.profile:

    export LANG=en_US.UTF-8
    �[0m
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2

[!] Your project does not explicitly specify the CocoaPods master specs repo. Since CDN is now used as the default, you may safely remove it from your repos directory via `pod repo remove master`. To suppress this warning please add `warn_for_unused_master_specs_repo => false` to your Podfile.

UnityEngine.Debug:LogError(Object)
Line.LineSDK.Editor.ShellCommand:Run(String, String) (at Assets/LineSDK/Editor/CommandRunner.cs:58)
Line.LineSDK.Editor.CocoaPodsInstalling:OnPostprocessBuild(BuildTarget, String) (at Assets/LineSDK/Editor/CocoaPods/CocoaPodsInstalling.cs:71)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun() (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:136)
Error building Player: Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
    �[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
    Consider adding the following to ~/.profile:

    export LANG=en_US.UTF-8
    �[0m
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2

[!] Your project does not explicitly specify the CocoaPods master specs repo. Since CDN is now used as the default, you may safely remove it from your repos directory via `pod repo remove master`. To suppress this warning please add `warn_for_unused_master_specs_repo => false` to your Podfile.
Build completed with a result of 'Failed' in 37 seconds (36876 ms)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun() (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:136)
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002af] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:194 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95 
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun() (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:136)

仮の解決方法?? | Temporary solution??

Unityで書き出し先に指定したフォルダにはXcodeのプロジェクトが書き出されていました。
The Xcode project was exported to the folder specified as the export destination in Unity.

そのパスを指定してpod installを実行することでLINE SDKをCocoaPodsで導入できました。
I was able to install the LINE SDK with CocoaPods by running pod install with that path.

実機で実行できました。
I was able to execute it on the actual machine.

更なる問題 | Further problems

一時的な解決策が分かったので既存のプロジェクトに導入しようとチャレンジしました。
I found a temporary solution, so I tried to introduce it into an existing project.

ただしpod installしてもXcodeのビルドはエラーが出ました。
However, even with pod install, I got an error when building Xcode.

こちらが新規プロジェクトの場合のPodfileです。
Here is the Podfile for a new project.

platform :ios, '10.0'

target 'Unity-iPhone' do
    use_frameworks!
    pod 'LineSDKSwift/ObjC', '~> 5.1'
end

target 'UnityFramework' do
    use_frameworks!
    pod 'LineSDKSwift/ObjC', '~> 5.1'
end

こちらが既存のプロジェクトに追加した場合のPodfileです。
Here is the Podfile when added to an existing project.

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'

target 'UnityFramework' do
  pod 'Firebase/Analytics', '7.0.0'
  pod 'Firebase/Auth', '7.0.0'
  pod 'Firebase/Core', '7.0.0'
  pod 'Firebase/Crashlytics', '7.0.0'
  pod 'Firebase/Database', '7.0.0'
  pod 'Firebase/DynamicLinks', '7.0.0'
  pod 'Firebase/Messaging', '7.0.0'
  pod 'LineSDKSwift/ObjC', '~> 5.1'
end

Xcodeに出力されたエラーはこちらです。
Here is the error output to Xcode.

Undefined symbol: nominal type descriptor for Foundation.Locale
Undefined symbol: (extension in Foundation):Swift.StringProtocol.range<A where A1: Swift.StringProtocol>(of: A1, options: __C.NSStringCompareOptions, range: Swift.Range<Swift.String.Index>?, locale: Foundation.Locale?) -> Swift.Range<Swift.String.Index>?
Undefined symbol: (extension in Foundation):Swift.StringProtocol.rangeOfCharacter(from: Foundation.CharacterSet, options: __C.NSStringCompareOptions, range: Swift.Range<Swift.String.Index>?) -> Swift.Range<Swift.String.Index>?
Undefined symbol: Swift.String.index(_: Swift.String.Index, offsetBy: Swift.Int, limitedBy: Swift.String.Index) -> Swift.String.Index?
Undefined symbol: Swift.String.startIndex.getter : Swift.String.Index
Undefined symbol: protocol witness table for Swift.String.Index : Swift.Comparable in Swift
Undefined symbol: (extension in Swift):Swift.Collection.drop(while: (A.Element) throws -> Swift.Bool) throws -> A.SubSequence
Undefined symbol: protocol conformance descriptor for Foundation.Data : Swift.Collection in Foundation
Undefined symbol: type metadata accessor for Foundation.JSONDecoder.KeyDecodingStrategy
Undefined symbol: enum case for Foundation.JSONDecoder.KeyDecodingStrategy.convertFromSnakeCase(Foundation.JSONDecoder.KeyDecodingStrategy.Type) -> Foundation.JSONDecoder.KeyDecodingStrategy
Undefined symbol: dispatch thunk of Foundation.JSONDecoder.keyDecodingStrategy.setter : Foundation.JSONDecoder.KeyDecodingStrategy
Undefined symbol: Foundation.URLRequest.httpMethod.setter : Swift.String?
Undefined symbol: static Swift.Array.+= infix(inout [A], [A]) -> ()
Undefined symbol: Swift.Dictionary.isEmpty.getter : Swift.Bool
Undefined symbol: static Foundation.CharacterSet.urlQueryAllowed.getter : Foundation.CharacterSet
Undefined symbol: Foundation.CharacterSet.remove(charactersIn: Swift.String) -> ()
Undefined symbol: Foundation.URLComponents.percentEncodedQuery.getter : Swift.String?
Undefined symbol: method descriptor for static Swift.CaseIterable.allCases.getter : A.AllCases
Undefined symbol: associated type descriptor for Swift.CaseIterable.AllCases
Undefined symbol: protocol descriptor for Swift.CaseIterable
Undefined symbol: type metadata accessor for Foundation.URLQueryItem
Undefined symbol: Foundation.URLQueryItem.name.getter : Swift.String
Undefined symbol: _swift_projectBox
Undefined symbol: Foundation.URL.path.getter : Swift.String
Undefined symbol: Foundation.URL.host.getter : Swift.String?
Undefined symbol: nominal type descriptor for Swift.Dictionary.Iterator
Undefined symbol: nominal type descriptor for Swift.Int32
Undefined symbol: Swift.Dictionary.makeIterator() -> [A : B].Iterator
Undefined symbol: Swift.Array.removeAll(keepingCapacity: Swift.Bool) -> ()
Undefined symbol: Foundation.Data.base64EncodedString(options: __C.NSDataBase64EncodingOptions) -> Swift.String
Undefined symbol: Swift.String.init(repeating: Swift.String, count: Swift.Int) -> Swift.String
Undefined symbol: metaclass for Foundation.JSONDecoder
Undefined symbol: Foundation.JSONDecoder.deinit
Undefined symbol: static (extension in Foundation):Swift.String.Encoding.ascii.getter : (extension in Foundation):Swift.String.Encoding
Undefined symbol: associated conformance descriptor for Swift.CaseIterable.Swift.CaseIterable.AllCases: Swift.Collection
Undefined symbol: protocol conformance descriptor for Foundation.Date : Swift.Comparable in Foundation
Undefined symbol: Foundation.Date.init(timeIntervalSince1970: Swift.Double) -> Foundation.Date
Undefined symbol: static (extension in Swift):Swift.Comparable.>= infix(A, A) -> Swift.Bool
Undefined symbol: _swift_getAtKeyPath
Undefined symbol: type metadata accessor for Swift.KeyPath
Undefined symbol: Swift.KeyedDecodingContainer.nestedUnkeyedContainer(forKey: A) throws -> Swift.UnkeyedDecodingContainer
Undefined symbol: Swift.Array.init() -> [A]
Undefined symbol: dispatch thunk of Swift.UnkeyedDecodingContainer.isAtEnd.getter : Swift.Bool
Undefined symbol: nominal type descriptor for Swift.IndexingIterator
Undefined symbol: Swift.IndexingIterator.next() -> A.Element?
Undefined symbol: Swift.Array.startIndex.getter : Swift.Int
Undefined symbol: type metadata accessor for Swift.ArraySlice
Undefined symbol: Foundation.URLRequest.httpBody.setter : Foundation.Data?
Undefined symbol: protocol descriptor for Swift.ExpressibleByUnicodeScalarLiteral
Undefined symbol: type metadata for Swift.String.Index
Undefined symbol: associated conformance descriptor for Swift.ExpressibleByExtendedGraphemeClusterLiteral.Swift.ExpressibleByExtendedGraphemeClusterLiteral.ExtendedGraphemeClusterLiteralType: Swift._ExpressibleByBuiltinExtendedGraphemeClusterLiteral
Undefined symbol: protocol descriptor for Swift.ExpressibleByExtendedGraphemeClusterLiteral
Undefined symbol: associated conformance descriptor for Swift.ExpressibleByStringLiteral.Swift.ExpressibleByStringLiteral.StringLiteralType: Swift._ExpressibleByBuiltinStringLiteral
Undefined symbol: (extension in Swift):Swift.ExpressibleByExtendedGraphemeClusterLiteral< where A.ExtendedGraphemeClusterLiteralType == A.UnicodeScalarLiteralType>.init(unicodeScalarLiteral: A.ExtendedGraphemeClusterLiteralType) -> A
Undefined symbol: protocol witness table for Swift.String : Swift._ExpressibleByBuiltinUnicodeScalarLiteral in Swift
Undefined symbol: (extension in Swift):Swift.ExpressibleByStringLiteral< where A.ExtendedGraphemeClusterLiteralType == A.StringLiteralType>.init(extendedGraphemeClusterLiteral: A.ExtendedGraphemeClusterLiteralType) -> A
Undefined symbol: protocol witness table for Swift.String : Swift._ExpressibleByBuiltinStringLiteral in Swift
Undefined symbol: dispatch thunk of Swift.Encoder.singleValueContainer() -> Swift.SingleValueEncodingContainer
Undefined symbol: dispatch thunk of Swift.SingleValueDecodingContainer.decode(Swift.String.Type) throws -> Swift.String
Undefined symbol: protocol witness table for Swift.String : Swift._ExpressibleByBuiltinExtendedGraphemeClusterLiteral in Swift
Undefined symbol: Swift.KeyedEncodingContainer.encode(_: Swift.Bool, forKey: A) throws -> ()
Undefined symbol: static Foundation.JSONEncoder.OutputFormatting.prettyPrinted.getter : Foundation.JSONEncoder.OutputFormatting
Undefined symbol: protocol witness table for Swift.String : Swift.Decodable in Swift
Undefined symbol: Swift.Bool.init(Swift.String) -> Swift.Bool?
Undefined symbol: Swift.KeyedEncodingContainer.encodeIfPresent(_: Swift.UInt?, forKey: A) throws -> ()
Undefined symbol: Swift.KeyedDecodingContainer.decodeIfPresent(_: Swift.UInt.Type, forKey: A) throws -> Swift.UInt?
Undefined symbol: nominal type descriptor for Swift.PartialRangeUpTo
Undefined symbol: type metadata accessor for Swift.PartialRangeFrom
Undefined symbol: type metadata accessor for Swift.PartialRangeUpTo
Undefined symbol: protocol conformance descriptor for Swift.PartialRangeUpTo<A> : Swift.RangeExpression in Swift
Undefined symbol: (extension in Foundation):Swift.String.init(data: __shared Foundation.Data, encoding: (extension in Foundation):Swift.String.Encoding) -> Swift.String?
Undefined symbol: protocol descriptor for CoreFoundation._CFObject
Undefined symbol: nominal type descriptor for Swift.Unmanaged
Undefined symbol: method descriptor for Swift.ExpressibleByExtendedGraphemeClusterLiteral.init(extendedGraphemeClusterLiteral: A.ExtendedGraphemeClusterLiteralType) -> A
Undefined symbol: (extension in Foundation):Swift.StringProtocol.replacingOccurrences<A, B where A1: Swift.StringProtocol, B1: Swift.StringProtocol>(of: A1, with: B1, options: __C.NSStringCompareOptions, range: Swift.Range<Swift.String.Index>?) -> Swift.String
Undefined symbol: protocol conformance descriptor for Swift.ClosedRange<A> : Swift.RangeExpression in Swift
Undefined symbol: Foundation.Data.subscript.getter : <A where A: Swift.RangeExpression, A.Bound: Swift.FixedWidthInteger>(A) -> Foundation.Data
Undefined symbol: Foundation.Data.init(bytes: Swift.UnsafeRawPointer, count: Swift.Int) -> Foundation.Data
Undefined symbol: protocol witness table for Swift.UInt8 : Swift.CustomStringConvertible in Swift
Undefined symbol: method descriptor for Foundation.CustomNSError.errorUserInfo.getter : [Swift.String : Any]
Undefined symbol: type metadata accessor for Foundation.JSONEncoder.OutputFormatting
Undefined symbol: method descriptor for Foundation.LocalizedError.helpAnchor.getter : Swift.String?
Undefined symbol: method descriptor for Foundation.LocalizedError.recoverySuggestion.getter : Swift.String?
Undefined symbol: (extension in Foundation):Swift.StringProtocol.components<A where A1: Swift.StringProtocol>(separatedBy: A1) -> [Swift.String]
Undefined symbol: method descriptor for Swift.Error._getEmbeddedNSError() -> Swift.AnyObject?
Undefined symbol: (extension in Foundation):Swift.StringProtocol.addingPercentEncoding(withAllowedCharacters: Foundation.CharacterSet) -> Swift.String?
Undefined symbol: method descriptor for Swift.Error._domain.getter : Swift.String
Undefined symbol: method descriptor for Foundation.JSONDecoder.decode<A where A: Swift.Decodable>(_: A.Type, from: Foundation.Data) throws -> A
Undefined symbol: (extension in Foundation):Foundation.LocalizedError.recoverySuggestion.getter : Swift.String?
Undefined symbol: (extension in Foundation):Foundation.LocalizedError.failureReason.getter : Swift.String?
Undefined symbol: protocol conformance descriptor for (extension in Foundation):Swift.String.Encoding : Swift.CustomStringConvertible in Foundation
Undefined symbol: method lookup function for Foundation.JSONDecoder
Undefined symbol: protocol conformance descriptor for [A : B] : Swift.Collection in Swift
Undefined symbol: Swift.Dictionary.init() -> [A : B]
Undefined symbol: Swift.Dictionary.init<A where A1: Swift.Sequence, A1.Element == (A, B)>(uniqueKeysWithValues: __owned A1) -> [A : B]
Undefined symbol: (extension in Swift):Swift.Error._userInfo.getter : Swift.AnyObject?
Undefined symbol: (extension in Foundation):Swift.Error< where A: Foundation.CustomNSError>._code.getter : Swift.Int
Undefined symbol: (extension in Foundation):Swift.Error< where A: Foundation.CustomNSError>._domain.getter : Swift.String
Undefined symbol: protocol descriptor for Foundation.CustomNSError
Undefined symbol: type metadata for Swift.AnyObject
@consolesoup
Copy link
Author

「更なる問題」に関してのエラーは以下の記事にて解決しました。
The error regarding "Further problems" has been resolved in the following article.
https://stackoverflow.com/questions/52536380/why-linker-link-static-libraries-with-errors-ios

「Unity-iPhone/UnityFramework/」のフォルダを右クリックで選択。
Right-click on the "Unity-iPhone/Unity Framework/" folder.

「New File...」で「Swift File」を選択し、Targetsにて全てチェックを入れて作成。
Select "Swift File" in "New File..." and check all in Targets to create.

作成時にポップアップが出て「Create Bridging Header」を選択しました。
When creating, a pop-up appeared and I selected "Create Bridging Header".

ここで作成したファイルを消すとまたエラーが再発します。
If you delete the file created here, the error will reoccur.

@onevcat
Copy link
Member

onevcat commented Feb 17, 2021

Hi,

Thanks for reporting this.

The CocoaPods building script of LINE SDK for Unity does quite a few things, including adding LINE SDK pod entry to Podfile, installing it, and also set up other necessary build settings automatically. Most of these require you have a valid Ruby environment. Your first attempt to install it in an empty exported project seems to be related to Ruby permission.

The system-bundled Ruby always installs gems under a system path, which requires your password for sudo. It is an obstacle of the automation process. So we are asking LINE SDK for Unity users to have a managed Ruby version. You can use either rbenv or rvm to install a version of ruby in the user path, so other gem installation does not require further permission. Can you try to follow the guide here, specifically, in the "Ruby Environment" section, to prepare a valid Ruby environment?

And for your existing project, it seems that you already have other CocoaPods dependencies. LINE SDK for Unity now requires to build as framework and linked in a dynamic way, so use_frameworks! is necessary. I am not sure about Firebase's requirement, but I guess it should be fine for them to link as dynamic (you can try to add use_frameworks! to your existing project to see how it works). If that is true, once you can prepare a valid Ruby environment, the build should run seamlessly.

However, if your existing pod dependencies requires to build as a library and linked in a static way, LINE SDK for Unity won't work now. In this case, maybe you can consider switching to another integrating way, Carthage, which is less invasive to your existing project:

CocoaPods is the default, recommended dependency manager used by LINE SDK for Unity. However, it requires a slightly different project structure than what you might be used to. Also, if your project is already using CocoaPods for another purpose, you may be forced to use Carthage. Choose the dependency manager that works best for you and your project.

You can find more instruction and comparison of two on the same page. To switch the dependency manager used, check the Settings for iOS export.

@consolesoup
Copy link
Author

私はCarthageを使用しようと思います。
I'm going to use Carthage.

操作としては、Unityの「Preferences... > LINE SDK」からiOS Dependency Managerにて「Carthage」を選択しました。
As an operation, I selected "Carthage" in iOS Dependency Manager from "Preferences ...> LINE SDK" of Unity.

UnityでBuild and Runした際のエラーがこちらです。
Here is the error when building and running in Unity.

A shell task (/usr/bin/xcrun lipo -create /Users/${USER_NAME}/Library/Caches/org.carthage.CarthageKit/DerivedData/12.4_12D4e/line-sdk-ios-swift/5.7.0/Build/Intermediates.noindex/ArchiveIntermediates/LineSDK/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/LineSDK.framework/LineSDK /Users/${USER_NAME}/Library/Caches/org.carthage.CarthageKit/DerivedData/12.4_12D4e/line-sdk-ios-swift/5.7.0/Build/Products/Release-iphonesimulator/LineSDK.framework/LineSDK -output /Users/${USER_NAME}/Desktop/Pechill/Carthage/Build/iOS/LineSDK.framework/LineSDK) failed with exit code 1:
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /Users/${USER_NAME}/Library/Caches/org.carthage.CarthageKit/DerivedData/12.4_12D4e/line-sdk-ios-swift/5.7.0/Build/Intermediates.noindex/ArchiveIntermediates/LineSDK/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/LineSDK.framework/LineSDK and /Users/${USER_NAME}/Library/Caches/org.carthage.CarthageKit/DerivedData/12.4_12D4e/line-sdk-ios-swift/5.7.0/Build/Products/Release-iphonesimulator/LineSDK.framework/LineSDK have the same architectures (arm64) and can't be in the same fat output file

Building universal frameworks with common architectures is not possible. The device and simulator slices for "LineSDK" both build for: arm64
Rebuild with --use-xcframeworks to create an xcframework bundle instead.

UnityEngine.Debug:LogError(Object)
Line.LineSDK.Editor.ShellCommand:Run(String, String) (at Assets/LineSDK/Editor/CommandRunner.cs:58)
Line.LineSDK.Editor.CarthageInstalling:CarthageUpdate() (at Assets/LineSDK/Editor/Carthage/CarthageInstalling.cs:96)
Line.LineSDK.Editor.CarthageInstalling:OnPostprocessBuild(BuildTarget, String) (at Assets/LineSDK/Editor/Carthage/CarthageInstalling.cs:52)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun() (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:136)
[DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local path 'vendor/bundle'`, and stop using this flag

UnityEngine.Debug:LogError(Object)
Line.LineSDK.Editor.ShellCommand:Run(String, String) (at Assets/LineSDK/Editor/CommandRunner.cs:58)
Line.LineSDK.Editor.CarthageInstalling:AddCarthageCopyPhase() (at Assets/LineSDK/Editor/Carthage/CarthageInstalling.cs:137)
Line.LineSDK.Editor.CarthageInstalling:OnPostprocessBuild(BuildTarget, String) (at Assets/LineSDK/Editor/Carthage/CarthageInstalling.cs:54)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun() (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:136)

@onevcat
Copy link
Member

onevcat commented Feb 17, 2021

Ummm,

That is an issue of Carthage which fails to build a framework for Xcode 12 (see here and here). I will check how can I make it easier to adopt.

Stay tuned.

@onevcat
Copy link
Member

onevcat commented Feb 17, 2021

Hey,

A workaround for this has been applied in #30.

Here is a beta version and maybe you can give it a try, in which the Carthage building failure should be fixed.

line_sdk_unity_1.1.5_beta.1.zip

@consolesoup
Copy link
Author

私はこれを試しました。結果として成功しました。
I tried this. As a result, it was successful.

Firebaseの件はこれと別件のIssueだと思います。新規で作成しても良いですか?
I think the Firebase issue is another issue. Can I create a new one?

@onevcat
Copy link
Member

onevcat commented Feb 19, 2021

To install LINE SDK with Firebase (or any other libraries requiring CocoaPods as a dependency manager) would be tricky. It is mainly Unity to blame for the lack of a standard dependency manager.

But, yes. Feel free to open a new issue and we can check and find if there is a good solution for it.

@onevcat
Copy link
Member

onevcat commented Feb 19, 2021

The changes in #30 will be contained in the 1.1.5 release soon.

I am closing this now.

@onevcat onevcat closed this as completed Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants