Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8341823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:35:57+00:00 2026-06-09T05:35:57+00:00

I’m trying to quickly test what kind of results I’d get using SecureUDID before

  • 0

I’m trying to quickly test what kind of results I’d get using SecureUDID before I can use in my Xcode project. In this case I’m using CodeRunner but I’ve never compiled obj-c code outside of Xcode. I’ve attached the error I’m getting when using the default compilation flag CodeRunner provides for Obj-c files. I’ve experimented with compilation flag options inspired from the answer for this questions but still getting essentially the same error. What compilation flags should I be using? Are there any good resources to learn how to compile obj-c outside of Xcode? Please help thanks!

enter image description here

Update: It looks like I need to add UIKit and maybe others to the compilation flags now?

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:35:59+00:00Added an answer on June 9, 2026 at 5:35 am

    I agree with Mattia, Xcode is probably the best way to go, however: CHALLENGE ACCEPTED.


    First, let’s get CodeRunner to compile with UIKit. In the CodeRunner preferences, duplicate the Objective-C language and name it something like “iOS”. I’m using the command that Xcode uses (which you can find in the Log Navigator) as a template. This is also what Mattia was talking about. Set the Compilation Flags to something like this:

    -arch i386 -fmessage-length=0 -std=c99 -fpascal-strings -O0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -fexceptions -fasm-blocks -g -fvisibility=hidden -fobjc-abi-version=2 -fobjc-legacy-dispatch -mios-simulator-version-min=5.1 -framework Foundation -framework UIKit -F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks

    Note the iPhoneSimulator5.1.sdk path and -mios-simulator-version-min=5.1 flag. You may need to change these for your own system and versions.

    To start, try using the following iOS code (you can also make this your template in the preferences):

    #import <Foundation/Foundation.h>
    #import <UIKit/UIKit.h>
    
    @interface AppDelegate : NSObject <UIApplicationDelegate>
    
    @property (nonatomic, retain) UIWindow * window;
    @property (nonatomic, retain) UIViewController * viewController;
    
    @end
    
    @implementation AppDelegate
    
    @synthesize window = _window;
    @synthesize viewController = _viewController;
    
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
        self.viewController = [[[UIViewController alloc] initWithNibName:nil bundle:nil] autorelease];
        self.viewController.view.backgroundColor = [UIColor orangeColor];
        UILabel * label = [[UILabel alloc] initWithFrame:self.viewController.view.bounds];
        label.font = [UIFont boldSystemFontOfSize:48.0];
        label.textColor = [UIColor whiteColor];
        label.backgroundColor = [UIColor clearColor];
        label.textAlignment = UITextAlignmentCenter;
        label.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
        label.text = @"Hello World";
        [self.viewController.view addSubview:label];
        [label release];
    
        self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease];
        self.window.rootViewController = self.viewController;
        [self.window makeKeyAndVisible];
    
        return YES;
    }
    
    @end
    
    int main(int argc, char *argv[]) {
        @autoreleasepool {
            UIApplicationMain(argc, argv, nil, @"AppDelegate");
        }
    }
    

    If you try to run, it should compile, however the application will crash with this error:

    dyld: Library not loaded: /System/Library/Frameworks/UIKit.framework/UIKit

    This is because you’re trying to run an iOS app on a Mac, which doesn’t have UIKit available; it needs to run in the simulator. Back in the preferences, change Run Command to:

    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator -SimulateApplication $PWD/$compiler

    Now run the same code. The iOS Simulator should launch and you should see an orange screen with “Hello World”:

    Hello World

    Now to get it to work with SecureUDID. You’ll need to save the code somewhere. Now copy the SecureUDID .h and .m files into the same folder as the saved code. Add #import "SecureUDID.h" to the top of the file, change the font size to 14.0, and change @"Hello World" to [SecureUDID UDIDForDomain:@"com.example.test" usingKey:@"abcdefg"]. If you run the code, it will complain that it can’t find the SecureUDID symbols, as you were seeing. We’ll need to add “SecureUDID.m” to the Compilation Flags. So you can reuse the iOS language in CodeRunner, you can add this to the flags in Custom Run, however you’ll need to deal with that modal view each time you want to run.

    And there you go:

    SecureUDID

    Unfortunately, logging will not appear in the CodeRunner console, but you can open up the Mac app, Console, to see them. I’m also getting some extra black padding. Not yet sure what I’m doing wrong to get that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.