Problems building through bitrise; more problems building through xcode - ios

I've somehow found myself trying to build an app through bitrise to deploy to testflight. I'm a total novice at all of this, so apologies for what probably seems stupid.
Bitrise manages to build everything but then finally refuses to deploy, citing the following in the log:
[06:06:44]: [Transporter Error Output]: description length:10500450
[06:08:55]: [Transporter Error Output]: ERROR ITMS-90725: "SDK Version Issue. This app was built with the iOS 11.4 SDK. All iOS apps submitted to the App Store must be built with the iOS 11 SDK or later, included in Xcode 9 or later. Further, starting March 2019, all iOS apps submitted to the App Store must be built with the iOS 12.1 SDK or later, included in Xcode 10.1 or later."
[06:08:55]: Transporter transfer failed.
[06:08:55]:
[06:08:55]: description length:10500450
ERROR ITMS-90725: "SDK Version Issue. This app was built with the iOS 11.4 SDK. All iOS apps submitted to the App Store must be built with the iOS 11 SDK or later, included in Xcode 9 or later. Further, starting March 2019, all iOS apps submitted to the App Store must be built with the iOS 12.1 SDK or later, included in Xcode 10.1 or later."
Fine, I think, I'll clone the repo, open up the project in xcode and thereby update the sdk version. This just seems to mean more problems... When I try to build the project within Xcode, I encounter the following error:
Users/[...]/ios/Pods/Target Support Files/Pods-x/Pods-x.debug.xxconfig: unable to open file (in target "x" in project "x")(in target 'x')
In addition to this, there are a few issues, including:
The file "Pods-x.release.xcconfig" couldn't be opened because there is no such file.
If I ignore this error, push it and build it anew on bitrise, I get the following:
Resolving dependencies of `Podfile`
[!] CocoaPods could not find compatible versions for pod "DoubleConversion":
In snapshot (Podfile.lock):
DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
In Podfile:
DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
None of your spec sources contain a spec satisfying the dependencies: `DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`), DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
So, it's looking like there's something badly amiss with the CocoaPods installation. And indeed, when I check into the files, there is no Pods folder at all -- just Podfile and Podfile.lock. (I have no idea how it would have build fine previously without this?)
So, I try to reinstall CocoaPods into the project, by running pod install from a terminal in the iOS folder. I get that same error in the terminal: No such file or directory # rb_sysopen -- /Users/[...]DoubleConversion.podspec. pod update generates the same error. In addition, I'm told there's a new version of CocoaPods available. I install it using sudo gem install cocoapods, which generates a Pods folder with subfolders in ios, but all are empty.
As you can tell, I'm a bit baffled. If an intrinsic part of CocoaPods functionality is missing from the project files, how did it ever build previously? I'm guessing it's due to CocoaPods being installed as part of the bitrise workflow (and it is indeed there) -- but, if so, what about that is now causing it to fail during build? What is it about trying to open up the project to update the SDK used that is introducing this problem?
I'm sure all this seems a bit daft (at least I hope so). Thanks for your patience and any help would be enormously appreciated.

Related

Building Realm for Mac Catalyst fails: Realm.h not found

I have an iOS app, which I recently updated to support Mac Catalyst. For the Mac version I added a new target, which I also added to my Podfile with the subset of the same libraries, including Realm.
The app builds well for "My Mac", but when I want to archive it (build for release), it fails with the following error:
"Umbrella header 'Realm.h' not found"
I am not familiar with the problem, what could go wrong?
I tried the usual Derived Data deleting, etc, but nothing seems to help. Is this some kind of problem with the CocoaPods, my config, or with Realm?
Due to CocoaPods not releasing 1.10.2 I have fixed the same issue in my project.
Remove Realm from your pod file
pod install in terminal to remove it fully
Install Swift Package Manager for (Xcode) - https://swiftpackageregistry.com/realm/realm-cocoa
This should allow you to get the project archived successfully.

Xcode build with Google UMP SDK fails with 'framework not found'

We make middleware using Cordova and AdMob to show ads. Cordova generates an Xcode project for us. However the resulting Xcode projects now fail to build with the error ld: framework not found UserMessagingPlatform.xcframework.
This appears to be caused by the Google UMP SDK updating to version 1.3.0, which notes "Updated the SDK from a .framework to a .xcframework." I've contacted AdMob support, and they claim the build works for them and haven't provided any useful help.
I have no idea why our builds now fail and I'm at a loss as to what to do about it. Here is a sample Xcode project: https://www.dropbox.com/s/y1ly2c3yi45rop6/TestBuild.ios.project.zip?dl=0
Can anyone identify what has gone wrong with this Xcode project causing it to fail to build, and identify a workaround?
The Issue
The issue appears to be that a framework/dependency is not added to the Xcode project, so it doesn't have the code necessary to compile the application. AdMob relies on that UserMessagingPlatform thing to work, and without the Mobile Ads SDK being present in your codebase, UserMessagingPlatform is missing and your application is essentially asking for code that isn't there. To resolve this, you have to tell cocoapods (a dependency manager, think npm but for Swift/Objective-C) to locate and add the missing code to your project.
First, install cocoapods if you haven't already. I used Homebrew to do this, as it seems to be the only method that worked without headache. Many people already have Homebrew, but if you don't, install that first, then run:
brew install cocoapods
Next, go into your project directory using the Terminal. Once you're in the directory, run:
pod install --repo-update
Reopen your project in Xcode, and it should compile successfully now.
Step by step resolution:
Skip any steps that aren't necessary for your environment.
Install Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Install cocoapods: brew install cocoapods
Open a terminal, navigate to your project directory: cd /path/to/your/project
Update dependencies: pod install --repo-update
Disclaimer: I'm not a Swift or Objective-C developer, and my experience with Apple/Xcode is limited. I also am unfamiliar with "cocoapods" and AdMob. I just downloaded the sample code and worked through the issue until I got it to compile successfully.
Are you using Cocoapods for your XCode project?
This stackoverflow answer suggest updating cocoapods
Try updating cocoapods:
sudo gem install cocoapods
Cocoapods changelog contains fixes for XCFrameworks
.xcframework files can only be used on CocoaPods 1.10.0 or newer, in your sample app you were using 1.8.4.
Update CocoaPods to latest and run pod install again.

Multiple dependencies error during build on iOS

I'm trying to build my nativescript app on iOS.
I have brand new MacMini with fresh system and all stuff like xcode, etc.
My app builds without any warnings on android - not checked android build on Mac.
When i try to run my app on emulator i have an error saying:
Analyzing dependencies
[!] There are multiple dependencies with different sources for `Socket.IO-Client-Swift` in `Podfile`:
- Socket.IO-Client-Swift (from `https://github.com/triniwiz/socket.io-client-swift.git`)
- Socket.IO-Client-Swift (~> 12.1.3)
'pod install' command failed.
Tried to remove one of the dependency from pod file but without any luck - it brings back during build.
What should i do?
After updating my dependencies, I also ran into an issue with Cocopods, although, not exactly the same. In my case, running pod repo update from within platforms/ios solved my problem. In short, there had been updates that my local pod spec repo wasn't aware of and it was getting "confused". I'm not sure if this will ultimately solve your specific problem, but it's fairly quick to do and, at least, won't hurt anything.
Good luck!

Renaming a React Native project

I have a working react native app (without expo), running and compiling in both Android and iOS devices. Now I'm trying to rename the app, but I'm having problems with that.
Steps followed:
I have deleted both ios and android directories.
Changed the project name in my app.json
Regenerated the android and ios directories with react-native upgrade --legacy (cause eject is not working anymore)
Updated my podfile with the need
Pod install
When i tried to compile my app via xcode, I got "null is not an object (evaluating '_RNGestureHandlerModule.default.Direction')
I guessed that was due to the autolinking when you install some react native third party components. So I deleted node_modules, and installed all react native navigation again. Then I ran react-native link. The previous error went away.
Now, I'm stuck with:
Target 'cjlrnneTests' has target dependency on Target 'cjlrnne'
That command depends on command in Target 'cjlrnne': script phase “[CP] Copy Pods Resources”
Honestly, I don't know what else more to do / look for.
Can anyone please provide with some clue, or the steps to change a RN app's name?
Thanks!
You can try this package for renaming the app.
react-native-rename
https://www.npmjs.com/package/react-native-rename
react-native-rename <newName>
It will automatically configure all the things.

Zip and Encryption pods build error in Ensembles 2.6.2

I created a brand new Xcode project in Swift and integrated Ensembles 2.6.2 via Cocoapods.
I also wanted to include Zip compression and Encryption and so I simply added these 2 pods in my Podfile, as suggested in the manual.
Unfortunately after running pod install, I’m getting an error when trying to build. I attach 2 screenshots to give you some context. Unless I’m missing something really obvious, I have no idea on what to try next.
I'm using Xcode 9.4.1 and macOS 10.13.6

Resources