I inherited an iOS app that has AWSCognito as a dependency.
I'm receiving an error for #import <AWSCognito/AWSCognito.h> in a file.
Looks like this lib is needed to do the following
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc]
So looks like I just need some header to allow me to do that authentication. I tried grepping the sdk folder but haven't found that class in a header yet (references to it are everywhere and it's hard to find)
I downloaded the latest AWS ios SDK at Latest iOS SDK
I added a couple AWS frameworks by just dragging the .xcframework folders to frameworks, libraries, etc
Only thing is the AWSCognito framework is missing.
There's only AWSCognitoAuth, AWSCognitoIdentityProvider, and AWSCognitoIdentityProviderASF. Dragging all 3 of these over did not fix the error.
I downloaded an older version of the SDK that did have the AWSCognito folder (however, it was .framework and not .xcframework)...Regardless, I still got the same error.
Has the original AWSCognito framework been deprecated to a mixture of AWSCognitoAuth, AWSCognitoIdentityProvider, and AWSCognitoIdentityProviderASF ?
Do I just need to rename the import of the header file? Is there a version of the SDK that includes the original AWSCognito.framework as .xcframework.
Thanks!
I used #import <AWSCognitoAuth/AWSCognitoAuth.h> and that at least made the build pass.
I'm guessing this is just the newer lib to use and the regular AWSCognito is deprecated. Can anyone confirm?
Related
I have been trying to integrate the Brother's SDK for printing with the iOS part of my Flutter project.
The following are the steps that I followed :
I added the BRLMPrinterKit.framework & BRLMPrinterKitW.framework to the Framework folder in my Xcode project.
Added $(PROJECT_DIR)/Frameworks to the Framework Search Paths and Header Search Paths.
I then added #import <BRLMPrinterKit/BRLMPrinterKit.h> to the Runner-Bridging-Header.h.
After performing the above steps, when I try to import BRLMPrinterKit in the appdelegate file, I am getting a "No such module BRLMPrinterKit" error.
Any Help will be appreciated.
You don't need to add "import BRLMPrinterKit" in your Swift file. So, just delete this line and you should be OK.
Adding #import <BRLMPrinterKit/BRLMPrinterKit.h> as you did to the Bridging Header is sufficient to be able to use SDK APIs in a Swift file.
A few other tips:
Do NOT include both frameworks in your project.
Use BRLMPrinterKitW.framework if you are ONLY supporting WIFI
Use BRLMPrinterKit.framework if you are supporting Bluetooth (and also WIFI)
You must "embed and sign" the framework via the General tab for the target. Otherwise your app will crash as soon as you run it.
You may need to add #import <BRLMPrinterKit/BRPtouchPrinterKit.h> to your Bridging Header too, if you need to access any APIs from the older v3 SDK (BRPtouchPrinterKit) that do not have equivalent APIs yet in the v4 SDK (BRLMPrinterKit).
I just installed the Firebase framework to Xcode (not using CocoaPods due to other unsolvable issues with that). I followed the Firebase Alternative Setup instructions from here (manually dragging the FireBase 2.5 Framework to my project).
Problem is, when I compile my app I get 27 errors:
screenshot
I'm just using the sample code from the Getting Started page.
In fact, all I'm using so far is the first line, but it won't even instantiate that. (var ref = Firebase(url:"my firebase URL here")
I'm on Xcode 7.2 and Swift 2.1. My target is iOS 9.2 using the Simulator.
Please help!
Thanks.
PS.
I should also add that libicucore.dylib and libc++.dylib no longer appear to be available as linkable libraries that you mention to include from firebase.com/docs/ios/alternate-setup.html So maybe this is related? Someone mentioned libz.tbd is the one to use now? (which I'm using)
If you are targeting 9.2 then the frameworks changed to the following:
libicucore.dylib to libicucore.tbd
libc++.dylib to libc++.tbd
They are exactly the same so use them instead, you have to use them in order to get it working.
A comment by apple:
For those who are curious, the .tbd files are new "text-based stub
libraries", that provide a much more compact version of the stub
libraries for use in the SDK, and help to significantly reduce its
download size.
I follow all the steps in This Tutorial and/or Facebook SDK Documentation to install Facebook Login on my App, but when I run the code I get an error. although Facebook mention I can just use import (Swift) to include the framework, I try to do it the old fashion as well with Objective-C Bridge Header.
Error:
'FBSDKLoginKit/FBSDKLoginKit.h' file not found
ScreenshotAs you can see the bridge.h is being read by the compiler, but due to internal file error it will throw error.
Bridge.h In Xcode 6 you don't require bridge header file, I could just do it with import
#import <FBSDKLoginKit/FBSDKLoginKit.h>
This problem is due to Xcode 7 Beta, I have tried to do it on Xcode 6 and it worked perfectly with just an import FBSDKLoginKit. Can anyone tell me a hack around this? or if there is a way to convert my Swift 2 code back to 1.4 and work on Xcode 6.
I had the same problem.
Managed to sort the directory by adding the Facebook SDK in "Framework Search Path".
Target -> Build Settings -> Framework Search Paths -> + /Users//Documents/FacebookSDK
it works!
=]
For those using cocoapods the solution for me was actually adding FBSDKCoreKit to podfile:
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
The facebook documentation is incomplete, they dont mention anything about including FBSDKCoreKit pod reference.
For [login,sharekit,corekit].h file not found error , My solution was:
changing framework searchpath of RCTFBSDK (inside library of the project)
~/Documents/FacebookSDK
to
$(HOME)/Documents/FacebookSDK
I have the same issue and recognized, that my old XCode 6 projects worked with the Facebook frameworks.
So i try the following workaround and that fixed the problem. however i don't know why:
Facebook iOS SDK 4.2
Create a fresh project in XCode 6
Link the Facebook Frameworks to your project as described in the docs
Close the project and reopen it in XCode 7
The "To Swift 2 Converter" should open within the project - Convert the project to Swift 2
Run the project - in my case everything works fine.
After that i copied my "old" Swift 2 Files into the new project. The app starts without any issues.
I observed the changes by the converter, but can't recognized any change depending the Facebook frameworks.
Had the same issue, instead of updating the search path
I solved it by removing the Frameworks from the project and then adding them checking the Copy items if needed box
My header files looks this
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
You can simply put ~/Documents/FacebookSDK in Framework Search Paths and it will work for any user
this is a known bug: https://developers.facebook.com/bugs/362995353893156/
Check out this solution: Facebook iOS8 SDK build module error for FBSDKCoreKit
I am developing an app that google-drive-sdk has been successfully integrated onto, but now I want to share my app on google-plus so I used Google+ SDK, and it conflicts with GoogleDrive SDK.
I used GTLDriveFile Class for GoogleDrive,
and I followed these steps for installing GoogleDrive.
It works fine with just GoogleDrive SDK. But if I add Google+ SDK then it'll conflict with GoogleDrive SDK. I've tried lots of time and searched on Google but I can't find anything.
I only found these links:
1: (SO) How to implement Google Drive and Google Plus sdk in ios project
2: (YouTube) Google Drive SDK: using the Google+ Sign-In button with Drive on iOS
Update:
It displays duplicate symbols for architecture i386
If I delete one file then it will display the same error in another file because in following folder
GTL->GTL Source->Common->Objects
which has all the files, which are already available in
GoogleOpenSource.framework
And if I deleted all the .h files from the GTL folder then it won't work either, it gives a 'file not found' error.
Can anyone help me?
Update
If I had not added GoogleOpenSource.framework but I added only GooglePlus.framework then it gives me error like....
Thanks in advance!
You should be able to drop the GoogleOpenSource.framework - that just includes the Plus relevant parts of GTL and GTM which you're likely to be bringing in as part of the Drive client library. If you need any files from it, you can find the source version of whats included within the original SDK zip you downloaded.
To be clear:
Delete GoogleOpenSource.framework from your projectList item
If there are any errors on missing files, bring those in individually from the open source folder in the Google+ SDK zip. Include both the .m and .h files
It's much more simpler than #Ian's answer. No offence #Ian. :)
SVN checkout from http://google-api-objectivec-client.googlecode.com/svn/trunk
After checkout completes, Go to Source folder and open GTL.xcodeproj.
See the image
I'm trying to add the AWS SDK to my xcode project that is written in swift.
I followed these steps: http://mobile.awsblog.com/post/Tx2AA7ZHB1FK0G1/Version-2-of-the-AWS-SDK-for-iOS-Developer-Preview to create a Bridge-Header file, and add the SDK itself to my project.
The problem is that when I try to build the app I get an error now... the Bridge Header cannot be imported because one of the files in the AWS SDK (AWSModel.h) has an error. This file tries to import Mantle/Mantle.h, and the error reads "Mantle/Mantle.h file not found"
do I need to add this file to my project as well? If so, how would I go about doing that? The only frameworks I'm using are Facebook SDK, and I would like to add AWS as well.
There is a working sample app on GitHub. You should follow README and see if you can compile the app. It should help you understand how to set up the project.