Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Objective-C alternative for InitArgs(CommandLine.argc, CommandLine.unsafeArgv) #47

Closed
TarekMedhat opened this issue Sep 17, 2019 · 2 comments · Fixed by #62
Closed

Objective-C alternative for InitArgs(CommandLine.argc, CommandLine.unsafeArgv) #47

TarekMedhat opened this issue Sep 17, 2019 · 2 comments · Fixed by #62

Comments

@TarekMedhat
Copy link

What is the objective-c alternative for those 2 steps ?

  1. Add this to your Runner/Runner/Runner-Bridging-Header.h
    #import "UnityUtils.h"
    Add to AppDelegate.swift before the GeneratePluginRegistrant call:
    InitArgs(CommandLine.argc, CommandLine.unsafeArgv)
@juicycleff
Copy link
Owner

@TarekMedhat please clarify your questions. Those are objective-c code

@TarekMedhat
Copy link
Author

Hi @juicycleff, I'm aware that InitArgs is an Objective-c method and that we are accessing it through Appdelegate.swift by importing it using the bridging header.
But what if my project is in objective-C and the appdelegate is written in objective-c instead of swift (Appdelegate.h & appdelegate.m), how can I call initArg in objective-c and access the commandline argc &argv to pass them as parameters ?
Sorry I've a basic knowledge of ios and Objective-c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants