How can I use iOS Libraries?

mze
Fri, 13 Jun 2014 12:11:58 +0000
Mobile

I’m using a mac to write a game for iOS, I’m trying to use UIKit from xCode however when I import the framework I receive the error that it can’t be found. "Shell Script Invocation Error ‘UIKit/UIAlertView.h’ file not found. Someone asked a similar question and was referred to the unreal source code build.cs, I took my build.cs from there but I can’t see what I’m missing.

In my .cpp class I have:

#include "MyProject2.h"
#include "BasicHUD.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIAlertView.h> // Error here:  "Shell Script Invocation Error 'UIKit/UIAlertView.h' file not found

ABasicHUD::ABasicHUD(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
}

void ABasicHUD::ShowAlert(){
    NSString *string = [[NSString alloc]init];
    UIAlertView *alert = [[UIAlertView alloc]init];
}

My build.cs looks like this:

using UnrealBuildTool;

public class MyProject2 : ModuleRules
{
    public MyProject2(TargetInfo Target)
    {

        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });

        if (Target.Platform == UnrealTargetPlatform.IOS)
	    {
            PublicIncludePaths.AddRange(new string[] {"Runtime/Core/Public/Apple", "Runtime/Core/Public/IOS"});
		    AddThirdPartyPrivateStaticDependencies( Target, "zlib" );
		    PublicFrameworks.AddRange(new string[] { "UIKit", "AudioToolbox", "AVFoundation", "GameKit", "StoreKit", "CoreVideo", "CoreMedia", "CoreMotion"});

	    }
    }
}

5 posts - 1 participant