I'm a flutter developer and I don't have much idea about iOS. I'm facing errors for the last 2-3 days in two packages. The flutter packages which I am using are - razorpay_flutter: ^1.2.7 and image_cropper: ^1.4.1 .
Now, razorpay_flutter is required to set use_frameworks! in Podfile else, it will give a file not found an error as shown in the screenshot.
On the other hand, the image_cropper packages use TOCropViewController iOS package which throws errors when we add use_frameworks! in Podfile. Check the below screenshot.
Also, there is an issue created on GitHub where people instructed not to add use_framework in Podfile but it is required for the Razorpay package.
The minimum deployment target shouldn't be less than iOS 10.0. If it is then go to "Podfile" and add this line and save the changes:
platform :ios, '10.0'
Then run pod install in the project directory i.e ios
Related
In my Flutter project, I target both Android and iOS, and I added the following libraries in my pubspec.yamlfile:
url_launcher: ^5.7.10
package_info: ^0.4.3+4
Now, when I run my app in debug mode on an iOS emulator, I got the following error during compile time:
/Users/blabla/MyProject/Developpement/myproject/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'package_info' not found
#import package_info;
~~~~~~~^~~~~~~~~~~~
1 error generated.
I can see the error in Xcode, when I open GeneratedPluginRegistrant.m:
I took a look at that, and maybe the problem comes from the fact that I use a custom Cocoapods file in my project (a custom Podfile), not sure though. The problem is: I need that file to import AWS libraries in my iOS project.
Here is the content of my Podfile:
platform :ios, '12.0'
target 'Runner' do
use_frameworks!
pod 'AWSMobileClient'
pod 'AWSAPIGateway'
pod 'AWSS3'
end
So how can I fix that problem?
Thanks.
I finally managed to make this work by doing the following:
create a new Flutter project, and add, in pubspec.yaml, the url_launcher and package_info libraries
open the iOS module using Xcode, and open the Podfile
copy the content of that Podfile, and paste it in the Podfile of my current project
move, in the target Runner block of my Podfile project, the already existing libraries (in my case, the 3 AWS libraries)
I am facing an error while making a flutter plugin on the iOS side while using pods. The pods are installed successfully then also I am able to import them in the file.
The pod in my case which I am trying to use is Freshchat iOS SDK
Steps I have followed to install the pod
Start a new Flutter plugin project.
In .podspec file add s.dependency 'FreshchatSDK'
Run pod install in example/ios folder.
I got an error
The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (/Users/nimish/FlutterProjects/freshchat_flutter/freshchat_flutter/example/ios/Pods/FreshchatSDK/FreshchatSDK/libFDFreshchatSDK.a)
I removed use_frameworks! from podfile following this comment .
I ran pod install again and the pods were successfully installed and Pods folder was created which had FreshchatSDK folder in it.
Now I need to have use_frameworks! in my project because other plugins are not compiling because of this.
I added s.static_framework = true in .podspec and use_frameworks! in podfile. Now pod install ran successfully,
After I added the import #import "FreshchatSDK.h" in my Plugin.h file I got the error
error: include of non-modular header inside framework module
I tried this answer but was not able to resolve it.
Please help me resolve this. I'll be respectful of your time.
There is another flutter plugin available here but it has many issues and one unhandled case is making my iOS app crash so I want to make it my own.
There may be problems in the PodFile due to unmatched Targets.
When this happens to me, I used these simple steps.
Delete Podfile
Open Terminal at the specific file
Pod init
Open Podfile and adds Dependencies
Pod install
I am getting multiple command produce gRPCCertificates.bundle
Multiple commands produce '...iphoneos/gRPCCertificates.bundle':
1)
Target 'gRPC-C++-gRPCCertificates' has create directory command with
output '.../iphoneos/gRPCCertificates.bundle'
2) Target
'FirebaseFirestore-gRPCCertificates' has create directory command with
output '....iphoneos/gRPCCertificates.bundle'
Here is my Podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'
target 'FireCheck' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for FireCheck
pod 'Firebase/Core'
pod 'Firebase/Firestore'
end
I have already tried clean, deleting derived data, deintegrating and reintegrating pods, nothing works
I am using Xcode 10.
It only happens when I do build and achieve ... normal run/debug works
It also only happens in macOS 10.14 (18A391) not in previous version of the macOS (High Sierra)
More information I have added here
https://github.com/firebase/firebase-ios-sdk/issues/2102
Run pod update
The issue is now fixed with the release of version 0.0.5 of gRPC-C++.
More details at https://github.com/firebase/firebase-ios-sdk/issues/2102
While waiting for an update on the Github project, you can temporarily use the previous version of Firestore.
pod 'Firebase/Firestore', '5.12.0'
For anyone that didn't use CocoaPods to install RNFirebase and is getting this error, navigating to the Build Phases -> Copy Build Resources in Xcode and removing the duplicate gRPCCertificates.bundle file manually worked for me.
I am trying to upgrade my iOS app with the latest FacebookSDK. Facebook recommends the use of CocoaPods for upgrades. I was already using another 3rd party SDK that also uses CocoaPods. For the existing 3rd party SDK, it requires the use of use_frameworks! in the podFile. However, when I run 'pod update' and then build my app, I get the following errors:
Unknown type name FBSDK_EXTERN [facebook header file]
for each Facebook header file that uses this extern. How can I resolve this apparent incompatibility between podFile requirements of these two different SDKs?
My podFile looks like the following:
platform :ios, '8.0'
def shared_pod
use_frameworks!
pod 'apptentive-ios', '~> 4'
pod 'FacebookSDK'
end
target 'myApp' do
shared_pod
end
target 'myOtherApp' do
shared_pod
end
Alternatively, how can I resolve the 'Unknown type name FBSDK_EXTERN' to allow my app to build?
I also had the same problem.
I believe this can be cause by CocoaPods cache.
The best approach (and worked for me) is
go to the /Pods folder
delete the problematic framework folder (may be
named FBSDKLoginKit)
run pod install --repo-update again
if that doesn't work try resolving your pod to the previous version
pod 'FacebookSDK', '4.37.0'
Cheers
Had the same error when tried to compile FBSDKShareKit 4.38.1 with FacebookSDK 4.37.0. Updating FacebookSDK to 4.38.0 fixed this issue.
I tried Francisco's solution without success, downgraded to 4.37.0 and suddenly still got the same error (even though I had this version installed right before trying to update).
What then helped was simply cleaning Xcode's build folder, building now works for me.
I have an objective C iOS app using the Parse SDK.
In the process of moving this app from Parse.com to a self hosted Parse-Server, I need to update the Parse SDK to the latest version. For this update I decided to go with CocoaPods.
This is the first time I touch CocoaPods (after reading and hearing so much good about it).
I found my way, following what I could read here and also based on a few CocoaPods tutorial I quickly viewed.
Having my project "ready", when buiding it I get this error:
#import <ParseUI/ParseUI.h> -----> File not found.
Obviously things have changed place. And I tried a couple of unsuccessful solutions.
So here is my question:
How do I need to change the settings of my project, now that I am using CocoaPods?
In order to use Cocoapods with parse and Parse UI you need to do the following steps:
Create a new file and name it Podfile. This file should be located on your IOS project root folder.
The Podfile should contain at least the following structure if you want to use parse IOS SDK and ParseUI
platform :ios, '8.0'
use_frameworks!
pod 'Parse'
pod 'ParseUI'
# Put more pods in here..
Notice to the platform, you may change it to the minimum version that your app can run on and the use_frameworks! will install all your pod as frameworks and this is mandatory if you like to consume Swift libraries.
Open terminal and navigate to your IOS root directory and enter pod install. This command will install all the pods and dependencies into your project.
After installing you will no longer use the IOS project file from now on you will use a new file which called workspace. The workspace will contain both your project files and the pods project/frameworks files.
Build your project, fix some error (if there are) and run it to make sure that it works as expected .
More CocoaPods commands that you need to know are:
pod update - update all your pods to the latest release or to the release that was mentioned in the Podfile
pod update update specific pod to the latest release or to the release that was mentioned in the Podfile
pod outdated - display out to date pods that are being used inside your project.