react-native-qqsdk icon indicating copy to clipboard operation
react-native-qqsdk copied to clipboard

Readme iOS manual setup contains bad code

Open cjohnweb opened this issue 5 years ago • 1 comments

Hello, I am trying to use the resolveAssetSource function in my react native project. I've newly installed everything, including xcode. I followed the instructions in your README file but I'm running into issues.

  1. In step #5, libstdc++.tbd does not exist. Is this required? What do I do?
  2. Step #8 is not clear. "add LSApplicationQueriesSchemes For QQ SDK". So it's not an option that exists already, but something I must add, as a type array, and then populate it with all the options listed in the image?
  3. Step #9 says "add following code to your AppDelegate.m" Googled, found this: https://stackoverflow.com/questions/46787801/cant-find-appdelegate-m-in-xcode. So I added my code to AppDelegate.h:
#import <React/RCTLinkingManager.h>
 
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
  return [RCTLinkingManager application:application openURL:url
                      sourceApplication:sourceApplication annotation:annotation];
}

But now xcode throws error after error, recommends fixes that only make more errors. It doesn't like the - (BOOL). I'm not entirely sure what I am doing here. This file already has code in it, can I just plop this code at the bottom of the file, can you add some specificity to this?

I'd much prefer a simpler solution, but this seems to be necessary. Your work is greatly appreciated!

Thank you

cjohnweb avatar Feb 26 '20 01:02 cjohnweb

AppDeleate.h is like so prior to editing:

/**
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>

@property (nonatomic, strong) UIWindow *window;

@end

cjohnweb avatar Feb 26 '20 01:02 cjohnweb