Error: Importing Alamofire - alamofire

..Hi I'm having a hard time Importing Alamofire I've finished the tutorial but I got an error message in "import Alamofire" line 2.. what should I do??..In buid phases my Target Dependencies was "Alamofire iOS (Alamofire)" that was my only option together with the "Alamofire OSX (Alamofire)" no option for "Alamofire (Alamofire)" like in the tutorial..
import UIKit
import Alamofire
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
Alamofire.request(.GET, "http://ec2-54-169-246-41.ap-southeast-1.compute.amazonaws.com:3000", parameters: nil)
.response { request, response, data, error in
println(request)
println(response)
println(error)
}
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}

I had a lot of trouble with Alamofire when I tried to copy the project from git and add it to my project. my solution was "s60" comment to use CocoaPods, so here are the steps to using a Podfile:
First open your terminal and install CocoaPoads with the following command:
sudo gem install cocoapods
After installation go to the folder of your app with the commands cd+"name of path" for example:
cd Documents
cd AlamofireProject
When you are inside your project folder use the next command:
pod init
After running this command a Podfile should be created in your directory you should open the Podfile and then specify the version of Alamofire that you want to use, the source of the Podfile and that you want to use frameworks in your app, here is how you Podfile should look
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'YOUR APP NAME' do
pod 'Alamofire', '~> 2.0'
end
After you edit your Podfile save it and then run this command in the terminal:
pod install
If everything runs smoothly now you should have in your app folder a new folder called Pods and a ".xcworkspace" file. Now you must work in the workspace file where you can reference the Alamofire library smoothly like this:
import Alamofire
Alamofire.request(.GET, "https://omgvamp-hearthstone-v1.p.mashape.com/cards",parameters:["X-Mashape-Key:":"ibxqtnAb9BmshWhdS6Z4zttkVtQop1j0yGSjsn6tn5x2Y4BBF0"])
.responseJSON { _, _, result in
switch result {
case .Success(let data):
let json = JSON(data)
debugPrint(data)
self.Photos = self.ParseHS(json)
self.performSegueWithIdentifier("ToCollection", sender: self)
case .Failure(_, let error):
print("Request failed with error: \(error)")
}
}
This is a sample function of an Alamofire request that I use in one of my apps. If you have any trouble leave me a comment. XD Greetings.

easiest way to integrate Alamofire is use CocoaPods
add below to your Podfile and run pod update Alamofire will auto integrated into your project
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 1.3.0
'

Alamofire is very good networking library written in Swift. There are two ways to integrate Alamofire in project:
Cocoa Pod:
To Add new Alamofire library to your current project go with the pod installation. below is the code you have to integrate in your pod file for fresh installation of Alamofire.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 2.0'
With the latest release of Alamofire 2.0 request method get change.
I am posting some sample steps which will help you most
Here is my sample code,
//Step:
import Alamofire
// Step : 1
var manager = Manager.sharedInstance
// Specifying the Headers we need
manager.session.configuration.HTTPAdditionalHeaders = [
"Content-Type": "application/graphql",
"Accept": "application/json" //Optional
]
// Step : 3 then call the Alamofire request method.
Alamofire.request(.GET, url2).responseJSON { request, response,result in
print(result.value)
}
Try this or you can check the latest update from alamofire on xcode 7:
https://github.com/Alamofire/Alamofire
In previous version of Alamofire there is one more parameter for handle in request method, now that was removed. Check Git for more information. I think this will help you more.
Mannual:
Download the Alamofire from git: https://github.com/Alamofire/Alamofire , then extract the downloaded folder.
From your project -> click on add files to "project" -> navigate to extracted folder -> find Alamofire.xcodeproj -> select the Alamofire.xcodeproj file -> please make sure Copy items if needed is checked.
Now its time to add Alamofire into embedded binaries. To do that click on project name and then navigate to General tab -> select Embedded Binaries -> click on '+' -> now add Alamofire.xcodeproj.
Lastly use import Alamofire in .swift file, whenever you want to use Alamofire.
But my personal opinioin is, if you are using Xcode 7 and Swift 2 then you must go with the Cocoapod installation for Alamofire

Related

SwiftUI can't run on the device(Alamofire)

I use cocoapods to install alamofire in my project, it works fine in simulator. When I want to run my App on my iphone 6s(ios 13.3.1), it crashed and show the error message. My Xcode version is 11.3.1 (11C504). Is this issue appear due to latest swiftUI project? And is there some way to solve this issue? Please help. Thank you.
dyld: Library not loaded: #rpath/Alamofire.framework/Alamofire
Referenced from: /private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Fitness(SwiftUI)
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire: code signature invalid for '/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire'
/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire: stat() failed with errno=25
/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire: code signature invalid for '/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire'
/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire: stat() failed with errno=1
/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire: code signature invalid for '/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire'
/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire: stat() failed with errno=1
Below is my Podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '13.3.1'
target 'Fitness(SwiftUI)' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Fitness(SwiftUI)
pod 'Alamofire'
pod 'SwiftyJSON', '~> 4.0'
pod 'AlamofireImage', '~> 3.5'
end
There is an open issue:
https://github.com/Alamofire/Alamofire/issues/3051
Seems to happen on ios 13.1.3 with non-developer Apple ID. Right now you can switch to developer Apple ID or remove use_frameworks! from pods (sadly that can make other dependencies throw error)
What fixed this issue in my case was to delete the Apple Development profile from my device and then let Xcode install it again when I ran the app on the device.
General > Device Management > Apple Development ... > tap on it then tap on Delete App. Then when you run again the app one your device the profile will be installed again and you'll be asked to Trust it again.
To be fair, I've also done a pods update.

Deprecated API Usage Apple [duplicate]

Yesterday, I uploaded my App to TestFlight and after a while Apple sent me this warning:
ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See https://developer.apple.com/documentation/uikit/uiwebview for more information.
The thing is that I don't use UIWebView in my app so I tried to update my pods but still the same thing.By the way this is my 3rd build on TestFlight and this is the first time apple sends me this. Any ideas?
Update
These are my pods:
pod 'Firebase/Core'
pod 'Firebase/Firestore'
pod 'Firebase/MLVision'
pod 'Firebase/MLVisionTextModel'
pod 'SVProgressHUD'
pod 'SPPermission/Camera'
pod 'SPPermission/PhotoLibrary'
pod 'Mantis'
pod 'SwiftKeychainWrapper'
pod 'SwiftyOnboard'
pod 'Fabric'
pod 'Crashlytics'
Update 2
Seems like I found the frameworks with the issue.
Binary file ./Pods/FirebaseMLCommon/Frameworks/FirebaseMLCommon.framework/FirebaseMLCommon matches
Binary file ./Pods/Crashlytics/iOS/Crashlytics.framework/Crashlytics matches
Binary file ./Pods/GoogleMobileVision/Detector/Frameworks/GoogleMobileVision.framework/GoogleMobileVision matches
So now do I have to wait for google to fix them and update my pods?
Check if you use in your code the UIWebView class; if yes replace your implementation with WKWebView, else need check your Pods.
Go with terminal into your project folder and execute the command:
grep -r "UIWebView" .
All matched pod must be updated.
Now I'm stuck because I found UIWebView into Google AdMob (version 7.49.0) and I'm waiting a new version from Google.
You can examine each of the frameworks in the archived app to see if any of them refer to UIWebView. From the command line, cd to the archived app, e.g.:
cd ~/Library/Developer/Xcode/Archives/<date>/myapp.xcarchive/Products/Applications/myapp.app
Once there, use the nm command to dump the symbols of your app and each of the app's frameworks:
nm myapp | grep UIWeb
for framework in Frameworks/*.framework; do
fname=$(basename $framework .framework)
echo $fname
nm $framework/$fname | grep UIWeb
done
This will at least tell you which framework is the culprit.
I will answer my own question as I have news about this email. Google told me that there are several tickets about this issue and they are going to resolve this as soon as possible.
Also today my app has been approved for the AppStore so it seems to be just a warning for the time being.
For project with cocoapods:
grep -r UIWebView Pods/
WKWebView is the replacement for UIWebView. If you don't have UIWebView usage in your code than by executing the below terminal command you can easily get to know that which library is still using UIWebView reference (don't miss the . (dot)).
From the command line, cd to the archived app, e.g
cd ~/Library/Developer/Xcode/Archives/<date>/myapp.xcarchive/Products/Applications/myapp.app
And then Run
grep -r UIWebView
OR call
grep -r UIWebView /Path/To/Project/*
This will give you Output for framework match
./<ANY>.framework/Headers/ANY.h:#define ANYUseUIWebView ANY_NAME_PASTE(ANY_PREFIX_NAME, ANYUseUIWebView)
Output for library match
Binary file ./<FRAMEWORK-NAME>.framework/<LIB-FILE>.a matches
Update these Libraries
pod update
also check out this Medium Article
brew install ripgrep
cd Pods
rg UIWebView
YoutubePlayer-in-WKWebView/README.md
10:- using WKWebView instead of UIWebView.
TTTAttributedLabel/TTTAttributedLabel/TTTAttributedLabel.h
166: to emulate the link detection behaviour of UIWebView.
TwitterKit/iOS/TwitterKit.framework/Headers/Twitter.h
28: * either UIWebView or SFSafariViewController depending on iOS
TwitterKit/iOS/TwitterKit.framework/Headers/TWTRTweet.h
84: * Suitable for loading in a `UIWebView`, `WKWebView` or passing to Safari:
In order to find where you are using a UIWebView, Go to your project root in terminal
and use this command
grep -r -F "UIWebView" .
The '.' is very important.
It tells the system to search the string "UIWebView" in the current folder and subfolders.
This will search the cocoapods libraries also
I solved this issue by updating ionic webview plugin and adding preferences in config.
I followed following steps:
1.cordova plugin rm cordova-plugin-ionic-webview
2.cordova plugin add cordova-plugin-ionic-webview#latest
3.Added preferences in config file under ios platform :
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
After following these steps my app is submitted and later approved in review.
Use latest firebase version
https://firebase.google.com/support/release-notes/ios
Version 6.8.1 : Removed references to UIWebViewDelegate to comply with App Store Submission warning (#3722).
If you are building with Unity 3D, this is a know-issue (acknowledged in changelogs), it's currently fixed for version 2019.3 (being tested and backported).
Check the ticket here https://unity3d.com/unity/whats-new/2019.2.4
It was a long process, but I managed to solve the above mentioned issue. Let me walk you through the process and share my findings.
First things first, its not necessary what worked for me will work for you. You juts need to try every possible solution put out there.
I followed some of the solutions posted in various threads. (Linked below).
When I was on RN 0.59, I found these files comment mentioned here. Didn't work
I upgraded to RN 0.61, I didn't find these files. I tried uploading the app but still got the warning. Didn't work
I updated the following libraries to their latest versions. Didn't work
react-native-device-info
react-native-view
I tried this grep command mentioned here. There were certain libraries that showed up i.e react-native-fbsdk, react-native-google-sign, react-native-gesture-handler. So I upgraded all of them and uploaded the build but still got the warning. Didn't work
The last resort to update all the libraries, which i know was going to take a lot of time. So my first guess was to update 'react-native-firebase' to latest v6 version issue. But it had some issues with Notification not being on so I couldn't use it. Also they mentioned that their v.5.5.6 is clean and doesn't have any UIWebViewIssues given you update your iOS sdk to 6.12.+ More info here.
So this moved me to my second guess which in my case was 'react-native-ux-cam'. Luckily they updated their library to remove all the references of UIWebView. I updated to the lastest version and BOOM, the issue was solved. I submitted my app to Apple and no warnings so far. More info here Worked đŸ’„
Hope this helps someone.
Backstory
On my ReactJS + Cordova project I uploaded an app to the app store and it was successful. Shortly after I received an email citing ITMS-90809: Deprecated API Usage. After hours (over days) of research and multiple failed uploads I connected with Apple using a paid developer token ($50); they responded basically saying "check your node modules folder" and refunded my token because they weren't going to assist me with this extremely ambiguous error.
Previous Attempts
Updated cordova to use the wkwebview-engine and wkwebviewxhrfix plugins
Using grep -r on archives, ios source, and entire project source, I found a LOT of notes but nothing that really helped.
updated all npm packages
cleaned and updated all cocoapod pods
Final Attempt
After removing all "extra" cordova plugins, npm packages, and pods I was left with a shell of an application but still facing the apple rejection. using grep -r again there was still a reference to "facebook" which lead me to an old copy of the FBSDK.
Solution
FBSDK had been manually added to target > Build Phases > Link Binary With Libraries. There was also an associated cordovaFacebook.m in target > Build Phases > Compile Sources. After removing these old, un-maintained files I was able to upload to itunes connect without at issue.
In my case, Firebase/Auth was using deprecated UIWebView API and the version I was using was an older one. So I just updated the Firebase/Auth pod using the command,
pod update 'Firebase/Auth'
Note: To figure out the frameworks which are using this api, just search "UIWebView" (cmd+shift+F)
FB Sdk above Version 7.16.1 have this issue. Actually it have no files in framework folder.
This error remove when you build it using FBSDK v7.16.1, but Appstore got rejected the app, because of depreciated api usage(UIWebView).
I resolve it by using FBSDK v7.19.2.
1) When you build the project for xcode it shows the mention error, shareKit not found. I resolve it by copy the facebookSDK folder from the framework folder of my previous build(with fbsdk v7.16.1), into the same location of the current xcode folder(frameworks/FacebookSDK....)
2) Then, open your xcode project, add files from location: Frameworks/FacebookSDK/Plugins/IOS/ (sharekit, corekit, loginkit) into Frameworks in Xcode.
3) Add "$(PROJECT_DIR)/Frameworks/FacebookSDK/Plugins/iOS" into Framework Search Paths into build settings at Xcode.
4) Open Project into Terminal: type "grep -r "UIWebView" ." , if this shows any match with UIWebView remove it by opening the file.
5) If it shows match in a binary file of FBSDKCoreKit. Open the file in TextEdit at MAC and Find and Replace all "UIWebView" to "WKWebView"
6) Save it and again add it into Frameworks at Xcode. Build and push to appstore.
100% Working Solution #ionic #wkwebview #webview
Here Webview is deprecated by Apple so replace with WKWebview.
Follow few simple steps for solve this issue:-
1.Open Terminal and go to project path
2.cordova plugin rm cordova-plugin-ionic-webview
3.cordova plugin add cordova-plugin-ionic-webview#latest
4.open config.xml file and put below code inside <platform name="ios"> section.
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
after following all this step again build using "ionic cordova build ios" command and submit it to again in appstore.
When you build an Ionic app, you can choose between Cordova or Capacitor to deploy a native mobile version. While more recent versions use WKWebView automatically, Cordova still uses UIWebView APIs outright or contain references to them (Capacitor has been updated to remove these references – see below).
Upon app submission, Apple searches the app’s code for the “UIWebView” string then generates a submission warning if found. Therefore, a future release of cordova-ios (the Cordova iOS library) will be required to ensure that all references to UIWebView APIs removed.
another thought. I don't know if it makes sense or is technically possible.
Move UIWebView to a plugin as well and make cordova-ios use this or some of the WKWebView plugins. cordova-ios just contains the code to load a webview. By default the next version should load the Apache WKWebViewEngine (Plugin installed by default on new apps, Migration instruction for old apps). Users who need UIWebView, the Ionic one, a fork or others can specify their own one like it is now.
That way no UIWebView would be in cordova-ios and it would still be flexible enough like today.
I faced the same for React native app. Check below things :
1) You are using react-native-webview module rather than importing it directly from react-native(community webview is deprecated as a lean core removal in v0.60 and will be removed in the next stable release). (check here)
2) Please also verify if you are using any third-party libraries which use webview is up to date, If not please ask the library maintainers to upgrade the react-native-webview.
3) you are good to go for the upload, Please add comments if anyone finds some more difficulties.
Check here the breaking changes in v0.60
Another way to get rid of this warning is:
start passing useWebKit={true}, that is to say, you are using WKWebView not UIWebView at all. Then you can do the following to solve the problem -- Deprecated API Usage.
Remove Libraries/RNCWebView.xcodeproj/RNCUIWebView.h、RNCUIWebView.m、RNCUIWebViewManager.h、RNCUIWebViewManager.m
Remove Libraries/React.xcodeproj/React/Views/RCTWebView.h、RCTWebView.m、RCTWebViewManager.h、RCTWebViewManager.m
Now I has already uploaded app.ipa to AppStore successfully without any permission warnings.
<WebView
style={{flex: 1, backgroundColor: Colors.white}}
useWebKit={true}
startInLoadingState={true}
source={{uri: 'my http url'}}
/>```
If anyone helps I run pod update on terminal and then archive again. That works for me.
For me, scripts didn't help. I had to just manually go through each framework and look at release note, and update them.
I get rid out from this by following below steps-
Step 1:
Search “UIWebView” in xcode project directory
Step 2:
Right click (on RCTWebView.m) and select “Reveal In Project Navigator”
Step 3:
Scroll down and delete the following four files only:
1. RCTWebView.h
2. RCTWebView.m
3. RCTWebViewManager.h
4. RCTWebViewManager.m
Then clean the project & archive.
N.B: If you use 'react-native-community/react-native-webview' library then update with latest version otherwise it's done.
You should install this Cordova Plugin:
https://github.com/apache/cordova-plugin-wkwebview-engine
Then add <preference name="WKWebViewOnly" value="true" /> in your config.xml, under the iOS section.
Then increase the version and re-upload it.
To update WebView depreceated in ios
This solved my problem successfully
cd platforms/ios
grep -r UIWebView Pods/
Open Podfile and add/replace AFNetworking pod as
pod 'AFNetworking', '~> 4.0'
Finally in terminal pod update
As per new Apple policies, the new/old apps that use UIWebView are no longer accepted. The best solution is to use WKWebView for improved security. The issue is there because of some deprecated old plugins like GoogleAd or GoogleVR SDK. If you want a quick solution then replace the UIWebView with WKWebView framework.
In Terminal, run this command in your iOS project folder:
grep -r "UIWebView"
Then you will find the list of all the files that use UIWebview. Update whatever files to use WKWebView (Or replaced them with WKWebView using gVim). If your pod libraries are showing that it has UIWebView. Update the pods files as well.
In my case, the unsupported plugin was GVR SDK and steps to resolve are:
Step1: Remove UIWebView:
Get vim for mac.
List item In Vim open {Path to your build folder} \Pods\GVRSDK\Libraries\libGVRSDK.a
Click ESC
Type ":"
Paste "%s/UIWebView/WKWebView/g"
Click enter
Step 2: Adding Frameworks to Your Xcode Project
Select the project file from the project navigator on the left side of the project window.
Select the target for where you want to add frameworks in the project settings editor.
Select the “Build Phases” tab, and click the small triangle next to “Link Binary With Libraries” to view all of the frameworks in your application.
To Add frameworks, click the “+” below the list of frameworks.
Select WebKit.framework

Receiving build failed error "Use of undeclared identifier 'ParseClientConfiguration'"

Screenshot of error
Long time lurker, first time posting. I am attempting migrate my parse.com db to back4app. The migration has gone flawlessly, but now I'm running into trouble changing where the app points to access the parse server. The code I am using came straight from back4app's guides here.
I am running Xcode 8.0, and the app is designed for a minimum of iOS 9. I am using cocoa pods to manage parse as well as several others, so I have the latest version of cocoa pods (1.1.1) and the latest version of parse (1.14.2).
It seems that several solutions for my error have suggested making sure Xcode and the parse pod were up-to-date. Which they are. Another person said they had issues, even though the parse pod said it was updated, the old pod was still being used. I removed parse form my podfile, ran pod update and install, then reinserted parse in the podfile to run 'pod install', but same results.
Anyone have any suggestions?
#import <Parse/Parse.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//Set up Parse
[Parse initializeWithConfiguration:[ParseClientConfiguration configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
configuration.applicationId = #"....";
configuration.clientKey = #"....";
configuration.server = #"https://parseapi.back4app.com";
}]];
return YES;
}
I hope this helps others that have this or similar issues. I found that there was on old 'parse.framework' file in my workspace directory. Not sure if all these steps are necessary, but here is what I did...
Removed 'pod Parse' from podfile
Ran 'pod update' in terminal
Deleted remaining 'parse.framework' file
Re-added 'pod Parse' in podfile
Ran 'pod update' in terminal
Runs like a charm.
In addition to removing parse.framework from your Xcode project, open up your finder and remove parse.framework from your app directory as Xcode default build settings will include your directory to search for frameworks.

Type arguments cannot be applied to non-parameterized class BFTask in PFAnalytics and PFObject

I've updated my project to iOS 9, my podfile, and all necessary files, but it will not build. The source of my grief is in the following error message:
Type arguments cannot be applied to non-parameterized class 'BFTask'
This is the only error that shows, but it shows up multiple times in both PFAnalytics.h and probably more importantly PFObject.h.
Could someone tell me what this means and please suggest a solution? I hope I have provided enough information, but if not, let me know!
The code samples are as follows: In PFObject.h and PFAnalytics.h, everywhere there is the following:
(BFTask PF_GENERIC(XXSOMECLASS *)*) someMethod;
the error is thrown. This is no code of mine, it is PFObject.h and PFAnalytics.h as stated before. Examples of the functions throwing the error in PFObject.h are below
- (BFTask PF_GENERIC(NSNumber *)*)saveInBackground;
- (BFTask PF_GENERIC(NSNumber *)*)saveEventually;
- (BFTask PF_GENERIC(NSNumber *)*)deleteInBackground;
+ (BFTask PF_GENERIC(NSNumber *)*)saveAllInBackground:(PF_NULLABLE NSArray *)objects;
+ (BFTask PF_GENERIC(NSNumber *)*)deleteAllInBackground:(PF_NULLABLE NSArray *)objects;
// .... etc
when clicking on the stop sign the suggestion is to delete PF_GENERIC(NSNumber *), resulting in a method like this
- (BFTask *)xxsomeMethod;
but that doesn't help as it just gets a lot messier
Update 02: The contents of my Podfile:
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
target: 'BMR' do
pod 'AFNetworking', '~> 2.6'
pod 'ParseFacebookUtils', '~> 1.8'
pod 'Parse'
pod 'ParseUI', '~> 1.1'
pod 'FBSDKCoreKit', '~> 4.6'
pod 'FBSDKLoginKit', '~> 4.6'
pod 'JSQMessagesViewController', '~> 7.2'
pod 'IDMPhotoBrowser', '~> 1.7'
pod 'RNGridMenu', '~> 0.1'
pod 'APHorizontalMenu', '~> 1.3'
pod 'ASIHTTPRequest', '~> 1.8'
pod 'AutoScrollLabel', '~> 0.4'
pod 'CJAMacros', '~> 2.1'
pod 'CrittercismSDK', '~> 5.3'
end
Make sure that you don't have a duplicate version of the Bolts.framework.
If you are using both Parse SDK and Facebook SDK you will encounter a problem where Parse SDK contains an older version of Bolts (currently 1.1.5) and the FB SDK has the newest version of Bolts SDK (>= 1.2.2)
Once you remove an older version of the Bolt.framework that comes with Parse SDK you should be fine.
To check what version of Bolts.SDK you have simply go to the Bolts.framework file, right - click and choose "Get Info".
You have two Bolts.framework, old from FacebookSDK and new from Parse. So go to the FacebookSDK folder from where you added the FacebookSDK into the xcode and delete the Bolts.framework. Keep the new Bolts.framework and everything will be fine now.
If you still is not able to find the old Bolts.framework find the class file showing error and right click it and select show in finder and traceback the facebook folder from the finder and make sure it is in Facebook SDK folder and delete the Bolts.framework. Make sure you don't delete the new Bolts.framework you added from Parse SDK folder.
I had the same problem (spent a few hours investigating whats going on). I messed up old FacebookSDK framework with the one I installed via cocoapods
Check the following path ~/Documents/FacebookSDK to see if there are some outdated SDK
Remove any import of Facebook SDK #import <FacebookSDK/FacebookSDK.h>
Install it via cocoapods
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
or add the new framework manually.

Cocoapods Pod Lib Create The file ####.xcworkspace does not exist

I'm trying to create a cocoapod using pod lib create but for some reason the .xcworkspace file is never created.
I've tried updating Ruby and I've tried using Ruby 2.0.0 which my colleague is using and it works fine for him.
Here is the output from the pod lib create command:
tmep chris$ pod lib create hello
Cloning `https://github.com/CocoaPods/pod-template.git` into `hello`.
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/cocoapods-0.33.1/lib/cocoapods/executable.rb:55: warning: Insecure world writable dir /usr/local/rvm/gems in PATH, mode 040777
Configuring hello template.
/Users/chris/tmep/hello/setup/TemplateConfigurator.rb:172: warning: Insecure world writable dir /usr/local/rvm/gems in PATH, mode 040777
------------------------------
To get you started we need to ask 4 questions, this should only take a minute.
If this is your first time we recommend running through with the guide:
- http://guides.cocoapods.org/making/using-pod-lib-create.html
( hold cmd and double click links to open in a browser. )
Would you like to have a demo for your library? [ Yes / No ]
>
yes
Which testing frameworks will you use? [ Specta / Kiwi ]
>
specta
Would you like to do view based testing? [ Yes / No ]
>
yes
What is your class prefix?
> OS
Running pod install on your new library.
Analyzing dependencies
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/cocoapods-0.33.1/lib/cocoapods/executable.rb:55: warning: Insecure world writable dir /usr/local/rvm/gems in PATH, mode 040777
[!] An error occurred while performing `git pull` on repo `studio_pods`.
[!] /usr/bin/git pull --ff-only
Your configuration specifies to merge with the ref 'master'
from the remote, but no such ref was fetched.
Ace! you're ready to go!
We will start you off by opening your project in Xcode
open 'hello/Example/hello.xcworkspace'
The file /Users/chris/tmep/hello/Example/hello.xcworkspace does not exist.
To learn more about the template see `https://github.com/CocoaPods/pod-template.git`.
To learn more about creating a new pod, see `http://guides.cocoapods.org/making/making-a-cocoapod`.
I would be very greatful if anyone can shed any light on this issue as I'd love to get started using this great tool straightaway!
Whoops! Just figured out what it was.
I had added a repo to pods (pod repo add) and it must have been trying to download dependancies from there!
A call to pod repo remove sorted it.