@@ -451,7 +451,7 @@ Pod::Spec.new do |s|
451
451
s .requires_arc = true
452
452
453
453
s .dependency \\" React\\ "
454
-
454
+ s . dependency ' AFNetworking ' , '~> 3.0'
455
455
# s.dependency \\"... \\"
456
456
end
457
457
@@ -474,6 +474,7 @@ content:
474
474
--------
475
475
#import \\"AliceBobbi .h \\"
476
476
477
+ #import <AFNetworking /AFNetworking .h >
477
478
478
479
@implementation AliceBobbi
479
480
@@ -482,7 +483,13 @@ RCT_EXPORT_MODULE()
482
483
RCT_EXPORT_METHOD (sampleMethod :(NSString *)stringArgument numberParameter :(nonnull NSNumber *)numberArgument callback :(RCTResponseSenderBlock )callback )
483
484
{
484
485
// TODO: Implement some actually useful functionality
485
- callback(@[[NSString stringWithFormat : @\\" numberArgument: %@ stringArgument: %@\\ " , numberArgument , stringArgument ]]);
486
+ AFHTTPSessionManager * manager = [AFHTTPSessionManager manager ];
487
+ manager .responseSerializer .acceptableContentTypes = [NSSet setWithObject :@\\" text/plain\\ " ];
488
+ [manager GET :@\\" https://httpstat.us/200\\ " parameters :nil progress :nil success :^ (NSURLSessionTask * task , id responseObject ) {
489
+ callback(@[[NSString stringWithFormat : @\\" numberArgument: %@ stringArgument: %@ resp: %@\\ " , numberArgument , stringArgument , responseObject ]]);
490
+ } failure : ^(NSURLSessionTask *operation , NSError *error ) {
491
+ callback (@[[NSString stringWithFormat : @\\"numberArgument : %@ stringArgument : %@ err : %@\\", numberArgument , stringArgument , error ]]);
492
+ }];
486
493
}
487
494
488
495
@end
@@ -782,6 +789,8 @@ content:
782
789
" * execa.commandSync command: react-native init test-demo --version [email protected] options: {\\ " cwd \\" :\\ " ./ react - native - alice - bobbi \\" ,\\ " stdio \\" :\\ " inherit \\" }
783
790
" ,
784
791
" * ensureDir dir: react-native-alice-bobbi/scripts/
792
+ " ,
793
+ " * ensureDir dir: react-native-alice-bobbi/test-demo/ios/
785
794
" ,
786
795
" * ensureDir dir: react-native-alice-bobbi/test-demo/
787
796
" ,
@@ -900,6 +909,43 @@ content:
900
909
removeLibraryNpmIgnorePaths(npmIgnorePath, libraryNodeModulesPath);
901
910
})();
902
911
912
+ <<<<<<<< ======== >>>>>>>>
913
+ ",
914
+ "* outputFile name: react-native-alice-bobbi/test-demo/ios/Podfile
915
+ content:
916
+ --------
917
+ platform :ios, '10.0'
918
+
919
+ target 'test-demo' do
920
+ rn_path = '../node_modules/react-native'
921
+
922
+ pod 'yoga', path: \\ "#{ rn_path } /ReactCommon/yoga/yoga.podspec\\ "
923
+ pod 'DoubleConversion', :podspec => \\ "#{ rn_path } /third-party-podspecs/DoubleConversion.podspec\\ "
924
+ pod 'Folly', :podspec => \\ "#{ rn_path } /third-party-podspecs/Folly.podspec\\ "
925
+ pod 'glog', :podspec => \\ "#{ rn_path } /third-party-podspecs/GLog.podspec\\ "
926
+ pod 'React', path: rn_path, subspecs: [
927
+ 'Core',
928
+ 'CxxBridge',
929
+ 'RCTAnimation',
930
+ 'RCTActionSheet',
931
+ 'RCTImage',
932
+ 'RCTLinkingIOS',
933
+ 'RCTNetwork',
934
+ 'RCTSettings',
935
+ 'RCTText',
936
+ 'RCTVibration',
937
+ 'RCTWebSocket',
938
+ 'RCTPushNotification',
939
+ 'RCTCameraRoll',
940
+ 'RCTSettings',
941
+ 'RCTBlob',
942
+ 'RCTGeolocation',
943
+ 'DevSupport'
944
+ ]
945
+
946
+ pod 'react-native-alice-bobbi', :path => '../../react-native-alice-bobbi.podspec'
947
+ end
948
+
903
949
<<<<<<<< ======== >>>>>>>>
904
950
",
905
951
"* outputFile name: react-native-alice-bobbi/test-demo/App.js
0 commit comments