how to create jabberd xmpp client in ios9 using swift2 - swift2

I am following this link
https://github.com/processone/xmpp-messenger-ios
but am getting couple of errors which are as follows
1.Could not build ObjectiveC module 'XMPPFramework'
2.CocoaAsyncSocket/GCDAsyncSocket.h file not found.
I have tried out ways such as
Built Setting on your project, then setting it like
User Header Search Paths = $(SRCROOT) // recursive.
Always Search User Paths = YES
But still errors persist.
Please help

To build the project, you need to have Cocoapods installed.
Then, you can check out the latest version of the project with Xcode 7.2.1 and open Example/xmpp-messenger-ios.xcworkspace
On first build all dependencies should be properly downloaded, but you need to use workspace and not project with Cocoapods.

Related

Executable Not Found. xxx.app is not a valid path to an executable file

Details
Executable Not Found
Domain: DVTMachOErrorDomain
Code: 5
Recovery Suggestion: /Users/riber/Library/Developer/Xcode/DerivedData/digitalCurrency-hiyiyrokjaydkiagjimlwohehrtu/Build/Products/Debug-iphonesimulator/digitalCurrency.app is not a valid path to an executable file. Please rebuild the project to ensure that all required executables are created. Check your project settings to ensure that a valid executable will be built.
System Information
macOS Version 11.4 (Build 20F71)
Xcode 12.5 (18205) (Build 12E262)
Timestamp: 2021-06-11T16:34:20+08:00
Check if all files are available.
Targets -> Build Phases -> Compile Sources
If you see faint files, then they need to be removed or added.
Under "Build Settings" - "Architectures" check that you don't have "arm64" excluded under "Excluded architectures" for release, as all new iOS devices use this architecture.
I'm also get the same error. Let me share how I fix it.
I write cpp code on vscode.
I deleted a .cpp/.h file that I didn't need anymore a few days ago.
Everything nice and happy when I working on vscode.
".app is not a valid path" appeared when i switched back to the xcode to verification function.
I was confused.
(I don't immediately remember my delete operation a few days ago)
The key isn't the dialog showed "Executable Not Found",
Switch to "Issue Navigator" and drag to the bottom...
Now the ERROR shows up in front of U:
Finally the solution is :
TARGETS -> Select your ‘Target' -> Build Phases -> Compile Sources :
Select the ".cpp" file that had been delete, then "Remove Items" by click the second "-" button in the lower left corner.
I fixed it by adding x86_64 to VALID_ARCHS. Build Setting search "VALID_ARCHS",check the x86_64 is there or not, add and run.It worked with me .
resolve it using pod install.
as Frank said, I also use RN in my app.
I have tried clean derived data & even reboot, still happening
Check the Executable File in the Info(.plist). It should be named the same as your Product in Products
I have this issue on a react native application and I can resolve it reinstalling cocoaPods.
pod install
Inside the ios folder on your react native project.
Check if you have any other info.plist-s added to project.
I had similar issue when I added some pod sources (MKStoreKit) to the project - it had several info plists for different platforms which interfered with original one. Deleting wrong info plists solved the issue.
I have to delete the 'DerivedData' folder:
$ rm -Rf ~/Library/Developer/Xcode/DerivedData
EDIT: I've found a solution...
The problem in my case was because of project configurations and Pods. In the long life of my project the configuration files for the schemes changed and Xcode, using the new build system, did not like.
To fix it, just go to the Project -> Info tab. Under Configurations change the Based on Configuration value of the Targets and set them to None. Please note that I've changed only the Targets.
Now close Xcode and launch pod install from the Terminal.
reopen Xcode and launch your project.
Old answer:
I may have found a workaround to this issue... not a solution but a workaround.
I have to work on a not really recent project that was built using the Legacy System that, as you may know, is deprecated now.
While I was using Xcode 12 everything was fine. Then I installed the Xcode 13 GM and I upgrated the project to the new building system and I started to experience this issue. I have the same problem with any Xcode 13.x version. With the betas I had not, as far as I can remember.
The strange thing is that "sometimes" (I could not reproduce it sorry), the new build system worked... but just for a while.
The building phase succeeds but then, then the app is installed on simulator OR on a real device, I have that annoying message that we know...
This morning I may have find a solution...
In Xcode go to File -> Workspace Settings, keep the Legacy Build System and check the box "Do not show a diagnostic issue about build system deprecation"
Now the app builds and can be installed.
Honestly I don't know it is an Xcode bug or not... maybe it is.
if you are using git, there's huge chance there might be conflict in .pbxproj due to multiple people adding stuffs together. During the resolution xcode might try to recover those 'lost references' it got confused and unable to resolve the once there references. find those 'recovered references' in project explorer and remove them if they are invalid
Had the same issue. I deleted the simulators and added them again.
Please make sure that your runner isn't missing AppDelegate.swift or Runner-Bridging-Header.h file.
In my case, my AppDelegate.swift file and Runner-Bridging-Header.h files were deleted, so I copy and paste both the files in ios>Runner folder again from some other project (usually both of these files are same in all projects, just need to add the code lines for firebase configurations).

in Xcode12 beta the Swift package manager fails to load dependencies

Recently the SPM has started to give me errors. Was working before.
I'm trying to use the AlamofireImage library but xcode fails to resolve de dependency and doesn't give any good explanation.
Does anybody know why and how to make it work?
this was once happened to me, maybe you can try to go ahead to File > Swift Packages > Update to Latest Package Versions. Let's see if that works
I ran into a similar issue when I was trying to arrange the files inside the project folder, and when I put them back to their old position the problem was resolved and the app run successfully.
I found something that's not ideal, but works for now. In your main xCode project file, go under Project not Target and find Package Dependencies. After finding it, remove the SDK, and then right click on the name of your project and add a package. This time when adding Firebase, use Minor version. It should hopefully resolve and install.

React Native Build Errors in Xcode

While trying to build my React Native project in Xcode keep coming across the same build errors. There are too many errors to list, but it seems to have something to do with React. Is there any way to rewind in Xcode or address the mass errors? I installed several npm/react-native libraries and used link to integrate them. Any idea on how to restore order, given the warnings in the image?
My issue was finally solved here:
https://github.com/facebook/react-native/issues/14382#issuecomment-313163119
In the Terminal, navigate to the react-native/third-party/glog folder inside node_modules (for me, this was cd node_modules/react-native/third-party/glog-0.3.4)
Once actively in this folder, run ../../scripts/ios-configure-glog.sh
Glog is configured and the required config.h header file is created for Xcode to find

SpeechToTextV1 - Missing required modules SSCZLib, SSCommonCrypto

I am working on XCode 9.1 project that uses IBM Watson swift-sdk SpeechToTextV1 package. After upgrading swift-sdk to the version 0.19.0 and building XCode project the compiler error has occured: Missing required modules: 'SSCZLib', 'SSCommonCrypto' pointing to the import SpeechToTextV1 statement. swift-sdk updated via Carthage.
Cartfile content: github "watson-developer-cloud/swift-sdk".
command line update: carthage update --platform ios --no-use-binaries.
How can I include SSCZLib and SSCommonCrypto modules into XCode project?
Please help. Thanks a lot.
Use carthage update --platform iOS --no-use-binaries. It takes a while, but it works.
I'm afraid that I haven't been able to replicate the problem on my machine. I started with a new, empty Xcode project and was able to transcribe audio with the Speech to Text service.
I uploaded my app here. Can you try downloading it, adding your Speech to Text credentials, and running the app?
Please make sure that the newly compiled frameworks are the ones being used. Carthage does not place the frameworks in a custom location that is referenced in the project or workspace.
For me - in addition to building the library using --no-use-binaries flag - I also had to ensure that under my target's
Build Phases->Embed Frameworks
Build Phases->Link Binary with Libraries
SpeechToTextV1.framework is included
In addition - I found that these two files made all the difference inside the Carthage folder:
Carthage/Checkouts/ios-sdk/Source/SupportingFiles/Dependencies/Starscream/zlib/include.h
Carthage/Checkouts/ios-sdk/Source/SupportingFiles/Dependencies/Starscream/zlib/module.modulemap
I could only get this to work after my project was directly referencing the Carthage folder. Deleting either of these two files caused the error to return.
The v0.21.0 release of the Watson Swift SDK fixes this issue. You should no longer have to add a link to the zlib folder in your project settings. However, you will need to copy Starscream.framework into your application in the same way that other frameworks are copied.
The solution was to externalize the Starscream dependency. Adding Starscream as a recursive dependency for the Swift SDK allows it to build independently with its own environment. When the Starscream library is copied into your application, it should automatically include the SSCZLib and SSCommonCrypto dependencies.
We test each SDK before it's release, but this problem slipped past us. Our test machine happens to have other software that adds SSCZLib and SSCommonCrypto to the path, making it available to the Xcode build. It wasn't until we refreshed the machine with a new macOS install that we were able to replicate the problem. And with v0.21.0, that problem has been solved.
Sorry for your trouble and thank you for your patience while we tracked down the solution!

XCode 8.2.1 error - No such module YouTubePlayer

I am using https://github.com/gilesvangruisen/Swift-YouTube-Player
First I've tried to import it manually from everywhere include dropping, copyng, embed framewordks, embedded binaries, linked frameworks, but it was unsuccessfully with error message No such module YouTubePlayer
Next I used cocoapods. Install it and run it from .xcworkspace. Then try to run it and again error message No such module YoutubePlayer
This is list tree directories after pod install
Maybe this is the solution, but I don't know where is repo and how to do the described action.
https://github.com/gilesvangruisen/Swift-YouTube-Player/issues/42
The reason why its failing with cocoapod is because the pod written is in old swift version. So, unless until we don't compile the pod successfully, we can't import that. You can change the old swift code to new using :
Xcode->Edit->Convert->To Current Swift Syntax
Also you can use the latest release and build the framework from the repo you mentioned:
https://github.com/gilesvangruisen/Swift-YouTube-Player
I downloaded the latest release and created the youTubePlayer framework and linked it to a sample app and able to import it.
Please check this link for the sample app which is having YouTubePlayer framework as well which you can use in your own project.

Resources