f111fei / react-native-unity-demo

103 stars 80 forks source link

UnityView dismissal #34

Closed cnagy closed 5 years ago

cnagy commented 5 years ago

There's no way to dismiss the UnityView from JS.

saudahmed commented 5 years ago

@cnagy Have you been easily able to run this project both on android and iOS. can you tell me your development environment. Which problems you encountered while executing, can you share your thoughts on this. I have just created an issue about it.

cnagy commented 5 years ago

Sorted out. Sorry, was my bad.

cnagy commented 5 years ago

@cnagy Have you been easily able to run this project both on android and iOS. can you tell me your development environment. Which problems you encountered while executing, can you share your thoughts on this. I have just created an issue about it.

I'm building it only for iOS > 10. The project downloaded as it is, is having a lot of build errors, you have to solve them in Xcode. For example you have to add -framework AVKit to the UnityConfig.xcconfig, or the exported Unity Data folder in Xcode is linked to the authors local path, which obviously wont work on your computer, the RCTLinkingManager needs all the parameters nullable:

@interface RCTLinkingManager : RCTEventEmitter

+ (BOOL)application:(nullable UIApplication *)app
            openURL:(nullable NSURL *)URL
            options:(nullable NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options;

+ (BOOL)application:(nullable UIApplication *)application
            openURL:(nullable NSURL *)URL
  sourceApplication:(nullable NSString *)sourceApplication
         annotation:(nullable id)annotation;

+ (BOOL)application:(nullable UIApplication *)application
continueUserActivity:(nullable NSUserActivity *)userActivity
  restorationHandler:(nullable void (^)(NSArray * __nullable))restorationHandler;

@end

So patience and keep having fun. My Xcode is version 10.2 (10E125), Unity is version: 2018.3.71f