Compilation fails in Xcode 4.6 while creating archive for adhoc distribution. - ios

I am new to iOS. and i am trying adhoc distribution ipa file from xcode.
1) I could able compile and run the application in the iphone/ipad.
2) But when i create archive, i am getting compilation error saying 'something.h' not found.
Could someone kindly direct me what could be wrong?

1-Try to open the organizer (Window -> Organizer), then the Projects tab. Select your project then hit the delete button next to the derived data path (to the right). Confirm and let it re-index your project.
2-Go to your project folder, Press on YOURPROJECTNAME.xcodeproj and right click and go to show package contents . Leave the project.pbxproj file, but delete the project.xcworkspace file, any .pbxuser files, and the entire userdata folder.
I hope it works..

If you are putting things in a group in the XCode project navigator, and it is not an actual folder, you do not need to do Mountain/Mountain.h. You would just include Mountain.h.
When creating a group in the project navigator, by default, these are not actual folders, they are just virtual project folders, so if it is trying to see the Mountain folder and it does not exist, you will get that error.
It is weird that it will compile and run otherwise, but just give that a shot, let me know if it works.

Related

With Xcode how can I export and share an app with a team member in the simulator?

So I have a teammate/client I need to share an app I'm developing.
They have android and a Mac Desktop so it would be shared through the Simulator only.
I've tried the archive app and there seems to be no way to get this work with the .ipa file which is generated.
Does anyone know of a way to achieve this?
Share the source code, then run the app in Xcode. Voila, it is now in the Simulator. They have to install Xcode anyway to get the Simulator so there really isn't any extra work involved other than building the app.
The .ipa is built for iOS devices and cannot run in the Simulator. I suppose you could transfer the binary to another simulator and get it to work, but I have not heard of anyone doing it that way and, frankly, it seems like potentially more work than "clone this git repo, load the project/workspace in Xcode, click the triangle button and wait a bit."
All you can do is you can just generate the .app file. But how you can run it on a simulator (applies only if Xcode 8.2 or above isn't installed), I really don't have the idea. If you want to have your .app generated, follow this:
Connect any iPhone with your mac
Open your project in Xcode
Wait for the setup (processing symbol files, blah, blah) to be completed
Run your project in that iPhone once
Now just build your project while the iPhone is connected
Search for the Product group (or, folder) and expand it
You will see a file (maybe more) named as your target (project name)
Right click on that file and select show in finder. And voila, you have your .app file
What generates the .app
You will need to have previously built the app for the intended target. The "Product" option in the top menu bar includes a couple of ways to trigger this including: "Build for" of "Destination".
Where is the .app?
The yourApp.app you are looking for is stored in: <<YOURUSERHOME>>/Library/Developer/Xcode/DerivedData/<<YOURAPPNAME-UID>>/Build/Products/Debug-iphonesimulator
Easier way to locate
Open you app in XCODE
Browse the file tree in the left sidebar
Expand the "Products" directory
Right click the .app file you want to share, and select "Show In Finder"
What you are trying to do is not going to work. You can not share the .ipa file for someone else to install it on an iPhone simulator.

Archived app wont appear on organizer after a few updates

I was compiling my app and archiving it correctly with no problem whatsoever. I added a charts library to the app, did some stuff with it, archived it fine but Apple didnt let me upload it because the library wasnt correctly referenced in the app.
So I fixed that problem and tried to archive it again, but it just wont appear on the organizer.
Skip install is set to NO
Archive in the scheme is checked
Reveal archive in organizer is also checked
How can I fix this?
Simply try this steps:
Reopen your project
Clean Xcode & Remove derived data
Change build number & version number
Make archive now
Note:
You are able make archive earlier, so it could work perfect after this steps. Unless you have changed any settings in Xcode.
Edit:
Go to targets - build settings & find "Installation Directory". Make sure there is "$(LOCAL_APPS_DIR)" added.
Go to Edit Scheme -> Build tab, Make sure you have archive check box selected. Check image below:
Go to Edit Scheme -> Archive tab & make sure the check box "Reveal in organizer selected"
See below image:
Hope it will help you.
I know this is an old item... However, I encountered the same issue today and tried all the above suggestions and still no luck.
Was able to work around it by using Finder and going to the build > iOS > archive folder of the application. Then right click on the .xcarchive file and open with Xcode.

How to create .dsym file in Xcode 6.4

I know this should be a simple problem to solve, but I'm stumped.
Using Xcode 6.4, how can I create the .dsym file (this is for submission for Veracode scanning, if that matters).
All the instructions I can find are for Xcode <=5, and don't fully translate to Xcode 6.x
After archiving your app, in your derived data
~/Library/Developer/Xcode/DerivedData/
Go to your application
AppName-xxxxxxxxx/Build/Intermediates/ArchiveIntermediates/AppName/BuildProductsPath/Release-iphoneos
your .dsym file will be in this folder.
Finding the dSYM of a particular build through the Terminal can be quite cumbersome. Instead, use Xcode to do that. In the Window menu, choose Organiser. A list of your apps and archives appears. Select the one you are interested in. Right-click on it, and choose Show in Finder. You will end up in a directory with files called <AppName>-<ArchiveDate>.xcarchive, with the archive you selected in Xcode already selected in the Finder. Right-click again on it, and choose Show Package Contents. And you'll find here a dSYMs folder.

trying to remove audio file from project

I can't seem to get rid of an audio file in my iOS project. I had it in my Supporting Files folder but deleted it (moved it to the Trash, not just its reference).
It is still being picked up by this line of code in my DetailViewController:
NSArray* soundFilesArray = [[NSBundle mainBundle] pathsForResourcesOfType:#"wav" inDirectory:nil];
I'm sure it's something simple, but I'm still rather new to this so am confused as to how XCode is finding the file. After looking everywhere in the XCode project, I even scoured all folders (in a Terminal) and couldn't find anything. I also did a Clean (Product > Clean).
File is cached in your .app file. For clean this, do this steps:
1) Open Organizer
2) Click Projects
3) Find your project at left panel and click
4) CLick on Delete at center panel
5) (Optionally) If you want a see in Finder, click on Arrow who after a "Derived Data" path
6) Build your project. And XCode will copy your resources at again.
Even though you've removed the file from your project, it has already been copied to the device you were building to (either the Simulator, or the iPhone or iPad you were testing on). Delete the app from the device, and all files will be removed from it. Then, since you have already cleaned the XCode project to ensure the file is really gone, if you rebuild to your test device, the file should be gone for good.

iPhone project has "My Mac 64-bit"

I'm working on an iPhone project and somehow the schema has "My Mac 64-bit" and "My Mac 32-bit" in addition to the normal "Simulator 4.3" and "IOS Device".
Is there anyway to remove the "My Mac..." options? It always wants to switch to these when I switch git branches and I end up building without realizing it and get an error. More of an annoyance than anything.
Could possibly be something with your xcuserdata folder.
Right-click on the xcodeproj file and select "show package contents."
Make a backup copy of the xcuserdata folder.
Now delete everything inside the xcuserdata folder, and restart xcode.
If causes a problem, then put backup folder back in.
This happens to me every time files get modified outside of Xcode, and Xcode needs to reload the project file. Closing the project and re-opening it always fixes the issue for me.
If you are porting your Xcode project from one mac to other then this issue happens most often. You can Try These two resolutions: First one only worked for me:
Resolution:1
Open Your project folder > Right Click on Xcode and Select “Show Package Content” Inside there we will get one folder “XcuserData”.> Open the Xcuserdata folder and delete all its content. >Now Launch the Xcode project again, the problem should be fixed now.
if the above resolution is not working then try this one:
Resolution:2
open Xcode > clicked on Manage Schemes and then Autocreate Schemes Now > Then select the new scheme in Xcode.
Hope either resolution should work for you.
This is a bug in the beta builds for Xcode 4.2, with regards to their handling of Git repos (confirmed at WWDC with Xcode devs). According to a friend of mine it's been fixed in Xcode 4.2 beta 5, but there are a bunch of issues with that build and you might want to hold off until beta 6.
Step 1: Right Click on Xcode project > Show Package contents > xcuserdata > Delete All content
Step 2: Open project > select target > (Project name)Tests > Host Application > select application > allow testing application APIs
Resolved :) Enjoy your Code
I always open my projects from within Finder to get around this problem. Browse to your project directory, eg /apps/iOS/iPhone/SingleViewApp. Double clicking the .xcodeproj file launches the project within Xcode. I see "Checking DDI Symbols" msg and soon after iPhone device name appears.

Resources