Could not launch Mac OS X 10.7 application archived with RestKit - objective-c

I'm a newbie for RestKit and developing Mac OS X application.
I'm trying to develop Mac OS X application using the RestKit.
I can run the app on debug mode of Xcode.
But I could not run the app on production mode (It means archived application).
Launch the app, this error will be occurred.
TestRestKit cannot be opened because of a problem.
Check with the developer to make sure TestRestKit works with version of Mac OS X.
You may need to reinstall the application. Be sure to install any available updates for the application and Mac OS X.
Click Report to see more detailed information and send a report to Apple.
And I checked the system log, then I find these logs.
May 14 12:41:01 black-umbrella [0x0-0x26b26b].jp.co.test.TestRestKit[30585]: dyld: Library not loaded: #executable_path/../Frameworks/RestKit.framework/Versions/A/RestKit
May 14 12:41:01 black-umbrella [0x0-0x26b26b].jp.co.test.TestRestKit[30585]: Referenced from: /Users/tfmagician/Desktop/TestRestKit.app/Contents/MacOS/TestRestKit
May 14 12:41:01 black-umbrella [0x0-0x26b26b].jp.co.fuller.TestRestKit[30585]: Reason: image not found
May 14 12:41:02 black-umbrella com.apple.launchd.peruser.501[235] ([0x0-0x26b26b].jp.co.fuller.TestRestKit[30585]): Job appears to have crashed: Trace/BPT trap: 5
So I noticed the warning when the app is archiving.
Check dependencies
Warning: Installation Directory starts with #executable_path but Skip Install is disabled.
I was followed this documentation to install RestKit.
https://github.com/RestKit/RestKit/wiki/Installing-RestKit-in-Xcode-4.x
Xcode version is 4.3.2, and I'm using master branch of RestKit.
Please help me and I would be glad if I can get any idea about this problem.

In the target's Build Phases
Click Add Build Phase (bottom right), Add Copy Files and add this:

Related

Xcode 11 beta crashes when starting in Virtual machine

i have just downloaded Xcode 11 beta and installed in a vm environment. When trying to start a new playground or project, xcode quits with following error code. Any idea how to solve ?
Process: Xcode [426]
Path: /Applications/Xcode-beta.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 11.0 (14855.18)
Build Info: IDEFrameworks-14855018000000000~13
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [426]
User ID: 501
Date/Time: 2019-06-08 08:13:37.785 -0700
OS Version: Mac OS X 10.14.5 (18F132)
Report Version: 12
Anonymous UUID: CB32DBDA-4F6E-4212-F810-C52C80FFD0CD
Link to full error:
https://pastebin.com/fFhcadtZ
This should probably be a comment, not an answer, but I lack the reputation to do so. Here is the xcode developer who developed the minimap indicating that while the minimap indeed does require metal, xcode should not crash when metal is not available. Hopefully he implements a patch to fail gracefully in one of the next builds. As of right now, there is no workaround. The reply to the thread:
defaults write http://com.apple .dt.Xcode DVTTextShowMinimap -bool NO
does not prevent the crash, as mentioned there.
It is fixed in XCode 11 beta 2, available on developer.apple.com !!!
June 17 2019.
You don't need MacOS Catalina, only Mojave 10.14.4 and up (current is 10.14.5).
I used VMware on Windows to install Mojave and XCode beta 2.
I attempted the same with Parallels (with tools installed), and also observed a crash. I suspect the problem is with the virtualization software lacking support for Metal. Notice the stack trace on the main thread:
0 com.apple.dt.SourceEditor 0x0000000120ccb5cb specialized
static MinimapMetalLinesLayer.defaultDevice() + 491 1
com.apple.dt.SourceEditor 0x0000000120cc959c
MinimapMetalLinesLayer.init() + 284
The "Minimap" is a new feature in Xcode 11, it's a birds eye view of the source code in a column on the right (similar to Sublime text edit). Also notice the mention of Metal, Apple's graphics API. To test this theory, I opened Xcode 10 (in the same VM) and attempted to build one of Apple's examples. I got the following error, which seems to confirm my suspicion that Parallels is unable to support apps using Metal.
2019-06-09 09:15:17.875253-0400 HelloTriangle[652:7547] *** Assertion
failure in -[AAPLViewController viewDidLoad],
/Users/ZestyMeta/Downloads/UsingARenderPipelineToRenderPrimitives/Application/AAPLViewController.m:27
2019-06-09 09:15:17.875403-0400 HelloTriangle[652:7547] Failed to set
(contentViewController) user defined inspected property on (NSWindow):
Metal is not supported on this device
I haven't attempted installing macOS Catalina / Xcode 11 in VirtualBox, VMWare, et al. but unless they support Metal then this crash will happen there as well. If you're testing out Catalina (which is required for SwiftUI on macOS), unfortunately it seems the solution at this time is to install on a spare device or dual boot.

Debugging objc4 (532.2) on OS X 10.9

I'm trying to get objc4-532.2 to work on Mavericks.
(First of all, I tried to compile the latest version of objc4 (objc4-551.1).
This fails due os/lock_private.h is missing (objc-os.h). Maybe anyone knows how to solve this issue?)
Back to topic:
To successfully build objc4-532.2 I need to link against the frameworks which are based
on OS X 10.8.
So I configured the Xcode project to use OS X 10.8 SDKs for Base SDK and OS X Deployment Target.
This works, and I can compile and link a simple console based C program (Xcode template).
However when I try to link this program against Foundation and debug it, it miserably fails with the following error:
dyld: Symbol not found: _objc_debug_taggedpointer_mask Referenced from:
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Expected in:
/Users/manu/Library/Developer/Xcode/DerivedData/objc-dtrsexfveobodwdnwlpknyyiekpe/Build/Products/Debug/libobjc.A.dylib
in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
The symbol _objc_debug_taggedpointer_mask was first introduced in objc4-551.1 (latest runtime) and all 10.9 Frameworks needs to access this symbol (at least in debug mode).
Example:
$ cd /System/Library/Frameworks/Foundation.framework/Versions/C
$ grep objc_debug_taggedpointer_mask Foundation
Binary file Foundation matches
A Framework based on 10.8 doesn't contain such a symbol.
Since my project is configured to use 10.8 SDKs this error should not occur?!
So, what's the missing point?
Thanks!
I solved this problem: the symbol of objc_debug_taggedpointer_mask was imported into runtime after mac os x 10.9, so you need to add the new tags into the 532.2's code to make it compatible with os x 10.9's foundation and other frameworks.
Here is my working directory:
https://github.com/Jeswang/objc4-532.2
(First of all, I tried to compile the latest version of objc4
(objc4-551.1). This fails due os/lock_private.h is missing
(objc-os.h). Maybe anyone knows how to solve this issue?)
The best solution I could find is to manually scrape together the header files as described here:
http://www.mulle-kybernetik.com/weblog/2011/how_to_build_libobjc_for_os_x.html
The closest thing to os/lock_private.h that I have found is private/tsd_private.h from the libpthread project:
https://opensource.apple.com/source/libpthread/libpthread-105.40.1/private/tsd_private.h
Edit
I have also found this:
https://github.com/samdmarshall/OSXPrivateSDK

Trying to install Xcode 3.2.6 on a Lion machine but it won't install correctly (Not Date issue)

So I have some Objective-c code that was created in Xcode 3.1 on OSX 10.5.8, and it will no run in Xcode 4. I used this handy little guide http://hints.macworld.com/article.php?story=20110318050811544 on one of my 10.7.4 box and it worked swimmingly. (I had just upgraded from 10.6).
So now I am trying to do the same, install 3.2, install 4, link SDKs etc on another machine running 10.7.3, and after using the little date hack with the same 3.2 mpkg that i used on the other computer, the installer says it finishes successfully but when I go to look, Xcode isn't installed anywhere, and the directory mentioned in the instructions linked above /Developers/SDKs doesn't even exist (it did on the other computer). I tried copying the 10.5 SDK from the 10.7.4 machine to the 10.7.3 machine and still nothing, 4 won't run it, and I get this error.
ld: cannot link directly with /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libcrypto.0.9.7.dylib for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
A little history too, the 10.7.4 machine had xcode 3 installed on it previous to it's update to lion so that was already there and I didn't have to mess with any of that nonsense. Is it something with having had it installed previous to the Lion upgrade?
So, how do I get Xcode 3 to work on the machine, and second does anyone recognize that error?
I think mean Xcode 4 does run, but can't build your project since that error message is from the linker at the last stage of building your project.
Here's a much easier way to install Xcode 3 on Lion: http://anatomicwax.tumblr.com/post/8064949186/installing-xcode-3-2-6-on-lion-redux
Make sure you install it to a different folder named other than Developer. Xcode 4 may go out of its way to find /Developer and remove it. I named mine /Xcode3.

Compiling libogg using Xcode 4

I've just downloaded libogg from http://www.xiph.org/downloads/ (http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz) and I'm now trying to compile the Ogg.xcodeproj project provided in that package. When I try to build, I get the following error:
The run destination My Mac 64-bit is not valid for Running the scheme 'Ogg'.
The scheme 'Ogg' contains no buildables that can be built for the SDKs supported by the run destination My Mac 64-bit. Make sure your targets all specify SDKs that are supported by this version of Xcode.
I get a similar error if I attempt to build the static library instead of the framework:
The run destination My Mac 64-bit is not valid for Running the scheme 'libogg (static)'.
The scheme 'libogg (static)' contains no buildables that can be built for the SDKs supported by the run destination My Mac 64-bit. Make sure your targets all specify SDKs that are supported by this version of Xcode.
Again, this is just opening the project in Xcode 4.3.2 for the first time and attempting to build. I've made no changes to the project file at all.
Can anyone point me in the direction of a solution to get this to compile?
In my case, the Xcode project was linking against an old SDK on an old architecture (OS X 10.5 PPC, whereas I have OS X 10.8 Mountain Lion x64).
To fix this in Xcode 5, select the top-level project in Xcode (the top-most node in the project folder pane, with the blue "A" icon) followed by the Project. Change Architectures to something suitable for your current system, such as Native Architecture of Build machine and change Base SDK to an SDK currently installed in your Xcode environment, such as OS X 10.8.
Here is a screenshot of my project to help you find those settings (following the highlighted parts: kisshelper > kisshelper > Architectures):

Xcode app version not compatible with Mac OS X version

am using Os X 10.6.4 and X code Version 3.2.3 for developing some simple app files and using PackageMaker to distribute these app files. But when trying to run the package on some other mac I am getting error that the package is not compatible with the Os X its running and file would not be installed. Is this a problem with X code or package maker. sorry for reposting it but although I tried changing base SDK to 10.5, it was getting compiled and ran well on mac I am using for development (Mac OS X 10.6.4) but when installed on mac running OS X 10.5 the .app files were grayed out and message poped up saying 'you cannot use this version of application with this version of Mac'. Any idea why is this happening? Also as mentioned earlier I am using IBOutlet for accepting user date from form and then writing that into a text file. Any idea or solution about it?
Do you have anything set in your Info.plist for the LSMinimumSystemVersion key? This is one place the system looks.
When I was brand new I had trouble figuring this out...
Make sure that your Base SDK and deployment target are 10.5 and that you have the right compiler on(GCG4.0/4.2), also make sure that when you change these settings you change it for both Release and Debug, I once made this mistake of changing it only on debug, and when I built for release it only worked on 10.6 because I didn't change those settings.