質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
iOS

iOSとは、Apple製のスマートフォンであるiPhoneやタブレット端末のiPadに搭載しているオペレーションシステム(OS)です。その他にもiPod touch・Apple TVにも搭載されています。

CI(継続的インテグレーション)

CI(継続的インテグレーション)は、アプリ開発においてビルドとテストを繰り返すことで品質改善と納期短縮を図る手法です。JenkinsやTravis CIなどの専用ツールを利用してプロセスを自動化・半自動化して効率的に実施します。

Q&A

解決済

1回答

1059閲覧

Bitrise Carthageを使用したい

pftyuk

総合スコア52

iOS

iOSとは、Apple製のスマートフォンであるiPhoneやタブレット端末のiPadに搭載しているオペレーションシステム(OS)です。その他にもiPod touch・Apple TVにも搭載されています。

CI(継続的インテグレーション)

CI(継続的インテグレーション)は、アプリ開発においてビルドとテストを繰り返すことで品質改善と納期短縮を図る手法です。JenkinsやTravis CIなどの専用ツールを利用してプロセスを自動化・半自動化して効率的に実施します。

0グッド

0クリップ

投稿2019/08/13 05:35

前提・実現したいこと

こちらの質問の続きとなります。
RealmをCocoapodsで導入しているプロジェクトで、フリープランでBitriseを利用したかったので
こちらを参考にRealmをCocoapodsから、Carthageに変更しました。

xcode単体ではビルドまで出来て問題なく動くのですが
Bitrise上でビルドを行うと、下記のエラーが出てしまいビルドに失敗しています。

Bitrise上でCarthageを利用する方法が
調べてもわからなかったので、ご教示頂けると幸いです。

発生している問題・エラーメッセージ

+------------------------------------------------------------------------------+ | (6) xcode-archive@2.5.0 | +------------------------------------------------------------------------------+ | id: xcode-archive | | version: 2.5.0 | | collection: https://github.com/bitrise-io/bitrise-steplib.git | | toolkit: go | | time: 2019-08-13T05:05:27Z | +------------------------------------------------------------------------------+ | | INFO[05:05:27] * [OK] Step dependency (xcode) installed, available. INFO[05:05:27] * [OK] Step dependency (go) installed, available. Configs: - ExportMethod: ad-hoc - UploadBitcode: yes - CompileBitcode: yes - ICloudContainerEnvironment: - TeamID: - UseDeprecatedExport: no - ForceTeamID: - ForceProvisioningProfileSpecifier: - ForceProvisioningProfile: - ForceCodeSignIdentity: - CustomExportOptionsPlistContent: - OutputTool: xcpretty - Workdir: /Users/vagrant/git - ProjectPath: UtilityCosts.xcworkspace - Scheme: UtilityCosts - Configuration: - OutputDir: /Users/vagrant/deploy - IsCleanBuild: no - XcodebuildOptions: - DisableIndexWhileBuilding: true - IsExportXcarchiveZip: no - ExportAllDsyms: yes - ArtifactName: UtilityCosts - VerboseLog: true step determined configs: - xcodebuildVersion: Xcode 10.2.1 (Build version 10E1001) Checking if output tool (xcpretty) is installed - xcprettyVersion: 0.3.0 Create the Archive ... [05:05:36] $ set -o pipefail && xcodebuild "-workspace" "UtilityCosts.xcworkspace" "-scheme" "UtilityCosts" "COMPILER_INDEX_STORE_ENABLE=NO" "archive" "-archivePath" "/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/__archive__533620815/UtilityCosts.xcarchive" | xcpretty ▸ Copying Charts-umbrella.h ▸ Processing Charts-Info.plist ▸ Processing ScrollableGraphView-Info.plist ▸ Copying ScrollableGraphView-umbrella.h ▸ Processing RxSwift-Info.plist ▸ Copying RxSwift-umbrella.h ▸ Processing IQKeyboardManagerSwift-Info.plist ▸ Copying IQKeyboardManagerSwift-umbrella.h ▸ Compiling ScrollableGraphView_vers.c ▸ Compiling ScrollableGraphView-dummy.m ▸ Compiling ScrollableGraphView_vers.c ▸ Compiling ScrollableGraphView-dummy.m ▸ Compiling RxSwift_vers.c ▸ Linking ScrollableGraphView ▸ Compiling RxSwift-dummy.m ▸ Linking RxSwift ▸ Compiling RxSwift_vers.c ▸ Linking ScrollableGraphView ▸ Generating 'ScrollableGraphView.framework.dSYM' ▸ Compiling RxSwift-dummy.m ▸ Linking RxSwift ▸ Generating 'RxSwift.framework.dSYM' ▸ Compiling Charts_vers.c ▸ Compiling Charts-dummy.m ▸ Compiling Charts_vers.c ▸ Linking Charts ▸ Compiling Charts-dummy.m ▸ Compiling IQKeyboardManagerSwift_vers.c ▸ Compiling IQKeyboardManagerSwift-dummy.m ▸ Compiling IQKeyboardManagerSwift_vers.c ▸ Linking IQKeyboardManagerSwift ▸ Compiling IQKeyboardManagerSwift-dummy.m ▸ Linking Charts ▸ Linking IQKeyboardManagerSwift ▸ Generating 'IQKeyboardManagerSwift.framework.dSYM' ▸ Touching ScrollableGraphView.framework (in target: ScrollableGraphView) ▸ Copying /Users/vagrant/git/Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle ▸ Touching RxSwift.framework (in target: RxSwift) ▸ Processing RxCocoa-Info.plist ▸ Copying RxCocoa-umbrella.h ▸ Copying RxCocoa.h ▸ Copying _RXObjCRuntime.h ▸ Copying _RXKVOObserver.h ▸ Copying _RXDelegateProxy.h ▸ Copying _RX.h ▸ Copying RxCocoaRuntime.h ▸ Generating 'Charts.framework.dSYM' ▸ Compiling _RXObjCRuntime.m ▸ Compiling _RXKVOObserver.m ▸ Compiling _RXDelegateProxy.m ▸ Compiling _RX.m ▸ Compiling RxCocoa_vers.c ▸ Compiling RxCocoa-dummy.m ▸ Compiling _RXObjCRuntime.m ▸ Compiling _RXKVOObserver.m ▸ Linking RxCocoa ▸ Compiling _RXDelegateProxy.m ▸ Compiling _RX.m ▸ Compiling RxCocoa_vers.c ▸ Compiling RxCocoa-dummy.m ▸ Linking RxCocoa ▸ Touching IQKeyboardManagerSwift.framework (in target: IQKeyboardManagerSwift) ▸ Touching Charts.framework (in target: Charts) ▸ Generating 'RxCocoa.framework.dSYM' ▸ Touching RxCocoa.framework (in target: RxCocoa) ▸ Processing Pods-UtilityCosts-Info.plist ▸ Copying Pods-UtilityCosts-umbrella.h ▸ Compiling Pods-UtilityCosts-dummy.m ▸ Compiling Pods_UtilityCosts_vers.c ▸ Touching Pods_UtilityCosts.framework (in target: Pods-UtilityCosts) ▸ Running script '[CP] Check Pods Manifest.lock' ❌ /Users/vagrant/git/UtilityCosts/UtilityCostModel.swift:10:8: no such module 'RealmSwift' import RealmSwift ^ Last lines of the Xcode's build log: import RealmSwift ^ ** ARCHIVE FAILED ** The following build commands failed: CompileSwift normal arm64 CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (2 failures) You can find the last couple of lines of Xcode's build log above, but the full log is also available in the raw-xcodebuild-output.log The log file is stored in $BITRISE_DEPLOY_DIR, and its full path is available in the $BITRISE_XCODE_RAW_RESULT_TEXT_PATH environment variable (value: /Users/vagrant/deploy/raw-xcodebuild-output.log) Archive failed, error: exit status 65 | | +---+---------------------------------------------------------------+----------+ | x | xcode-archive@2.5.0 (exit code: 1) | 201 sec | +---+---------------------------------------------------------------+----------+ | Update available: 2.5.0 -> 2.6.0 | | Issue tracker: https://github.com/bitrise-steplib/steps-xcode-archive/issues | | Source: https://github.com/bitrise-steplib/steps-xcode-archive | +---+---------------------------------------------------------------+----------+

Workflow

イメージ説明

試したこと

gitignoreにCarthage/を追加していたので
Carthage/を削除してCarthageフォルダごとプッシュした状態で試してみましたが
上記と同じエラーで解決できませんでした。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

gitignore のままで大丈夫です。

Run CocoaPods installXcode Archive & Export for iOS の間の
+ボタンを押して Carthage と検索してみてください。

イメージ説明

タップするとフローに追加されます。

イメージ説明

その後 Carthage を選択して必要に応じて設定を追加してください。
私は bootstrap--platform ios を追加してよく使っています。

イメージ説明

投稿2019/08/13 06:02

TakuyaAso

総合スコア1361

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

pftyuk

2019/08/13 07:08

早急なご回答ありがとうございます。 早速試してみたのですがエラーになってしまい、恥ずかしながら 少し格闘してみたのですが解決出来なかったので教えて下さい。 以下エラーの文言になります。 Running Carthage command $ carthage "bootstrap" "--platform" "ios" *** No Cartfile.resolved found, updating dependencies Failed to read file or folder at /Users/vagrant/git/Cartfile: Error Domain=NSCocoaErrorDomain Code=260 "The file “Cartfile” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/vagrant/git/Cartfile, NSUnderlyingError=0x7ffed6d65ae0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} Carthage command failed, error: exit status 1 Run CocoaPods install と Xcode Archive & Export for iOSの間に追加して bootstrap と --platform iosを追加して実行してみた結果になります。 Cartfileがないって言われてるのはわかりますが、別途パスの指定等をどこかでする必要があるのでしょうか?
pftyuk

2019/08/13 07:39

ご回答ありがとうございます。 もう一度ご提示頂いたurlを元にXcode側の設定込みで やり直してみたところ、先程のエラーは解消されました。 しかしRealmをビルドしている段階でやはり時間が足りずタイムアウトになってしまいました。 以前教えて頂いた、--cache-buildsを付けてみたのですが同様にタイムアウトになってしまいました。 ここまで試してタイムアウトとなってしまうとなると やはりプラン変更するのが最善でしょうか? 他足りてないことがありましたら、ご指摘頂けると幸いです、、、 +------------------------------------------------------------------------------+ | (6) carthage | +------------------------------------------------------------------------------+ | id: carthage | | version: 3.2.1 | | collection: https://github.com/bitrise-io/bitrise-steplib.git | | toolkit: go | | time: 2019-08-13T07:24:56Z | +------------------------------------------------------------------------------+ | | INFO[07:24:56] * [OK] Step dependency (go) installed, available. INFO[07:24:56] * [OK] Step dependency (carthage) installed, available. Config: - GithubAccessToken: - CarthageCommand: bootstrap - CarthageOptions: --platform ios --cache-builds - SourceDir: /Users/vagrant/git - VerboseLog: false Environment: - CarthageVersion: 0.33.0 - SwiftVersion: Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)- Target: x86_64-apple-darwin18.5.0 Check if cache is available Check cache specific files - Carthage/Build directory: not found - Cachefile: not available yet - Cartfile.resolved: not found No Cartfile.resolved found at: /Users/vagrant/git/Cartfile.resolved Make sure it's committed into your repository! Cartfile.resolved presence ensures that Bitrise will use exactly the same versions of dependencies as you in your local environment. The dependencies will not be cached until the Cartfile.resolved file presents in the repository. Cache not available Running Carthage command $ carthage "bootstrap" "--platform" "ios" "--cache-builds" *** No Cartfile.resolved found, updating dependencies *** Cloning realm-cocoa *** Checking out realm-cocoa at "v3.17.3" *** No cache found for realm-cocoa, building with all downstream dependencies *** xcodebuild output can be found in /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/carthage-xcodebuild.DApbIy.log *** Skipped downloading realm-cocoa.framework binary due to the error: "API rate limit exceeded for 208.52.166.154. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)" *** Building scheme "Realm" in Realm.xcworkspace timeout after 600 seconds
TakuyaAso

2019/08/13 08:59

うーん 初回は時間かかっちゃうのでそうなりますかね。 2回目以降はキャッシュビルドできるので早くはなりますが。 すみません><
pftyuk

2019/08/13 09:04

初回が出来ればって感じなんですね>< ただ非常に勉強になりましたしアップグレードを前向きに検討してみようと思います。 丁寧にご対応頂きありがとうございましたー!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問