Bulding on xcode fails - objective-c

I'm trying to build the latest version of GPGMail for MacOS Mojave, and within xCode when building the GPGMail module, I get an error in one of the last "Build Phases"
All I simply did was downloaded the source code, and opened it with xcode.
But of what I understand, this has to do with the fact it's being executed under Apple Sandbox.
I've tried disabling the entitlements list, but that had no effect;
Any suggestion?

The build process doesn't run in a sandbox. That script is trying to install GPGMail under /Users/jamesbednell/Library/Mail/Bundles but failing.
Try creating that folder manually and then rebuild on Xcode.

Related

Using Crashlytics on iOS with CMake

Our projects all use CMake, and Fabric seems to require a script run in XCode's build environment to extract information. CMake doesn't seem to have a way to add a run script build phase.
So, I tried running the script manually after setting the following manually from known values in CMake:
INFOPLIST_PATH
BUILT_PRODUCTS_DIR
DWARF_DSYM_FILE_NAME
DWARF_DSYM_FOLDER_PATH
PROJECT_DIR
As a result, there were no errors when running the script but ..also nothing happened. I just got a "Launching uploader in validation mode" and then the process exited.
Is it possible I could get a full run-down of what the program needs in order to run? Our projects are built on a build server so having to VNC in and launch xcode to build is not really an option.
Thanks in advance.
Since you're using CMake, instead of using the run script build phase, I'd use the upload-symbols script as that will be a more reliable way to upload the dSYMs to Crashlytics.

"classes.dex not found. Try to rebuild project" in Android Studio

I'm unable to build Android project using Android Studio 0.1.3. Everything worked fine until latest SVN update of the project. This is strange, because no settings were changed (SDK, dependencies etc.). I also didn't update any tools. I keep getting the error:
Android Packager: [trunk] File /home/matis/.AndroidStudioPreview/system/compile-server/apilot_f8e91252/android/intermediate_artifacts/trunk/classes.dex not found. Try to rebuild project
There are no errors in source code, I can build and deploy it on a device without problems using Eclipse. I'm using SDK rev. 17 with SDK Tools rev. 22.
I tried to build source from earlier SVN revision, but the same thing happens.
Has anyone else experienced similar problem? How can I solve it?
Update
After some investigation I found out that dx tool doesn't get called at all (I modified its script so it would create some file if run), but aapt is called properly.

bundle dylib with application

I'm running Xcode 4.5 and MacOS 10.7.4 and trying to create a MacOS app for local distribution.
I have a dylib from a 3rd party USB hardware vendor. Rather than drop this into /usr/lib, I wanted to bundle this with the app. I have tried all of the methods mentioned here that I could find:
Creating a Cocoa Library target, and using a copy build phase, setting paths with #rpath and #executable_path and #loader_path ...
Here's what I ran into:
I can get the target app to build to compile and run if the dylib is copied into the same directory as the target app (by setting destination to "Products Directory"), however this only works while the app is running within Xcode. If I run the app from the finder it still looks for the dylib at /usr/lib.
A caveat when changing the destination setting: any files copied to a location in the previous build are not deleted when you make a change a build again. This tricked me into thinking a few times that I had a solution when I didn't.
"Library search paths" appears to work as expected when linking, but setting "Dynamic Library Install Name" and "Runpath search paths" don't appear to stop the code from looking in /usr/lib only at run time. They don't seem to have any effect at all.
So, why would setting those path variables have no effect, and how can I set the run time search path?

Xcode builds on Debug but not on Release

So, I have this problem when trying to build my project.
Currently If I run the project in Debug mode, it runs fine, the app starts up on the device and I can test stuff.
However the weird part is when i switch over to the Release build and try to build on the device. When I press the Run button Xcode builds as normal and the build succeeded notification even pops up, but then I get this error code.
Lets call my app xxx
Could not launch "xxx.app"
No such file or directory:
/Users/*my Name*/Library/Developer/Xcode/DerivedData/*Bunch of xcode folders*/Products/Release-iphoneos/xxx.app/xxx
I went into finder and searched up xxx.app and couldn't find it. Furthermore there doesn't even exist a Library folder under /Users/my Name/.
So what is xcode trying to do here, and what should I do to fix this?
Edit: I have also tried Cleaning the project and building again, the error code still comes up.
I get this crap all the time.
What I do is clean the project, close it, shut down Xcode, start up Xcode, open project, then build and run.
If that still does not work then find the "DerivedData' folder Organizer->Projects and delete it, then do the above again and try again.
I tried creating a new scheme and setting it to Release mode. That worked for me. However, a reboot after closing xCode seems to work, too.
I went into finder and searched up xxx.app and couldn't find it. Furthermore there doesn't even exist a Library folder under /Users/my Name/.
It does exist, but it's hidden (since OSX Lion) in the Finder (because standard users -- as opposed to developers -- should not mess with it).
Some utilities (on a simple command line) can make it visible again but the simplest thing to do is to use "Go" menu of the Finder and select "Go to folder…" (Command-Shift-G). Then copy/paste the path you want to go to and validate.

RestKit.h Not Found When Building With Xcode Product > Profile

I have an app that uses RestKit 0.10.2 and I can build and run the app just fine in the Xcode 4.4.1 simulator using iOS 5.1.1. I can also run Analyze without any issues. However, when I go to try and Profile the app, the build fails with Lexical or Preprocessor Issue RestKit/Reskit.h file not found.
Here's what I have in Header Search Paths > Debug on the target:
$(BUILT_PRODUCTS_DIR)/../three20
$(BUILT_PRODUCTS_DIR)/../../three20
"$(BUILT_PRODUCTS_DIR)/../../Headers"
What could I be missing? When I upgraded from 0.94 to 0.10.2 I completely removed Restkit from my project and re-imported it because I was having a lot of issues trying to get this exact same problem resolved for a normal run. Any ideas?
Profile uses a Release build by default, not Debug (since it makes no sense to profile a debug build). Make sure Header Search Path -> Release is also filled in.