Why can't I drag the Facebook SDK into a new project? - xcode

On The Github page, it states:
In Xcode, open the Facebook SDK by selecting File->Open... and selecting src/facebook-ios-sdk.xcodeproj.
With your own application project open in Xcode, drag and drop the "FBConnect" folder from the Facebook SDK project into your application's project.
I know this worked for me earlier this year, using Xcode 3.x and iOS 4.x, but now I'm doing a new project in Xcode 4.2 and iOS 5 and it doesn't work anymore. I'm unable to drag the folder into my project. Any ideas? What should I do instead?

It's a better idea to just include all the necessary files directly into your project - so everything inside the src directory, excluding the .pch and .xcodeproj files.
Also, it sounds like you found a bug in Xcode 4.2, so it might be a good idea to submit a bug report to http://bugreport.apple.com :)

This is a bug in XCode 4.2. Just file a report with Apple. I have filed one too. More the number of reports, chances are they'll get a fix out earlier.
For now, I just use a mac with an older version of XCode, add any SDKs I need to add and then open the project again with the new version. That works :)

Related

Cannot change file in Xcode project

When I launch one of my Xcode projects, I am presented the storyboard of the project. I can edit the storyboard, I can run the project on my device and simulator. But on changing to any other file from the project navigator or any other way (like opening any file of my project from finder), I get stuck with a rolling rainbow cursor which keeps on rolling till infinity (I have waited for as long as an hour) and I have to force quit Xcode. My other projects appears to work fine.
I have tried the following fixes:
Restarting my Mac
Reinstalling Xcode
Resetting Xcode Settings from http://ioslau.blogspot.in/2013/08/resetting-xcode-settingspreferences.html
I have Xcode v6.3 and Yosemite v10.10.3.
I don't want to recreate my project as it will suck time.
Any help or advice is appreciated.
This may be a known issue with the latest release of Xcode:
apple dev forum
The accepted answer and the apple dev forum didn't help me.
I am using a swift project with no IB and no Storyboard.
What I did was, close Xcode, restart the mac, open the Xcode not from the app but form the .xcodeproject file. It worked.
For me, the solution was to make a copy of the files that were uneditable, delete the original files from the Xcode project and drag the duplicates in.

How to create an .ipa file out of phonegap 3.5.0 project?

I'm very new to OS X and facing difficulties even in finding the menu options in xcode.
I tried all the resources available online. All I'm trying is to make an .ipa file out of the phonegap project which uses push notifications. I have tried phonegap build this way:
Created .p12 key and development provision file according to the instructions in the following link:
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
It's not working out. So, I started to use xcode to do it. But I don't find an option to edit scheme anywhere.
Kindly help me.
Change you device from iPhone/iPad in XCode to iOS Device then in the project build menu, select Archive. You will be prompted by Xcode to sign the app and if you don't have provisioning profile Xcode will assign you one.
Follow the archive menu to create an download the packaged IPA.

How did my Xcode project get changed from iOS project to an OSX project?

I've been doing only iOS development and never made an OSX app. In the iOS project I'm working on now I see that suddenly Xcode thinks it's an OSX project. The all my framework files are shown in red (missing), and lots of the options in the project panel show choices that are only appropriate for OSX such as "deployment target", which offers only 10.4, 10.5, 10.6 etc. and in Build Settings the Valid Architecture shows i386 x86_64 with no drop-down options.
What happened? How can I change this back to an iOS project?
could be 2 late to answer this question, however, this answer might help someone in the future, as the above answer wasn't helpful for me, so here is what I have done.
1- on the left top corner of Xcode click on the scheme.
2- click edit scheme
3- in the new window change "Executable" from non to the name of your project scheme "target"
4- on the top where it says "My Mac 64-bit" if it didn't changed automatically to iPhone/iPad change it manually.
5- if there wasn't any option, in bottom of the window click "Manage Schemes" and make sure the
check box next to your project scheme is checked.
hope this could help and save anyone time.
By your comment you should not have an issue navigating this.
Go to your Project (in upper left) -> Project (project name in submenu) -> Build Settings -> under Architectures menu select Base SDK and choose iOS 6.1.
This should switch your project back. Now under Info you should see your Deployment Target options have switched from saying OS X Development Target to iOS Development Target
As for why it originally changed, I have no idea. But hopefully this will fix your issue.
I know this is an old post, but this just happened to me in a project with multiple targets.
I'm using github and it had marked one of my target scheme files with a merge block at the top of the file after using a newer compiler. I could find a way to edit the scheme through XCode, but upon re-opening the project, it would be bad again.
I had to edit the file manually and complete the merge edit.
This recently happened to me with Xcode 8 where an old iOS project was turned into a dual destination macOS / iOS one.
To fix the issue I changed the Base SDK under Project -> Build Settings to Latest iOS (iOS10) and the change rippled through removing the macOS destination.
I fixed this by deleting the scheme showing issue and recreate it. This time it gets created as desired scheme type showing all the simulators and devices attached, if any.

Can you install the Xcode 5 Developer Preview in parallel with Xcode 4.6.2?

Apple announced the Xcode 5 Developer Preview today and I want to try it.
But before I download this, I want to know that what happen with my current version of Xcode (version 4.6.2)?
Will the Xcode 5 Developer Preview install as a different application or it will remove the old version? Will some common tools collide, like the command line tools?
The Xcode 5 developer preview comes as a normal app DMG (not with the usual packager/installer) and has a different name.
So essentially, you download it, open a DMG, then pull to the Applications folder and thence have two Xcodes there (the old and the new one called Xcode5-DP). It even comes with a slightly different icon (red badge across a corner) and the intro screen is different too, so there is very little chance of confusing them.
I already did that today (and a colleague also).
Now that xcode 5 has reached the first official release and is no longer in beta, you have to do ONE of the following if you wish to keep BOTH versions.
Run the dmg of the new version you download from developer.apple.com. Drag the app to applications, and when asked to overwrite click KEEP BOTH. This will rename the existing app to xcode 2 I believe.
Select your existing xcode 4 in applications. Rename it to xcode4 or whatever. Now you can drag in the new version without overwriting the existing one.
Drag the new xcode to someplace other than applications. Rename it and then drag it into applications.
I personally favour option 2, since going forward we'll be using xcode 5 and it's helpful if it retains the default name from the get go for easy updating.
BTW, if you do have more than one xcode installed expect the mac app store to report that you need to do an update. Probably best to install it by downloading it from the developer portal if this sort of thing bugs you.
Xcode 5 preview works fine with Xcode 4.6.2 or any other Xcode, It has different icon and it runs from its .dmg file (no install).
Pay attention you cannot submit an app with Xcode 5, So keep the old Xcode till Apple would release the stable version of Xcode 5.
Short answer: Dont replace XCode 4!
If you plan to deploy some app to appstore, you can't do it using Xcode 5 at this moment.
The best way is download the Xcode 5 version, unpack it and run the app on different folder (not application folder). You will stay with Xcode 4, and can run Xcode 5 separated (You don't need to 'install' xcode 5).

Create project without storyboard in Xcode 4.3

If I want to Create project without storyboard in Xcode 4.3
and use only ARC feature from Xcode.
How can we create app without story board as we dont want Navigation controller,
in app and use addsubview as we use to code in earlier versions.
Does app coded in Xcode 4.3 can be deployed on iOS 4.0 ,iOS 4.3, or only works with iOS 5
Please let me know..
Thanks
To my strong dismay, Apple removed the "Use Storyboards" checkbox in Xcode 5. Every project gets created with a dreaded UIStoryboard. I wrote a tool that converts Xcode 4's project templates to Xcode 5, so you can once again create projects with or without storyboards. You can find it here on GitHub: https://github.com/jfahrenkrug/Xcode4templates
When you create a new project there is an option to "Use Storyboards". Don't tick that.
Do tick the "Use Automatic Reference Counting" box.
Apps developed in Xcode 4.3 can target platforms below 5.0, it's up to you to ensure that you include / exclude the appropriate features.

Resources