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

Deep link ios partial comlpetion, the changes have been made for deep … #280

Merged
merged 3 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.acceptSuggestionOnEnter": "on"
}
49 changes: 49 additions & 0 deletions __tests__/GitHub-SignIn.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import React from 'react';
import { render, fireEvent, waitFor } from '@testing-library/react-native';

Check failure on line 2 in __tests__/GitHub-SignIn.tsx

View workflow job for this annotation

GitHub Actions / build (16.x)

'waitFor' is defined but never used
import AuthScreen from '../src/screens/AuthScreen/AuthScreen';
// Mocking modules used in AuthScreen
jest.mock('react-native-device-info', () => ({
getUniqueId: jest.fn(() => 'mockedDeviceId'),
}));

jest.mock('../../utils/dataStore', () => ({
storeData: jest.fn(),
}));

jest.mock('react-native-toast-message', () => ({
Toast: {
show: jest.fn(),
},
}));

jest.mock('react-native-camera-kit', () => ({
CameraScreen: 'CameraScreen',
}));

jest.mock('react-native-walkthrough-tooltip', () => 'Tooltip');

describe('AuthScreen', () => {
it('renders correctly', () => {
const { getByText } = render(<AuthScreen />);

expect(getByText('Welcome to')).toBeTruthy();
expect(getByText('Real Dev Squad')).toBeTruthy();
// Add more assertions based on your UI
});

it('handles sign in with GitHub', () => {
const { getByText } = render(<AuthScreen />);

// Mocking Linking.openURL
jest.spyOn(global, 'Linking').mockImplementation(() => ({
openURL: jest.fn(),
}));

fireEvent.press(getByText('Sign in with GitHub'));

// Ensure Linking.openURL is called with the correct URL
expect(global.Linking.openURL).toHaveBeenCalledWith(expect.stringContaining('https://github.com/'));
});

// Add more tests for other functionalities as needed
});
10 changes: 8 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ PODS:
- React-Core
- react-native-safe-area-context (3.4.1):
- React-Core
- react-native-webview (11.26.1):
- react-native-webview (13.6.0):
- React-Core
- React-perflogger (0.67.0)
- React-RCTActionSheet (0.67.0):
Expand Down Expand Up @@ -363,6 +363,8 @@ PODS:
- React-Core
- RNGestureHandler (1.10.3):
- React-Core
- RNKeychain (8.1.2):
- React-Core
- RNReanimated (2.17.0):
- DoubleConversion
- FBLazyVector
Expand Down Expand Up @@ -461,6 +463,7 @@ DEPENDENCIES:
- "RNCMaskedView (from `../node_modules/@react-native-masked-view/masked-view`)"
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNKeychain (from `../node_modules/react-native-keychain`)
- RNReanimated (from `../node_modules/react-native-reanimated`)
- RNScreens (from `../node_modules/react-native-screens`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
Expand Down Expand Up @@ -562,6 +565,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-device-info"
RNGestureHandler:
:path: "../node_modules/react-native-gesture-handler"
RNKeychain:
:path: "../node_modules/react-native-keychain"
RNReanimated:
:path: "../node_modules/react-native-reanimated"
RNScreens:
Expand Down Expand Up @@ -605,7 +610,7 @@ SPEC CHECKSUMS:
react-native-date-picker: 04e866ba4e7857f83abd504ad42e787f0f02ae00
react-native-image-picker: 60f4246eb5bb7187fc15638a8c1f13abd3820695
react-native-safe-area-context: 9e40fb181dac02619414ba1294d6c2a807056ab9
react-native-webview: 9f111dfbcfc826084d6c507f569e5e03342ee1c1
react-native-webview: 669ae162965f629a8d6a4bdd3b99a304d36ef1f2
React-perflogger: 9454d63e7027e0830fa3e527628558160684f5dd
React-RCTActionSheet: 240d798e2f5bd1ba2e85503a00fd390f560e6827
React-RCTAnimation: 0ebf0df36838057097b8c6a30d1036531f8c7b1e
Expand All @@ -623,6 +628,7 @@ SPEC CHECKSUMS:
RNCMaskedView: 949696f25ec596bfc697fc88e6f95cf0c79669b6
RNDeviceInfo: 5795b418ed3451ebcaf39384e6cf51f60cb931c9
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
RNKeychain: a65256b6ca6ba6976132cc4124b238a5b13b3d9c
RNReanimated: 953281675307b83d2c12ac4c39e6c3415d0ce248
RNScreens: b21dc57dfa2b710c30ec600786a3fc223b1b92e7
Yoga: 3f5bfc54ce164fcd5b5d7f9f4232182d6298dd56
Expand Down
10 changes: 9 additions & 1 deletion ios/RDSApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
00E356EE1AD99517003FC87E /* RDSAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RDSAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* RDSAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RDSAppTests.m; sourceTree = "<group>"; };
0A924FF82ACC1F66000FCCDA /* RDSAppRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = RDSAppRelease.entitlements; path = RDSApp/RDSAppRelease.entitlements; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* RDSApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RDSApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = RDSApp/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = RDSApp/AppDelegate.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -86,6 +87,7 @@
13B07FAE1A68108700A75B9A /* RDSApp */ = {
isa = PBXGroup;
children = (
0A924FF82ACC1F66000FCCDA /* RDSAppRelease.entitlements */,
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
13B07FB01A68108700A75B9A /* AppDelegate.m */,
13B07FB51A68108700A75B9A /* Images.xcassets */,
Expand Down Expand Up @@ -145,7 +147,6 @@
E3224A6A91E841AC005BE238 /* Pods-RDSApp-RDSAppTests.debug.xcconfig */,
4A3C23DA4575D9C6CC0EB901 /* Pods-RDSApp-RDSAppTests.release.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -485,6 +486,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 3S25RJ7VWK;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = RDSApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -510,7 +512,11 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = RDSApp/RDSAppRelease.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = RDSApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -522,7 +528,9 @@
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
"PRODUCT_BUNDLE_IDENTIFIER[sdk=iphoneos*]" = org.reactjs.native.example.RDSAppTest;
PRODUCT_NAME = RDSApp;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
Expand Down
47 changes: 46 additions & 1 deletion ios/RDSApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,35 @@
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>org.reactjs.native.example.RDSApp</string>
<key>CFBundleURLSchemes</key>
<array>
<string>RDSapp</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string></string>
<key>CFBundleURLSchemes</key>
<array/>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string></string>
<key>CFBundleURLSchemes</key>
<array/>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand All @@ -28,10 +57,26 @@
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<key>applinks:https://my.realdevsquad.com/</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
<key>applinks:https://realdevsquad.com/</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
<key>applinks:https://www.realdevsquad.com/</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
</dict>
</dict>
Expand Down
12 changes: 12 additions & 0 deletions ios/RDSApp/RDSAppRelease.entitlements
Original file line number Diff line number Diff line change
@@ -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>com.apple.developer.associated-domains</key>
<array>
<string>applinks:realdevsquad.com/</string>
<string>applinks:www.realdevsquad.com/</string>
<string>applinks:my.realdevsquad.com/</string>
</array>
</dict>
</plist>
Loading