No such module 'DJIWidget' when trying to integrate DJI video feed - ios

I have been trying to integrate the DJIWidget library into my Xcode project to display a live video feed from a drone, but I have been unable to get Xcode to find the DJIWidget module.
I tried downloading the DJI iOS-FPVDemo-Swift project and running pod install, but it has the exact same problem, where Xcode cannot find the DJIWidget module.
Is this an issue with the way Cocoapods is installing it?
I am using Xcode 10.1.

I remember DJIWidget has an issu with the last version of Cocoapods 1.6.0. Could you degragde your Cocoapods to 1.5.3 and try again. Hope this helps.

Related

libPhonenumber (from Google) on iOS in a Kotlin Native project

I've been struggling to solve a problem.
I'm building a cross platform app (iOS and Android) using Kotlin Multiplatform (KMP) where I need a library from Google (https://github.com/google/libphonenumber).
For Android, I can point to a Maven repo (https://repo1.maven.org/maven2/com/googlecode/libphonenumber/libphonenumber/8.12.6/).
For iOS, I can use a ObjC port of libPhonenumber via Cocoapods.(https://cocoapods.org/pods/libPhoneNumber-ios).
But, I can't use Kotlin's (cocoapod plugin) to properly recognize the Pod. The plugin appears to fail to build.
Here's the details of my setup:
Xcode v11.5
IntelliJ IDEA v2020.1.2
Cocoapods v1.9.1
Gradle 6.0.1
Sample repo (https://github.com/touchlab/kotlin-native)
NOTE: Within the repo, I'm using ./samples/cocoapods
modify ./samples/cocoapods/kotlin-library/build.gradle.kts
commented out AFNetworking, remove AFNetworking pod
pod("AFNetworking", "~> 3.2.0")
add a new pod
pod("libPhoneNumber-iOS")
modify ./samples/cocoapods/kotlin-library/gradle.properties
change this line:
kotlin.native.home=../../../dist
to this:
#kotlin.native.home=../../../dist
in Terminal in this folder: ./samples/cocoapods/kotlin-library/
./gradlew podspec
This creates a podspec file (libPhoneNumber-iOS.def) in ./samples/cocoapods/kotlin-library/build/cocoapods/defs/
cd from kotlin-library to ios-app folder
cd ../ios-app/
Pod install using the command:
pod install
You'll see something like:
Downloading dependencies
Installing kotlin_library (1.0)
Installing libPhoneNumber-iOS (0.9.15)
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.
When I build the sample 'ios-app' target: simulator in Xcode, I get the error:
fatal error: module 'libPhoneNumber' not found
I have tried other libPhoneNumber pods, such as:
libPhoneNumberSwift
LTPhoneNumberField
Both fail to build using Kotlin's cocoapods plugin, but work as a Pod without Kotlin's cocoapod plugin.
What am I missing?
This particular problem seems to be caused by the dash in the pod's name. There was already an issue reported on GitHub. For now, it's recommended to workaround this problem by re-naming the module. Changing your kotlin-library/build.gradle.kts like
pod("libPhoneNumber-iOS", moduleName = "libPhoneNumber_iOS")
should help. Please give it a try and tell here or on GH if it works.
I have obtained excellent results by adding the unchanged Javascript version of libphonenumber using JavaScriptCore in IOS. The only part of the library not available yet in Javascript is the geocoder.
I used the concept explained here: https://www.appcoda.com/javascriptcore-swift .
Performance is great and there is no porting involved. Always the latest version available.

React Native project version upgrade error: v0.56 to v0.60, iOS fails

I'm currently upgrading one of my projects built in React Native v0.56 to latest v0.60. Created a new project with version v0.60 and updated all the packages used in previous version of app, but now facing weird errors.
I've already tried all the possible solutions mentioned in Git and Stack overflow. None of them worked for me. I've also tried to remove plugins one by one and then adding them but not able to find cause of the error.
iOS:
In iOS, all the packages by default autolinks as per v0.60, but I got error of linking in very first package, I've tried manual linking too, not working.
After manual linking do cd ios and then pod install. This will not be done by autolinking and you have to do it yourself. On iOS on my project i had to manual link on iOS almost every library and almost all of them needed a pod install
use upgrade helper from react native community Upgrade Helper

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

Xcode showing error 'No such module' even though I've installed Cocoapods and installed pod file of Dialogflow

I've been making a chatbot using Dialogflow formerly Api.AI but now encountering error while integrating the project to my app written in Swift in Xcode. I'd installed cocoapods using terminal "sudo gem install cocoapods" and using this version of Dialogflow to create the podfile.
All gone well but now when I'm importing inside Xcode in my app's AppDelegate.swift file using import ApiAI or import AI Xcode is showing me error that No such module. Please refer to image.
And on GitHub this library which is written in Swift, showing that it has depreciated and asking me to refer to API.AI's Apple Client library which is in Obj-C and unfortunately I've no expertise in Obj-C.
After installing a pod using Cocoa Pods, you must from that point forward open the workspace rather that the project file. The icons will appear differently in your project like so:
In the image you provided is clearly showing that you have opened the project file not the workspace one.
Go to Pods Build settings and set Build Active Architecture Only to NO. This always helps while using pods. After that clean the project once and then build.
After installing pod you should clean project (shift + command + k) and then builds (command + b) in it a few times. Repeat it a few times if it is not still working.
Hope this help!

MuPDF Cocoapods Installation Error

After researching on what library to use in one of my projects for epub reader, I decided to use MuPDF. I integrated it using Cocoapods, but when I build the app, it gives me a couple of errors on _math.h_ file on lines 36 and 73. I have attached the screenshots for reference. It would be of great help if anyone here can help me build the app after integrating MuPDF without any error. line 36
I think you are being hit by a not-backwards-compatible change that took place in CocoaPods 0.39 ( https://github.com/CocoaPods/CocoaPods/pull/4057 ).
Can you upgrade your CocoaPod to 0.39? (gem update cocoa pods) If you do so and then run pod install that should fix it.
If you can't upgrade to 0.39, you could use the 1.7 podspec mupdf, which is compatible with CocoaPod 0.38.
There's an example project that uses the MuPDF pod spec here:
https://github.com/jogu/MuPDF-example
(To try and prevent this problem in the future I just pushed a new pod, 1.8.2, that has a cocoapods_version >= 0.39 restriction in the podspec.)

Resources