Why do i get this error message when trying to add a new framework using carthage? - swift

I want to add a FrameWork to this app I'm working on. It converts latitude and longitude coordinates to UTM coordinates.
I added this to the cartfile:
github "peterringset/UTMConversion" ~> 1.1
But when i run this code in the terminal to clone the framework:
carthage update --platform iOS
I get this error message:
A shell task (/usr/bin/env git clone --bare --quiet https://github.com/peterringset/UTMConversion.git /Users/Fallet/Library/Caches/org.carthage.CarthageKit/dependencies/UTMConversion) failed with exit code 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
I've used other external frameworks like this, and it used to work just fine.. Any idea how I can fix this?

The problem occurs due to a change in username by the publisher of his GitHub account. If you notice the link to the repository is https://github.com/wtw-software/UTMConversion while the Carthage reference is "peterringset/UTMConversion". I was able to solve it by changing the Carthage reference to "wtw-software/UTMConversion". But then you will get this error if you are on Swift 3 or below and Xcode 8 or below.
Task failed with exit code 65.....This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details
So I digged into the logs and found this:
Check dependencies
“Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
** BUILD FAILED **
I googled around this error and it looks like the project is developed with Swift 4 and with Xcode 9.

Related

Error: 'Flutter/Flutter.h' file not found

I added firebase_crashlytics to my Flutter project and followed the Firebase guideline in order to install it.
On flutter run the app works well without any error.
ONLY DURING flutter build ipa I get this:
Error (Xcode): 'Flutter/Flutter.h' file not found
/project/ios/Runner/GeneratedPluginRegistrant.h:9:8
Error (Xcode): failed to emit precompiled header
'/Users/macnew/Library/Developer/Xcode/DerivedData/Runner-biyumwxiyqxyjkacscuqcbwbjroj/Build/Intermediates.no
index/ArchiveIntermediates/Runner/PrecompiledHeaders/Runner-Bridging-Header-swift_26UGEQJVHLD5H-clang_19ZWN9O
PIOOJI.pch' for bridging header '/project/ios/Runner/Runner-Bridging-Header.h'
Encountered error while archiving for device.
Any advice about this?
I'm using firebase_crashlytics 2.8.6 (latest version) and flutter 2.10.5 (without null-safety).
Since I tried every solution given on StackOverflow and Github (Flutter repo), here you have the solution:
Delete the "ios" folder
Run the app and create the iOS project
Inside the "ios" folder ("cd ios"), run the command "pod install"
Follow the official guide by the iOS side
This is the only solution that works.

Error Module 'flutter_secure_storage' not found when try Product ->Build for -> Profiling

well this error occurs to me when I try to make my app in production.
The app is created with flutter and I was able to create the apk for android, but when I try to do it for ios it won't let me.
The file that I am opening is Runner.xcworkspace and the problem is the import of a flutter library, it seems to me that I have to make some kind of connection with the pods.
here is the error, I want to tell you that I do not want to run the app, but to make an installer
The error that occurs when building a release (ie. flutter build ipa) and not when running a debug build is:
/[REDACTED]/ios/Runner/GeneratedPluginRegistrant.m:48:9: fatal error: module
'flutter_secure_storage' not found
#import flutter_secure_storage;
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
For me regenerating Podfile in the following way solved the issue:
rm ios/Podfile && flutter build ios
See Closed [ios][release] GeneratedPluginRegistrant.m Module not found
#43986

Unrecognized font family 'FontAwesome5Free-Solid'

This happened out of nowhere, and I have no idea what happened.
I started to run my app and got this error:
I believe that it's coming from react-native-vector-icons.
I've tried switching to an older version of react-native-vector-icons, and I still receive the same result.
I've also tried to uninstall react-native-vector-icons, and, when I do, I receive a compiling error.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/lukeschoenberger/Documents/Programming/news-
arg/test6/ios/build/test6/Build/Intermediates.noindex/Pods.build/Debug-
iphonesimulator/RNVectorIcons.build/Objects-
normal/x86_64/RNVectorIconsManager.o
/Users/lukeschoenberger/Documents/Programming/news-
arg/test6/node_modules/react-native-vector-
icons/RNVectorIconsManager/RNVectorIconsManager.m normal x86_64
objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
I'm pretty stuck at this point.
EDIT:
After I linked react-native-vector-desing and cleared the build folder, I received this error:
Build system information
error: Multiple commands produce '/Users/lukeschoenberger/Documents/Programming/news-arg/test6/ios/build/test6/Build/Products/Debug-iphonesimulator/test6.app/AntDesign.ttf':
1) Target 'test6' (project 'test6') has copy command from
'/Users/lukeschoenberger/Documents/Programming/news-
arg/test6/node_modules/native-base/Fonts/AntDesign.ttf' to
'/Users/lukeschoenberger/Documents/Programming/news-
arg/test6/ios/build/test6/Build/Products/Debug-
iphonesimulator/test6.app/AntDesign.ttf'
2) Target 'test6' (project 'test6') has copy command from
'/Users/lukeschoenberger/Documents/Programming/news-
arg/test6/node_modules/react-native-vector-icons/Fonts/AntDesign.ttf' to
'/Users/lukeschoenberger/Documents/Programming/news-
arg/test6/ios/build/test6/Build/Products/Debug-
iphonesimulator/test6.app/AntDesign.ttf'
** BUILD FAILED **
Icon module does not appear to be properly linked.
You can try react-native link react-native-vector-icons
If this is not a workaround,
Delete all items in the build folder under the iOS folder. Then rebuild the project with react-native run-ios.
Regular, Solid, and Brand Icons TTF File import android and ios directory
https://aboutreact.com/react-native-fontawesome/

Error Setting up PerfectlySoft Swift on OS X

When trying to build the most simple starter pack for PerfectlySoft Swift Server https://github.com/PerfectlySoft/Perfect, which simply involves the following steps per their website:
git clone https://github.com/PerfectlySoft/PerfectTemplate.git
cd PerfectTemplate
swift build
.build/debug/PerfectTemplate
I get the following error multiple times during the step "Linking COpenSSL" which causes the build to error out "error: exit(1)":
#escaping attribute only applies to function types
I'm building this with Xcode command line tools V:8.0 (8S201h). What do I need to be doing differently to get this to work?
Please, use DEVELOPMENT Snapshot instead a release version of Swift:
Swift Snapshot

How to install Swift package via package manager?

I am currently following the document from swift.org to play around with the new Swift Package Manager.
I cloned the demo project from Github and run the following command from terminal.
git clone https://github.com/apple/example-package-dealer.git
cd example-package-dealer
swift build
.build/debug/Dealer
While I run swift build, error arise.
<unknown>:0: error: no such file or directory: 'build'
Any idea?
I stuck for an hour. Sadly, it's just an epic fail that downloading the wrong swift package. If you want to use swift build, MAKE SURE you download the development version.
You did not add the newly installed swift to your PATH. The instructions for doing that are here.
On OS X:
export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:"${PATH}"
On Linux:
export PATH=/path/to/Swift/usr/bin:"${PATH}"
Then to test it works:
swift build --version
I think it is a problem with the latest snapshot:
Ubuntu 14.04 Swift 2.2 Snapshot of January 11 contains swift-build in usr/bin
Ubuntu 14.04 Swift 2.2 Snapshot of January 25 doesn't contain swift-build in usr/bin
Besides, the January 25 release also seems to miss other files (libFoundation.so and libXCTest.so in usr/lib/swift/linux for instances).
Either there has been a structure change....or, simply, the latest snapshot had a problem ;)
While they fix the snapshot, simply take the older (January 11th) snapshot, and you should be fine.
I was facing the same issue and in my case, I recently updated my Xcode to 8.2.1 and swift 3.0 comes with it.
I was getting this log.
Ranvijay-Mac-mini:PerfectTemplate ranaranvijaysingh$ swift build
error: unable to invoke subcommand: /Library/Developer/CommandLineTools/usr/bin/swift-build (No such file or directory)
The path it was taking was incorrect. It was suppose to be:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
To change the path, run this command.
export PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH
And DONE.
Run : swift build again on your project and if you get this error.
xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
error: Invalid platform path
then you need to change the SDK path as well.
In my case, I had two .sdk at path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
MacOSX.sdk MacOSX10.12.sdk
To know what is your SDK path, run this command.
xcrun --sdk macosx --show-sdk-path
My case i got this.
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
To change it run this command.
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
and NOW DONE.
Try running swift build now.