pod lib lint fails with bitcode error - xcode

I have created custom control for tvOS (https://github.com/Ponf/FPScrollingBanner) and I'm trying to publish it in cocoapods repository. When I'm checking podspec using pod lib lint it fails with next log:
Integrating target `Pods` (`../../../../var/folders/9w/9v94b0_j4l1b_802_my5vlc00000gn/T/CocoaPods/Lint/App.xcodeproj` project)
Adding Build Phase 'Embed Pods Frameworks' to project.
Adding Build Phase 'Copy Pods Resources' to project.
Adding Build Phase 'Check Pods Manifest.lock' to project.
- Running post install hooks
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
Building with xcodebuild.
xcodebuild clean build -workspace App.xcworkspace -scheme App -configuration Release CODE_SIGN_IDENTITY=- -sdk appletvsimulator
Build settings from command line:
CODE_SIGN_IDENTITY = -
SDKROOT = appletvsimulator9.1
=== CLEAN TARGET FPScrollingBanner OF PROJECT Pods WITH CONFIGURATION Release ===
Check dependencies
target 'FPScrollingBanner' has bitcode disabled (ENABLE_BITCODE = NO), but it is required for the 'appletvos' platform
** CLEAN FAILED **
The following build commands failed:
Check dependencies
(1 failure)
=== BUILD TARGET FPScrollingBanner OF PROJECT Pods WITH CONFIGURATION Release ===
Check dependencies
target 'FPScrollingBanner' has bitcode disabled (ENABLE_BITCODE = NO), but it is required for the 'appletvos' platform
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
-> FPScrollingBanner (1.0.0)
- ERROR | [tvOS] xcodebuild: Returned an unsuccessful exit code.
Pods workspace available at `/var/folders/9w/9v94b0_j4l1b_802_my5vlc00000gn/T/CocoaPods/Lint/App.xcworkspace` for inspection.
[!] FPScrollingBanner did not pass validation, due to 1 error.
/Users/filipp/projects/CocoaPods/lib/cocoapods/command/lib.rb:181:in `block in run'
/Users/filipp/projects/CocoaPods/lib/cocoapods/command/lib.rb:153:in `each'
/Users/filipp/projects/CocoaPods/lib/cocoapods/command/lib.rb:153:in `run'
/Users/filipp/.rvm/gems/ruby-2.0.0-p643/bundler/gems/CLAide-4ded02e52c34/lib/claide/command.rb:312:in `run'
/Users/filipp/projects/CocoaPods/lib/cocoapods/command.rb:48:in `run'
/Users/filipp/projects/CocoaPods/bin/pod:44:in `<main>'
So as I can see, the problem is target 'FPScrollingBanner' has bitcode disabled (ENABLE_BITCODE = NO), but it is required for the 'appletvos' platform. When I'm opening App.workspace with Xcode, it has no bitcode option at all.
Xcode version: 7.2
Cocoapods built from latest master branch with specifying latest CocoaPods Core.

I have fallback to cocoapods version 0.39.0 and bug doesn't reproduced anymore. It looks like something broken in current master branch.

Maybe you can set *.podspec file:
s.xcconfig = {
'ENABLE_BITCODE' => 'NO'
}
in my *.podspec ,add this will set the framework BITCODE disable.

Related

Github Actions workflow throwing this error 'Could not resolve package dependencies Package.swift manifest for version 1.4.2'

I have a github-action configuration setup for an iOS App, with the following declaration in my CI.yml file:
name: BuildAndTestCI
on:
pull_request:
branches: [master]
jobs:
build-and-test:
runs-on: macos-latest
steps:
- uses: actions/checkout#v2
- name: Select Xcode
run: sudo xcode-select -switch /Applications/Xcode_11.3.app
- name: Build and Test
run: xcodebuild clean build test -project sample/sample.xcodeproj -scheme "sample" -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPad Pro (12.9-inch) (5th generation)" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO
But the workflow run and stop with the following error:
xcodebuild: error: Could not resolve package dependencies:
https://github.com/Juanpe/SkeletonView.git has no Package.swift manifest for version 1.4.2
The possible solutions that I've tried are:
Reset package caches
Upgrade the affected packages 'SkeletonView'
Perform a global search where 1.4.2 appears (no-where)
Build and Clean the project multiple times
Also my concerns are:
There is no package that has the version number 1.4.2 and yet the Github-Action Workflow still throws the said error every time a build process is triggered via commit.
There is absolutely no way to do a proper debugging, and I feel like I'm stuck
Below is the full logs of the Github-Action Workflow:
**Set up a job**
Current runner version: '2.284.0'
Operating System
Virtual Environment
Virtual Environment Provisioner
GITHUB_TOKEN Permissions
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout#v2' (SHA:ec3a7ce113134d7a93b817d10a8272cb61118579)
**Run actions/checkout#v2**
Run actions/checkout#v2
Syncing repository: repository/sample-ios
Getting Git version info
Deleting the contents of '/Users/runner/work/sample-ios/sample-ios'
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
Determining the checkout info
Checking out the ref
/usr/local/bin/git log -1 --format='%H'
'9ebab3de7d5294064240e266cb4070a52e08c672'
**Select Xcode**
Run sudo xcode-select -switch /Applications/Xcode_11.3.app
**Build and test**
Run xcodebuild clean build test -project sample/sample.xcodeproj -scheme "sample" -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPad Pro (12.9-inch) (5th generation)" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO
Build settings from command line:
CODE_SIGNING_REQUIRED = NO
ONLY_ACTIVE_ARCH = NO
SDKROOT = iphonesimulator13.2
Resolve Package Graph
Fetching https://github.com/Juanpe/SkeletonView.git
Fetching https://github.com/apollographql/apollo-ios.git
Fetching https://github.com/firebase/firebase-ios-sdk.git
Fetching https://github.com/getsentry/sentry-cocoa
Fetching https://github.com/intercom/intercom-ios
xcodebuild: error: Could not resolve package dependencies:
https://github.com/Juanpe/SkeletonView.git has no Package.swift manifest for version 1.4.2
Error: Process completed with exit code 74.

Setting up CI for Catalyst with `pod gen` and `xcodebuild build test`

I'd like to add Catalyst testing to our CI for testing libraries described by podspec's, but running into signing issues:
git clone git#github.com:firebase/firebase-ios-sdk.git
pod gen FirebaseCore.podspec --local-sources=./ --platforms=ios
xcodebuild build test -configuration release -workspace /Users/paulbeusterien/gh8/firebase-ios-sdk/gen/FirebaseCore/FirebaseCore.xcworkspace -scheme FirebaseCore-Unit-unit ARCHS=x86_64h VALID_ARCHS=x86_64h ONLY_ACTIVE_ARCH=NO SUPPORTS_MACCATALYST=YES -sdk macosx CODE_SIGN_IDENTITY=-
After compiling and linking, it fails with
Testing failed:
FirebaseCore-Unit-unit:
AppHost-FirebaseCore-Unit-Tests.app (88189) encountered an error (Failed to load the test bundle. (Underlying error: The bundle “FirebaseCore-Unit-unit” couldn’t be loaded because it is damaged or missing necessary resources. The bundle is damaged or missing necessary resources. dlopen_preflight(/Users/paulbeusterien/Library/Developer/Xcode/DerivedData/FirebaseCore-eyanoskvkatavqdrdwdwryhqqdsc/Build/Products/Release-maccatalyst/AppHost-FirebaseCore-Unit-Tests.app/Contents/PlugIns/FirebaseCore-Unit-unit.xctest/Contents/MacOS/FirebaseCore-Unit-unit): no suitable image found. Did find:
/Users/paulbeusterien/Library/Developer/Xcode/DerivedData/FirebaseCore-eyanoskvkatavqdrdwdwryhqqdsc/Build/Products/Release-maccatalyst/AppHost-FirebaseCore-Unit-Tests.app/Contents/PlugIns/FirebaseCore-Unit-unit.xctest/Contents/MacOS/FirebaseCore-Unit-unit: code signature in (/Users/paulbeusterien/Library/Developer/Xcode/DerivedData/FirebaseCore-eyanoskvkatavqdrdwdwryhqqdsc/Build/Products/Release-maccatalyst/AppHost-FirebaseCore-Unit-Tests.app/Contents/PlugIns/FirebaseCore-Unit-unit.xctest/Contents/MacOS/FirebaseCore-Unit-unit) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)))
Any suggestions?
I needed to add CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO.
The following command builds and runs the tests successfully:
xcodebuild test -configuration Debug -workspace /Users/paulbeusterien/gh8/firebase-ios-sdk/gen/FirebaseCore/FirebaseCore.xcworkspace -scheme FirebaseCore-Unit-unit ARCHS=x86_64h VALID_ARCHS=x86_64h ONLY_ACTIVE_ARCH=NO SUPPORTS_MACCATALYST=YES -sdk macosx CODE_SIGN_IDENTITY=- SUPPORTS_UIKITFORMAC=YES CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
This solution worked for me locally, but only partially on GitHub Actions. With GitHub Actions testspecs that include requires_app_host still failed to run tests. Details in this PR.

What am I missing with my pod install? Xcode Build fails Azure Devops Pipeline

I am using an Azure Devops Build pipeline to build my Xcode workspace. It builds fine locally as well as if I import the repo and use it in AppCenter to build.
But I want to use an external Git, thus using a Build Pipeline.
It is pretty simple in terms of steps.
1 - Get Repo (finishes this step)
2 - Pod Install (finishes this step)
3 - Install Cert/Provision Profile (finishes this step)
4 - Build
Here is the yaml for pod
steps: task: CocoaPods#0 displayName: 'pod install'
And result from the task:
Pod installation complete! There are 9 dependencies from the Podfile and 9 total pods installed.
AND HERE IS THE ERROR
▸ Running script '[CP] Check Pods Manifest.lock'
❌ /Users/vsts/agent/2.149.1/work/1/s/MyDemo/Extension Files/SortedArray.swift:10:8: no such module 'Starscream'
import Starscream
^
** BUILD FAILED **
The following build commands failed:
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
[error]Error: /usr/bin/xcodebuild failed with return code: 65
I have looked through the docs and I can't figure out what is going on. I've messed with the settings to no avail.
Using Xcode 10 to build.
Thanks
This error is due to the Xcode task not working out of the workspace path.
Update the xcWorkspacePath variable in your azure-pipelines.yml file from **/*.xcodeproj/project.xcworkspace to yourProjectName.xcworkspace.
- task: Xcode#5
inputs:
xcWorkspacePath: 'yourProjectName.xcworkspace'

CocoaPods: App.xcworkspace does not exists

This is what happened:
$ pod lib lint
-> MXKit (5.2.2)
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
- NOTE | [iOS] xcodebuild: xcodebuild: error: 'App.xcworkspace' does not exist.
[!] MXKit did not pass validation, due to 1 error.
You can use the `--no-clean` option to inspect any issue.
I'm using:
CocoaPods 1.0.1
Ruby 2.2.2
Xcode 8.0
OS X 10.12
By add the --verbose option:
$ pod lib lint --verbose
MXKit (5.2.2) - Analyzing on iOS 8.0 platform.
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-App`: (``)
Fetching external sources
-> Fetching podspec for `MXKit` from `/Users/Meniny/MXDevelop/MXProjects/MXKit-in-Objective-C`
Resolving dependencies of
Comparing resolved specification to the sandbox manifest
A MXKit
Downloading dependencies
-> Installing MXKit (5.2.2)
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding libraries to Pods project
- Adding resources to Pods project
- Linking headers
- Installing targets
- Installing target `MXKit` iOS 8.0
- Generating Info.plist file at
`../../../../../private/var/folders/rf/gj7xyczj0t14ggvbvh9jldf80000gn/T/CocoaPods/Lint/Pods/Target
Support Files/MXKit/Info.plist`
- Generating module map file at
`../../../../../private/var/folders/rf/gj7xyczj0t14ggvbvh9jldf80000gn/T/CocoaPods/Lint/Pods/Target
Support Files/MXKit/MXKit.modulemap`
- Generating umbrella header at
`../../../../../private/var/folders/rf/gj7xyczj0t14ggvbvh9jldf80000gn/T/CocoaPods/Lint/Pods/Target
Support Files/MXKit/MXKit-umbrella.h`
- Installing target `Pods-App` iOS 8.0
- Generating Info.plist file at
`../../../../../private/var/folders/rf/gj7xyczj0t14ggvbvh9jldf80000gn/T/CocoaPods/Lint/Pods/Target
Support Files/Pods-App/Info.plist`
- Generating module map file at
`../../../../../private/var/folders/rf/gj7xyczj0t14ggvbvh9jldf80000gn/T/CocoaPods/Lint/Pods/Target
Support Files/Pods-App/Pods-App.modulemap`
- Generating umbrella header at
`../../../../../private/var/folders/rf/gj7xyczj0t14ggvbvh9jldf80000gn/T/CocoaPods/Lint/Pods/Target
Support Files/Pods-App/Pods-App-umbrella.h`
- Running post install hooks
- Writing Xcode project file to
`../../../../../private/var/folders/rf/gj7xyczj0t14ggvbvh9jldf80000gn/T/CocoaPods/Lint/Pods/Pods.xcodeproj`
- Writing Lockfile in
`../../../../../var/folders/rf/gj7xyczj0t14ggvbvh9jldf80000gn/T/CocoaPods/Lint/Podfile.lock`
- Writing Manifest in
`../../../../../private/var/folders/rf/gj7xyczj0t14ggvbvh9jldf80000gn/T/CocoaPods/Lint/Pods/Manifest.lock`
Integrating client project
[!] Please close any current Xcode sessions and use `App.xcworkspace` for this project from now on.
Integrating target `Pods-App` (`../../../../../var/folders/rf/gj7xyczj0t14ggvbvh9jldf80000gn/T/CocoaPods/Lint/App.xcodeproj` project)
Adding Build Phase '[CP] Embed Pods Frameworks' to project.
Adding Build Phase '[CP] Copy Pods Resources' to project.
Adding Build Phase '[CP] Check Pods Manifest.lock' to project.
- Running post install hooks
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod
installed.
Building with xcodebuild.
xcodebuild clean build -workspace App.xcworkspace -scheme App -configuration Release CODE_SIGN_IDENTITY=- -sdk iphonesimulator -destination id=DF8B8BB3-28D5-40FC-8150-7FEBD5BE12BF
2016-09-22 18:53:33.285 xcodebuild[44725:412823] [MT] DVTPlugInManager: Required plug-in compatibility UUID 8A66E736-A720-4B3C-92F1-33D9962C69DF for KSImageNamed.ideplugin (com.ksuther.KSImageNamed) not present
Build settings from command line:
CODE_SIGN_IDENTITY = -
SDKROOT = iphonesimulator10.0
xcodebuild: error: 'App.xcworkspace' does not exist.
-> MXKit (5.2.2)
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
- NOTE | [iOS] xcodebuild: xcodebuild: error: 'App.xcworkspace' does not exist.
[!] MXKit did not pass validation, due to 1 error.
You can use the `--no-clean` option to inspect any issue.
/Users/Meniny/.rvm/gems/ruby-2.2.2/gems/cocoapods-1.0.1/lib/cocoapods/command/lib/lint.rb:75:in `block in run'
/Users/Meniny/.rvm/gems/ruby-2.2.2/gems/cocoapods-1.0.1/lib/cocoapods/command/lib/lint.rb:47:in `each'
/Users/Meniny/.rvm/gems/ruby-2.2.2/gems/cocoapods-1.0.1/lib/cocoapods/command/lib/lint.rb:47:in `run'
/Users/Meniny/.rvm/gems/ruby-2.2.2/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/Users/Meniny/.rvm/gems/ruby-2.2.2/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'
/Users/Meniny/.rvm/gems/ruby-2.2.2/gems/cocoapods-1.0.1/bin/pod:55:in `<top (required)>'
/Users/Meniny/.rvm/gems/ruby-2.2.2/bin/pod:23:in `load'
/Users/Meniny/.rvm/gems/ruby-2.2.2/bin/pod:23:in `<main>'
/Users/Meniny/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
/Users/Meniny/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'
Today I installed a new system (macOS Sierra 10.12) with Parallels Desktop 12, and:
downloaded Xcode 8 (and installed the components)
installed rvm 1.27.0 (latest)
updated gem to 2.6.6
installed CocoaPods 1.0.1
but the pod lib lint and pod trunk push commands still doesn't work.
:(
sudo gem install cocoapods --pre
When I updated cocoapods to 1.1.0.rc.2, the error has gone.
Hope this can help you.
try sudo xcode-select -s /Applications/Xcode8.0.app/Contents/Developer/ after you install new version of Xcode

Xamarin iOS Framework Binding

I am trying to create a binding for the WePay Framework:
https://github.com/wepay/wepay-ios
Following are the steps that I followed.
I installed CocoaPods.
I installed ObjectiveSharpie
I run this command in terminal : $ sharpie pod init ios WePay
And I get this error: Could not install CocoaPod
here is the full error message:
** Setting up CocoaPods master repo ...
(this may take a while the first time)
Setting up CocoaPods master repo
$ /usr/bin/git pull --ff-only
From https://github.com/CocoaPods/Specs
ee36ba4..8c6767d master -> origin/master
Updating ee36ba4..8c6767d
Fast-forward
Specs/BluetoothKit/0.3.0/BluetoothKit.podspec.json | 35 ++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 Specs/BluetoothKit/0.3.0/BluetoothKit.podspec.json
Setup completed
** Searching for requested CocoaPods ...
** Working directory:
** - Writing Podfile ...
** - Installing CocoaPods ...
** (running pod install --no-integrate --no-repo-update)
[!] Unknown option: --no-integrate
Did you mean: --no-ansi?
Usage:
$ pod install
Downloads all dependencies defined in `Podfile` and creates an Xcode Pods
library project in `./Pods`.
The Xcode project file should be specified in your `Podfile` like this:
project 'path/to/XcodeProject.xcodeproj'
If no project is specified, then a search for an Xcode project will be
made. If more than one Xcode project is found, the command will raise an
error.
This will configure the project to reference the Pods static library, add
a build configuration file, and add a post build script to copy Pod
resources.
Options:
--repo-update Force running `pod repo update` before
install
--project-directory=/project/dir/ The path to the root of the project
directory
--silent Show nothing
--verbose Show more debugging information
--no-ansi Show output without ANSI codes
--help Show help banner of specified command
error: could not install CocoaPod
Well apparently the most recent CocoaPods removed the --no-integrate option that objective sharpie uses. Downgrading cocoapods to 0.39.0 should fix your issue. It worked for us.

Resources