add tests ios app

This commit is contained in:
Salakar 2018-08-25 13:38:31 +01:00
parent e56bf3aae9
commit 7b744cb958
15 changed files with 2275 additions and 0 deletions

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AD_UNIT_ID_FOR_BANNER_TEST</key>
<string>ca-app-pub-3940256099942544/2934735716</string>
<key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
<string>ca-app-pub-3940256099942544/4411468910</string>
<key>CLIENT_ID</key>
<string>305229645282-9i07a33r4sj2fmrshnmh8jkh52dgpdve.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.305229645282-9i07a33r4sj2fmrshnmh8jkh52dgpdve</string>
<key>API_KEY</key>
<string>AIzaSyAcdVLG5dRzA1ck_fa_xd4Z0cY7cga7S5A</string>
<key>GCM_SENDER_ID</key>
<string>305229645282</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.testing</string>
<key>PROJECT_ID</key>
<string>rnfirebase-b9ad4</string>
<key>STORAGE_BUCKET</key>
<string>rnfirebase-b9ad4.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<true></true>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<false></false>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:305229645282:ios:af36d4d29a83e04c</string>
<key>DATABASE_URL</key>
<string>https://rnfirebase-b9ad4.firebaseio.com</string>
</dict>
</plist>

51
tests/ios/Podfile Normal file
View File

@ -0,0 +1,51 @@
install! 'cocoapods', :deterministic_uuids => false
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
target 'testing' do
platform :ios, '9.0'
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
react_native_path = "../node_modules/react-native"
pod "yoga", :path => "#{react_native_path}/ReactCommon/yoga"
# Pods for ReactNativeFirebaseDemo
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'RCTText',
'RCTNetwork',
'RCTWebSocket',
]
pod 'Firebase/AdMob', '~> 5.6.0'
pod 'Firebase/Auth', '~> 5.6.0'
pod 'Firebase/Core', '~> 5.6.0'
pod 'Firebase/Database', '~> 5.6.0'
pod 'Firebase/Functions', '~> 5.6.0'
pod 'Firebase/DynamicLinks', '~> 5.6.0'
pod 'Firebase/Firestore', '~> 5.6.0'
pod 'Firebase/Invites', '~> 5.6.0'
pod 'Firebase/Messaging', '~> 5.6.0'
pod 'Firebase/RemoteConfig', '~> 5.6.0'
pod 'Firebase/Storage', '~> 5.6.0'
pod 'Firebase/Performance', '~> 5.6.0'
pod 'Fabric', '~> 1.7.11'
pod 'Crashlytics', '~> 3.10.7'
pod 'RNFirebase', :path => '../../ios/RNFirebase.podspec'
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
if target.name == 'yoga'
target.build_configurations.each do |config|
config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'NO'
config.build_settings['GCC_WARN_64_TO_32_BIT_CONVERSION'] = 'NO'
end
end
end
end
end

352
tests/ios/Podfile.lock Normal file
View File

@ -0,0 +1,352 @@
PODS:
- BoringSSL (10.0.6):
- BoringSSL/Implementation (= 10.0.6)
- BoringSSL/Interface (= 10.0.6)
- BoringSSL/Implementation (10.0.6):
- BoringSSL/Interface (= 10.0.6)
- BoringSSL/Interface (10.0.6)
- Crashlytics (3.10.7):
- Fabric (~> 1.7.11)
- Fabric (1.7.11)
- Firebase/AdMob (5.6.0):
- Firebase/Core
- Google-Mobile-Ads-SDK (= 7.31.0)
- Firebase/Auth (5.6.0):
- Firebase/CoreOnly
- FirebaseAuth (= 5.0.3)
- Firebase/Core (5.6.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 5.1.1)
- Firebase/CoreOnly (5.6.0):
- FirebaseCore (= 5.1.1)
- Firebase/Database (5.6.0):
- Firebase/CoreOnly
- FirebaseDatabase (= 5.0.2)
- Firebase/DynamicLinks (5.6.0):
- Firebase/Core
- FirebaseDynamicLinks (= 3.0.2)
- Firebase/Firestore (5.6.0):
- Firebase/CoreOnly
- FirebaseFirestore (= 0.13.1)
- Firebase/Functions (5.6.0):
- Firebase/CoreOnly
- FirebaseFunctions (= 2.1.0)
- Firebase/Invites (5.6.0):
- Firebase/Core
- FirebaseInvites (= 3.0.0)
- Firebase/Messaging (5.6.0):
- Firebase/CoreOnly
- FirebaseMessaging (= 3.1.0)
- Firebase/Performance (5.6.0):
- Firebase/Core
- FirebasePerformance (= 2.1.1)
- Firebase/RemoteConfig (5.6.0):
- Firebase/Core
- FirebaseRemoteConfig (= 3.0.1)
- Firebase/Storage (5.6.0):
- Firebase/CoreOnly
- FirebaseStorage (= 3.0.0)
- FirebaseABTesting (2.0.0):
- FirebaseCore (~> 5.0)
- Protobuf (~> 3.5)
- FirebaseAnalytics (5.1.1):
- FirebaseCore (~> 5.1)
- FirebaseInstanceID (~> 3.2)
- GoogleAppMeasurement (~> 5.1)
- GoogleUtilities/AppDelegateSwizzler (~> 5.2.0)
- GoogleUtilities/MethodSwizzler (~> 5.2.0)
- GoogleUtilities/Network (~> 5.2)
- "GoogleUtilities/NSData+zlib (~> 5.2)"
- nanopb (~> 0.3)
- FirebaseAuth (5.0.3):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 5.0)
- GoogleUtilities/Environment (~> 5.2)
- GTMSessionFetcher/Core (~> 1.1)
- FirebaseAuthInterop (1.0.0)
- FirebaseCore (5.1.1):
- GoogleUtilities/Logger (~> 5.2)
- FirebaseDatabase (5.0.2):
- FirebaseCore (~> 5.0)
- leveldb-library (~> 1.18)
- FirebaseDynamicLinks (3.0.2):
- FirebaseAnalytics (~> 5.1)
- FirebaseFirestore (0.13.1):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 5.0)
- FirebaseFirestore/abseil-cpp (= 0.13.1)
- gRPC-ProtoRPC (~> 1.0)
- leveldb-library (~> 1.18)
- nanopb (~> 0.3.8)
- Protobuf (~> 3.1)
- FirebaseFirestore/abseil-cpp (0.13.1):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 5.0)
- gRPC-ProtoRPC (~> 1.0)
- leveldb-library (~> 1.18)
- nanopb (~> 0.3.8)
- Protobuf (~> 3.1)
- FirebaseFunctions (2.1.0):
- FirebaseCore (~> 5.0)
- GTMSessionFetcher/Core (~> 1.1)
- FirebaseInstanceID (3.2.1):
- FirebaseCore (~> 5.1)
- GoogleUtilities/Environment (~> 5.2)
- FirebaseInvites (3.0.0):
- FirebaseAnalytics (~> 5.0)
- FirebaseDynamicLinks (~> 3.0)
- GoogleAPIClientForREST (~> 1.0)
- GoogleSignIn (~> 4.1)
- GoogleToolboxForMac/Logger (~> 2.1)
- "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)"
- "GoogleToolboxForMac/NSString+URLArguments (~> 2.1)"
- GoogleToolboxForMac/StringEncoding (~> 2.1)
- GoogleToolboxForMac/URLBuilder (~> 2.1)
- GTMOAuth2 (~> 1.0)
- GTMSessionFetcher/Core (~> 1.1)
- GTMSessionFetcher/Full (~> 1.1)
- Protobuf (~> 3.5)
- FirebaseMessaging (3.1.0):
- FirebaseCore (~> 5.0)
- FirebaseInstanceID (~> 3.0)
- GoogleUtilities/Reachability (~> 5.2)
- Protobuf (~> 3.1)
- FirebasePerformance (2.1.1):
- FirebaseAnalytics (~> 5.1)
- FirebaseInstanceID (~> 3.2)
- GoogleToolboxForMac/Logger (~> 2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- GoogleUtilities/ISASwizzler (~> 5.2.0)
- GoogleUtilities/MethodSwizzler (~> 5.2.0)
- GTMSessionFetcher/Core (~> 1.1)
- Protobuf (~> 3.5)
- FirebaseRemoteConfig (3.0.1):
- FirebaseABTesting (~> 2.0)
- FirebaseAnalytics (~> 5.1)
- FirebaseCore (~> 5.1)
- FirebaseInstanceID (~> 3.2)
- GoogleUtilities/Environment (~> 5.2)
- "GoogleUtilities/NSData+zlib (~> 5.2)"
- Protobuf (~> 3.5)
- FirebaseStorage (3.0.0):
- FirebaseCore (~> 5.0)
- GTMSessionFetcher/Core (~> 1.1)
- Google-Mobile-Ads-SDK (7.31.0)
- GoogleAPIClientForREST (1.3.6):
- GoogleAPIClientForREST/Core (= 1.3.6)
- GTMSessionFetcher (>= 1.1.7)
- GoogleAPIClientForREST/Core (1.3.6):
- GTMSessionFetcher (>= 1.1.7)
- GoogleAppMeasurement (5.1.1):
- GoogleUtilities/AppDelegateSwizzler (~> 5.2.0)
- GoogleUtilities/MethodSwizzler (~> 5.2.0)
- GoogleUtilities/Network (~> 5.2)
- "GoogleUtilities/NSData+zlib (~> 5.2)"
- nanopb (~> 0.3)
- GoogleSignIn (4.2.0):
- "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)"
- "GoogleToolboxForMac/NSString+URLArguments (~> 2.1)"
- GTMOAuth2 (~> 1.0)
- GTMSessionFetcher/Core (~> 1.1)
- GoogleToolboxForMac/Core (2.1.4):
- GoogleToolboxForMac/Defines (= 2.1.4)
- GoogleToolboxForMac/DebugUtils (2.1.4):
- GoogleToolboxForMac/Defines (= 2.1.4)
- GoogleToolboxForMac/Defines (2.1.4)
- GoogleToolboxForMac/Logger (2.1.4):
- GoogleToolboxForMac/Defines (= 2.1.4)
- "GoogleToolboxForMac/NSData+zlib (2.1.4)":
- GoogleToolboxForMac/Defines (= 2.1.4)
- "GoogleToolboxForMac/NSDictionary+URLArguments (2.1.4)":
- GoogleToolboxForMac/DebugUtils (= 2.1.4)
- GoogleToolboxForMac/Defines (= 2.1.4)
- "GoogleToolboxForMac/NSString+URLArguments (= 2.1.4)"
- "GoogleToolboxForMac/NSString+URLArguments (2.1.4)"
- GoogleToolboxForMac/StringEncoding (2.1.4):
- GoogleToolboxForMac/Defines (= 2.1.4)
- GoogleToolboxForMac/URLBuilder (2.1.4):
- GoogleToolboxForMac/Core (= 2.1.4)
- GoogleToolboxForMac/Defines (= 2.1.4)
- "GoogleToolboxForMac/NSDictionary+URLArguments (= 2.1.4)"
- "GoogleToolboxForMac/NSString+URLArguments (= 2.1.4)"
- GoogleUtilities/AppDelegateSwizzler (5.2.2):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (5.2.2)
- GoogleUtilities/ISASwizzler (5.2.2)
- GoogleUtilities/Logger (5.2.2):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (5.2.2):
- GoogleUtilities/Logger
- GoogleUtilities/Network (5.2.2):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (5.2.2)"
- GoogleUtilities/Reachability (5.2.2):
- GoogleUtilities/Logger
- gRPC (1.14.1):
- gRPC-RxLibrary (= 1.14.1)
- gRPC/Main (= 1.14.1)
- gRPC-Core (1.14.1):
- gRPC-Core/Implementation (= 1.14.1)
- gRPC-Core/Interface (= 1.14.1)
- gRPC-Core/Implementation (1.14.1):
- BoringSSL (~> 10.0)
- gRPC-Core/Interface (= 1.14.1)
- nanopb (~> 0.3)
- gRPC-Core/Interface (1.14.1)
- gRPC-ProtoRPC (1.14.1):
- gRPC-ProtoRPC/Main (= 1.14.1)
- gRPC-ProtoRPC/Main (1.14.1):
- gRPC (= 1.14.1)
- gRPC-RxLibrary (= 1.14.1)
- Protobuf (~> 3.0)
- gRPC-RxLibrary (1.14.1)
- gRPC/Main (1.14.1):
- gRPC-Core (= 1.14.1)
- gRPC-RxLibrary (= 1.14.1)
- GTMOAuth2 (1.1.6):
- GTMSessionFetcher (~> 1.1)
- GTMSessionFetcher (1.2.0):
- GTMSessionFetcher/Full (= 1.2.0)
- GTMSessionFetcher/Core (1.2.0)
- GTMSessionFetcher/Full (1.2.0):
- GTMSessionFetcher/Core (= 1.2.0)
- leveldb-library (1.20)
- nanopb (0.3.8):
- nanopb/decode (= 0.3.8)
- nanopb/encode (= 0.3.8)
- nanopb/decode (0.3.8)
- nanopb/encode (0.3.8)
- Protobuf (3.6.1)
- React (0.56.0):
- React/Core (= 0.56.0)
- React/Core (0.56.0):
- yoga (= 0.56.0.React)
- React/fishhook (0.56.0)
- React/RCTBlob (0.56.0):
- React/Core
- React/RCTNetwork (0.56.0):
- React/Core
- React/RCTText (0.56.0):
- React/Core
- React/RCTWebSocket (0.56.0):
- React/Core
- React/fishhook
- React/RCTBlob
- RNFirebase (5.0.0-rc0):
- Firebase/Core
- React
- yoga (0.56.0.React)
DEPENDENCIES:
- Crashlytics (~> 3.10.7)
- Fabric (~> 1.7.11)
- Firebase/AdMob (~> 5.6.0)
- Firebase/Auth (~> 5.6.0)
- Firebase/Core (~> 5.6.0)
- Firebase/Database (~> 5.6.0)
- Firebase/DynamicLinks (~> 5.6.0)
- Firebase/Firestore (~> 5.6.0)
- Firebase/Functions (~> 5.6.0)
- Firebase/Invites (~> 5.6.0)
- Firebase/Messaging (~> 5.6.0)
- Firebase/Performance (~> 5.6.0)
- Firebase/RemoteConfig (~> 5.6.0)
- Firebase/Storage (~> 5.6.0)
- React/Core (from `../node_modules/react-native`)
- React/RCTNetwork (from `../node_modules/react-native`)
- React/RCTText (from `../node_modules/react-native`)
- React/RCTWebSocket (from `../node_modules/react-native`)
- RNFirebase (from `../../ios/RNFirebase.podspec`)
- yoga (from `../node_modules/react-native/ReactCommon/yoga`)
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- BoringSSL
- Crashlytics
- Fabric
- Firebase
- FirebaseABTesting
- FirebaseAnalytics
- FirebaseAuth
- FirebaseAuthInterop
- FirebaseCore
- FirebaseDatabase
- FirebaseDynamicLinks
- FirebaseFirestore
- FirebaseFunctions
- FirebaseInstanceID
- FirebaseInvites
- FirebaseMessaging
- FirebasePerformance
- FirebaseRemoteConfig
- FirebaseStorage
- Google-Mobile-Ads-SDK
- GoogleAPIClientForREST
- GoogleAppMeasurement
- GoogleSignIn
- GoogleToolboxForMac
- GoogleUtilities
- gRPC
- gRPC-Core
- gRPC-ProtoRPC
- gRPC-RxLibrary
- GTMOAuth2
- GTMSessionFetcher
- leveldb-library
- nanopb
- Protobuf
EXTERNAL SOURCES:
React:
:path: "../node_modules/react-native"
RNFirebase:
:path: "../../ios/RNFirebase.podspec"
yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"
SPEC CHECKSUMS:
BoringSSL: e10f92a27043805c01071fe815a5cd98ae8212e7
Crashlytics: ccaac42660eb9351b9960c0d66106b0bcf99f4fa
Fabric: f233c9492b3bbc1f04e3882986740f7988a58edb
Firebase: 75ea9e232eefa158c1049028030b8f661a2ccb62
FirebaseABTesting: 1f50b8d50f5e3469eea54e7463a7b7fe221d1f5e
FirebaseAnalytics: 993577e91157feb40945abedd6ab346d8a4b6ac8
FirebaseAuth: 657a25e4be044d2d333663ebf515a861c5a59cd7
FirebaseAuthInterop: 0ffa57668be100582bb7643d4fcb7615496c41fc
FirebaseCore: cb9ee75e0894def766167c95a4d5a14b1c138269
FirebaseDatabase: 27be5ac5bc75e0b17537b2bbfada8258addcc8cd
FirebaseDynamicLinks: eb41fb20677b0a6e944b47f45cbe59f388e9e5cc
FirebaseFirestore: e953e8e02544cc60372f3787d4c30cb47a691aa7
FirebaseFunctions: 0cb3bc0bbeac1daf6fea378a1064ff7f484e4c4e
FirebaseInstanceID: ea5af6920d0a4a29b40459d055bebe4a6c1333c4
FirebaseInvites: d7534f94d0610b892bac8ee0cf4218a14be46c28
FirebaseMessaging: f67b3719f520ee200da0e20ce577fe2bce0c01d0
FirebasePerformance: e732cd3fe9488c68bf2e9ae7a55672e873d0c55a
FirebaseRemoteConfig: 7b6d675dfb11f0e0e638caee00908b06af150d56
FirebaseStorage: 7ca4bb7b58a25fa647b04f524033fc7cb7eb272b
Google-Mobile-Ads-SDK: 6e529e748b45507a2ca904e0b5a52669ba3920c4
GoogleAPIClientForREST: 5b95b38a0fa912e8ac7bdcf9e124578ef1a61bf2
GoogleAppMeasurement: f7507b39b70ad0bd80b3d81518b2f43868974307
GoogleSignIn: 591e46382014e591269f862ba6e7bc0fbd793532
GoogleToolboxForMac: 91c824d21e85b31c2aae9bb011c5027c9b4e738f
GoogleUtilities: 06b66f9567769a7958db20a92f0128b2843e49d5
gRPC: 65fa2a50c4fd61940b76f4962d75c239c92c6a8d
gRPC-Core: e3ace1e1161e75903135de8d8231bb69c9d35721
gRPC-ProtoRPC: 78f976fc6a1eafc0e1f4965c255c313aa0859b1e
gRPC-RxLibrary: c4c826507ad3c8c8fab6887f153938eb04b86d59
GTMOAuth2: c77fe325e4acd453837e72d91e3b5f13116857b2
GTMSessionFetcher: 0c4baf0a73acd0041bf9f71ea018deedab5ea84e
leveldb-library: 08cba283675b7ed2d99629a4bc5fd052cd2bb6a5
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
Protobuf: 1eb9700044745f00181c136ef21b8ff3ad5a0fd5
React: 1fe0eb13d90b625d94c3b117c274dcfd2e760e11
RNFirebase: 2b25fd2e60269f26bb0a76c71dcc942b35a77df0
yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85
PODFILE CHECKSUM: 33388e8d8d1b7c967a58d636efdd0c9f4d74a9b5
COCOAPODS: 1.5.3

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
BuildableName = "libReact.a"
BlueprintName = "React"
ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "testing.app"
BlueprintName = "testing"
ReferencedContainer = "container:testing.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "exampleTests.xctest"
BlueprintName = "exampleTests"
ReferencedContainer = "container:testing.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "exampleTests.xctest"
BlueprintName = "exampleTests"
ReferencedContainer = "container:testing.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "testing.app"
BlueprintName = "testing"
ReferencedContainer = "container:testing.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "testing.app"
BlueprintName = "testing"
ReferencedContainer = "container:testing.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "testing.app"
BlueprintName = "testing"
ReferencedContainer = "container:testing.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
BuildableName = "libReact.a"
BlueprintName = "React"
ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "testing.app"
BlueprintName = "testing"
ReferencedContainer = "container:testing.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "exampleTests.xctest"
BlueprintName = "exampleTests"
ReferencedContainer = "container:testing.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "exampleTests.xctest"
BlueprintName = "exampleTests"
ReferencedContainer = "container:testing.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "testing.app"
BlueprintName = "testing"
ReferencedContainer = "container:testing.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "testing.app"
BlueprintName = "testing"
ReferencedContainer = "container:testing.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "testing.app"
BlueprintName = "testing"
ReferencedContainer = "container:testing.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
customArchiveName = "testing"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

16
tests/ios/testing/AppDelegate.h Executable file
View File

@ -0,0 +1,16 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (nonatomic, strong) UIWindow *window;
@end

39
tests/ios/testing/AppDelegate.m Executable file
View File

@ -0,0 +1,39 @@
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
//#import <RNFirebaseNotifications.h>
@import Firebase;
@import GoogleSignIn;
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[FIRApp configure];
[GIDSignIn sharedInstance].clientID = [FIRApp defaultApp].options.clientID;
NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"testing"
initialProperties:nil
launchOptions:launchOptions];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
//- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
//fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
// [[RNFirebaseNotifications instance] didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
//}
@end

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="NO">
<dependencies>
<development version="7000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="testing" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>

View File

@ -0,0 +1,53 @@
{
"images": [
{
"idiom": "iphone",
"size": "20x20",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "20x20",
"scale": "3x"
},
{
"idiom": "iphone",
"size": "29x29",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "29x29",
"scale": "3x"
},
{
"idiom": "iphone",
"size": "40x40",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "40x40",
"scale": "3x"
},
{
"idiom": "iphone",
"size": "60x60",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "60x60",
"scale": "3x"
},
{
"idiom": "ios-marketing",
"size": "1024x1024",
"scale": "1x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

64
tests/ios/testing/Info.plist Executable file
View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.17067372085-siujfe334vool17t2mtrmjrsgl81nhd9</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>location</string>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>

18
tests/ios/testing/main.m Executable file
View File

@ -0,0 +1,18 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.testing</string>
</array>
</dict>
</plist>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@ -0,0 +1,70 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import <React/RCTLog.h>
#import <React/RCTRootView.h>
#define TIMEOUT_SECONDS 600
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
@interface exampleTests : XCTestCase
@end
@implementation exampleTests
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
{
if (test(view)) {
return YES;
}
for (UIView *subview in [view subviews]) {
if ([self findSubviewInView:subview matching:test]) {
return YES;
}
}
return NO;
}
- (void)testRendersWelcomeScreen
{
UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
BOOL foundElement = NO;
__block NSString *redboxError = nil;
RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
if (level >= RCTLogLevelError) {
redboxError = message;
}
});
while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
return YES;
}
return NO;
}];
}
RCTSetLogFunction(RCTDefaultLogFunction);
XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
}
@end